[INFO] fetching crate gdnative-bindings-lily 0.9.3... [INFO] checking gdnative-bindings-lily-0.9.3 against master#350d0ef0ec0493e6d21cfb265cb8211a0e74d766 for pr-145342-1 [INFO] extracting crate gdnative-bindings-lily 0.9.3 into /workspace/builds/worker-2-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-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate gdnative-bindings-lily 0.9.3 on toolchain 350d0ef0ec0493e6d21cfb265cb8211a0e74d766 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+350d0ef0ec0493e6d21cfb265cb8211a0e74d766" "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" "+350d0ef0ec0493e6d21cfb265cb8211a0e74d766" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 67 packages to latest compatible versions [INFO] [stderr] Adding bitflags v1.3.2 (available: v2.9.3) [INFO] [stderr] Adding gdnative-core v0.9.3 (available: v0.11.3) [INFO] [stderr] Adding gdnative-sys v0.9.3 (available: v0.11.3) [INFO] [stderr] Adding gdnative_bindings_generator v0.9.3 (available: v0.11.3) [INFO] [stderr] Adding heck v0.3.3 (available: v0.5.0) [INFO] [stderr] Adding mini-internal v0.1.13 (available: v0.1.42) [INFO] [stderr] Adding miniserde v0.1.13 (available: v0.1.42) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+350d0ef0ec0493e6d21cfb265cb8211a0e74d766" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded mini-internal v0.1.13 [INFO] [stderr] Downloaded gdnative-impl-proc-macros v0.9.3 [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 gdnative-sys v0.9.3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+350d0ef0ec0493e6d21cfb265cb8211a0e74d766" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e8e0526c46c04b69eb58b1907d8ee27c3065f81fa8a2d3839faa6773712a35ed [INFO] running `Command { std: "docker" "start" "-a" "e8e0526c46c04b69eb58b1907d8ee27c3065f81fa8a2d3839faa6773712a35ed", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e8e0526c46c04b69eb58b1907d8ee27c3065f81fa8a2d3839faa6773712a35ed", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e8e0526c46c04b69eb58b1907d8ee27c3065f81fa8a2d3839faa6773712a35ed", kill_on_drop: false }` [INFO] [stdout] e8e0526c46c04b69eb58b1907d8ee27c3065f81fa8a2d3839faa6773712a35ed [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+350d0ef0ec0493e6d21cfb265cb8211a0e74d766" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a6de59806b8c77c5baf485ec4c2a6d9d33038938df61310160a765a16d27b713 [INFO] running `Command { std: "docker" "start" "-a" "a6de59806b8c77c5baf485ec4c2a6d9d33038938df61310160a765a16d27b713", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.101 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling autocfg v1.5.0 [INFO] [stderr] Compiling libc v0.2.175 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling version_check v0.9.5 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Compiling itoa v0.4.8 [INFO] [stderr] Compiling ryu v1.0.20 [INFO] [stderr] Compiling cfg-if v1.0.3 [INFO] [stderr] Compiling regex-syntax v0.8.6 [INFO] [stderr] Compiling memchr v2.7.5 [INFO] [stderr] Compiling bindgen v0.56.0 [INFO] [stderr] Compiling lazy_static v1.5.0 [INFO] [stderr] Compiling rustc-hash v1.1.0 [INFO] [stderr] Compiling peeking_take_while v0.1.2 [INFO] [stderr] Compiling shlex v0.1.1 [INFO] [stderr] Compiling lazycell v1.3.0 [INFO] [stderr] Compiling bitflags v1.3.2 [INFO] [stderr] Compiling libloading v0.8.8 [INFO] [stderr] Compiling xmlparser v0.13.6 [INFO] [stderr] Compiling unicode-segmentation v1.12.0 [INFO] [stderr] Compiling parking_lot_core v0.8.6 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Compiling unindent v0.1.11 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Compiling roxmltree v0.14.1 [INFO] [stderr] Checking hashbrown v0.12.3 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling clang-sys v1.8.1 [INFO] [stderr] Compiling nom v5.1.3 [INFO] [stderr] Compiling ahash v0.7.8 [INFO] [stderr] Compiling heck v0.3.3 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Checking euclid v0.22.11 [INFO] [stderr] Checking approx v0.4.0 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Compiling regex-automata v0.4.10 [INFO] [stderr] Compiling cexpr v0.4.0 [INFO] [stderr] Compiling regex v1.11.2 [INFO] [stderr] Compiling mini-internal v0.1.13 [INFO] [stderr] Compiling gdnative-impl-proc-macros v0.9.3 [INFO] [stderr] Compiling miniserde v0.1.13 [INFO] [stderr] Compiling gdnative_bindings_generator v0.9.3 [INFO] [stderr] Compiling gdnative-bindings-lily v0.9.3 (/opt/rustwide/workdir) [INFO] [stderr] Compiling gdnative-sys v0.9.3 [INFO] [stderr] Checking gdnative-core v0.9.3 [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:16:1437 [INFO] [stdout] | [INFO] [stdout] 16 | ...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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs: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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:52:1516 [INFO] [stdout] | [INFO] [stdout] 52 | ..._case_types)] # [derive (Debug)] pub struct AudioEffectLowShelfFilter { this : RawObject < Self > , } impl AudioEffectLowShelfFilter {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectLowShelfFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:130:1652 [INFO] [stdout] | [INFO] [stdout] 130 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeGlobalExpression { this : RawObject < Self > , } impl VisualShaderNodeGlobalEx... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeGlobalExpression` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:184:1439 [INFO] [stdout] | [INFO] [stdout] 184 | ...el_case_types)] # [derive (Debug)] pub struct AudioStreamMicrophone { this : RawObject < Self > , } impl AudioStreamMicrophone { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioStreamMicrophone` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:232:1400 [INFO] [stdout] | [INFO] [stdout] 232 | ...on_camel_case_types)] # [derive (Debug)] pub struct Texture3D { this : RawObject < Self > , } impl Texture3D { # [doc = "Creates a new... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Texture3D` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:268:1792 [INFO] [stdout] | [INFO] [stdout] 268 | ...n_camel_case_types)] # [derive (Debug)] pub struct ARVRCamera { this : RawObject < Self > , } impl ARVRCamera { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ARVRCamera` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:292:1482 [INFO] [stdout] | [INFO] [stdout] 292 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeOuterProduct { this : RawObject < Self > , } impl VisualShaderNodeOuterProdu... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeOuterProduct` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:334:1458 [INFO] [stdout] | [INFO] [stdout] 334 | ...l_case_types)] # [derive (Debug)] pub struct VisualScriptCustomNode { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , ... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptCustomNode` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:358:1498 [INFO] [stdout] | [INFO] [stdout] 358 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeScalarSm... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarSmoothStep` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:364:1478 [INFO] [stdout] | [INFO] [stdout] 364 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeFaceForward { this : RawObject < Self > , } impl VisualShaderNodeFaceForwar... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeFaceForward` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:388:1490 [INFO] [stdout] | [INFO] [stdout] 388 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorDistance { this : RawObject < Self > , } impl VisualShaderNodeVectorDis... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorDistance` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:394:1387 [INFO] [stdout] | [INFO] [stdout] 394 | ...mel_case_types)] # [derive (Debug)] pub struct StreamPeerGDNative { this : RawObject < Self > , } impl StreamPeerGDNative { # [doc = "... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `StreamPeerGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:424:1464 [INFO] [stdout] | [INFO] [stdout] 424 | ...camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ21 { this : RawObject < Self > , } impl AudioEffectEQ21 { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectEQ21` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:430:1387 [INFO] [stdout] | [INFO] [stdout] 430 | ...mel_case_types)] # [derive (Debug)] pub struct PacketPeerGDNative { this : RawObject < Self > , } impl PacketPeerGDNative { # [doc = "... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PacketPeerGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:520:1244 [INFO] [stdout] | [INFO] [stdout] 520 | ...amel_case_types)] # [derive (Debug)] pub struct Physics2DServerSW { this : RawObject < Self > , } impl Physics2DServerSW { } impl gdna... [INFO] [stdout] | ----------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Physics2DServerSW` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:562:1522 [INFO] [stdout] | [INFO] [stdout] 562 | ..._case_types)] # [derive (Debug)] pub struct VisualScriptComposeArray { this : RawObject < Self > , } impl VisualScriptComposeArray { #... [INFO] [stdout] | ------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptComposeArray` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:568:1553 [INFO] [stdout] | [INFO] [stdout] 568 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarSwitch { this : RawObject < Self > , } impl VisualShaderNodeScalarSwit... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarSwitch` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:634:1490 [INFO] [stdout] | [INFO] [stdout] 634 | ...l_case_types)] # [derive (Debug)] pub struct MultiplayerPeerGDNative { this : RawObject < Self > , } impl MultiplayerPeerGDNative { # ... [INFO] [stdout] | ----------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `MultiplayerPeerGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:724:1246 [INFO] [stdout] | [INFO] [stdout] 724 | ...mel_case_types)] # [derive (Debug)] pub struct BulletPhysicsServer { this : RawObject < Self > , } impl BulletPhysicsServer { } impl g... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `BulletPhysicsServer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:736:1522 [INFO] [stdout] | [INFO] [stdout] 736 | ...ypes)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeVecto... [INFO] [stdout] | -------------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorScalarSmoothStep` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:754:1408 [INFO] [stdout] | [INFO] [stdout] 754 | ...el_case_types)] # [derive (Debug)] pub struct ARVRInterfaceGDNative { this : RawObject < Self > , } impl ARVRInterfaceGDNative { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ARVRInterfaceGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:808:1478 [INFO] [stdout] | [INFO] [stdout] 808 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarClamp { this : RawObject < Self > , } impl VisualShaderNodeScalarClam... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarClamp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:814:1194 [INFO] [stdout] | [INFO] [stdout] 814 | ..._camel_case_types)] # [derive (Debug)] pub struct InputDefault { this : RawObject < Self > , } impl InputDefault { } impl gdnative_cor... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `InputDefault` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:820:1478 [INFO] [stdout] | [INFO] [stdout] 820 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorClamp { this : RawObject < Self > , } impl VisualShaderNodeVectorClam... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorClamp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:838:1830 [INFO] [stdout] | [INFO] [stdout] 838 | ...n_camel_case_types)] # [derive (Debug)] pub struct PopupPanel { this : RawObject < Self > , } impl PopupPanel { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PopupPanel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:892:1341 [INFO] [stdout] | [INFO] [stdout] 892 | ...on_camel_case_types)] # [derive (Debug)] pub struct TextFile { this : RawObject < Self > , } impl TextFile { # [doc = "Creates a new i... [INFO] [stdout] | -------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `TextFile` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:910:1309 [INFO] [stdout] | [INFO] [stdout] 910 | ...ase_types)] # [derive (Debug)] pub struct BulletPhysicsDirectBodyState { this : RawObject < Self > , } impl BulletPhysicsDirectBodySta... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `BulletPhysicsDirectBodyState` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:928:1446 [INFO] [stdout] | [INFO] [stdout] 928 | ...mel_case_types)] # [derive (Debug)] pub struct VisualScriptSubCall { this : RawObject < Self > , } impl VisualScriptSubCall { # [doc =... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptSubCall` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:964:1873 [INFO] [stdout] | [INFO] [stdout] 964 | ...n_camel_case_types)] # [derive (Debug)] pub struct HScrollBar { this : RawObject < Self > , } impl HScrollBar { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HScrollBar` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1036:1564 [INFO] [stdout] | [INFO] [stdout] 1036 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeBooleanUniform { this : RawObject < Self > , } impl VisualShaderNodeBooleanUn... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeBooleanUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1096:1872 [INFO] [stdout] | [INFO] [stdout] 1096 | ...camel_case_types)] # [derive (Debug)] pub struct MarginContainer { this : RawObject < Self > , } impl MarginContainer { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `MarginContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1114:1873 [INFO] [stdout] | [INFO] [stdout] 1114 | ...n_camel_case_types)] # [derive (Debug)] pub struct VScrollBar { this : RawObject < Self > , } impl VScrollBar { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VScrollBar` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1120:1560 [INFO] [stdout] | [INFO] [stdout] 1120 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarUniform { this : RawObject < Self > , } impl VisualShaderNodeScalarUni... [INFO] [stdout] | ----------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1126:1842 [INFO] [stdout] | [INFO] [stdout] 1126 | ...n_camel_case_types)] # [derive (Debug)] pub struct VSeparator { this : RawObject < Self > , } impl VSeparator { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VSeparator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1132:1846 [INFO] [stdout] | [INFO] [stdout] 1132 | ...non_camel_case_types)] # [derive (Debug)] pub struct HSlider { this : RawObject < Self > , } impl HSlider { # [doc = "Creates a new in... [INFO] [stdout] | ------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HSlider` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1138:1454 [INFO] [stdout] | [INFO] [stdout] 1138 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptCondition { this : RawObject < Self > , } impl VisualScriptCondition { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptCondition` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1150:1906 [INFO] [stdout] | [INFO] [stdout] 1150 | ...n_camel_case_types)] # [derive (Debug)] pub struct CSGCombiner { this : RawObject < Self > , } impl CSGCombiner { # [doc = "Creates a ... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `CSGCombiner` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1162:1454 [INFO] [stdout] | [INFO] [stdout] 1162 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptSceneTree { this : RawObject < Self > , } impl VisualScriptSceneTree { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptSceneTree` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1204:1836 [INFO] [stdout] | [INFO] [stdout] 1204 | ...n_camel_case_types)] # [derive (Debug)] pub struct PopupDialog { this : RawObject < Self > , } impl PopupDialog { # [doc = "Creates a ... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PopupDialog` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1222:1520 [INFO] [stdout] | [INFO] [stdout] 1222 | ...case_types)] # [derive (Debug)] pub struct AudioEffectBandLimitFilter { this : RawObject < Self > , } impl AudioEffectBandLimitFilter ... [INFO] [stdout] | -------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectBandLimitFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1252:1349 [INFO] [stdout] | [INFO] [stdout] 1252 | ...mel_case_types)] # [derive (Debug)] pub struct ResourceFormatSaver { this : RawObject < Self > , } impl ResourceFormatSaver { # [doc =... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ResourceFormatSaver` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1270:1482 [INFO] [stdout] | [INFO] [stdout] 1270 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorInterp { this : RawObject < Self > , } impl VisualShaderNodeVectorInte... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorInterp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1276:1498 [INFO] [stdout] | [INFO] [stdout] 1276 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeVectorSm... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorSmoothStep` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1306:1321 [INFO] [stdout] | [INFO] [stdout] 1306 | ..._camel_case_types)] # [derive (Debug)] pub struct SpatialGizmo { this : RawObject < Self > , } impl SpatialGizmo { } impl gdnative_cor... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `SpatialGizmo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1336:1307 [INFO] [stdout] | [INFO] [stdout] 1336 | ...case_types)] # [derive (Debug)] pub struct Physics2DDirectBodyStateSW { this : RawObject < Self > , } impl Physics2DDirectBodyStateSW ... [INFO] [stdout] | -------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Physics2DDirectBodyStateSW` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1468:1874 [INFO] [stdout] | [INFO] [stdout] 1468 | ...n_camel_case_types)] # [derive (Debug)] pub struct ToolButton { this : RawObject < Self > , } impl ToolButton { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ToolButton` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1480:1460 [INFO] [stdout] | [INFO] [stdout] 1480 | ...camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ6 { this : RawObject < Self > , } impl AudioEffectEQ6 { # [doc = "Create... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectEQ6` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1486:1442 [INFO] [stdout] | [INFO] [stdout] 1486 | ...mel_case_types)] # [derive (Debug)] pub struct VisualScriptSwitch { this : RawObject < Self > , } impl VisualScriptSwitch { # [doc = "... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptSwitch` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1492:1458 [INFO] [stdout] | [INFO] [stdout] 1492 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeCustom { this : RawObject < Self > , } impl VisualShaderNodeCustom { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeCustom` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1504:1478 [INFO] [stdout] | [INFO] [stdout] 1504 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeDeterminant { this : RawObject < Self > , } impl VisualShaderNodeDeterminan... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeDeterminant` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1522:1486 [INFO] [stdout] | [INFO] [stdout] 1522 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorRefract { this : RawObject < Self > , } impl VisualShaderNodeVectorRef... [INFO] [stdout] | ----------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorRefract` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1594:1908 [INFO] [stdout] | [INFO] [stdout] 1594 | ..._camel_case_types)] # [derive (Debug)] pub struct VBoxContainer { this : RawObject < Self > , } impl VBoxContainer { # [doc = "Creates... [INFO] [stdout] | ------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VBoxContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1600:1438 [INFO] [stdout] | [INFO] [stdout] 1600 | ...amel_case_types)] # [derive (Debug)] pub struct VisualScriptWhile { this : RawObject < Self > , } impl VisualScriptWhile { # [doc = "C... [INFO] [stdout] | ----------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptWhile` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1612:1862 [INFO] [stdout] | [INFO] [stdout] 1612 | ...on_camel_case_types)] # [derive (Debug)] pub struct CheckBox { this : RawObject < Self > , } impl CheckBox { # [doc = "Creates a new i... [INFO] [stdout] | -------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `CheckBox` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1648:1337 [INFO] [stdout] | [INFO] [stdout] 1648 | ...amel_case_types)] # [derive (Debug)] pub struct ResourceImporter { this : RawObject < Self > , } impl ResourceImporter { } impl gdnati... [INFO] [stdout] | ---------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ResourceImporter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1654:1186 [INFO] [stdout] | [INFO] [stdout] 1654 | ...camel_case_types)] # [derive (Debug)] pub struct GlobalConstants { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_u... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `GlobalConstants` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1696:1462 [INFO] [stdout] | [INFO] [stdout] 1696 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeFresnel { this : RawObject < Self > , } impl VisualShaderNodeFresnel { # ... [INFO] [stdout] | ----------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeFresnel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1726:1365 [INFO] [stdout] | [INFO] [stdout] 1726 | ...camel_case_types)] # [derive (Debug)] pub struct AudioBusLayout { this : RawObject < Self > , } impl AudioBusLayout { # [doc = "Create... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioBusLayout` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1756:1365 [INFO] [stdout] | [INFO] [stdout] 1756 | ...camel_case_types)] # [derive (Debug)] pub struct RichTextEffect { this : RawObject < Self > , } impl RichTextEffect { # [doc = "Create... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `RichTextEffect` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1762:1434 [INFO] [stdout] | [INFO] [stdout] 1762 | ..._case_types)] # [derive (Debug)] pub struct AnimationTrackEditPlugin { this : RawObject < Self > , } impl AnimationTrackEditPlugin { }... [INFO] [stdout] | ------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationTrackEditPlugin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1858:1458 [INFO] [stdout] | [INFO] [stdout] 1858 | ...se_types)] # [derive (Debug)] pub struct EditorResourcePreviewGenerator { this : RawObject < Self > , } impl EditorResourcePreviewGene... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `EditorResourcePreviewGenerator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1870:1494 [INFO] [stdout] | [INFO] [stdout] 1870 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorDecompose { this : RawObject < Self > , } impl VisualShaderNodeVectorDe... [INFO] [stdout] | ------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorDecompose` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1984:1464 [INFO] [stdout] | [INFO] [stdout] 1984 | ...camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ10 { this : RawObject < Self > , } impl AudioEffectEQ10 { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectEQ10` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1996:1498 [INFO] [stdout] | [INFO] [stdout] 1996 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarStep { this : RawObject < Self > , } impl VisualShaderNodeVectorSc... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorScalarStep` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2008:1688 [INFO] [stdout] | [INFO] [stdout] 2008 | ...ypes)] # [derive (Debug)] pub struct VisualShaderNodeTextureUniformTriplanar { this : RawObject < Self > , } impl VisualShaderNodeText... [INFO] [stdout] | --------------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeTextureUniformTriplanar` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2056:1258 [INFO] [stdout] | [INFO] [stdout] 2056 | ...on_camel_case_types)] # [derive (Debug)] pub struct Separator { this : RawObject < Self > , } impl Separator { } impl gdnative_core ::... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Separator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2062:1442 [INFO] [stdout] | [INFO] [stdout] 2062 | ...mel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeIf { this : RawObject < Self > , } impl VisualShaderNodeIf { # [doc = "... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeIf` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2068:1353 [INFO] [stdout] | [INFO] [stdout] 2068 | ...n_camel_case_types)] # [derive (Debug)] pub struct AudioEffect { this : RawObject < Self > , } impl AudioEffect { } impl gdnative_core... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffect` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2086:1450 [INFO] [stdout] | [INFO] [stdout] 2086 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptFunction { this : RawObject < Self > , } impl VisualScriptFunction { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptFunction` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2098:1353 [INFO] [stdout] | [INFO] [stdout] 2098 | ...el_case_types)] # [derive (Debug)] pub struct ResourceFormatLoader { this : RawObject < Self > , } impl ResourceFormatLoader { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `ResourceFormatLoader` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2104:1498 [INFO] [stdout] | [INFO] [stdout] 2104 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformCompose { this : RawObject < Self > , } impl VisualShaderNodeTransfor... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeTransformCompose` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2128:1495 [INFO] [stdout] | [INFO] [stdout] 2128 | ...l_case_types)] # [derive (Debug)] pub struct EditorSceneImporterFBX { this : RawObject < Self > , } impl EditorSceneImporterFBX { } im... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `EditorSceneImporterFBX` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2146:1482 [INFO] [stdout] | [INFO] [stdout] 2146 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarInterp { this : RawObject < Self > , } impl VisualShaderNodeScalarInte... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeScalarInterp` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2158:1880 [INFO] [stdout] | [INFO] [stdout] 2158 | ...n_camel_case_types)] # [derive (Debug)] pub struct CheckButton { this : RawObject < Self > , } impl CheckButton { # [doc = "Creates a ... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `CheckButton` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2176:1477 [INFO] [stdout] | [INFO] [stdout] 2176 | ..._case_types)] # [derive (Debug)] pub struct WebRTCDataChannelGDNative { this : RawObject < Self > , } impl WebRTCDataChannelGDNative {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `WebRTCDataChannelGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2188:1474 [INFO] [stdout] | [INFO] [stdout] 2188 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeDotProduct { this : RawObject < Self > , } impl VisualShaderNodeDotProduct ... [INFO] [stdout] | -------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeDotProduct` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2206:1771 [INFO] [stdout] | [INFO] [stdout] 2206 | ...(non_camel_case_types)] # [derive (Debug)] pub struct Panel { this : RawObject < Self > , } impl Panel { # [doc = "Creates a new insta... [INFO] [stdout] | ----- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Panel` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2302:1293 [INFO] [stdout] | [INFO] [stdout] 2302 | ...camel_case_types)] # [derive (Debug)] pub struct RootMotionView { this : RawObject < Self > , } impl RootMotionView { } impl gdnative_... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `RootMotionView` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2350:1309 [INFO] [stdout] | [INFO] [stdout] 2350 | ...on_camel_case_types)] # [derive (Debug)] pub struct JavaClass { this : RawObject < Self > , } impl JavaClass { # [doc = "Creates a new... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `JavaClass` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2362:1349 [INFO] [stdout] | [INFO] [stdout] 2362 | ...mel_case_types)] # [derive (Debug)] pub struct AudioEffectInstance { this : RawObject < Self > , } impl AudioEffectInstance { } impl g... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectInstance` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2386:1516 [INFO] [stdout] | [INFO] [stdout] 2386 | ..._case_types)] # [derive (Debug)] pub struct AudioEffectBandPassFilter { this : RawObject < Self > , } impl AudioEffectBandPassFilter {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectBandPassFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2518:1842 [INFO] [stdout] | [INFO] [stdout] 2518 | ...n_camel_case_types)] # [derive (Debug)] pub struct HSeparator { this : RawObject < Self > , } impl HSeparator { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HSeparator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2536:1353 [INFO] [stdout] | [INFO] [stdout] 2536 | ...n_camel_case_types)] # [derive (Debug)] pub struct VideoStream { this : RawObject < Self > , } impl VideoStream { } impl gdnative_core... [INFO] [stdout] | ----------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VideoStream` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2578:1429 [INFO] [stdout] | [INFO] [stdout] 2578 | ...amel_case_types)] # [derive (Debug)] pub struct AnimationRootNode { this : RawObject < Self > , } impl AnimationRootNode { # [doc = "C... [INFO] [stdout] | ----------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationRootNode` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2584:1470 [INFO] [stdout] | [INFO] [stdout] 2584 | ...mel_case_types)] # [derive (Debug)] pub struct EditorImportPlugin { this : RawObject < Self > , } impl EditorImportPlugin { } impl gdn... [INFO] [stdout] | ------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `EditorImportPlugin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2668:1458 [INFO] [stdout] | [INFO] [stdout] 2668 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeOutput { this : RawObject < Self > , } impl VisualShaderNodeOutput { } im... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeOutput` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2674:1707 [INFO] [stdout] | [INFO] [stdout] 2674 | ..._camel_case_types)] # [derive (Debug)] pub struct JNISingleton { this : RawObject < Self > , } impl JNISingleton { # [doc = "Creates a... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `JNISingleton` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2698:1349 [INFO] [stdout] | [INFO] [stdout] 2698 | ...mel_case_types)] # [derive (Debug)] pub struct AudioStreamPlayback { this : RawObject < Self > , } impl AudioStreamPlayback { } impl g... [INFO] [stdout] | ------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioStreamPlayback` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2704:1454 [INFO] [stdout] | [INFO] [stdout] 2704 | ...ase_types)] # [derive (Debug)] pub struct AudioStreamPlaybackResampled { this : RawObject < Self > , } impl AudioStreamPlaybackResampl... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioStreamPlaybackResampled` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2746:1926 [INFO] [stdout] | [INFO] [stdout] 2746 | ...camel_case_types)] # [derive (Debug)] pub struct VSplitContainer { this : RawObject < Self > , } impl VSplitContainer { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VSplitContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2782:1321 [INFO] [stdout] | [INFO] [stdout] 2782 | ..._camel_case_types)] # [derive (Debug)] pub struct TriangleMesh { this : RawObject < Self > , } impl TriangleMesh { # [doc = "Creates a... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `TriangleMesh` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2794:1520 [INFO] [stdout] | [INFO] [stdout] 2794 | ...case_types)] # [derive (Debug)] pub struct AudioEffectHighShelfFilter { this : RawObject < Self > , } impl AudioEffectHighShelfFilter ... [INFO] [stdout] | -------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectHighShelfFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2848:1412 [INFO] [stdout] | [INFO] [stdout] 2848 | ..._camel_case_types)] # [derive (Debug)] pub struct TextureArray { this : RawObject < Self > , } impl TextureArray { # [doc = "Creates a... [INFO] [stdout] | ------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `TextureArray` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2884:1458 [INFO] [stdout] | [INFO] [stdout] 2884 | ...l_case_types)] # [derive (Debug)] pub struct VisualShaderNodeSwitch { this : RawObject < Self > , } impl VisualShaderNodeSwitch { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeSwitch` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2944:1486 [INFO] [stdout] | [INFO] [stdout] 2944 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorCompose { this : RawObject < Self > , } impl VisualShaderNodeVectorCom... [INFO] [stdout] | ----------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorCompose` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2968:1516 [INFO] [stdout] | [INFO] [stdout] 2968 | ..._case_types)] # [derive (Debug)] pub struct AudioEffectHighPassFilter { this : RawObject < Self > , } impl AudioEffectHighPassFilter {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectHighPassFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2980:1866 [INFO] [stdout] | [INFO] [stdout] 2980 | ...camel_case_types)] # [derive (Debug)] pub struct PanelContainer { this : RawObject < Self > , } impl PanelContainer { # [doc = "Create... [INFO] [stdout] | -------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PanelContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:2998:1494 [INFO] [stdout] | [INFO] [stdout] 2998 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarMix { this : RawObject < Self > , } impl VisualShaderNodeVectorSc... [INFO] [stdout] | ------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorScalarMix` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3064:1652 [INFO] [stdout] | [INFO] [stdout] 3064 | ...se_types)] # [derive (Debug)] pub struct VisualShaderNodeCubeMapUniform { this : RawObject < Self > , } impl VisualShaderNodeCubeMapUn... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeCubeMapUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3094:1449 [INFO] [stdout] | [INFO] [stdout] 3094 | ...l_case_types)] # [derive (Debug)] pub struct AnimationNodeTimeScale { this : RawObject < Self > , } impl AnimationNodeTimeScale { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationNodeTimeScale` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3136:1450 [INFO] [stdout] | [INFO] [stdout] 3136 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptIndexGet { this : RawObject < Self > , } impl VisualScriptIndexGet { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptIndexGet` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3160:1506 [INFO] [stdout] | [INFO] [stdout] 3160 | ..._types)] # [derive (Debug)] pub struct VisualShaderNodeTransformDecompose { this : RawObject < Self > , } impl VisualShaderNodeTransfo... [INFO] [stdout] | ---------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeTransformDecompose` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3178:1908 [INFO] [stdout] | [INFO] [stdout] 3178 | ..._camel_case_types)] # [derive (Debug)] pub struct HBoxContainer { this : RawObject < Self > , } impl HBoxContainer { # [doc = "Creates... [INFO] [stdout] | ------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HBoxContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3190:1434 [INFO] [stdout] | [INFO] [stdout] 3190 | ...amel_case_types)] # [derive (Debug)] pub struct VisualScriptSelf { this : RawObject < Self > , } impl VisualScriptSelf { # [doc = "Cre... [INFO] [stdout] | ---------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptSelf` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3226:1426 [INFO] [stdout] | [INFO] [stdout] 3226 | ...on_camel_case_types)] # [derive (Debug)] pub struct PointMesh { this : RawObject < Self > , } impl PointMesh { # [doc = "Creates a new... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `PointMesh` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3250:1552 [INFO] [stdout] | [INFO] [stdout] 3250 | ...case_types)] # [derive (Debug)] pub struct VisualShaderNodeVec3Uniform { this : RawObject < Self > , } impl VisualShaderNodeVec3Unifor... [INFO] [stdout] | --------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVec3Uniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3274:1556 [INFO] [stdout] | [INFO] [stdout] 3274 | ...ase_types)] # [derive (Debug)] pub struct VisualShaderNodeColorUniform { this : RawObject < Self > , } impl VisualShaderNodeColorUnifo... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeColorUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3292:1450 [INFO] [stdout] | [INFO] [stdout] 3292 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptIndexSet { this : RawObject < Self > , } impl VisualScriptIndexSet { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptIndexSet` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3328:1398 [INFO] [stdout] | [INFO] [stdout] 3328 | ..._camel_case_types)] # [derive (Debug)] pub struct StyleBoxEmpty { this : RawObject < Self > , } impl StyleBoxEmpty { # [doc = "Creates... [INFO] [stdout] | ------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `StyleBoxEmpty` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3352:1572 [INFO] [stdout] | [INFO] [stdout] 3352 | ...e_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformUniform { this : RawObject < Self > , } impl VisualShaderNodeTransfor... [INFO] [stdout] | -------------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeTransformUniform` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3394:1512 [INFO] [stdout] | [INFO] [stdout] 3394 | ..._case_types)] # [derive (Debug)] pub struct AudioEffectLowPassFilter { this : RawObject < Self > , } impl AudioEffectLowPassFilter { #... [INFO] [stdout] | ------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectLowPassFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3436:1458 [INFO] [stdout] | [INFO] [stdout] 3436 | ...se_types)] # [derive (Debug)] pub struct EditorResourceConversionPlugin { this : RawObject < Self > , } impl EditorResourceConversionP... [INFO] [stdout] | ------------------------------ ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `EditorResourceConversionPlugin` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3448:1445 [INFO] [stdout] | [INFO] [stdout] 3448 | ...el_case_types)] # [derive (Debug)] pub struct AnimationNodeTimeSeek { this : RawObject < Self > , } impl AnimationNodeTimeSeek { # [do... [INFO] [stdout] | --------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AnimationNodeTimeSeek` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3562:1457 [INFO] [stdout] | [INFO] [stdout] 3562 | ...ase_types)] # [derive (Debug)] pub struct WebRTCPeerConnectionGDNative { this : RawObject < Self > , } impl WebRTCPeerConnectionGDNati... [INFO] [stdout] | ---------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `WebRTCPeerConnectionGDNative` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3586:1926 [INFO] [stdout] | [INFO] [stdout] 3586 | ...camel_case_types)] # [derive (Debug)] pub struct HSplitContainer { this : RawObject < Self > , } impl HSplitContainer { # [doc = "Crea... [INFO] [stdout] | --------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `HSplitContainer` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3592:1165 [INFO] [stdout] | [INFO] [stdout] 3592 | ...non_camel_case_types)] # [derive (Debug)] pub struct IP_Unix { this : RawObject < Self > , } impl IP_Unix { } impl gdnative_core :: pr... [INFO] [stdout] | ------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `IP_Unix` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3610:1458 [INFO] [stdout] | [INFO] [stdout] 3610 | ...l_case_types)] # [derive (Debug)] pub struct VisualScriptExpression { this : RawObject < Self > , } impl VisualScriptExpression { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptExpression` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3640:1450 [INFO] [stdout] | [INFO] [stdout] 3640 | ...el_case_types)] # [derive (Debug)] pub struct VisualScriptIterator { this : RawObject < Self > , } impl VisualScriptIterator { # [doc ... [INFO] [stdout] | -------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualScriptIterator` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3688:1760 [INFO] [stdout] | [INFO] [stdout] 3688 | ...n_camel_case_types)] # [derive (Debug)] pub struct Position3D { this : RawObject < Self > , } impl Position3D { # [doc = "Creates a ne... [INFO] [stdout] | ---------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `Position3D` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3700:1504 [INFO] [stdout] | [INFO] [stdout] 3700 | ...l_case_types)] # [derive (Debug)] pub struct AudioEffectNotchFilter { this : RawObject < Self > , } impl AudioEffectNotchFilter { # [d... [INFO] [stdout] | ---------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `AudioEffectNotchFilter` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3712:1832 [INFO] [stdout] | [INFO] [stdout] 3712 | ...on_camel_case_types)] # [derive (Debug)] pub struct SpotLight { this : RawObject < Self > , } impl SpotLight { # [doc = "Creates a new... [INFO] [stdout] | --------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `SpotLight` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3742:1470 [INFO] [stdout] | [INFO] [stdout] 3742 | ..._case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorLen { this : RawObject < Self > , } impl VisualShaderNodeVectorLen {... [INFO] [stdout] | ------------------------- ^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `VisualShaderNodeVectorLen` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `this` is never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:3784:1798 [INFO] [stdout] | [INFO] [stdout] 3784 | ...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: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:4:9102 [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 Shader` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_shader.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nShader inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Shader { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const SPATIAL : Mode = Mode (0i64) ; pub const CANVAS_ITEM : Mode = Mode (1i64) ; pub const PARTICLES : Mode = Mode (2i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Shader { pub const MODE_CANVAS_ITEM : i64 = 1i64 ; pub const MODE_PARTICLES : i64 = 2i64 ; pub const MODE_SPATIAL : i64 = 0i64 ; } impl Shader { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ShaderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the shader's code as the user has written it, not the full generated code used internally."] # [doc = ""] # [inline] pub fn code (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . get_code ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the shader's custom defines. Custom defines can be used in Godot to add GLSL preprocessor directives (e.g: extensions) required for the shader logic.\n**Note:** Custom defines are not validated by the Godot shader parser, so care should be taken when using them."] # [doc = ""] # [inline] pub fn custom_defines (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . get_custom_defines ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the texture that is set as default for the specified parameter.\n**Note:** `param` must match the name of the uniform in the code exactly."] # [doc = ""] # [inline] pub fn get_default_texture_param (& self , param : impl Into < GodotString >) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . get_default_texture_param ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , param . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES]."] # [doc = ""] # [inline] pub fn get_mode (& self) -> crate :: generated :: shader :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: shader :: Mode (ret) } } # [doc = "Returns `true` if the shader has this param defined as a uniform in its code.\n**Note:** `param` must match the name of the uniform in the code exactly."] # [doc = ""] # [inline] pub fn has_param (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . has_param ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the shader's code as the user has written it, not the full generated code used internally."] # [doc = ""] # [inline] pub fn set_code (& self , code : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . set_code ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , code . into ()) ; } } # [doc = "Returns the shader's custom defines. Custom defines can be used in Godot to add GLSL preprocessor directives (e.g: extensions) required for the shader logic.\n**Note:** Custom defines are not validated by the Godot shader parser, so care should be taken when using them."] # [doc = ""] # [inline] pub fn set_custom_defines (& self , custom_defines : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . set_custom_defines ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , custom_defines . into ()) ; } } # [doc = "Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial].\n**Note:** `param` must match the name of the uniform in the code exactly."] # [doc = ""] # [inline] pub fn set_default_texture_param (& self , param : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . set_default_texture_param ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , param . into () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Shader { } unsafe impl GodotObject for Shader { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Shader" } } impl std :: ops :: Deref for Shader { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Shader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Shader { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Shader { } unsafe impl SubClass < crate :: generated :: object :: Object > for Shader { } impl Instanciable for Shader { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Shader :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ShaderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_code : * mut sys :: godot_method_bind , pub get_custom_defines : * mut sys :: godot_method_bind , pub get_default_texture_param : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub has_param : * mut sys :: godot_method_bind , pub set_code : * mut sys :: godot_method_bind , pub set_custom_defines : * mut sys :: godot_method_bind , pub set_default_texture_param : * mut sys :: godot_method_bind } impl ShaderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ShaderMethodTable = ShaderMethodTable { class_constructor : None , get_code : 0 as * mut sys :: godot_method_bind , get_custom_defines : 0 as * mut sys :: godot_method_bind , get_default_texture_param : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , has_param : 0 as * mut sys :: godot_method_bind , set_code : 0 as * mut sys :: godot_method_bind , set_custom_defines : 0 as * mut sys :: godot_method_bind , set_default_texture_param : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ShaderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Shader\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_code = (gd_api . godot_method_bind_get_method) (class_name , "get_code\0" . as_ptr () as * const c_char) ; table . get_custom_defines = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_defines\0" . as_ptr () as * const c_char) ; table . get_default_texture_param = (gd_api . godot_method_bind_get_method) (class_name , "get_default_texture_param\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . has_param = (gd_api . godot_method_bind_get_method) (class_name , "has_param\0" . as_ptr () as * const c_char) ; table . set_code = (gd_api . godot_method_bind_get_method) (class_name , "set_code\0" . as_ptr () as * const c_char) ; table . set_custom_defines = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_defines\0" . as_ptr () as * const c_char) ; table . set_default_texture_param = (gd_api . godot_method_bind_get_method) (class_name , "set_default_texture_param\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:10:13732 [INFO] [stdout] | [INFO] [stdout] 10 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 10 | # [doc = "`core class ColorPicker` inherits `BoxContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_colorpicker.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ColorPicker` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nColorPicker inherits methods from:\n - [BoxContainer](struct.BoxContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ColorPicker { this : RawObject < Self > , } impl ColorPicker { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ColorPickerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them.\n**Note:** the presets list is only for [i]this[/i] color picker."] # [doc = ""] # [inline] pub fn add_preset (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . add_preset ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `true`, the \"add preset\" button is enabled."] # [doc = ""] # [inline] pub fn are_presets_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . are_presets_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, saved color presets are visible."] # [doc = ""] # [inline] pub fn are_presets_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . are_presets_visible ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes the given color from the list of color presets of this color picker."] # [doc = ""] # [inline] pub fn erase_preset (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . erase_preset ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The currently selected color."] # [doc = ""] # [inline] pub fn pick_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . get_pick_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the list of colors in the presets of the color picker."] # [doc = ""] # [inline] pub fn get_presets (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . get_presets ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [doc = "If `true`, the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues)."] # [doc = ""] # [inline] pub fn is_deferred_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . is_deferred_mode ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, shows an alpha channel slider (transparency)."] # [doc = ""] # [inline] pub fn is_editing_alpha (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . is_editing_alpha ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, allows editing the color with Hue/Saturation/Value sliders.\n**Note:** Cannot be enabled if raw mode is on."] # [doc = ""] # [inline] pub fn is_hsv_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . is_hsv_mode ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).\n**Note:** Cannot be enabled if HSV mode is on."] # [doc = ""] # [inline] pub fn is_raw_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . is_raw_mode ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues)."] # [doc = ""] # [inline] pub fn set_deferred_mode (& self , mode : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_deferred_mode ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, shows an alpha channel slider (transparency)."] # [doc = ""] # [inline] pub fn set_edit_alpha (& self , show : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_edit_alpha ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , show) ; } } # [doc = "If `true`, allows editing the color with Hue/Saturation/Value sliders.\n**Note:** Cannot be enabled if raw mode is on."] # [doc = ""] # [inline] pub fn set_hsv_mode (& self , mode : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_hsv_mode ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The currently selected color."] # [doc = ""] # [inline] pub fn set_pick_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_pick_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `true`, the \"add preset\" button is enabled."] # [doc = ""] # [inline] pub fn set_presets_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_presets_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, saved color presets are visible."] # [doc = ""] # [inline] pub fn set_presets_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_presets_visible ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visible) ; } } # [doc = "If `true`, allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).\n**Note:** Cannot be enabled if HSV mode is on."] # [doc = ""] # [inline] pub fn set_raw_mode (& self , mode : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_raw_mode ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ColorPicker { } unsafe impl GodotObject for ColorPicker { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ColorPicker" } } impl QueueFree for ColorPicker { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ColorPicker { type Target = crate :: generated :: box_container :: BoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ColorPicker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: box_container :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: box_container :: BoxContainer > for ColorPicker { } unsafe impl SubClass < crate :: generated :: container :: Container > for ColorPicker { } unsafe impl SubClass < crate :: generated :: control :: Control > for ColorPicker { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ColorPicker { } unsafe impl SubClass < crate :: generated :: node :: Node > for ColorPicker { } unsafe impl SubClass < crate :: generated :: object :: Object > for ColorPicker { } impl Instanciable for ColorPicker { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ColorPicker :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ColorPickerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_preset : * mut sys :: godot_method_bind , pub are_presets_enabled : * mut sys :: godot_method_bind , pub are_presets_visible : * mut sys :: godot_method_bind , pub erase_preset : * mut sys :: godot_method_bind , pub get_pick_color : * mut sys :: godot_method_bind , pub get_presets : * mut sys :: godot_method_bind , pub is_deferred_mode : * mut sys :: godot_method_bind , pub is_editing_alpha : * mut sys :: godot_method_bind , pub is_hsv_mode : * mut sys :: godot_method_bind , pub is_raw_mode : * mut sys :: godot_method_bind , pub set_deferred_mode : * mut sys :: godot_method_bind , pub set_edit_alpha : * mut sys :: godot_method_bind , pub set_hsv_mode : * mut sys :: godot_method_bind , pub set_pick_color : * mut sys :: godot_method_bind , pub set_presets_enabled : * mut sys :: godot_method_bind , pub set_presets_visible : * mut sys :: godot_method_bind , pub set_raw_mode : * mut sys :: godot_method_bind } impl ColorPickerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ColorPickerMethodTable = ColorPickerMethodTable { class_constructor : None , add_preset : 0 as * mut sys :: godot_method_bind , are_presets_enabled : 0 as * mut sys :: godot_method_bind , are_presets_visible : 0 as * mut sys :: godot_method_bind , erase_preset : 0 as * mut sys :: godot_method_bind , get_pick_color : 0 as * mut sys :: godot_method_bind , get_presets : 0 as * mut sys :: godot_method_bind , is_deferred_mode : 0 as * mut sys :: godot_method_bind , is_editing_alpha : 0 as * mut sys :: godot_method_bind , is_hsv_mode : 0 as * mut sys :: godot_method_bind , is_raw_mode : 0 as * mut sys :: godot_method_bind , set_deferred_mode : 0 as * mut sys :: godot_method_bind , set_edit_alpha : 0 as * mut sys :: godot_method_bind , set_hsv_mode : 0 as * mut sys :: godot_method_bind , set_pick_color : 0 as * mut sys :: godot_method_bind , set_presets_enabled : 0 as * mut sys :: godot_method_bind , set_presets_visible : 0 as * mut sys :: godot_method_bind , set_raw_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ColorPickerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ColorPicker\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_preset = (gd_api . godot_method_bind_get_method) (class_name , "add_preset\0" . as_ptr () as * const c_char) ; table . are_presets_enabled = (gd_api . godot_method_bind_get_method) (class_name , "are_presets_enabled\0" . as_ptr () as * const c_char) ; table . are_presets_visible = (gd_api . godot_method_bind_get_method) (class_name , "are_presets_visible\0" . as_ptr () as * const c_char) ; table . erase_preset = (gd_api . godot_method_bind_get_method) (class_name , "erase_preset\0" . as_ptr () as * const c_char) ; table . get_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "get_pick_color\0" . as_ptr () as * const c_char) ; table . get_presets = (gd_api . godot_method_bind_get_method) (class_name , "get_presets\0" . as_ptr () as * const c_char) ; table . is_deferred_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_deferred_mode\0" . as_ptr () as * const c_char) ; table . is_editing_alpha = (gd_api . godot_method_bind_get_method) (class_name , "is_editing_alpha\0" . as_ptr () as * const c_char) ; table . is_hsv_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_hsv_mode\0" . as_ptr () as * const c_char) ; table . is_raw_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_raw_mode\0" . as_ptr () as * const c_char) ; table . set_deferred_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_deferred_mode\0" . as_ptr () as * const c_char) ; table . set_edit_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_edit_alpha\0" . as_ptr () as * const c_char) ; table . set_hsv_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_hsv_mode\0" . as_ptr () as * const c_char) ; table . set_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "set_pick_color\0" . as_ptr () as * const c_char) ; table . set_presets_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_presets_enabled\0" . as_ptr () as * const c_char) ; table . set_presets_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_presets_visible\0" . as_ptr () as * const c_char) ; table . set_raw_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_raw_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:16:3579 [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 AnimationNodeOutput` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeoutput.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeOutput inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeOutput { this : RawObject < Self > , } impl AnimationNodeOutput { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeOutputMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeOutput { } unsafe impl GodotObject for AnimationNodeOutput { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeOutput" } } impl std :: ops :: Deref for AnimationNodeOutput { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeOutput { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeOutput { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeOutput { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeOutput { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeOutput { } impl Instanciable for AnimationNodeOutput { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeOutput :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeOutputMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AnimationNodeOutputMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeOutputMethodTable = AnimationNodeOutputMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeOutputMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeOutput\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:22:6208 [INFO] [stdout] | [INFO] [stdout] 22 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 22 | # [doc = "`core class RegExMatch` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_regexmatch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRegExMatch inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RegExMatch { this : RawObject < Self > , } impl RegExMatch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RegExMatchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_end (& self , name : impl OwnedToVariant) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_end ; let ret = crate :: icalls :: icallptr_i64_var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_group_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_group_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn names (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_names ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_start (& self , name : impl OwnedToVariant) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_start ; let ret = crate :: icalls :: icallptr_i64_var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_string (& self , name : impl OwnedToVariant) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_string ; let ret = crate :: icalls :: icallptr_str_var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn strings (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_strings ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn subject (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_subject ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for RegExMatch { } unsafe impl GodotObject for RegExMatch { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RegExMatch" } } impl std :: ops :: Deref for RegExMatch { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RegExMatch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RegExMatch { } unsafe impl SubClass < crate :: generated :: object :: Object > for RegExMatch { } impl Instanciable for RegExMatch { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RegExMatch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RegExMatchMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_end : * mut sys :: godot_method_bind , pub get_group_count : * mut sys :: godot_method_bind , pub get_names : * mut sys :: godot_method_bind , pub get_start : * mut sys :: godot_method_bind , pub get_string : * mut sys :: godot_method_bind , pub get_strings : * mut sys :: godot_method_bind , pub get_subject : * mut sys :: godot_method_bind } impl RegExMatchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RegExMatchMethodTable = RegExMatchMethodTable { class_constructor : None , get_end : 0 as * mut sys :: godot_method_bind , get_group_count : 0 as * mut sys :: godot_method_bind , get_names : 0 as * mut sys :: godot_method_bind , get_start : 0 as * mut sys :: godot_method_bind , get_string : 0 as * mut sys :: godot_method_bind , get_strings : 0 as * mut sys :: godot_method_bind , get_subject : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RegExMatchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RegExMatch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_end = (gd_api . godot_method_bind_get_method) (class_name , "get_end\0" . as_ptr () as * const c_char) ; table . get_group_count = (gd_api . godot_method_bind_get_method) (class_name , "get_group_count\0" . as_ptr () as * const c_char) ; table . get_names = (gd_api . godot_method_bind_get_method) (class_name , "get_names\0" . as_ptr () as * const c_char) ; table . get_start = (gd_api . godot_method_bind_get_method) (class_name , "get_start\0" . as_ptr () as * const c_char) ; table . get_string = (gd_api . godot_method_bind_get_method) (class_name , "get_string\0" . as_ptr () as * const c_char) ; table . get_strings = (gd_api . godot_method_bind_get_method) (class_name , "get_strings\0" . as_ptr () as * const c_char) ; table . get_subject = (gd_api . godot_method_bind_get_method) (class_name , "get_subject\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:34:4452 [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 VisualScriptSequence` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptsequence.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSequence inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSequence { this : RawObject < Self > , } impl VisualScriptSequence { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSequenceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn steps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSequenceMethodTable :: get (get_api ()) . get_steps ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_steps (& self , steps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSequenceMethodTable :: get (get_api ()) . set_steps ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , steps) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSequence { } unsafe impl GodotObject for VisualScriptSequence { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSequence" } } impl std :: ops :: Deref for VisualScriptSequence { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSequence { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSequence { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSequence { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSequence { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSequence { } impl Instanciable for VisualScriptSequence { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptSequence :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSequenceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_steps : * mut sys :: godot_method_bind , pub set_steps : * mut sys :: godot_method_bind } impl VisualScriptSequenceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSequenceMethodTable = VisualScriptSequenceMethodTable { class_constructor : None , get_steps : 0 as * mut sys :: godot_method_bind , set_steps : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptSequenceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSequence\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_steps = (gd_api . godot_method_bind_get_method) (class_name , "get_steps\0" . as_ptr () as * const c_char) ; table . set_steps = (gd_api . godot_method_bind_get_method) (class_name , "set_steps\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:40:8112 [INFO] [stdout] | [INFO] [stdout] 40 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 40 | # [doc = "`core class InterpolatedCamera` inherits `Camera` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_interpolatedcamera.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`InterpolatedCamera` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nInterpolatedCamera inherits methods from:\n - [Camera](struct.Camera.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InterpolatedCamera { this : RawObject < Self > , } impl InterpolatedCamera { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InterpolatedCameraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "How quickly the camera moves toward its target. Higher values will result in tighter camera motion."] # [doc = ""] # [inline] pub fn speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . get_speed ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The target's [NodePath]."] # [doc = ""] # [inline] pub fn target_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . get_target_path ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "If `true`, and a target is set, the camera will move automatically."] # [doc = ""] # [inline] pub fn is_interpolation_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . is_interpolation_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, and a target is set, the camera will move automatically."] # [doc = ""] # [inline] pub fn set_interpolation_enabled (& self , target_path : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_interpolation_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , target_path) ; } } # [doc = "How quickly the camera moves toward its target. Higher values will result in tighter camera motion."] # [doc = ""] # [inline] pub fn set_speed (& self , speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_speed ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , speed) ; } } # [doc = "Sets the node to move toward and orient with."] # [doc = ""] # [inline] pub fn set_target (& self , target : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_target ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , target . as_arg_ptr ()) ; } } # [doc = "The target's [NodePath]."] # [doc = ""] # [inline] pub fn set_target_path (& self , target_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_target_path ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , target_path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InterpolatedCamera { } unsafe impl GodotObject for InterpolatedCamera { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "InterpolatedCamera" } } impl QueueFree for InterpolatedCamera { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for InterpolatedCamera { type Target = crate :: generated :: camera :: Camera ; # [inline] fn deref (& self) -> & crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InterpolatedCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: camera :: Camera { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: camera :: Camera > for InterpolatedCamera { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for InterpolatedCamera { } unsafe impl SubClass < crate :: generated :: node :: Node > for InterpolatedCamera { } unsafe impl SubClass < crate :: generated :: object :: Object > for InterpolatedCamera { } impl Instanciable for InterpolatedCamera { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InterpolatedCamera :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InterpolatedCameraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_speed : * mut sys :: godot_method_bind , pub get_target_path : * mut sys :: godot_method_bind , pub is_interpolation_enabled : * mut sys :: godot_method_bind , pub set_interpolation_enabled : * mut sys :: godot_method_bind , pub set_speed : * mut sys :: godot_method_bind , pub set_target : * mut sys :: godot_method_bind , pub set_target_path : * mut sys :: godot_method_bind } impl InterpolatedCameraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InterpolatedCameraMethodTable = InterpolatedCameraMethodTable { class_constructor : None , get_speed : 0 as * mut sys :: godot_method_bind , get_target_path : 0 as * mut sys :: godot_method_bind , is_interpolation_enabled : 0 as * mut sys :: godot_method_bind , set_interpolation_enabled : 0 as * mut sys :: godot_method_bind , set_speed : 0 as * mut sys :: godot_method_bind , set_target : 0 as * mut sys :: godot_method_bind , set_target_path : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { InterpolatedCameraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InterpolatedCamera\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_speed\0" . as_ptr () as * const c_char) ; table . get_target_path = (gd_api . godot_method_bind_get_method) (class_name , "get_target_path\0" . as_ptr () as * const c_char) ; table . is_interpolation_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_interpolation_enabled\0" . as_ptr () as * const c_char) ; table . set_interpolation_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_interpolation_enabled\0" . as_ptr () as * const c_char) ; table . set_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_speed\0" . as_ptr () as * const c_char) ; table . set_target = (gd_api . godot_method_bind_get_method) (class_name , "set_target\0" . as_ptr () as * const c_char) ; table . set_target_path = (gd_api . godot_method_bind_get_method) (class_name , "set_target_path\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:46:4931 [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 VisualShaderNodeTransformConstant` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodetransformconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformConstant inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformConstant { this : RawObject < Self > , } impl VisualShaderNodeTransformConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A [Transform] constant which represents the state of this node."] # [doc = ""] # [inline] pub fn constant (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformConstantMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "A [Transform] constant which represents the state of this node."] # [doc = ""] # [inline] pub fn set_constant (& self , value : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformConstantMethodTable :: get (get_api ()) . set_constant ; let ret = crate :: icalls :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformConstant { } unsafe impl GodotObject for VisualShaderNodeTransformConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformConstant" } } impl std :: ops :: Deref for VisualShaderNodeTransformConstant { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformConstant { } impl Instanciable for VisualShaderNodeTransformConstant { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeTransformConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_constant : * mut sys :: godot_method_bind , pub set_constant : * mut sys :: godot_method_bind } impl VisualShaderNodeTransformConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformConstantMethodTable = VisualShaderNodeTransformConstantMethodTable { class_constructor : None , get_constant : 0 as * mut sys :: godot_method_bind , set_constant : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:52:3905 [INFO] [stdout] | [INFO] [stdout] 52 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 52 | # [doc = "`core class AudioEffectLowShelfFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectlowshelffilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectLowShelfFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectLowShelfFilter { this : RawObject < Self > , } impl AudioEffectLowShelfFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectLowShelfFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectLowShelfFilter { } unsafe impl GodotObject for AudioEffectLowShelfFilter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectLowShelfFilter" } } impl std :: ops :: Deref for AudioEffectLowShelfFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectLowShelfFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectLowShelfFilter { } impl Instanciable for AudioEffectLowShelfFilter { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectLowShelfFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectLowShelfFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectLowShelfFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectLowShelfFilterMethodTable = AudioEffectLowShelfFilterMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectLowShelfFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectLowShelfFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:58:27512 [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 = "`tools class EditorPlugin` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorPlugin inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorPlugin { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CustomControlContainer (pub i64) ; impl CustomControlContainer { pub const TOOLBAR : CustomControlContainer = CustomControlContainer (0i64) ; pub const SPATIAL_EDITOR_MENU : CustomControlContainer = CustomControlContainer (1i64) ; pub const SPATIAL_EDITOR_SIDE_LEFT : CustomControlContainer = CustomControlContainer (2i64) ; pub const SPATIAL_EDITOR_SIDE_RIGHT : CustomControlContainer = CustomControlContainer (3i64) ; pub const SPATIAL_EDITOR_BOTTOM : CustomControlContainer = CustomControlContainer (4i64) ; pub const CANVAS_EDITOR_MENU : CustomControlContainer = CustomControlContainer (5i64) ; pub const CANVAS_EDITOR_SIDE_LEFT : CustomControlContainer = CustomControlContainer (6i64) ; pub const CANVAS_EDITOR_SIDE_RIGHT : CustomControlContainer = CustomControlContainer (7i64) ; pub const CANVAS_EDITOR_BOTTOM : CustomControlContainer = CustomControlContainer (8i64) ; pub const PROPERTY_EDITOR_BOTTOM : CustomControlContainer = CustomControlContainer (9i64) ; pub const PROJECT_SETTING_TAB_LEFT : CustomControlContainer = CustomControlContainer (10i64) ; pub const PROJECT_SETTING_TAB_RIGHT : CustomControlContainer = CustomControlContainer (11i64) ; } impl From < i64 > for CustomControlContainer { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CustomControlContainer > for i64 { # [inline] fn from (v : CustomControlContainer) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DockSlot (pub i64) ; impl DockSlot { pub const LEFT_UL : DockSlot = DockSlot (0i64) ; pub const LEFT_BL : DockSlot = DockSlot (1i64) ; pub const LEFT_UR : DockSlot = DockSlot (2i64) ; pub const LEFT_BR : DockSlot = DockSlot (3i64) ; pub const RIGHT_UL : DockSlot = DockSlot (4i64) ; pub const RIGHT_BL : DockSlot = DockSlot (5i64) ; pub const RIGHT_UR : DockSlot = DockSlot (6i64) ; pub const RIGHT_BR : DockSlot = DockSlot (7i64) ; pub const MAX : DockSlot = DockSlot (8i64) ; } impl From < i64 > for DockSlot { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DockSlot > for i64 { # [inline] fn from (v : DockSlot) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorPlugin { pub const CONTAINER_CANVAS_EDITOR_BOTTOM : i64 = 8i64 ; pub const CONTAINER_CANVAS_EDITOR_MENU : i64 = 5i64 ; pub const CONTAINER_CANVAS_EDITOR_SIDE_LEFT : i64 = 6i64 ; pub const CONTAINER_CANVAS_EDITOR_SIDE_RIGHT : i64 = 7i64 ; pub const CONTAINER_PROJECT_SETTING_TAB_LEFT : i64 = 10i64 ; pub const CONTAINER_PROJECT_SETTING_TAB_RIGHT : i64 = 11i64 ; pub const CONTAINER_PROPERTY_EDITOR_BOTTOM : i64 = 9i64 ; pub const CONTAINER_SPATIAL_EDITOR_BOTTOM : i64 = 4i64 ; pub const CONTAINER_SPATIAL_EDITOR_MENU : i64 = 1i64 ; pub const CONTAINER_SPATIAL_EDITOR_SIDE_LEFT : i64 = 2i64 ; pub const CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT : i64 = 3i64 ; pub const CONTAINER_TOOLBAR : i64 = 0i64 ; pub const DOCK_SLOT_LEFT_BL : i64 = 1i64 ; pub const DOCK_SLOT_LEFT_BR : i64 = 3i64 ; pub const DOCK_SLOT_LEFT_UL : i64 = 0i64 ; pub const DOCK_SLOT_LEFT_UR : i64 = 2i64 ; pub const DOCK_SLOT_MAX : i64 = 8i64 ; pub const DOCK_SLOT_RIGHT_BL : i64 = 5i64 ; pub const DOCK_SLOT_RIGHT_BR : i64 = 7i64 ; pub const DOCK_SLOT_RIGHT_UL : i64 = 4i64 ; pub const DOCK_SLOT_RIGHT_UR : i64 = 6i64 ; } impl EditorPlugin { # [doc = "Adds a script at `path` to the Autoload list as `name`."] # [doc = ""] # [inline] pub fn add_autoload_singleton (& self , name : impl Into < GodotString > , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_autoload_singleton ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , path . into ()) ; } } # [doc = "Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free]."] # [doc = ""] # [inline] pub fn add_control_to_bottom_panel (& self , control : impl AsArg < crate :: generated :: control :: Control > , title : impl Into < GodotString >) -> Option < Ref < crate :: generated :: tool_button :: ToolButton , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_control_to_bottom_panel ; let ret = crate :: icalls :: icallptr_obj_obj_str (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr () , title . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tool_button :: ToolButton , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI.\nPlease remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).\nWhen your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [method Node.queue_free]."] # [doc = ""] # [inline] pub fn add_control_to_container (& self , container : i64 , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_control_to_container ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , container , control . as_arg_ptr ()) ; } } # [doc = "Adds the control to a specific dock slot (see [enum DockSlot] for options).\nIf the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.\nWhen your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free]."] # [doc = ""] # [inline] pub fn add_control_to_dock (& self , slot : i64 , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_control_to_dock ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , slot , control . as_arg_ptr ()) ; } } # [doc = "Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.\nWhen given node or resource is selected, the base type will be instanced (ie, \"Spatial\", \"Control\", \"Resource\"), then the script will be loaded and set to this object.\nYou can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using the `is` keyword.\nDuring run-time, this will be a simple object with a script so this function does not need to be called then."] # [doc = ""] # [inline] pub fn add_custom_type (& self , _type : impl Into < GodotString > , base : impl Into < GodotString > , script : impl AsArg < crate :: generated :: script :: Script > , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_custom_type ; let ret = crate :: icalls :: icallptr_void_str_str_obj_obj (method_bind , self . this . sys () . as_ptr () , _type . into () , base . into () , script . as_arg_ptr () , icon . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_export_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_export_plugin :: EditorExportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_export_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_import_plugin (& self , importer : impl AsArg < crate :: generated :: editor_import_plugin :: EditorImportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_import_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , importer . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_inspector_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_inspector_plugin :: EditorInspectorPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_inspector_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_scene_import_plugin (& self , scene_importer : impl AsArg < crate :: generated :: editor_scene_importer :: EditorSceneImporter >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_scene_import_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , scene_importer . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_spatial_gizmo_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_spatial_gizmo_plugin :: EditorSpatialGizmoPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_spatial_gizmo_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = "Adds a custom menu item to **Project > Tools** as `name` that calls `callback` on an instance of `handler` with a parameter `ud` when user activates it.\n# Default Arguments\n* `ud` - `null`"] # [doc = ""] # [inline] pub fn add_tool_menu_item (& self , name : impl Into < GodotString > , handler : impl AsArg < crate :: generated :: object :: Object > , callback : impl Into < GodotString > , ud : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_tool_menu_item ; let ret = crate :: icalls :: icallptr_void_str_obj_str_var (method_bind , self . this . sys () . as_ptr () , name . into () , handler . as_arg_ptr () , callback . into () , ud . owned_to_variant ()) ; } } # [doc = "Adds a custom submenu under **Project > Tools >** `name`. `submenu` should be an object of class [PopupMenu]. This submenu should be cleaned up using `remove_tool_menu_item(name)`."] # [doc = ""] # [inline] pub fn add_tool_submenu_item (& self , name : impl Into < GodotString > , submenu : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_tool_submenu_item ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , submenu . as_arg_ptr ()) ; } } # [doc = "Returns the [EditorInterface] object that gives you control over Godot editor's window and its functionalities."] # [doc = ""] # [inline] pub fn get_editor_interface (& self) -> Option < Ref < crate :: generated :: editor_interface :: EditorInterface , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . get_editor_interface ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_interface :: EditorInterface , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Gets the Editor's dialogue used for making scripts.\n**Note:** Users can configure it before use."] # [doc = ""] # [inline] pub fn get_script_create_dialog (& self) -> Option < Ref < crate :: generated :: script_create_dialog :: ScriptCreateDialog , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . get_script_create_dialog ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: script_create_dialog :: ScriptCreateDialog , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it."] # [doc = ""] # [inline] pub fn get_undo_redo (& self) -> Option < Ref < crate :: generated :: undo_redo :: UndoRedo , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . get_undo_redo ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: undo_redo :: UndoRedo , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn hide_bottom_panel (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . hide_bottom_panel ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn make_bottom_panel_item_visible (& self , item : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . make_bottom_panel_item_visible ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , item . as_arg_ptr ()) ; } } # [doc = "Queue save the project's editor layout."] # [doc = ""] # [inline] pub fn queue_save_layout (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . queue_save_layout ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes an Autoload `name` from the list."] # [doc = ""] # [inline] pub fn remove_autoload_singleton (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_autoload_singleton ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes the control from the bottom panel. You have to manually [method Node.queue_free] the control."] # [doc = ""] # [inline] pub fn remove_control_from_bottom_panel (& self , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_control_from_bottom_panel ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Removes the control from the specified container. You have to manually [method Node.queue_free] the control."] # [doc = ""] # [inline] pub fn remove_control_from_container (& self , container : i64 , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_control_from_container ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , container , control . as_arg_ptr ()) ; } } # [doc = "Removes the control from the dock. You have to manually [method Node.queue_free] the control."] # [doc = ""] # [inline] pub fn remove_control_from_docks (& self , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_control_from_docks ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Removes a custom type added by [method add_custom_type]."] # [doc = ""] # [inline] pub fn remove_custom_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_custom_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_export_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_export_plugin :: EditorExportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_export_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_import_plugin (& self , importer : impl AsArg < crate :: generated :: editor_import_plugin :: EditorImportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_import_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , importer . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_inspector_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_inspector_plugin :: EditorInspectorPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_inspector_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_scene_import_plugin (& self , scene_importer : impl AsArg < crate :: generated :: editor_scene_importer :: EditorSceneImporter >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_scene_import_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , scene_importer . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_spatial_gizmo_plugin (& self , plugin : impl AsArg < crate :: generated :: editor_spatial_gizmo_plugin :: EditorSpatialGizmoPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_spatial_gizmo_plugin ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = "Removes a menu `name` from **Project > Tools**."] # [doc = ""] # [inline] pub fn remove_tool_menu_item (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_tool_menu_item ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_force_draw_over_forwarding_enabled (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . set_force_draw_over_forwarding_enabled ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Use this method if you always want to receive inputs from 3D view screen inside [method forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene."] # [doc = ""] # [inline] pub fn set_input_event_forwarding_always_enabled (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . set_input_event_forwarding_always_enabled ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Updates the overlays of the editor (2D/3D) viewport."] # [doc = ""] # [inline] pub fn update_overlays (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . update_overlays ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorPlugin { } unsafe impl GodotObject for EditorPlugin { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorPlugin" } } impl QueueFree for EditorPlugin { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorPlugin { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorPlugin { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorPlugin { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorPluginMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_autoload_singleton : * mut sys :: godot_method_bind , pub add_control_to_bottom_panel : * mut sys :: godot_method_bind , pub add_control_to_container : * mut sys :: godot_method_bind , pub add_control_to_dock : * mut sys :: godot_method_bind , pub add_custom_type : * mut sys :: godot_method_bind , pub add_export_plugin : * mut sys :: godot_method_bind , pub add_import_plugin : * mut sys :: godot_method_bind , pub add_inspector_plugin : * mut sys :: godot_method_bind , pub add_scene_import_plugin : * mut sys :: godot_method_bind , pub add_spatial_gizmo_plugin : * mut sys :: godot_method_bind , pub add_tool_menu_item : * mut sys :: godot_method_bind , pub add_tool_submenu_item : * mut sys :: godot_method_bind , pub get_editor_interface : * mut sys :: godot_method_bind , pub get_script_create_dialog : * mut sys :: godot_method_bind , pub get_undo_redo : * mut sys :: godot_method_bind , pub hide_bottom_panel : * mut sys :: godot_method_bind , pub make_bottom_panel_item_visible : * mut sys :: godot_method_bind , pub queue_save_layout : * mut sys :: godot_method_bind , pub remove_autoload_singleton : * mut sys :: godot_method_bind , pub remove_control_from_bottom_panel : * mut sys :: godot_method_bind , pub remove_control_from_container : * mut sys :: godot_method_bind , pub remove_control_from_docks : * mut sys :: godot_method_bind , pub remove_custom_type : * mut sys :: godot_method_bind , pub remove_export_plugin : * mut sys :: godot_method_bind , pub remove_import_plugin : * mut sys :: godot_method_bind , pub remove_inspector_plugin : * mut sys :: godot_method_bind , pub remove_scene_import_plugin : * mut sys :: godot_method_bind , pub remove_spatial_gizmo_plugin : * mut sys :: godot_method_bind , pub remove_tool_menu_item : * mut sys :: godot_method_bind , pub set_force_draw_over_forwarding_enabled : * mut sys :: godot_method_bind , pub set_input_event_forwarding_always_enabled : * mut sys :: godot_method_bind , pub update_overlays : * mut sys :: godot_method_bind } impl EditorPluginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorPluginMethodTable = EditorPluginMethodTable { class_constructor : None , add_autoload_singleton : 0 as * mut sys :: godot_method_bind , add_control_to_bottom_panel : 0 as * mut sys :: godot_method_bind , add_control_to_container : 0 as * mut sys :: godot_method_bind , add_control_to_dock : 0 as * mut sys :: godot_method_bind , add_custom_type : 0 as * mut sys :: godot_method_bind , add_export_plugin : 0 as * mut sys :: godot_method_bind , add_import_plugin : 0 as * mut sys :: godot_method_bind , add_inspector_plugin : 0 as * mut sys :: godot_method_bind , add_scene_import_plugin : 0 as * mut sys :: godot_method_bind , add_spatial_gizmo_plugin : 0 as * mut sys :: godot_method_bind , add_tool_menu_item : 0 as * mut sys :: godot_method_bind , add_tool_submenu_item : 0 as * mut sys :: godot_method_bind , get_editor_interface : 0 as * mut sys :: godot_method_bind , get_script_create_dialog : 0 as * mut sys :: godot_method_bind , get_undo_redo : 0 as * mut sys :: godot_method_bind , hide_bottom_panel : 0 as * mut sys :: godot_method_bind , make_bottom_panel_item_visible : 0 as * mut sys :: godot_method_bind , queue_save_layout : 0 as * mut sys :: godot_method_bind , remove_autoload_singleton : 0 as * mut sys :: godot_method_bind , remove_control_from_bottom_panel : 0 as * mut sys :: godot_method_bind , remove_control_from_container : 0 as * mut sys :: godot_method_bind , remove_control_from_docks : 0 as * mut sys :: godot_method_bind , remove_custom_type : 0 as * mut sys :: godot_method_bind , remove_export_plugin : 0 as * mut sys :: godot_method_bind , remove_import_plugin : 0 as * mut sys :: godot_method_bind , remove_inspector_plugin : 0 as * mut sys :: godot_method_bind , remove_scene_import_plugin : 0 as * mut sys :: godot_method_bind , remove_spatial_gizmo_plugin : 0 as * mut sys :: godot_method_bind , remove_tool_menu_item : 0 as * mut sys :: godot_method_bind , set_force_draw_over_forwarding_enabled : 0 as * mut sys :: godot_method_bind , set_input_event_forwarding_always_enabled : 0 as * mut sys :: godot_method_bind , update_overlays : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorPluginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorPlugin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_autoload_singleton = (gd_api . godot_method_bind_get_method) (class_name , "add_autoload_singleton\0" . as_ptr () as * const c_char) ; table . add_control_to_bottom_panel = (gd_api . godot_method_bind_get_method) (class_name , "add_control_to_bottom_panel\0" . as_ptr () as * const c_char) ; table . add_control_to_container = (gd_api . godot_method_bind_get_method) (class_name , "add_control_to_container\0" . as_ptr () as * const c_char) ; table . add_control_to_dock = (gd_api . godot_method_bind_get_method) (class_name , "add_control_to_dock\0" . as_ptr () as * const c_char) ; table . add_custom_type = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_type\0" . as_ptr () as * const c_char) ; table . add_export_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_export_plugin\0" . as_ptr () as * const c_char) ; table . add_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_import_plugin\0" . as_ptr () as * const c_char) ; table . add_inspector_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_inspector_plugin\0" . as_ptr () as * const c_char) ; table . add_scene_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_scene_import_plugin\0" . as_ptr () as * const c_char) ; table . add_spatial_gizmo_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_spatial_gizmo_plugin\0" . as_ptr () as * const c_char) ; table . add_tool_menu_item = (gd_api . godot_method_bind_get_method) (class_name , "add_tool_menu_item\0" . as_ptr () as * const c_char) ; table . add_tool_submenu_item = (gd_api . godot_method_bind_get_method) (class_name , "add_tool_submenu_item\0" . as_ptr () as * const c_char) ; table . get_editor_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_interface\0" . as_ptr () as * const c_char) ; table . get_script_create_dialog = (gd_api . godot_method_bind_get_method) (class_name , "get_script_create_dialog\0" . as_ptr () as * const c_char) ; table . get_undo_redo = (gd_api . godot_method_bind_get_method) (class_name , "get_undo_redo\0" . as_ptr () as * const c_char) ; table . hide_bottom_panel = (gd_api . godot_method_bind_get_method) (class_name , "hide_bottom_panel\0" . as_ptr () as * const c_char) ; table . make_bottom_panel_item_visible = (gd_api . godot_method_bind_get_method) (class_name , "make_bottom_panel_item_visible\0" . as_ptr () as * const c_char) ; table . queue_save_layout = (gd_api . godot_method_bind_get_method) (class_name , "queue_save_layout\0" . as_ptr () as * const c_char) ; table . remove_autoload_singleton = (gd_api . godot_method_bind_get_method) (class_name , "remove_autoload_singleton\0" . as_ptr () as * const c_char) ; table . remove_control_from_bottom_panel = (gd_api . godot_method_bind_get_method) (class_name , "remove_control_from_bottom_panel\0" . as_ptr () as * const c_char) ; table . remove_control_from_container = (gd_api . godot_method_bind_get_method) (class_name , "remove_control_from_container\0" . as_ptr () as * const c_char) ; table . remove_control_from_docks = (gd_api . godot_method_bind_get_method) (class_name , "remove_control_from_docks\0" . as_ptr () as * const c_char) ; table . remove_custom_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_type\0" . as_ptr () as * const c_char) ; table . remove_export_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_export_plugin\0" . as_ptr () as * const c_char) ; table . remove_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_import_plugin\0" . as_ptr () as * const c_char) ; table . remove_inspector_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_inspector_plugin\0" . as_ptr () as * const c_char) ; table . remove_scene_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_scene_import_plugin\0" . as_ptr () as * const c_char) ; table . remove_spatial_gizmo_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_spatial_gizmo_plugin\0" . as_ptr () as * const c_char) ; table . remove_tool_menu_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_tool_menu_item\0" . as_ptr () as * const c_char) ; table . set_force_draw_over_forwarding_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_force_draw_over_forwarding_enabled\0" . as_ptr () as * const c_char) ; table . set_input_event_forwarding_always_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_input_event_forwarding_always_enabled\0" . as_ptr () as * const c_char) ; table . update_overlays = (gd_api . godot_method_bind_get_method) (class_name , "update_overlays\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:64:13215 [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 = "`tools class EditorProperty` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorproperty.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorProperty inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorProperty { this : RawObject < Self > , } impl EditorProperty { # [doc = "If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed."] # [doc = ""] # [inline] pub fn add_focusable (& self , control : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . add_focusable ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "If one or several properties have changed, this must be called. `field` is used in case your editor can modify fields separately (as an example, Vector3.x). The `changing` argument avoids the editor requesting this property to be refreshed (leave as `false` if unsure).\n# Default Arguments\n* `field` - `\"\"`\n* `changing` - `false`"] # [doc = ""] # [inline] pub fn emit_changed (& self , property : impl Into < GodotString > , value : impl OwnedToVariant , field : impl Into < GodotString > , changing : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . emit_changed ; let ret = crate :: icalls :: icallptr_void_str_var_str_bool (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant () , field . into () , changing) ; } } # [doc = "Gets the edited object."] # [doc = ""] # [inline] pub fn get_edited_object (& self) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . get_edited_object ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return the property."] # [doc = ""] # [inline] pub fn get_edited_property (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . get_edited_property ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Set this property to change the label (if you want to show one)."] # [doc = ""] # [inline] pub fn label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . get_label ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Override if you want to allow a custom tooltip over your property."] # [doc = ""] # [inline] pub fn get_tooltip_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . get_tooltip_text ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Used by the inspector, set to `true` when the property is checkable."] # [doc = ""] # [inline] pub fn is_checkable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_checkable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Used by the inspector, set to `true` when the property is checked."] # [doc = ""] # [inline] pub fn is_checked (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_checked ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Used by the inspector, set to `true` when the property must draw with error color. This is used for editable children's properties."] # [doc = ""] # [inline] pub fn is_draw_red (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_draw_red ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Used by the inspector, set to `true` when the property can add keys for animation."] # [doc = ""] # [inline] pub fn is_keying (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_keying ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Used by the inspector, set to `true` when the property is read-only."] # [doc = ""] # [inline] pub fn is_read_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_read_only ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Adds controls with this function if you want them on the bottom (below the label)."] # [doc = ""] # [inline] pub fn set_bottom_editor (& self , editor : impl AsArg < crate :: generated :: control :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_bottom_editor ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , editor . as_arg_ptr ()) ; } } # [doc = "Used by the inspector, set to `true` when the property is checkable."] # [doc = ""] # [inline] pub fn set_checkable (& self , checkable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_checkable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , checkable) ; } } # [doc = "Used by the inspector, set to `true` when the property is checked."] # [doc = ""] # [inline] pub fn set_checked (& self , checked : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_checked ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , checked) ; } } # [doc = "Used by the inspector, set to `true` when the property must draw with error color. This is used for editable children's properties."] # [doc = ""] # [inline] pub fn set_draw_red (& self , draw_red : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_draw_red ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , draw_red) ; } } # [doc = "Used by the inspector, set to `true` when the property can add keys for animation."] # [doc = ""] # [inline] pub fn set_keying (& self , keying : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_keying ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , keying) ; } } # [doc = "Set this property to change the label (if you want to show one)."] # [doc = ""] # [inline] pub fn set_label (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_label ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Used by the inspector, set to `true` when the property is read-only."] # [doc = ""] # [inline] pub fn set_read_only (& self , read_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_read_only ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , read_only) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorProperty { } unsafe impl GodotObject for EditorProperty { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorProperty" } } impl QueueFree for EditorProperty { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorProperty { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorProperty { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for EditorProperty { } unsafe impl SubClass < crate :: generated :: control :: Control > for EditorProperty { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for EditorProperty { } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorProperty { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorProperty { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorPropertyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_focusable : * mut sys :: godot_method_bind , pub emit_changed : * mut sys :: godot_method_bind , pub get_edited_object : * mut sys :: godot_method_bind , pub get_edited_property : * mut sys :: godot_method_bind , pub get_label : * mut sys :: godot_method_bind , pub get_tooltip_text : * mut sys :: godot_method_bind , pub is_checkable : * mut sys :: godot_method_bind , pub is_checked : * mut sys :: godot_method_bind , pub is_draw_red : * mut sys :: godot_method_bind , pub is_keying : * mut sys :: godot_method_bind , pub is_read_only : * mut sys :: godot_method_bind , pub set_bottom_editor : * mut sys :: godot_method_bind , pub set_checkable : * mut sys :: godot_method_bind , pub set_checked : * mut sys :: godot_method_bind , pub set_draw_red : * mut sys :: godot_method_bind , pub set_keying : * mut sys :: godot_method_bind , pub set_label : * mut sys :: godot_method_bind , pub set_read_only : * mut sys :: godot_method_bind } impl EditorPropertyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorPropertyMethodTable = EditorPropertyMethodTable { class_constructor : None , add_focusable : 0 as * mut sys :: godot_method_bind , emit_changed : 0 as * mut sys :: godot_method_bind , get_edited_object : 0 as * mut sys :: godot_method_bind , get_edited_property : 0 as * mut sys :: godot_method_bind , get_label : 0 as * mut sys :: godot_method_bind , get_tooltip_text : 0 as * mut sys :: godot_method_bind , is_checkable : 0 as * mut sys :: godot_method_bind , is_checked : 0 as * mut sys :: godot_method_bind , is_draw_red : 0 as * mut sys :: godot_method_bind , is_keying : 0 as * mut sys :: godot_method_bind , is_read_only : 0 as * mut sys :: godot_method_bind , set_bottom_editor : 0 as * mut sys :: godot_method_bind , set_checkable : 0 as * mut sys :: godot_method_bind , set_checked : 0 as * mut sys :: godot_method_bind , set_draw_red : 0 as * mut sys :: godot_method_bind , set_keying : 0 as * mut sys :: godot_method_bind , set_label : 0 as * mut sys :: godot_method_bind , set_read_only : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorPropertyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorProperty\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_focusable = (gd_api . godot_method_bind_get_method) (class_name , "add_focusable\0" . as_ptr () as * const c_char) ; table . emit_changed = (gd_api . godot_method_bind_get_method) (class_name , "emit_changed\0" . as_ptr () as * const c_char) ; table . get_edited_object = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_object\0" . as_ptr () as * const c_char) ; table . get_edited_property = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_property\0" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\0" . as_ptr () as * const c_char) ; table . get_tooltip_text = (gd_api . godot_method_bind_get_method) (class_name , "get_tooltip_text\0" . as_ptr () as * const c_char) ; table . is_checkable = (gd_api . godot_method_bind_get_method) (class_name , "is_checkable\0" . as_ptr () as * const c_char) ; table . is_checked = (gd_api . godot_method_bind_get_method) (class_name , "is_checked\0" . as_ptr () as * const c_char) ; table . is_draw_red = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_red\0" . as_ptr () as * const c_char) ; table . is_keying = (gd_api . godot_method_bind_get_method) (class_name , "is_keying\0" . as_ptr () as * const c_char) ; table . is_read_only = (gd_api . godot_method_bind_get_method) (class_name , "is_read_only\0" . as_ptr () as * const c_char) ; table . set_bottom_editor = (gd_api . godot_method_bind_get_method) (class_name , "set_bottom_editor\0" . as_ptr () as * const c_char) ; table . set_checkable = (gd_api . godot_method_bind_get_method) (class_name , "set_checkable\0" . as_ptr () as * const c_char) ; table . set_checked = (gd_api . godot_method_bind_get_method) (class_name , "set_checked\0" . as_ptr () as * const c_char) ; table . set_draw_red = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_red\0" . as_ptr () as * const c_char) ; table . set_keying = (gd_api . godot_method_bind_get_method) (class_name , "set_keying\0" . as_ptr () as * const c_char) ; table . set_label = (gd_api . godot_method_bind_get_method) (class_name , "set_label\0" . as_ptr () as * const c_char) ; table . set_read_only = (gd_api . godot_method_bind_get_method) (class_name , "set_read_only\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:70:3078 [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 PackedDataContainerRef` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_packeddatacontainerref.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPackedDataContainerRef inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PackedDataContainerRef { this : RawObject < Self > , } impl PackedDataContainerRef { # [doc = ""] # [doc = ""] # [inline] pub fn size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedDataContainerRefMethodTable :: get (get_api ()) . size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for PackedDataContainerRef { } unsafe impl GodotObject for PackedDataContainerRef { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PackedDataContainerRef" } } impl std :: ops :: Deref for PackedDataContainerRef { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PackedDataContainerRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PackedDataContainerRef { } unsafe impl SubClass < crate :: generated :: object :: Object > for PackedDataContainerRef { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PackedDataContainerRefMethodTable { pub class_constructor : sys :: godot_class_constructor , pub size : * mut sys :: godot_method_bind } impl PackedDataContainerRefMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PackedDataContainerRefMethodTable = PackedDataContainerRefMethodTable { class_constructor : None , size : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PackedDataContainerRefMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PackedDataContainerRef\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . size = (gd_api . godot_method_bind_get_method) (class_name , "size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:76:23650 [INFO] [stdout] | [INFO] [stdout] 76 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 76 | # [doc = "`core class Particles2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_particles2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Particles2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nParticles2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Particles2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawOrder (pub i64) ; impl DrawOrder { pub const INDEX : DrawOrder = DrawOrder (0i64) ; pub const LIFETIME : DrawOrder = DrawOrder (1i64) ; } impl From < i64 > for DrawOrder { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawOrder > for i64 { # [inline] fn from (v : DrawOrder) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Particles2D { pub const DRAW_ORDER_INDEX : i64 = 0i64 ; pub const DRAW_ORDER_LIFETIME : i64 = 1i64 ; } impl Particles2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Particles2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns a rectangle containing the positions of all existing particles."] # [doc = ""] # [inline] pub fn capture_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . capture_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Number of particles emitted in one emission cycle."] # [doc = ""] # [inline] pub fn amount (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_amount ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle draw order. Uses [enum DrawOrder] values."] # [doc = ""] # [inline] pub fn draw_order (& self) -> crate :: generated :: particles_2d :: DrawOrder { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_draw_order ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: particles_2d :: DrawOrder (ret) } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn explosiveness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_explosiveness_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn fractional_delta (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_fractional_delta ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount of time each particle will exist."] # [doc = ""] # [inline] pub fn lifetime (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_lifetime ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Normal map to be used for the [member texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn one_shot (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_one_shot ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn pre_process_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_pre_process_time ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]."] # [doc = ""] # [inline] pub fn process_material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_process_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn randomness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_randomness_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn use_local_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_use_local_coordinates ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Editor visibility helper."] # [doc = ""] # [inline] pub fn visibility_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_visibility_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn is_emitting (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . is_emitting ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Restarts all the existing particles."] # [doc = ""] # [inline] pub fn restart (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . restart ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Number of particles emitted in one emission cycle."] # [doc = ""] # [inline] pub fn set_amount (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_amount ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Particle draw order. Uses [enum DrawOrder] values."] # [doc = ""] # [inline] pub fn set_draw_order (& self , order : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_draw_order ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , order) ; } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn set_emitting (& self , emitting : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_emitting ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , emitting) ; } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn set_explosiveness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_explosiveness_ratio ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn set_fixed_fps (& self , fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_fixed_fps ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , fps) ; } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn set_fractional_delta (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_fractional_delta ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Amount of time each particle will exist."] # [doc = ""] # [inline] pub fn set_lifetime (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_lifetime ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [doc = "Normal map to be used for the [member texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_map (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn set_one_shot (& self , secs : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_one_shot ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn set_pre_process_time (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_pre_process_time ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , secs) ; } } # [doc = "[Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]."] # [doc = ""] # [inline] pub fn set_process_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_process_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn set_randomness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_randomness_ratio ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn set_use_local_coordinates (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_use_local_coordinates ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Editor visibility helper."] # [doc = ""] # [inline] pub fn set_visibility_rect (& self , visibility_rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_visibility_rect ; let ret = crate :: icalls :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , visibility_rect) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Particles2D { } unsafe impl GodotObject for Particles2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Particles2D" } } impl QueueFree for Particles2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Particles2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Particles2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Particles2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Particles2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Particles2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Particles2D { } impl Instanciable for Particles2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Particles2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Particles2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub capture_rect : * mut sys :: godot_method_bind , pub get_amount : * mut sys :: godot_method_bind , pub get_draw_order : * mut sys :: godot_method_bind , pub get_explosiveness_ratio : * mut sys :: godot_method_bind , pub get_fixed_fps : * mut sys :: godot_method_bind , pub get_fractional_delta : * mut sys :: godot_method_bind , pub get_lifetime : * mut sys :: godot_method_bind , pub get_normal_map : * mut sys :: godot_method_bind , pub get_one_shot : * mut sys :: godot_method_bind , pub get_pre_process_time : * mut sys :: godot_method_bind , pub get_process_material : * mut sys :: godot_method_bind , pub get_randomness_ratio : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_use_local_coordinates : * mut sys :: godot_method_bind , pub get_visibility_rect : * mut sys :: godot_method_bind , pub is_emitting : * mut sys :: godot_method_bind , pub restart : * mut sys :: godot_method_bind , pub set_amount : * mut sys :: godot_method_bind , pub set_draw_order : * mut sys :: godot_method_bind , pub set_emitting : * mut sys :: godot_method_bind , pub set_explosiveness_ratio : * mut sys :: godot_method_bind , pub set_fixed_fps : * mut sys :: godot_method_bind , pub set_fractional_delta : * mut sys :: godot_method_bind , pub set_lifetime : * mut sys :: godot_method_bind , pub set_normal_map : * mut sys :: godot_method_bind , pub set_one_shot : * mut sys :: godot_method_bind , pub set_pre_process_time : * mut sys :: godot_method_bind , pub set_process_material : * mut sys :: godot_method_bind , pub set_randomness_ratio : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_use_local_coordinates : * mut sys :: godot_method_bind , pub set_visibility_rect : * mut sys :: godot_method_bind } impl Particles2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Particles2DMethodTable = Particles2DMethodTable { class_constructor : None , capture_rect : 0 as * mut sys :: godot_method_bind , get_amount : 0 as * mut sys :: godot_method_bind , get_draw_order : 0 as * mut sys :: godot_method_bind , get_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , get_fixed_fps : 0 as * mut sys :: godot_method_bind , get_fractional_delta : 0 as * mut sys :: godot_method_bind , get_lifetime : 0 as * mut sys :: godot_method_bind , get_normal_map : 0 as * mut sys :: godot_method_bind , get_one_shot : 0 as * mut sys :: godot_method_bind , get_pre_process_time : 0 as * mut sys :: godot_method_bind , get_process_material : 0 as * mut sys :: godot_method_bind , get_randomness_ratio : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_use_local_coordinates : 0 as * mut sys :: godot_method_bind , get_visibility_rect : 0 as * mut sys :: godot_method_bind , is_emitting : 0 as * mut sys :: godot_method_bind , restart : 0 as * mut sys :: godot_method_bind , set_amount : 0 as * mut sys :: godot_method_bind , set_draw_order : 0 as * mut sys :: godot_method_bind , set_emitting : 0 as * mut sys :: godot_method_bind , set_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , set_fixed_fps : 0 as * mut sys :: godot_method_bind , set_fractional_delta : 0 as * mut sys :: godot_method_bind , set_lifetime : 0 as * mut sys :: godot_method_bind , set_normal_map : 0 as * mut sys :: godot_method_bind , set_one_shot : 0 as * mut sys :: godot_method_bind , set_pre_process_time : 0 as * mut sys :: godot_method_bind , set_process_material : 0 as * mut sys :: godot_method_bind , set_randomness_ratio : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_use_local_coordinates : 0 as * mut sys :: godot_method_bind , set_visibility_rect : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Particles2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Particles2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . capture_rect = (gd_api . godot_method_bind_get_method) (class_name , "capture_rect\0" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\0" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\0" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\0" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\0" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\0" . as_ptr () as * const c_char) ; table . get_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "get_pre_process_time\0" . as_ptr () as * const c_char) ; table . get_process_material = (gd_api . godot_method_bind_get_method) (class_name , "get_process_material\0" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . get_visibility_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_rect\0" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\0" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\0" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\0" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\0" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\0" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\0" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\0" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\0" . as_ptr () as * const c_char) ; table . set_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "set_pre_process_time\0" . as_ptr () as * const c_char) ; table . set_process_material = (gd_api . godot_method_bind_get_method) (class_name , "set_process_material\0" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . set_visibility_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility_rect\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:82:17552 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:88:13645 [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 UndoRedo` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_undoredo.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`UndoRedo` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nUndoRedo inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UndoRedo { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MergeMode (pub i64) ; impl MergeMode { pub const DISABLE : MergeMode = MergeMode (0i64) ; pub const ENDS : MergeMode = MergeMode (1i64) ; pub const ALL : MergeMode = MergeMode (2i64) ; } impl From < i64 > for MergeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MergeMode > for i64 { # [inline] fn from (v : MergeMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UndoRedo { pub const MERGE_ALL : i64 = 2i64 ; pub const MERGE_DISABLE : i64 = 0i64 ; pub const MERGE_ENDS : i64 = 1i64 ; } impl UndoRedo { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UndoRedoMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Register a method that will be called when the action is committed."] # [doc = ""] # [inline] pub fn add_do_method (& self , object : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_method ; let ret = crate :: icalls :: icallvarargs__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , varargs) ; ret } } # [doc = "Register a property value change for \"do\"."] # [doc = ""] # [inline] pub fn add_do_property (& self , object : impl AsArg < crate :: generated :: object :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_property ; let ret = crate :: icalls :: icallptr_void_obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Register a reference for \"do\" that will be erased if the \"do\" history is lost. This is useful mostly for new nodes created for the \"do\" call. Do not use for resources."] # [doc = ""] # [inline] pub fn add_do_reference (& self , object : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_reference ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr ()) ; } } # [doc = "Register a method that will be called when the action is undone."] # [doc = ""] # [inline] pub fn add_undo_method (& self , object : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_method ; let ret = crate :: icalls :: icallvarargs__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , varargs) ; ret } } # [doc = "Register a property value change for \"undo\"."] # [doc = ""] # [inline] pub fn add_undo_property (& self , object : impl AsArg < crate :: generated :: object :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_property ; let ret = crate :: icalls :: icallptr_void_obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Register a reference for \"undo\" that will be erased if the \"undo\" history is lost. This is useful mostly for nodes removed with the \"do\" call (not the \"undo\" call!)."] # [doc = ""] # [inline] pub fn add_undo_reference (& self , object : impl AsArg < crate :: generated :: object :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_reference ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr ()) ; } } # [doc = "Clear the undo/redo history and associated references.\nPassing `false` to `increase_version` will prevent the version number to be increased from this.\n# Default Arguments\n* `increase_version` - `true`"] # [doc = ""] # [inline] pub fn clear_history (& self , increase_version : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . clear_history ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , increase_version) ; } } # [doc = "Commit the action. All \"do\" methods/properties are called/set when this function is called."] # [doc = ""] # [inline] pub fn commit_action (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . commit_action ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].\nThe way actions are merged is dictated by the `merge_mode` argument. See [enum MergeMode] for details.\n# Default Arguments\n* `merge_mode` - `0`"] # [doc = ""] # [inline] pub fn create_action (& self , name : impl Into < GodotString > , merge_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . create_action ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , merge_mode) ; } } # [doc = "Gets the name of the current action."] # [doc = ""] # [inline] pub fn get_current_action_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . get_current_action_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Gets the version. Every time a new action is committed, the [UndoRedo]'s version number is increased automatically.\nThis is useful mostly to check if something changed from a saved version."] # [doc = ""] # [inline] pub fn get_version (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . get_version ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if a \"redo\" action is available."] # [doc = ""] # [inline] pub fn has_redo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . has_redo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if an \"undo\" action is available."] # [doc = ""] # [inline] pub fn has_undo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . has_undo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the [UndoRedo] is currently committing the action, i.e. running its \"do\" method or property change (see [method commit_action])."] # [doc = ""] # [inline] pub fn is_commiting_action (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . is_commiting_action ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Redo the last action."] # [doc = ""] # [inline] pub fn redo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . redo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Undo the last action."] # [doc = ""] # [inline] pub fn undo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . undo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for UndoRedo { } unsafe impl GodotObject for UndoRedo { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "UndoRedo" } } impl std :: ops :: Deref for UndoRedo { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UndoRedo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for UndoRedo { } impl Instanciable for UndoRedo { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { UndoRedo :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UndoRedoMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_do_method : * mut sys :: godot_method_bind , pub add_do_property : * mut sys :: godot_method_bind , pub add_do_reference : * mut sys :: godot_method_bind , pub add_undo_method : * mut sys :: godot_method_bind , pub add_undo_property : * mut sys :: godot_method_bind , pub add_undo_reference : * mut sys :: godot_method_bind , pub clear_history : * mut sys :: godot_method_bind , pub commit_action : * mut sys :: godot_method_bind , pub create_action : * mut sys :: godot_method_bind , pub get_current_action_name : * mut sys :: godot_method_bind , pub get_version : * mut sys :: godot_method_bind , pub has_redo : * mut sys :: godot_method_bind , pub has_undo : * mut sys :: godot_method_bind , pub is_commiting_action : * mut sys :: godot_method_bind , pub redo : * mut sys :: godot_method_bind , pub undo : * mut sys :: godot_method_bind } impl UndoRedoMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UndoRedoMethodTable = UndoRedoMethodTable { class_constructor : None , add_do_method : 0 as * mut sys :: godot_method_bind , add_do_property : 0 as * mut sys :: godot_method_bind , add_do_reference : 0 as * mut sys :: godot_method_bind , add_undo_method : 0 as * mut sys :: godot_method_bind , add_undo_property : 0 as * mut sys :: godot_method_bind , add_undo_reference : 0 as * mut sys :: godot_method_bind , clear_history : 0 as * mut sys :: godot_method_bind , commit_action : 0 as * mut sys :: godot_method_bind , create_action : 0 as * mut sys :: godot_method_bind , get_current_action_name : 0 as * mut sys :: godot_method_bind , get_version : 0 as * mut sys :: godot_method_bind , has_redo : 0 as * mut sys :: godot_method_bind , has_undo : 0 as * mut sys :: godot_method_bind , is_commiting_action : 0 as * mut sys :: godot_method_bind , redo : 0 as * mut sys :: godot_method_bind , undo : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { UndoRedoMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UndoRedo\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_do_method = (gd_api . godot_method_bind_get_method) (class_name , "add_do_method\0" . as_ptr () as * const c_char) ; table . add_do_property = (gd_api . godot_method_bind_get_method) (class_name , "add_do_property\0" . as_ptr () as * const c_char) ; table . add_do_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_do_reference\0" . as_ptr () as * const c_char) ; table . add_undo_method = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_method\0" . as_ptr () as * const c_char) ; table . add_undo_property = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_property\0" . as_ptr () as * const c_char) ; table . add_undo_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_reference\0" . as_ptr () as * const c_char) ; table . clear_history = (gd_api . godot_method_bind_get_method) (class_name , "clear_history\0" . as_ptr () as * const c_char) ; table . commit_action = (gd_api . godot_method_bind_get_method) (class_name , "commit_action\0" . as_ptr () as * const c_char) ; table . create_action = (gd_api . godot_method_bind_get_method) (class_name , "create_action\0" . as_ptr () as * const c_char) ; table . get_current_action_name = (gd_api . godot_method_bind_get_method) (class_name , "get_current_action_name\0" . as_ptr () as * const c_char) ; table . get_version = (gd_api . godot_method_bind_get_method) (class_name , "get_version\0" . as_ptr () as * const c_char) ; table . has_redo = (gd_api . godot_method_bind_get_method) (class_name , "has_redo\0" . as_ptr () as * const c_char) ; table . has_undo = (gd_api . godot_method_bind_get_method) (class_name , "has_undo\0" . as_ptr () as * const c_char) ; table . is_commiting_action = (gd_api . godot_method_bind_get_method) (class_name , "is_commiting_action\0" . as_ptr () as * const c_char) ; table . redo = (gd_api . godot_method_bind_get_method) (class_name , "redo\0" . as_ptr () as * const c_char) ; table . undo = (gd_api . godot_method_bind_get_method) (class_name , "undo\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:94:5667 [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 Physics2DShapeQueryResult` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physics2dshapequeryresult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysics2DShapeQueryResult inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DShapeQueryResult { this : RawObject < Self > , } impl Physics2DShapeQueryResult { # [doc = "Returns the number of objects that intersected with the shape."] # [doc = ""] # [inline] pub fn get_result_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [Object] that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_object (& self , idx : i64) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_object ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the instance ID of the [Object] that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_object_id (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_object_id ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the child index of the object's [Shape] that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_object_shape (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_object_shape ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the [RID] of the object that intersected with the shape at index `idx`."] # [doc = ""] # [inline] pub fn get_result_rid (& self , idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryResultMethodTable :: get (get_api ()) . get_result_rid ; let ret = crate :: icalls :: icallptr_rid_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Rid :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DShapeQueryResult { } unsafe impl GodotObject for Physics2DShapeQueryResult { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Physics2DShapeQueryResult" } } impl std :: ops :: Deref for Physics2DShapeQueryResult { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DShapeQueryResult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Physics2DShapeQueryResult { } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DShapeQueryResult { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DShapeQueryResultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_result_count : * mut sys :: godot_method_bind , pub get_result_object : * mut sys :: godot_method_bind , pub get_result_object_id : * mut sys :: godot_method_bind , pub get_result_object_shape : * mut sys :: godot_method_bind , pub get_result_rid : * mut sys :: godot_method_bind } impl Physics2DShapeQueryResultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DShapeQueryResultMethodTable = Physics2DShapeQueryResultMethodTable { class_constructor : None , get_result_count : 0 as * mut sys :: godot_method_bind , get_result_object : 0 as * mut sys :: godot_method_bind , get_result_object_id : 0 as * mut sys :: godot_method_bind , get_result_object_shape : 0 as * mut sys :: godot_method_bind , get_result_rid : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Physics2DShapeQueryResultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DShapeQueryResult\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_result_count = (gd_api . godot_method_bind_get_method) (class_name , "get_result_count\0" . as_ptr () as * const c_char) ; table . get_result_object = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object\0" . as_ptr () as * const c_char) ; table . get_result_object_id = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object_id\0" . as_ptr () as * const c_char) ; table . get_result_object_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_result_object_shape\0" . as_ptr () as * const c_char) ; table . get_result_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_result_rid\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:100:19948 [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 singleton class Engine` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_engine.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEngine inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Engine { this : RawObject < Self > , } impl Engine { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Engine\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns engine author information in a Dictionary.\n`lead_developers` - Array of Strings, lead developer names\n`founders` - Array of Strings, founder names\n`project_managers` - Array of Strings, project manager names\n`developers` - Array of Strings, developer names"] # [doc = ""] # [inline] pub fn get_author_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_author_info ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns an Array of copyright information Dictionaries.\n`name` - String, component name\n`parts` - Array of Dictionaries {`files`, `copyright`, `license`} describing subsections of the component"] # [doc = ""] # [inline] pub fn get_copyright_info (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_copyright_info ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a Dictionary of Arrays of donor names.\n{`platinum_sponsors`, `gold_sponsors`, `silver_sponsors`, `bronze_sponsors`, `mini_sponsors`, `gold_donors`, `silver_donors`, `bronze_donors`}"] # [doc = ""] # [inline] pub fn get_donor_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_donor_info ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns the total number of frames drawn. If the render loop is disabled with `--disable-render-loop` via command line, this returns `0`. See also [method get_idle_frames]."] # [doc = ""] # [inline] pub fn get_frames_drawn (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_frames_drawn ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the frames per second of the running game."] # [doc = ""] # [inline] pub fn get_frames_per_second (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_frames_per_second ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the total number of frames passed since engine initialization which is advanced on each **idle frame**, regardless of whether the render loop is enabled. See also [method get_frames_drawn]."] # [doc = ""] # [inline] pub fn get_idle_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_idle_frames ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to `60` or above, as Godot doesn't interpolate the physics step. As a result, values lower than `60` will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage."] # [doc = ""] # [inline] pub fn iterations_per_second (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_iterations_per_second ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns Dictionary of licenses used by Godot and included third party components."] # [doc = ""] # [inline] pub fn get_license_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_license_info ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns Godot license text."] # [doc = ""] # [inline] pub fn get_license_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_license_text ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the main loop object (see [MainLoop] and [SceneTree])."] # [doc = ""] # [inline] pub fn get_main_loop (& self) -> Option < Ref < crate :: generated :: main_loop :: MainLoop , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_main_loop ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: main_loop :: MainLoop , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the total number of frames passed since engine initialization which is advanced on each **physics frame**."] # [doc = ""] # [inline] pub fn get_physics_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_physics_frames ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation."] # [doc = ""] # [inline] pub fn get_physics_interpolation_fraction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_physics_interpolation_fraction ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended."] # [doc = ""] # [inline] pub fn physics_jitter_fix (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_physics_jitter_fix ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a global singleton with given `name`. Often used for plugins, e.g. `GodotPayment` on Android."] # [doc = ""] # [inline] pub fn get_singleton (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_singleton ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit."] # [doc = ""] # [inline] pub fn target_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_target_fps ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed."] # [doc = ""] # [inline] pub fn time_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_time_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the current engine version information in a Dictionary.\n`major` - Holds the major version number as an int\n`minor` - Holds the minor version number as an int\n`patch` - Holds the patch version number as an int\n`hex` - Holds the full version number encoded as a hexadecimal int with one byte (2 places) per number (see example below)\n`status` - Holds the status (e.g. \"beta\", \"rc1\", \"rc2\", ... \"stable\") as a String\n`build` - Holds the build name (e.g. \"custom_build\") as a String\n`hash` - Holds the full Git commit hash as a String\n`year` - Holds the year the version was released in as an int\n`string` - `major` + `minor` + `patch` + `status` + `build` in a single String\nThe `hex` value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, \"3.1.12\" would be `0x03010C`. **Note:** It's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code:\n```gdscript\nif Engine.get_version_info().hex >= 0x030200:\n # Do things specific to version 3.2 or later\nelse:\n # Do things specific to versions before 3.2\n```"] # [doc = ""] # [inline] pub fn get_version_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_version_info ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns `true` if a singleton with given `name` exists in global scope."] # [doc = ""] # [inline] pub fn has_singleton (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . has_singleton ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "If `true`, it is running inside the editor. Useful for tool scripts."] # [doc = ""] # [inline] pub fn is_editor_hint (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . is_editor_hint ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the game is inside the fixed process and physics phase of the game loop."] # [doc = ""] # [inline] pub fn is_in_physics_frame (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . is_in_physics_frame ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, it is running inside the editor. Useful for tool scripts."] # [doc = ""] # [inline] pub fn set_editor_hint (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_editor_hint ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to `60` or above, as Godot doesn't interpolate the physics step. As a result, values lower than `60` will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage."] # [doc = ""] # [inline] pub fn set_iterations_per_second (& self , iterations_per_second : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_iterations_per_second ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , iterations_per_second) ; } } # [doc = "Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended."] # [doc = ""] # [inline] pub fn set_physics_jitter_fix (& self , physics_jitter_fix : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_physics_jitter_fix ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , physics_jitter_fix) ; } } # [doc = "The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit."] # [doc = ""] # [inline] pub fn set_target_fps (& self , target_fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_target_fps ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , target_fps) ; } } # [doc = "Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed."] # [doc = ""] # [inline] pub fn set_time_scale (& self , time_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_time_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time_scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Engine { } unsafe impl GodotObject for Engine { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Engine" } } impl std :: ops :: Deref for Engine { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Engine { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for Engine { } unsafe impl Send for Engine { } unsafe impl Sync for Engine { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EngineMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_author_info : * mut sys :: godot_method_bind , pub get_copyright_info : * mut sys :: godot_method_bind , pub get_donor_info : * mut sys :: godot_method_bind , pub get_frames_drawn : * mut sys :: godot_method_bind , pub get_frames_per_second : * mut sys :: godot_method_bind , pub get_idle_frames : * mut sys :: godot_method_bind , pub get_iterations_per_second : * mut sys :: godot_method_bind , pub get_license_info : * mut sys :: godot_method_bind , pub get_license_text : * mut sys :: godot_method_bind , pub get_main_loop : * mut sys :: godot_method_bind , pub get_physics_frames : * mut sys :: godot_method_bind , pub get_physics_interpolation_fraction : * mut sys :: godot_method_bind , pub get_physics_jitter_fix : * mut sys :: godot_method_bind , pub get_singleton : * mut sys :: godot_method_bind , pub get_target_fps : * mut sys :: godot_method_bind , pub get_time_scale : * mut sys :: godot_method_bind , pub get_version_info : * mut sys :: godot_method_bind , pub has_singleton : * mut sys :: godot_method_bind , pub is_editor_hint : * mut sys :: godot_method_bind , pub is_in_physics_frame : * mut sys :: godot_method_bind , pub set_editor_hint : * mut sys :: godot_method_bind , pub set_iterations_per_second : * mut sys :: godot_method_bind , pub set_physics_jitter_fix : * mut sys :: godot_method_bind , pub set_target_fps : * mut sys :: godot_method_bind , pub set_time_scale : * mut sys :: godot_method_bind } impl EngineMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EngineMethodTable = EngineMethodTable { class_constructor : None , get_author_info : 0 as * mut sys :: godot_method_bind , get_copyright_info : 0 as * mut sys :: godot_method_bind , get_donor_info : 0 as * mut sys :: godot_method_bind , get_frames_drawn : 0 as * mut sys :: godot_method_bind , get_frames_per_second : 0 as * mut sys :: godot_method_bind , get_idle_frames : 0 as * mut sys :: godot_method_bind , get_iterations_per_second : 0 as * mut sys :: godot_method_bind , get_license_info : 0 as * mut sys :: godot_method_bind , get_license_text : 0 as * mut sys :: godot_method_bind , get_main_loop : 0 as * mut sys :: godot_method_bind , get_physics_frames : 0 as * mut sys :: godot_method_bind , get_physics_interpolation_fraction : 0 as * mut sys :: godot_method_bind , get_physics_jitter_fix : 0 as * mut sys :: godot_method_bind , get_singleton : 0 as * mut sys :: godot_method_bind , get_target_fps : 0 as * mut sys :: godot_method_bind , get_time_scale : 0 as * mut sys :: godot_method_bind , get_version_info : 0 as * mut sys :: godot_method_bind , has_singleton : 0 as * mut sys :: godot_method_bind , is_editor_hint : 0 as * mut sys :: godot_method_bind , is_in_physics_frame : 0 as * mut sys :: godot_method_bind , set_editor_hint : 0 as * mut sys :: godot_method_bind , set_iterations_per_second : 0 as * mut sys :: godot_method_bind , set_physics_jitter_fix : 0 as * mut sys :: godot_method_bind , set_target_fps : 0 as * mut sys :: godot_method_bind , set_time_scale : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EngineMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Engine\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_author_info = (gd_api . godot_method_bind_get_method) (class_name , "get_author_info\0" . as_ptr () as * const c_char) ; table . get_copyright_info = (gd_api . godot_method_bind_get_method) (class_name , "get_copyright_info\0" . as_ptr () as * const c_char) ; table . get_donor_info = (gd_api . godot_method_bind_get_method) (class_name , "get_donor_info\0" . as_ptr () as * const c_char) ; table . get_frames_drawn = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_drawn\0" . as_ptr () as * const c_char) ; table . get_frames_per_second = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_per_second\0" . as_ptr () as * const c_char) ; table . get_idle_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_idle_frames\0" . as_ptr () as * const c_char) ; table . get_iterations_per_second = (gd_api . godot_method_bind_get_method) (class_name , "get_iterations_per_second\0" . as_ptr () as * const c_char) ; table . get_license_info = (gd_api . godot_method_bind_get_method) (class_name , "get_license_info\0" . as_ptr () as * const c_char) ; table . get_license_text = (gd_api . godot_method_bind_get_method) (class_name , "get_license_text\0" . as_ptr () as * const c_char) ; table . get_main_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_main_loop\0" . as_ptr () as * const c_char) ; table . get_physics_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_frames\0" . as_ptr () as * const c_char) ; table . get_physics_interpolation_fraction = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_interpolation_fraction\0" . as_ptr () as * const c_char) ; table . get_physics_jitter_fix = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_jitter_fix\0" . as_ptr () as * const c_char) ; table . get_singleton = (gd_api . godot_method_bind_get_method) (class_name , "get_singleton\0" . as_ptr () as * const c_char) ; table . get_target_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_target_fps\0" . as_ptr () as * const c_char) ; table . get_time_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_time_scale\0" . as_ptr () as * const c_char) ; table . get_version_info = (gd_api . godot_method_bind_get_method) (class_name , "get_version_info\0" . as_ptr () as * const c_char) ; table . has_singleton = (gd_api . godot_method_bind_get_method) (class_name , "has_singleton\0" . as_ptr () as * const c_char) ; table . is_editor_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_editor_hint\0" . as_ptr () as * const c_char) ; table . is_in_physics_frame = (gd_api . godot_method_bind_get_method) (class_name , "is_in_physics_frame\0" . as_ptr () as * const c_char) ; table . set_editor_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_hint\0" . as_ptr () as * const c_char) ; table . set_iterations_per_second = (gd_api . godot_method_bind_get_method) (class_name , "set_iterations_per_second\0" . as_ptr () as * const c_char) ; table . set_physics_jitter_fix = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_jitter_fix\0" . as_ptr () as * const c_char) ; table . set_target_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_target_fps\0" . as_ptr () as * const c_char) ; table . set_time_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_time_scale\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:106:8021 [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 InputEventKey` inherits `InputEventWithModifiers` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventkey.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventKey inherits methods from:\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventKey { this : RawObject < Self > , } impl InputEventKey { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventKeyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The key scancode, which corresponds to one of the [enum KeyList] constants.\nTo get a human-readable representation of the [InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [InputEventKey]."] # [doc = ""] # [inline] pub fn scancode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_scancode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the scancode combined with modifier keys such as `Shift` or `Alt`. See also [InputEventWithModifiers].\nTo get a human-readable representation of the [InputEventKey] with modifiers, use `OS.get_scancode_string(event.get_scancode_with_modifiers())` where `event` is the [InputEventKey]."] # [doc = ""] # [inline] pub fn get_scancode_with_modifiers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_scancode_with_modifiers ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information."] # [doc = ""] # [inline] pub fn unicode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_unicode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the key was already pressed before this event. It means the user is holding the key down."] # [doc = ""] # [inline] pub fn set_echo (& self , echo : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_echo ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , echo) ; } } # [doc = "If `true`, the key's state is pressed. If `false`, the key's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } # [doc = "The key scancode, which corresponds to one of the [enum KeyList] constants.\nTo get a human-readable representation of the [InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [InputEventKey]."] # [doc = ""] # [inline] pub fn set_scancode (& self , scancode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_scancode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , scancode) ; } } # [doc = "The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information."] # [doc = ""] # [inline] pub fn set_unicode (& self , unicode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_unicode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , unicode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventKey { } unsafe impl GodotObject for InputEventKey { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventKey" } } impl std :: ops :: Deref for InputEventKey { type Target = crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventKey { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventKey { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventKey { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventKey { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventKey { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventKey { } impl Instanciable for InputEventKey { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventKey :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventKeyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_scancode : * mut sys :: godot_method_bind , pub get_scancode_with_modifiers : * mut sys :: godot_method_bind , pub get_unicode : * mut sys :: godot_method_bind , pub set_echo : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind , pub set_scancode : * mut sys :: godot_method_bind , pub set_unicode : * mut sys :: godot_method_bind } impl InputEventKeyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventKeyMethodTable = InputEventKeyMethodTable { class_constructor : None , get_scancode : 0 as * mut sys :: godot_method_bind , get_scancode_with_modifiers : 0 as * mut sys :: godot_method_bind , get_unicode : 0 as * mut sys :: godot_method_bind , set_echo : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind , set_scancode : 0 as * mut sys :: godot_method_bind , set_unicode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { InputEventKeyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventKey\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_scancode = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode\0" . as_ptr () as * const c_char) ; table . get_scancode_with_modifiers = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode_with_modifiers\0" . as_ptr () as * const c_char) ; table . get_unicode = (gd_api . godot_method_bind_get_method) (class_name , "get_unicode\0" . as_ptr () as * const c_char) ; table . set_echo = (gd_api . godot_method_bind_get_method) (class_name , "set_echo\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; table . set_scancode = (gd_api . godot_method_bind_get_method) (class_name , "set_scancode\0" . as_ptr () as * const c_char) ; table . set_unicode = (gd_api . godot_method_bind_get_method) (class_name , "set_unicode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:112:10770 [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 CollisionPolygon2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_collisionpolygon2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CollisionPolygon2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCollisionPolygon2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionPolygon2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BuildMode (pub i64) ; impl BuildMode { pub const SOLIDS : BuildMode = BuildMode (0i64) ; pub const SEGMENTS : BuildMode = BuildMode (1i64) ; } impl From < i64 > for BuildMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BuildMode > for i64 { # [inline] fn from (v : BuildMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CollisionPolygon2D { pub const BUILD_SEGMENTS : i64 = 1i64 ; pub const BUILD_SOLIDS : i64 = 0i64 ; } impl CollisionPolygon2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CollisionPolygon2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Collision build mode. Use one of the [enum BuildMode] constants."] # [doc = ""] # [inline] pub fn build_mode (& self) -> crate :: generated :: collision_polygon_2d :: BuildMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . get_build_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: collision_polygon_2d :: BuildMode (ret) } } # [doc = "The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity."] # [doc = ""] # [inline] pub fn one_way_collision_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . get_one_way_collision_margin ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PoolVector2Array], not a reference."] # [doc = ""] # [inline] pub fn polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "If `true`, no collisions will be detected."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects."] # [doc = ""] # [inline] pub fn is_one_way_collision_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . is_one_way_collision_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Collision build mode. Use one of the [enum BuildMode] constants."] # [doc = ""] # [inline] pub fn set_build_mode (& self , build_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_build_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , build_mode) ; } } # [doc = "If `true`, no collisions will be detected."] # [doc = ""] # [inline] pub fn set_disabled (& self , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , disabled) ; } } # [doc = "If `true`, only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects."] # [doc = ""] # [inline] pub fn set_one_way_collision (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_one_way_collision ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity."] # [doc = ""] # [inline] pub fn set_one_way_collision_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_one_way_collision_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PoolVector2Array], not a reference."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionPolygon2D { } unsafe impl GodotObject for CollisionPolygon2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionPolygon2D" } } impl QueueFree for CollisionPolygon2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionPolygon2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionPolygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for CollisionPolygon2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for CollisionPolygon2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionPolygon2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for CollisionPolygon2D { } impl Instanciable for CollisionPolygon2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CollisionPolygon2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionPolygon2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_build_mode : * mut sys :: godot_method_bind , pub get_one_way_collision_margin : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub is_one_way_collision_enabled : * mut sys :: godot_method_bind , pub set_build_mode : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_one_way_collision : * mut sys :: godot_method_bind , pub set_one_way_collision_margin : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind } impl CollisionPolygon2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionPolygon2DMethodTable = CollisionPolygon2DMethodTable { class_constructor : None , get_build_mode : 0 as * mut sys :: godot_method_bind , get_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , is_one_way_collision_enabled : 0 as * mut sys :: godot_method_bind , set_build_mode : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_one_way_collision : 0 as * mut sys :: godot_method_bind , set_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CollisionPolygon2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionPolygon2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_build_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_build_mode\0" . as_ptr () as * const c_char) ; table . get_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . is_one_way_collision_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_one_way_collision_enabled\0" . as_ptr () as * const c_char) ; table . set_build_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_build_mode\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_one_way_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision\0" . as_ptr () as * const c_char) ; table . set_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:118:21299 [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 Node2D` inherits `CanvasItem` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_node2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Node2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNode2D inherits methods from:\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Node2D { this : RawObject < Self > , } impl Node2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Node2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Multiplies the current scale by the `ratio` vector."] # [doc = ""] # [inline] pub fn apply_scale (& self , ratio : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . apply_scale ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = "Returns the angle between the node and the `point` in radians."] # [doc = ""] # [inline] pub fn get_angle_to (& self , point : Vector2) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_angle_to ; let ret = crate :: icalls :: icallptr_f64_vec2 (method_bind , self . this . sys () . as_ptr () , point) ; ret as _ } } # [doc = "Global position."] # [doc = ""] # [inline] pub fn global_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_global_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Global rotation in radians."] # [doc = ""] # [inline] pub fn global_rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_global_rotation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Global rotation in degrees."] # [doc = ""] # [inline] pub fn global_rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_global_rotation_degrees ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Global scale."] # [doc = ""] # [inline] pub fn global_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_global_scale ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Position, relative to the node's parent."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform2D] relative to this node's parent."] # [doc = ""] # [inline] pub fn get_relative_transform_to_parent (& self , parent : impl AsArg < crate :: generated :: node :: Node >) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_relative_transform_to_parent ; let ret = crate :: icalls :: icallptr_trans2D_obj (method_bind , self . this . sys () . as_ptr () , parent . as_arg_ptr ()) ; mem :: transmute (ret) } } # [doc = "Rotation in radians, relative to the node's parent."] # [doc = ""] # [inline] pub fn rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_rotation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Rotation in degrees, relative to the node's parent."] # [doc = ""] # [inline] pub fn rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_rotation_degrees ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The node's scale. Unscaled value: `(1, 1)`."] # [doc = ""] # [inline] pub fn scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_scale ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others."] # [doc = ""] # [inline] pub fn z_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_z_index ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Adds the `offset` vector to the node's global position."] # [doc = ""] # [inline] pub fn global_translate (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . global_translate ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "If `true`, the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5."] # [doc = ""] # [inline] pub fn is_z_relative (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . is_z_relative ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Rotates the node so it points towards the `point`, which is expected to use global coordinates."] # [doc = ""] # [inline] pub fn look_at (& self , point : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . look_at ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , point) ; } } # [doc = "Applies a local translation on the node's X axis based on the [method Node._process]'s `delta`. If `scaled` is `false`, normalizes the movement.\n# Default Arguments\n* `scaled` - `false`"] # [doc = ""] # [inline] pub fn move_local_x (& self , delta : f64 , scaled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . move_local_x ; let ret = crate :: icalls :: icallptr_void_f64_bool (method_bind , self . this . sys () . as_ptr () , delta , scaled) ; } } # [doc = "Applies a local translation on the node's Y axis based on the [method Node._process]'s `delta`. If `scaled` is `false`, normalizes the movement.\n# Default Arguments\n* `scaled` - `false`"] # [doc = ""] # [inline] pub fn move_local_y (& self , delta : f64 , scaled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . move_local_y ; let ret = crate :: icalls :: icallptr_void_f64_bool (method_bind , self . this . sys () . as_ptr () , delta , scaled) ; } } # [doc = "Applies a rotation to the node, in radians, starting from its current rotation."] # [doc = ""] # [inline] pub fn rotate (& self , radians : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . rotate ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [doc = "Global position."] # [doc = ""] # [inline] pub fn set_global_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Global rotation in radians."] # [doc = ""] # [inline] pub fn set_global_rotation (& self , radians : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_rotation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [doc = "Global rotation in degrees."] # [doc = ""] # [inline] pub fn set_global_rotation_degrees (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_rotation_degrees ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "Global scale."] # [doc = ""] # [inline] pub fn set_global_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_scale ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Global [Transform2D]."] # [doc = ""] # [inline] pub fn set_global_transform (& self , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_transform ; let ret = crate :: icalls :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = "Position, relative to the node's parent."] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Rotation in radians, relative to the node's parent."] # [doc = ""] # [inline] pub fn set_rotation (& self , radians : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_rotation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [doc = "Rotation in degrees, relative to the node's parent."] # [doc = ""] # [inline] pub fn set_rotation_degrees (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_rotation_degrees ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "The node's scale. Unscaled value: `(1, 1)`."] # [doc = ""] # [inline] pub fn set_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_scale ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Local [Transform2D]."] # [doc = ""] # [inline] pub fn set_transform (& self , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = "If `true`, the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5."] # [doc = ""] # [inline] pub fn set_z_as_relative (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_z_as_relative ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others."] # [doc = ""] # [inline] pub fn set_z_index (& self , z_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_z_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , z_index) ; } } # [doc = "Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the [Node2D] it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position."] # [doc = ""] # [inline] pub fn to_global (& self , local_point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . to_global ; let ret = crate :: icalls :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , local_point) ; mem :: transmute (ret) } } # [doc = "Transforms the provided global position into a position in local coordinate space. The output will be local relative to the [Node2D] it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent."] # [doc = ""] # [inline] pub fn to_local (& self , global_point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . to_local ; let ret = crate :: icalls :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , global_point) ; mem :: transmute (ret) } } # [doc = "Translates the node by the given `offset` in local coordinates."] # [doc = ""] # [inline] pub fn translate (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . translate ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Node2D { } unsafe impl GodotObject for Node2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Node2D" } } impl QueueFree for Node2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Node2D { type Target = crate :: generated :: canvas_item :: CanvasItem ; # [inline] fn deref (& self) -> & crate :: generated :: canvas_item :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Node2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: canvas_item :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Node2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Node2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Node2D { } impl Instanciable for Node2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Node2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Node2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub apply_scale : * mut sys :: godot_method_bind , pub get_angle_to : * mut sys :: godot_method_bind , pub get_global_position : * mut sys :: godot_method_bind , pub get_global_rotation : * mut sys :: godot_method_bind , pub get_global_rotation_degrees : * mut sys :: godot_method_bind , pub get_global_scale : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_relative_transform_to_parent : * mut sys :: godot_method_bind , pub get_rotation : * mut sys :: godot_method_bind , pub get_rotation_degrees : * mut sys :: godot_method_bind , pub get_scale : * mut sys :: godot_method_bind , pub get_z_index : * mut sys :: godot_method_bind , pub global_translate : * mut sys :: godot_method_bind , pub is_z_relative : * mut sys :: godot_method_bind , pub look_at : * mut sys :: godot_method_bind , pub move_local_x : * mut sys :: godot_method_bind , pub move_local_y : * mut sys :: godot_method_bind , pub rotate : * mut sys :: godot_method_bind , pub set_global_position : * mut sys :: godot_method_bind , pub set_global_rotation : * mut sys :: godot_method_bind , pub set_global_rotation_degrees : * mut sys :: godot_method_bind , pub set_global_scale : * mut sys :: godot_method_bind , pub set_global_transform : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind , pub set_rotation : * mut sys :: godot_method_bind , pub set_rotation_degrees : * mut sys :: godot_method_bind , pub set_scale : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind , pub set_z_as_relative : * mut sys :: godot_method_bind , pub set_z_index : * mut sys :: godot_method_bind , pub to_global : * mut sys :: godot_method_bind , pub to_local : * mut sys :: godot_method_bind , pub translate : * mut sys :: godot_method_bind } impl Node2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Node2DMethodTable = Node2DMethodTable { class_constructor : None , apply_scale : 0 as * mut sys :: godot_method_bind , get_angle_to : 0 as * mut sys :: godot_method_bind , get_global_position : 0 as * mut sys :: godot_method_bind , get_global_rotation : 0 as * mut sys :: godot_method_bind , get_global_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_global_scale : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_relative_transform_to_parent : 0 as * mut sys :: godot_method_bind , get_rotation : 0 as * mut sys :: godot_method_bind , get_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_scale : 0 as * mut sys :: godot_method_bind , get_z_index : 0 as * mut sys :: godot_method_bind , global_translate : 0 as * mut sys :: godot_method_bind , is_z_relative : 0 as * mut sys :: godot_method_bind , look_at : 0 as * mut sys :: godot_method_bind , move_local_x : 0 as * mut sys :: godot_method_bind , move_local_y : 0 as * mut sys :: godot_method_bind , rotate : 0 as * mut sys :: godot_method_bind , set_global_position : 0 as * mut sys :: godot_method_bind , set_global_rotation : 0 as * mut sys :: godot_method_bind , set_global_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_global_scale : 0 as * mut sys :: godot_method_bind , set_global_transform : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind , set_rotation : 0 as * mut sys :: godot_method_bind , set_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_scale : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind , set_z_as_relative : 0 as * mut sys :: godot_method_bind , set_z_index : 0 as * mut sys :: godot_method_bind , to_global : 0 as * mut sys :: godot_method_bind , to_local : 0 as * mut sys :: godot_method_bind , translate : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Node2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Node2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . apply_scale = (gd_api . godot_method_bind_get_method) (class_name , "apply_scale\0" . as_ptr () as * const c_char) ; table . get_angle_to = (gd_api . godot_method_bind_get_method) (class_name , "get_angle_to\0" . as_ptr () as * const c_char) ; table . get_global_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_position\0" . as_ptr () as * const c_char) ; table . get_global_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rotation\0" . as_ptr () as * const c_char) ; table . get_global_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_global_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_global_scale\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_relative_transform_to_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_relative_transform_to_parent\0" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\0" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\0" . as_ptr () as * const c_char) ; table . get_z_index = (gd_api . godot_method_bind_get_method) (class_name , "get_z_index\0" . as_ptr () as * const c_char) ; table . global_translate = (gd_api . godot_method_bind_get_method) (class_name , "global_translate\0" . as_ptr () as * const c_char) ; table . is_z_relative = (gd_api . godot_method_bind_get_method) (class_name , "is_z_relative\0" . as_ptr () as * const c_char) ; table . look_at = (gd_api . godot_method_bind_get_method) (class_name , "look_at\0" . as_ptr () as * const c_char) ; table . move_local_x = (gd_api . godot_method_bind_get_method) (class_name , "move_local_x\0" . as_ptr () as * const c_char) ; table . move_local_y = (gd_api . godot_method_bind_get_method) (class_name , "move_local_y\0" . as_ptr () as * const c_char) ; table . rotate = (gd_api . godot_method_bind_get_method) (class_name , "rotate\0" . as_ptr () as * const c_char) ; table . set_global_position = (gd_api . godot_method_bind_get_method) (class_name , "set_global_position\0" . as_ptr () as * const c_char) ; table . set_global_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_global_rotation\0" . as_ptr () as * const c_char) ; table . set_global_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_global_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_global_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_global_scale\0" . as_ptr () as * const c_char) ; table . set_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_global_transform\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\0" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; table . set_z_as_relative = (gd_api . godot_method_bind_get_method) (class_name , "set_z_as_relative\0" . as_ptr () as * const c_char) ; table . set_z_index = (gd_api . godot_method_bind_get_method) (class_name , "set_z_index\0" . as_ptr () as * const c_char) ; table . to_global = (gd_api . godot_method_bind_get_method) (class_name , "to_global\0" . as_ptr () as * const c_char) ; table . to_local = (gd_api . godot_method_bind_get_method) (class_name , "to_local\0" . as_ptr () as * const c_char) ; table . translate = (gd_api . godot_method_bind_get_method) (class_name , "translate\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:124:25426 [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 Polygon2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_polygon2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Polygon2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPolygon2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Polygon2D { this : RawObject < Self > , } impl Polygon2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Polygon2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a bone with the specified `path` and `weights`."] # [doc = ""] # [inline] pub fn add_bone (& self , path : impl Into < NodePath > , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . add_bone ; let ret = crate :: icalls :: icallptr_void_nodepath_f32arr (method_bind , self . this . sys () . as_ptr () , path . into () , weights) ; } } # [doc = "Removes all bones from this [Polygon2D]."] # [doc = ""] # [inline] pub fn clear_bones (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . clear_bones ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes the specified bone from this [Polygon2D]."] # [doc = ""] # [inline] pub fn erase_bone (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . erase_bone ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "If `true`, polygon edges will be anti-aliased."] # [doc = ""] # [inline] pub fn antialiased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_antialiased ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of bones in this [Polygon2D]."] # [doc = ""] # [inline] pub fn get_bone_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the path to the node associated with the specified bone."] # [doc = ""] # [inline] pub fn get_bone_path (& self , index : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_path ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , index) ; NodePath :: from_sys (ret) } } # [doc = "Returns the height values of the specified bone."] # [doc = ""] # [inline] pub fn get_bone_weights (& self , index : i64) -> Float32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_weights ; let ret = crate :: icalls :: icallptr_f32arr_i64 (method_bind , self . this . sys () . as_ptr () , index) ; Float32Array :: from_sys (ret) } } # [doc = "The polygon's fill color. If `texture` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in `vertex_colors`."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn internal_vertex_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_internal_vertex_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, polygon will be inverted, containing the area outside the defined points and extending to the `invert_border`."] # [doc = ""] # [inline] pub fn invert (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Added padding applied to the bounding box when using `invert`. Setting this value too small may result in a \"Bad Polygon\" error."] # [doc = ""] # [inline] pub fn invert_border (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert_border ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The offset applied to each vertex."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The polygon's list of vertices. The final point will be connected to the first.\n**Note:** This returns a copy of the [PoolVector2Array] rather than a reference."] # [doc = ""] # [inline] pub fn polygon (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn polygons (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_polygons ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn skeleton (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The polygon's fill texture. Use `uv` to set texture coordinates."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Amount to offset the polygon's `texture`. If `(0, 0)` the texture's origin (its top-left corner) will be placed at the polygon's `position`."] # [doc = ""] # [inline] pub fn texture_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The texture's rotation in radians."] # [doc = ""] # [inline] pub fn texture_rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_rotation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture's rotation in degrees."] # [doc = ""] # [inline] pub fn texture_rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_rotation_degrees ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount to multiply the `uv` coordinates when using a `texture`. Larger values make the texture smaller, and vice versa."] # [doc = ""] # [inline] pub fn texture_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_scale ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Texture coordinates for each vertex of the polygon. There should be one `uv` per polygon vertex. If there are fewer, undefined vertices will use `(0, 0)`."] # [doc = ""] # [inline] pub fn uv (& self) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_uv ; let ret = crate :: icalls :: icallptr_vec2arr (method_bind , self . this . sys () . as_ptr ()) ; Vector2Array :: from_sys (ret) } } # [doc = "Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use `color`."] # [doc = ""] # [inline] pub fn vertex_colors (& self) -> ColorArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_vertex_colors ; let ret = crate :: icalls :: icallptr_colorarr (method_bind , self . this . sys () . as_ptr ()) ; ColorArray :: from_sys (ret) } } # [doc = "If `true`, polygon edges will be anti-aliased."] # [doc = ""] # [inline] pub fn set_antialiased (& self , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_antialiased ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , antialiased) ; } } # [doc = "Sets the path to the node associated with the specified bone."] # [doc = ""] # [inline] pub fn set_bone_path (& self , index : i64 , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_bone_path ; let ret = crate :: icalls :: icallptr_void_i64_nodepath (method_bind , self . this . sys () . as_ptr () , index , path . into ()) ; } } # [doc = "Sets the weight values for the specified bone."] # [doc = ""] # [inline] pub fn set_bone_weights (& self , index : i64 , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_bone_weights ; let ret = crate :: icalls :: icallptr_void_i64_f32arr (method_bind , self . this . sys () . as_ptr () , index , weights) ; } } # [doc = "The polygon's fill color. If `texture` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in `vertex_colors`."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_internal_vertex_count (& self , internal_vertex_count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_internal_vertex_count ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , internal_vertex_count) ; } } # [doc = "If `true`, polygon will be inverted, containing the area outside the defined points and extending to the `invert_border`."] # [doc = ""] # [inline] pub fn set_invert (& self , invert : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_invert ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , invert) ; } } # [doc = "Added padding applied to the bounding box when using `invert`. Setting this value too small may result in a \"Bad Polygon\" error."] # [doc = ""] # [inline] pub fn set_invert_border (& self , invert_border : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_invert_border ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , invert_border) ; } } # [doc = "The offset applied to each vertex."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The polygon's list of vertices. The final point will be connected to the first.\n**Note:** This returns a copy of the [PoolVector2Array] rather than a reference."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_polygons (& self , polygons : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_polygons ; let ret = crate :: icalls :: icallptr_void_arr (method_bind , self . this . sys () . as_ptr () , polygons) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skeleton (& self , skeleton : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_skeleton ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , skeleton . into ()) ; } } # [doc = "The polygon's fill texture. Use `uv` to set texture coordinates."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Amount to offset the polygon's `texture`. If `(0, 0)` the texture's origin (its top-left corner) will be placed at the polygon's `position`."] # [doc = ""] # [inline] pub fn set_texture_offset (& self , texture_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , texture_offset) ; } } # [doc = "The texture's rotation in radians."] # [doc = ""] # [inline] pub fn set_texture_rotation (& self , texture_rotation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_rotation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation) ; } } # [doc = "The texture's rotation in degrees."] # [doc = ""] # [inline] pub fn set_texture_rotation_degrees (& self , texture_rotation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_rotation_degrees ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation) ; } } # [doc = "Amount to multiply the `uv` coordinates when using a `texture`. Larger values make the texture smaller, and vice versa."] # [doc = ""] # [inline] pub fn set_texture_scale (& self , texture_scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_scale ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , texture_scale) ; } } # [doc = "Texture coordinates for each vertex of the polygon. There should be one `uv` per polygon vertex. If there are fewer, undefined vertices will use `(0, 0)`."] # [doc = ""] # [inline] pub fn set_uv (& self , uv : Vector2Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_uv ; let ret = crate :: icalls :: icallptr_void_vec2arr (method_bind , self . this . sys () . as_ptr () , uv) ; } } # [doc = "Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use `color`."] # [doc = ""] # [inline] pub fn set_vertex_colors (& self , vertex_colors : ColorArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_vertex_colors ; let ret = crate :: icalls :: icallptr_void_colorarr (method_bind , self . this . sys () . as_ptr () , vertex_colors) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Polygon2D { } unsafe impl GodotObject for Polygon2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Polygon2D" } } impl QueueFree for Polygon2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Polygon2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Polygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Polygon2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Polygon2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Polygon2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Polygon2D { } impl Instanciable for Polygon2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Polygon2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Polygon2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bone : * mut sys :: godot_method_bind , pub clear_bones : * mut sys :: godot_method_bind , pub erase_bone : * mut sys :: godot_method_bind , pub get_antialiased : * mut sys :: godot_method_bind , pub get_bone_count : * mut sys :: godot_method_bind , pub get_bone_path : * mut sys :: godot_method_bind , pub get_bone_weights : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_internal_vertex_count : * mut sys :: godot_method_bind , pub get_invert : * mut sys :: godot_method_bind , pub get_invert_border : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub get_polygons : * mut sys :: godot_method_bind , pub get_skeleton : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_offset : * mut sys :: godot_method_bind , pub get_texture_rotation : * mut sys :: godot_method_bind , pub get_texture_rotation_degrees : * mut sys :: godot_method_bind , pub get_texture_scale : * mut sys :: godot_method_bind , pub get_uv : * mut sys :: godot_method_bind , pub get_vertex_colors : * mut sys :: godot_method_bind , pub set_antialiased : * mut sys :: godot_method_bind , pub set_bone_path : * mut sys :: godot_method_bind , pub set_bone_weights : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_internal_vertex_count : * mut sys :: godot_method_bind , pub set_invert : * mut sys :: godot_method_bind , pub set_invert_border : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind , pub set_polygons : * mut sys :: godot_method_bind , pub set_skeleton : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_offset : * mut sys :: godot_method_bind , pub set_texture_rotation : * mut sys :: godot_method_bind , pub set_texture_rotation_degrees : * mut sys :: godot_method_bind , pub set_texture_scale : * mut sys :: godot_method_bind , pub set_uv : * mut sys :: godot_method_bind , pub set_vertex_colors : * mut sys :: godot_method_bind } impl Polygon2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Polygon2DMethodTable = Polygon2DMethodTable { class_constructor : None , add_bone : 0 as * mut sys :: godot_method_bind , clear_bones : 0 as * mut sys :: godot_method_bind , erase_bone : 0 as * mut sys :: godot_method_bind , get_antialiased : 0 as * mut sys :: godot_method_bind , get_bone_count : 0 as * mut sys :: godot_method_bind , get_bone_path : 0 as * mut sys :: godot_method_bind , get_bone_weights : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_internal_vertex_count : 0 as * mut sys :: godot_method_bind , get_invert : 0 as * mut sys :: godot_method_bind , get_invert_border : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , get_polygons : 0 as * mut sys :: godot_method_bind , get_skeleton : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_offset : 0 as * mut sys :: godot_method_bind , get_texture_rotation : 0 as * mut sys :: godot_method_bind , get_texture_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_texture_scale : 0 as * mut sys :: godot_method_bind , get_uv : 0 as * mut sys :: godot_method_bind , get_vertex_colors : 0 as * mut sys :: godot_method_bind , set_antialiased : 0 as * mut sys :: godot_method_bind , set_bone_path : 0 as * mut sys :: godot_method_bind , set_bone_weights : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_internal_vertex_count : 0 as * mut sys :: godot_method_bind , set_invert : 0 as * mut sys :: godot_method_bind , set_invert_border : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind , set_polygons : 0 as * mut sys :: godot_method_bind , set_skeleton : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_offset : 0 as * mut sys :: godot_method_bind , set_texture_rotation : 0 as * mut sys :: godot_method_bind , set_texture_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_texture_scale : 0 as * mut sys :: godot_method_bind , set_uv : 0 as * mut sys :: godot_method_bind , set_vertex_colors : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Polygon2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Polygon2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bone = (gd_api . godot_method_bind_get_method) (class_name , "add_bone\0" . as_ptr () as * const c_char) ; table . clear_bones = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones\0" . as_ptr () as * const c_char) ; table . erase_bone = (gd_api . godot_method_bind_get_method) (class_name , "erase_bone\0" . as_ptr () as * const c_char) ; table . get_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "get_antialiased\0" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\0" . as_ptr () as * const c_char) ; table . get_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_path\0" . as_ptr () as * const c_char) ; table . get_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_weights\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_internal_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "get_internal_vertex_count\0" . as_ptr () as * const c_char) ; table . get_invert = (gd_api . godot_method_bind_get_method) (class_name , "get_invert\0" . as_ptr () as * const c_char) ; table . get_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "get_invert_border\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_polygons = (gd_api . godot_method_bind_get_method) (class_name , "get_polygons\0" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_offset\0" . as_ptr () as * const c_char) ; table . get_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_rotation\0" . as_ptr () as * const c_char) ; table . get_texture_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_scale\0" . as_ptr () as * const c_char) ; table . get_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_uv\0" . as_ptr () as * const c_char) ; table . get_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_colors\0" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\0" . as_ptr () as * const c_char) ; table . set_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_path\0" . as_ptr () as * const c_char) ; table . set_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_weights\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_internal_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "set_internal_vertex_count\0" . as_ptr () as * const c_char) ; table . set_invert = (gd_api . godot_method_bind_get_method) (class_name , "set_invert\0" . as_ptr () as * const c_char) ; table . set_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "set_invert_border\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; table . set_polygons = (gd_api . godot_method_bind_get_method) (class_name , "set_polygons\0" . as_ptr () as * const c_char) ; table . set_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_offset\0" . as_ptr () as * const c_char) ; table . set_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_rotation\0" . as_ptr () as * const c_char) ; table . set_texture_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_scale\0" . as_ptr () as * const c_char) ; table . set_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_uv\0" . as_ptr () as * const c_char) ; table . set_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_colors\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:130:4401 [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 VisualShaderNodeGlobalExpression` inherits `VisualShaderNodeExpression` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodeglobalexpression.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeGlobalExpression inherits methods from:\n - [VisualShaderNodeExpression](struct.VisualShaderNodeExpression.html)\n - [VisualShaderNodeGroupBase](struct.VisualShaderNodeGroupBase.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeGlobalExpression { this : RawObject < Self > , } impl VisualShaderNodeGlobalExpression { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeGlobalExpressionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeGlobalExpression { } unsafe impl GodotObject for VisualShaderNodeGlobalExpression { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeGlobalExpression" } } impl std :: ops :: Deref for VisualShaderNodeGlobalExpression { type Target = crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeGlobalExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_expression :: VisualShaderNodeExpression > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node_group_base :: VisualShaderNodeGroupBase > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeGlobalExpression { } impl Instanciable for VisualShaderNodeGlobalExpression { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeGlobalExpression :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeGlobalExpressionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeGlobalExpressionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeGlobalExpressionMethodTable = VisualShaderNodeGlobalExpressionMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeGlobalExpressionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeGlobalExpression\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:136:5046 [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 CapsuleShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_capsuleshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCapsuleShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CapsuleShape { this : RawObject < Self > , } impl CapsuleShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CapsuleShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CapsuleShape { } unsafe impl GodotObject for CapsuleShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CapsuleShape" } } impl std :: ops :: Deref for CapsuleShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CapsuleShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for CapsuleShape { } impl Instanciable for CapsuleShape { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CapsuleShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CapsuleShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl CapsuleShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CapsuleShapeMethodTable = CapsuleShapeMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CapsuleShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CapsuleShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:142:4667 [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 VisualScriptResourcePath` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptresourcepath.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptResourcePath inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptResourcePath { this : RawObject < Self > , } impl VisualScriptResourcePath { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptResourcePathMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn resource_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptResourcePathMethodTable :: get (get_api ()) . get_resource_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_resource_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptResourcePathMethodTable :: get (get_api ()) . set_resource_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptResourcePath { } unsafe impl GodotObject for VisualScriptResourcePath { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptResourcePath" } } impl std :: ops :: Deref for VisualScriptResourcePath { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptResourcePath { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptResourcePath { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptResourcePath { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptResourcePath { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptResourcePath { } impl Instanciable for VisualScriptResourcePath { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptResourcePath :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptResourcePathMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_resource_path : * mut sys :: godot_method_bind , pub set_resource_path : * mut sys :: godot_method_bind } impl VisualScriptResourcePathMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptResourcePathMethodTable = VisualScriptResourcePathMethodTable { class_constructor : None , get_resource_path : 0 as * mut sys :: godot_method_bind , set_resource_path : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptResourcePathMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptResourcePath\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_resource_path = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_path\0" . as_ptr () as * const c_char) ; table . set_resource_path = (gd_api . godot_method_bind_get_method) (class_name , "set_resource_path\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:148:12142 [INFO] [stdout] | [INFO] [stdout] 148 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 148 | # [doc = "`core class AudioEffectChorus` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectchorus.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectChorus inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectChorus { this : RawObject < Self > , } impl AudioEffectChorus { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectChorusMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The effect's raw signal."] # [doc = ""] # [inline] pub fn dry (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_dry ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The amount of voices in the effect."] # [doc = ""] # [inline] pub fn voice_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The voice's cutoff frequency."] # [doc = ""] # [inline] pub fn voice_cutoff_hz (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_cutoff_hz ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [doc = "The voice's signal delay."] # [doc = ""] # [inline] pub fn voice_delay_ms (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_delay_ms ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [doc = "The voice filter's depth."] # [doc = ""] # [inline] pub fn voice_depth_ms (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_depth_ms ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [doc = "The voice's volume."] # [doc = ""] # [inline] pub fn voice_level_db (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_level_db ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [doc = "The voice's pan level."] # [doc = ""] # [inline] pub fn voice_pan (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_pan ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [doc = "The voice's filter rate."] # [doc = ""] # [inline] pub fn voice_rate_hz (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_rate_hz ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , voice_idx) ; ret as _ } } # [doc = "The effect's processed signal."] # [doc = ""] # [inline] pub fn wet (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_wet ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The effect's raw signal."] # [doc = ""] # [inline] pub fn set_dry (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_dry ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "The amount of voices in the effect."] # [doc = ""] # [inline] pub fn set_voice_count (& self , voices : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_count ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , voices) ; } } # [doc = "The voice's cutoff frequency."] # [doc = ""] # [inline] pub fn set_voice_cutoff_hz (& self , voice_idx : i64 , cutoff_hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_cutoff_hz ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , cutoff_hz) ; } } # [doc = "The voice's signal delay."] # [doc = ""] # [inline] pub fn set_voice_delay_ms (& self , voice_idx : i64 , delay_ms : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_delay_ms ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , delay_ms) ; } } # [doc = "The voice filter's depth."] # [doc = ""] # [inline] pub fn set_voice_depth_ms (& self , voice_idx : i64 , depth_ms : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_depth_ms ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , depth_ms) ; } } # [doc = "The voice's volume."] # [doc = ""] # [inline] pub fn set_voice_level_db (& self , voice_idx : i64 , level_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_level_db ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , level_db) ; } } # [doc = "The voice's pan level."] # [doc = ""] # [inline] pub fn set_voice_pan (& self , voice_idx : i64 , pan : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_pan ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , pan) ; } } # [doc = "The voice's filter rate."] # [doc = ""] # [inline] pub fn set_voice_rate_hz (& self , voice_idx : i64 , rate_hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_rate_hz ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx , rate_hz) ; } } # [doc = "The effect's processed signal."] # [doc = ""] # [inline] pub fn set_wet (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_wet ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectChorus { } unsafe impl GodotObject for AudioEffectChorus { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectChorus" } } impl std :: ops :: Deref for AudioEffectChorus { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectChorus { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectChorus { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectChorus { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectChorus { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectChorus { } impl Instanciable for AudioEffectChorus { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectChorus :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectChorusMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_dry : * mut sys :: godot_method_bind , pub get_voice_count : * mut sys :: godot_method_bind , pub get_voice_cutoff_hz : * mut sys :: godot_method_bind , pub get_voice_delay_ms : * mut sys :: godot_method_bind , pub get_voice_depth_ms : * mut sys :: godot_method_bind , pub get_voice_level_db : * mut sys :: godot_method_bind , pub get_voice_pan : * mut sys :: godot_method_bind , pub get_voice_rate_hz : * mut sys :: godot_method_bind , pub get_wet : * mut sys :: godot_method_bind , pub set_dry : * mut sys :: godot_method_bind , pub set_voice_count : * mut sys :: godot_method_bind , pub set_voice_cutoff_hz : * mut sys :: godot_method_bind , pub set_voice_delay_ms : * mut sys :: godot_method_bind , pub set_voice_depth_ms : * mut sys :: godot_method_bind , pub set_voice_level_db : * mut sys :: godot_method_bind , pub set_voice_pan : * mut sys :: godot_method_bind , pub set_voice_rate_hz : * mut sys :: godot_method_bind , pub set_wet : * mut sys :: godot_method_bind } impl AudioEffectChorusMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectChorusMethodTable = AudioEffectChorusMethodTable { class_constructor : None , get_dry : 0 as * mut sys :: godot_method_bind , get_voice_count : 0 as * mut sys :: godot_method_bind , get_voice_cutoff_hz : 0 as * mut sys :: godot_method_bind , get_voice_delay_ms : 0 as * mut sys :: godot_method_bind , get_voice_depth_ms : 0 as * mut sys :: godot_method_bind , get_voice_level_db : 0 as * mut sys :: godot_method_bind , get_voice_pan : 0 as * mut sys :: godot_method_bind , get_voice_rate_hz : 0 as * mut sys :: godot_method_bind , get_wet : 0 as * mut sys :: godot_method_bind , set_dry : 0 as * mut sys :: godot_method_bind , set_voice_count : 0 as * mut sys :: godot_method_bind , set_voice_cutoff_hz : 0 as * mut sys :: godot_method_bind , set_voice_delay_ms : 0 as * mut sys :: godot_method_bind , set_voice_depth_ms : 0 as * mut sys :: godot_method_bind , set_voice_level_db : 0 as * mut sys :: godot_method_bind , set_voice_pan : 0 as * mut sys :: godot_method_bind , set_voice_rate_hz : 0 as * mut sys :: godot_method_bind , set_wet : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectChorusMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectChorus\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_dry = (gd_api . godot_method_bind_get_method) (class_name , "get_dry\0" . as_ptr () as * const c_char) ; table . get_voice_count = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_count\0" . as_ptr () as * const c_char) ; table . get_voice_cutoff_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_cutoff_hz\0" . as_ptr () as * const c_char) ; table . get_voice_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_delay_ms\0" . as_ptr () as * const c_char) ; table . get_voice_depth_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_depth_ms\0" . as_ptr () as * const c_char) ; table . get_voice_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_level_db\0" . as_ptr () as * const c_char) ; table . get_voice_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_pan\0" . as_ptr () as * const c_char) ; table . get_voice_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_rate_hz\0" . as_ptr () as * const c_char) ; table . get_wet = (gd_api . godot_method_bind_get_method) (class_name , "get_wet\0" . as_ptr () as * const c_char) ; table . set_dry = (gd_api . godot_method_bind_get_method) (class_name , "set_dry\0" . as_ptr () as * const c_char) ; table . set_voice_count = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_count\0" . as_ptr () as * const c_char) ; table . set_voice_cutoff_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_cutoff_hz\0" . as_ptr () as * const c_char) ; table . set_voice_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_delay_ms\0" . as_ptr () as * const c_char) ; table . set_voice_depth_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_depth_ms\0" . as_ptr () as * const c_char) ; table . set_voice_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_level_db\0" . as_ptr () as * const c_char) ; table . set_voice_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_pan\0" . as_ptr () as * const c_char) ; table . set_voice_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_rate_hz\0" . as_ptr () as * const c_char) ; table . set_wet = (gd_api . godot_method_bind_get_method) (class_name , "set_wet\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:154:11944 [INFO] [stdout] | [INFO] [stdout] 154 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 154 | # [doc = "`core class NinePatchRect` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_ninepatchrect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`NinePatchRect` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNinePatchRect inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NinePatchRect { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AxisStretchMode (pub i64) ; impl AxisStretchMode { pub const STRETCH : AxisStretchMode = AxisStretchMode (0i64) ; pub const TILE : AxisStretchMode = AxisStretchMode (1i64) ; pub const TILE_FIT : AxisStretchMode = AxisStretchMode (2i64) ; } impl From < i64 > for AxisStretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AxisStretchMode > for i64 { # [inline] fn from (v : AxisStretchMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NinePatchRect { pub const AXIS_STRETCH_MODE_STRETCH : i64 = 0i64 ; pub const AXIS_STRETCH_MODE_TILE : i64 = 1i64 ; pub const AXIS_STRETCH_MODE_TILE_FIT : i64 = 2i64 ; } impl NinePatchRect { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NinePatchRectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Doesn't do anything at the time of writing."] # [doc = ""] # [inline] pub fn h_axis_stretch_mode (& self) -> crate :: generated :: nine_patch_rect :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_h_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: nine_patch_rect :: AxisStretchMode (ret) } } # [doc = "The height of the 9-slice's top row."] # [doc = ""] # [inline] pub fn patch_margin (& self , margin : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_patch_margin ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture."] # [doc = ""] # [inline] pub fn region_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_region_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The node's texture resource."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Doesn't do anything at the time of writing."] # [doc = ""] # [inline] pub fn v_axis_stretch_mode (& self) -> crate :: generated :: nine_patch_rect :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_v_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: nine_patch_rect :: AxisStretchMode (ret) } } # [doc = "If `true`, draw the panel's center. Else, only draw the 9-slice's borders."] # [doc = ""] # [inline] pub fn is_draw_center_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . is_draw_center_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, draw the panel's center. Else, only draw the 9-slice's borders."] # [doc = ""] # [inline] pub fn set_draw_center (& self , draw_center : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_draw_center ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , draw_center) ; } } # [doc = "Doesn't do anything at the time of writing."] # [doc = ""] # [inline] pub fn set_h_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_h_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The height of the 9-slice's top row."] # [doc = ""] # [inline] pub fn set_patch_margin (& self , margin : i64 , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_patch_margin ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , margin , value) ; } } # [doc = "Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture."] # [doc = ""] # [inline] pub fn set_region_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_region_rect ; let ret = crate :: icalls :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "The node's texture resource."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Doesn't do anything at the time of writing."] # [doc = ""] # [inline] pub fn set_v_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_v_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NinePatchRect { } unsafe impl GodotObject for NinePatchRect { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NinePatchRect" } } impl QueueFree for NinePatchRect { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for NinePatchRect { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NinePatchRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: node :: Node > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: object :: Object > for NinePatchRect { } impl Instanciable for NinePatchRect { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { NinePatchRect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NinePatchRectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub get_patch_margin : * mut sys :: godot_method_bind , pub get_region_rect : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_v_axis_stretch_mode : * mut sys :: godot_method_bind , pub is_draw_center_enabled : * mut sys :: godot_method_bind , pub set_draw_center : * mut sys :: godot_method_bind , pub set_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub set_patch_margin : * mut sys :: godot_method_bind , pub set_region_rect : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_v_axis_stretch_mode : * mut sys :: godot_method_bind } impl NinePatchRectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NinePatchRectMethodTable = NinePatchRectMethodTable { class_constructor : None , get_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , get_patch_margin : 0 as * mut sys :: godot_method_bind , get_region_rect : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , is_draw_center_enabled : 0 as * mut sys :: godot_method_bind , set_draw_center : 0 as * mut sys :: godot_method_bind , set_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , set_patch_margin : 0 as * mut sys :: godot_method_bind , set_region_rect : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { NinePatchRectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NinePatchRect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . get_patch_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_patch_margin\0" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . is_draw_center_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_center_enabled\0" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\0" . as_ptr () as * const c_char) ; table . set_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_patch_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_patch_margin\0" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:160:6914 [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 = "`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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:166:5083 [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 World2D` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_world2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWorld2D inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct World2D { this : RawObject < Self > , } impl World2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = World2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing."] # [doc = ""] # [inline] pub fn canvas (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = World2DMethodTable :: get (get_api ()) . get_canvas ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Direct access to the world's physics 2D space state. Used for querying current and potential collisions. Must only be accessed from the main thread within `_physics_process(delta)`."] # [doc = ""] # [inline] pub fn direct_space_state (& self) -> Option < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = World2DMethodTable :: get (get_api ()) . get_direct_space_state ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area."] # [doc = ""] # [inline] pub fn space (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = World2DMethodTable :: get (get_api ()) . get_space ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for World2D { } unsafe impl GodotObject for World2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "World2D" } } impl std :: ops :: Deref for World2D { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for World2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for World2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for World2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for World2D { } impl Instanciable for World2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { World2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct World2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_canvas : * mut sys :: godot_method_bind , pub get_direct_space_state : * mut sys :: godot_method_bind , pub get_space : * mut sys :: godot_method_bind } impl World2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : World2DMethodTable = World2DMethodTable { class_constructor : None , get_canvas : 0 as * mut sys :: godot_method_bind , get_direct_space_state : 0 as * mut sys :: godot_method_bind , get_space : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { World2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "World2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_canvas = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas\0" . as_ptr () as * const c_char) ; table . get_direct_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_direct_space_state\0" . as_ptr () as * const c_char) ; table . get_space = (gd_api . godot_method_bind_get_method) (class_name , "get_space\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:172:22860 [INFO] [stdout] | [INFO] [stdout] 172 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 172 | # [doc = "`core class SoftBody` inherits `MeshInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_softbody.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`SoftBody` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSoftBody inherits methods from:\n - [MeshInstance](struct.MeshInstance.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SoftBody { this : RawObject < Self > , } impl SoftBody { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SoftBodyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a body to the list of bodies that this body can't collide with."] # [doc = ""] # [inline] pub fn add_collision_exception_with (& self , body : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . add_collision_exception_with ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn areaAngular_stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_areaAngular_stiffness ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an array of nodes that were added as collision exceptions for this body."] # [doc = ""] # [inline] pub fn get_collision_exceptions (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_exceptions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The physics layers this SoftBody is in.\nCollidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.\nA contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the collision mask."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The physics layers this SoftBody scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the collision mask."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn damping_coefficient (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_damping_coefficient ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn drag_coefficient (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_drag_coefficient ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn linear_stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_linear_stiffness ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "[NodePath] to a [CollisionObject] this SoftBody should avoid clipping."] # [doc = ""] # [inline] pub fn parent_collision_ignore (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_parent_collision_ignore ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn pose_matching_coefficient (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_pose_matching_coefficient ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn pressure_coefficient (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_pressure_coefficient ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Increasing this value will improve the resulting simulation, but can affect performance. Use with care."] # [doc = ""] # [inline] pub fn simulation_precision (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_simulation_precision ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The SoftBody's mass."] # [doc = ""] # [inline] pub fn total_mass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_total_mass ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn volume_stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_volume_stiffness ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the [SoftBody] will respond to [RayCast]s."] # [doc = ""] # [inline] pub fn is_ray_pickable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . is_ray_pickable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes a body from the list of bodies that this body can't collide with."] # [doc = ""] # [inline] pub fn remove_collision_exception_with (& self , body : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . remove_collision_exception_with ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_areaAngular_stiffness (& self , areaAngular_stiffness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_areaAngular_stiffness ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , areaAngular_stiffness) ; } } # [doc = "The physics layers this SoftBody is in.\nCollidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.\nA contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , collision_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_layer) ; } } # [doc = "Sets individual bits on the layer mask. Use this if you only need to change one layer's value."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The physics layers this SoftBody scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , collision_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_mask) ; } } # [doc = "Sets individual bits on the collision mask. Use this if you only need to change one layer's value."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_damping_coefficient (& self , damping_coefficient : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_damping_coefficient ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , damping_coefficient) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_drag_coefficient (& self , drag_coefficient : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_drag_coefficient ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , drag_coefficient) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_linear_stiffness (& self , linear_stiffness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_linear_stiffness ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , linear_stiffness) ; } } # [doc = "[NodePath] to a [CollisionObject] this SoftBody should avoid clipping."] # [doc = ""] # [inline] pub fn set_parent_collision_ignore (& self , parent_collision_ignore : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_parent_collision_ignore ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , parent_collision_ignore . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_pose_matching_coefficient (& self , pose_matching_coefficient : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_pose_matching_coefficient ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pose_matching_coefficient) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_pressure_coefficient (& self , pressure_coefficient : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_pressure_coefficient ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pressure_coefficient) ; } } # [doc = "If `true`, the [SoftBody] will respond to [RayCast]s."] # [doc = ""] # [inline] pub fn set_ray_pickable (& self , ray_pickable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_ray_pickable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ray_pickable) ; } } # [doc = "Increasing this value will improve the resulting simulation, but can affect performance. Use with care."] # [doc = ""] # [inline] pub fn set_simulation_precision (& self , simulation_precision : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_simulation_precision ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , simulation_precision) ; } } # [doc = "The SoftBody's mass."] # [doc = ""] # [inline] pub fn set_total_mass (& self , mass : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_total_mass ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mass) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_volume_stiffness (& self , volume_stiffness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_volume_stiffness ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , volume_stiffness) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SoftBody { } unsafe impl GodotObject for SoftBody { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SoftBody" } } impl QueueFree for SoftBody { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SoftBody { type Target = crate :: generated :: mesh_instance :: MeshInstance ; # [inline] fn deref (& self) -> & crate :: generated :: mesh_instance :: MeshInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SoftBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: mesh_instance :: MeshInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: mesh_instance :: MeshInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for SoftBody { } unsafe impl SubClass < crate :: generated :: node :: Node > for SoftBody { } unsafe impl SubClass < crate :: generated :: object :: Object > for SoftBody { } impl Instanciable for SoftBody { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SoftBody :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SoftBodyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_collision_exception_with : * mut sys :: godot_method_bind , pub get_areaAngular_stiffness : * mut sys :: godot_method_bind , pub get_collision_exceptions : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_damping_coefficient : * mut sys :: godot_method_bind , pub get_drag_coefficient : * mut sys :: godot_method_bind , pub get_linear_stiffness : * mut sys :: godot_method_bind , pub get_parent_collision_ignore : * mut sys :: godot_method_bind , pub get_pose_matching_coefficient : * mut sys :: godot_method_bind , pub get_pressure_coefficient : * mut sys :: godot_method_bind , pub get_simulation_precision : * mut sys :: godot_method_bind , pub get_total_mass : * mut sys :: godot_method_bind , pub get_volume_stiffness : * mut sys :: godot_method_bind , pub is_ray_pickable : * mut sys :: godot_method_bind , pub remove_collision_exception_with : * mut sys :: godot_method_bind , pub set_areaAngular_stiffness : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_damping_coefficient : * mut sys :: godot_method_bind , pub set_drag_coefficient : * mut sys :: godot_method_bind , pub set_linear_stiffness : * mut sys :: godot_method_bind , pub set_parent_collision_ignore : * mut sys :: godot_method_bind , pub set_pose_matching_coefficient : * mut sys :: godot_method_bind , pub set_pressure_coefficient : * mut sys :: godot_method_bind , pub set_ray_pickable : * mut sys :: godot_method_bind , pub set_simulation_precision : * mut sys :: godot_method_bind , pub set_total_mass : * mut sys :: godot_method_bind , pub set_volume_stiffness : * mut sys :: godot_method_bind } impl SoftBodyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SoftBodyMethodTable = SoftBodyMethodTable { class_constructor : None , add_collision_exception_with : 0 as * mut sys :: godot_method_bind , get_areaAngular_stiffness : 0 as * mut sys :: godot_method_bind , get_collision_exceptions : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_damping_coefficient : 0 as * mut sys :: godot_method_bind , get_drag_coefficient : 0 as * mut sys :: godot_method_bind , get_linear_stiffness : 0 as * mut sys :: godot_method_bind , get_parent_collision_ignore : 0 as * mut sys :: godot_method_bind , get_pose_matching_coefficient : 0 as * mut sys :: godot_method_bind , get_pressure_coefficient : 0 as * mut sys :: godot_method_bind , get_simulation_precision : 0 as * mut sys :: godot_method_bind , get_total_mass : 0 as * mut sys :: godot_method_bind , get_volume_stiffness : 0 as * mut sys :: godot_method_bind , is_ray_pickable : 0 as * mut sys :: godot_method_bind , remove_collision_exception_with : 0 as * mut sys :: godot_method_bind , set_areaAngular_stiffness : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_damping_coefficient : 0 as * mut sys :: godot_method_bind , set_drag_coefficient : 0 as * mut sys :: godot_method_bind , set_linear_stiffness : 0 as * mut sys :: godot_method_bind , set_parent_collision_ignore : 0 as * mut sys :: godot_method_bind , set_pose_matching_coefficient : 0 as * mut sys :: godot_method_bind , set_pressure_coefficient : 0 as * mut sys :: godot_method_bind , set_ray_pickable : 0 as * mut sys :: godot_method_bind , set_simulation_precision : 0 as * mut sys :: godot_method_bind , set_total_mass : 0 as * mut sys :: godot_method_bind , set_volume_stiffness : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SoftBodyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SoftBody\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_exception_with\0" . as_ptr () as * const c_char) ; table . get_areaAngular_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_areaAngular_stiffness\0" . as_ptr () as * const c_char) ; table . get_collision_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_exceptions\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_damping_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_damping_coefficient\0" . as_ptr () as * const c_char) ; table . get_drag_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_coefficient\0" . as_ptr () as * const c_char) ; table . get_linear_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_stiffness\0" . as_ptr () as * const c_char) ; table . get_parent_collision_ignore = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_collision_ignore\0" . as_ptr () as * const c_char) ; table . get_pose_matching_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_pose_matching_coefficient\0" . as_ptr () as * const c_char) ; table . get_pressure_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure_coefficient\0" . as_ptr () as * const c_char) ; table . get_simulation_precision = (gd_api . godot_method_bind_get_method) (class_name , "get_simulation_precision\0" . as_ptr () as * const c_char) ; table . get_total_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_total_mass\0" . as_ptr () as * const c_char) ; table . get_volume_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_stiffness\0" . as_ptr () as * const c_char) ; table . is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "is_ray_pickable\0" . as_ptr () as * const c_char) ; table . remove_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "remove_collision_exception_with\0" . as_ptr () as * const c_char) ; table . set_areaAngular_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_areaAngular_stiffness\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_damping_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_damping_coefficient\0" . as_ptr () as * const c_char) ; table . set_drag_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_coefficient\0" . as_ptr () as * const c_char) ; table . set_linear_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_stiffness\0" . as_ptr () as * const c_char) ; table . set_parent_collision_ignore = (gd_api . godot_method_bind_get_method) (class_name , "set_parent_collision_ignore\0" . as_ptr () as * const c_char) ; table . set_pose_matching_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_pose_matching_coefficient\0" . as_ptr () as * const c_char) ; table . set_pressure_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure_coefficient\0" . as_ptr () as * const c_char) ; table . set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "set_ray_pickable\0" . as_ptr () as * const c_char) ; table . set_simulation_precision = (gd_api . godot_method_bind_get_method) (class_name , "set_simulation_precision\0" . as_ptr () as * const c_char) ; table . set_total_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_total_mass\0" . as_ptr () as * const c_char) ; table . set_volume_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_stiffness\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:178:7903 [INFO] [stdout] | [INFO] [stdout] 178 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 178 | # [doc = "`core class 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:184:3599 [INFO] [stdout] | [INFO] [stdout] 184 | ...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] 184 | # [doc = "`core class AudioStreamMicrophone` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreammicrophone.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamMicrophone inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamMicrophone { this : RawObject < Self > , } impl AudioStreamMicrophone { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamMicrophoneMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamMicrophone { } unsafe impl GodotObject for AudioStreamMicrophone { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamMicrophone" } } impl std :: ops :: Deref for AudioStreamMicrophone { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamMicrophone { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamMicrophone { } impl Instanciable for AudioStreamMicrophone { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioStreamMicrophone :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamMicrophoneMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioStreamMicrophoneMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamMicrophoneMethodTable = AudioStreamMicrophoneMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioStreamMicrophoneMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamMicrophone\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:190:7986 [INFO] [stdout] | [INFO] [stdout] 190 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 190 | # [doc = "`tools class 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:196:11171 [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 Navigation` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_navigation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Navigation` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigation inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Navigation { this : RawObject < Self > , } impl Navigation { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the navigation point closest to the point given. Points are in local coordinate space."] # [doc = ""] # [inline] pub fn get_closest_point (& self , to_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; mem :: transmute (ret) } } # [doc = "Returns the surface normal at the navigation point closest to the point given. Useful for rotating a navigation agent according to the navigation mesh it moves on."] # [doc = ""] # [inline] pub fn get_closest_point_normal (& self , to_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_closest_point_normal ; let ret = crate :: icalls :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; mem :: transmute (ret) } } # [doc = "Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigationMeshInstance]. For meshes added via [method navmesh_add], returns the owner that was given (or `null` if the `owner` parameter was omitted)."] # [doc = ""] # [inline] pub fn get_closest_point_owner (& self , to_point : Vector3) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_closest_point_owner ; let ret = crate :: icalls :: icallptr_obj_vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the navigation point closest to the given line segment. When enabling `use_collision`, only considers intersection points between segment and navigation meshes. If multiple intersection points are found, the one closest to the segment start point is returned.\n# Default Arguments\n* `use_collision` - `false`"] # [doc = ""] # [inline] pub fn get_closest_point_to_segment (& self , start : Vector3 , end : Vector3 , use_collision : bool) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_closest_point_to_segment ; let ret = crate :: icalls :: icallptr_vec3_vec3_vec3_bool (method_bind , self . this . sys () . as_ptr () , start , end , use_collision) ; mem :: transmute (ret) } } # [doc = "Returns the path between two given points. Points are in local coordinate space. If `optimize` is `true` (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.\n# Default Arguments\n* `optimize` - `true`"] # [doc = ""] # [inline] pub fn get_simple_path (& self , start : Vector3 , end : Vector3 , optimize : bool) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_simple_path ; let ret = crate :: icalls :: icallptr_vec3arr_vec3_vec3_bool (method_bind , self . this . sys () . as_ptr () , start , end , optimize) ; Vector3Array :: from_sys (ret) } } # [doc = "Defines which direction is up. By default, this is `(0, 1, 0)`, which is the world's \"up\" direction."] # [doc = ""] # [inline] pub fn up_vector (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_up_vector ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Adds a [NavigationMesh]. Returns an ID for use with [method navmesh_remove] or [method navmesh_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional `owner` is used as return value for [method get_closest_point_owner].\n# Default Arguments\n* `owner` - `null`"] # [doc = ""] # [inline] pub fn navmesh_add (& self , mesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh > , xform : Transform , owner : impl AsArg < crate :: generated :: object :: Object >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . navmesh_add ; let ret = crate :: icalls :: icallptr_i64_obj_trans_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , xform , owner . as_arg_ptr ()) ; ret as _ } } # [doc = "Removes the [NavigationMesh] with the given ID."] # [doc = ""] # [inline] pub fn navmesh_remove (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . navmesh_remove ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Sets the transform applied to the [NavigationMesh] with the given ID."] # [doc = ""] # [inline] pub fn navmesh_set_transform (& self , id : i64 , xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . navmesh_set_transform ; let ret = crate :: icalls :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , id , xform) ; } } # [doc = "Defines which direction is up. By default, this is `(0, 1, 0)`, which is the world's \"up\" direction."] # [doc = ""] # [inline] pub fn set_up_vector (& self , up : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . set_up_vector ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , up) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Navigation { } unsafe impl GodotObject for Navigation { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Navigation" } } impl QueueFree for Navigation { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Navigation { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Navigation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Navigation { } unsafe impl SubClass < crate :: generated :: node :: Node > for Navigation { } unsafe impl SubClass < crate :: generated :: object :: Object > for Navigation { } impl Instanciable for Navigation { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Navigation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_closest_point : * mut sys :: godot_method_bind , pub get_closest_point_normal : * mut sys :: godot_method_bind , pub get_closest_point_owner : * mut sys :: godot_method_bind , pub get_closest_point_to_segment : * mut sys :: godot_method_bind , pub get_simple_path : * mut sys :: godot_method_bind , pub get_up_vector : * mut sys :: godot_method_bind , pub navmesh_add : * mut sys :: godot_method_bind , pub navmesh_remove : * mut sys :: godot_method_bind , pub navmesh_set_transform : * mut sys :: godot_method_bind , pub set_up_vector : * mut sys :: godot_method_bind } impl NavigationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationMethodTable = NavigationMethodTable { class_constructor : None , get_closest_point : 0 as * mut sys :: godot_method_bind , get_closest_point_normal : 0 as * mut sys :: godot_method_bind , get_closest_point_owner : 0 as * mut sys :: godot_method_bind , get_closest_point_to_segment : 0 as * mut sys :: godot_method_bind , get_simple_path : 0 as * mut sys :: godot_method_bind , get_up_vector : 0 as * mut sys :: godot_method_bind , navmesh_add : 0 as * mut sys :: godot_method_bind , navmesh_remove : 0 as * mut sys :: godot_method_bind , navmesh_set_transform : 0 as * mut sys :: godot_method_bind , set_up_vector : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { NavigationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Navigation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_closest_point_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_normal\0" . as_ptr () as * const c_char) ; table . get_closest_point_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_owner\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment\0" . as_ptr () as * const c_char) ; table . get_simple_path = (gd_api . godot_method_bind_get_method) (class_name , "get_simple_path\0" . as_ptr () as * const c_char) ; table . get_up_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_up_vector\0" . as_ptr () as * const c_char) ; table . navmesh_add = (gd_api . godot_method_bind_get_method) (class_name , "navmesh_add\0" . as_ptr () as * const c_char) ; table . navmesh_remove = (gd_api . godot_method_bind_get_method) (class_name , "navmesh_remove\0" . as_ptr () as * const c_char) ; table . navmesh_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "navmesh_set_transform\0" . as_ptr () as * const c_char) ; table . set_up_vector = (gd_api . godot_method_bind_get_method) (class_name , "set_up_vector\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:202:4726 [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 AnimationNodeBlend3` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeblend3.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlend3 inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlend3 { this : RawObject < Self > , } impl AnimationNodeBlend3 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlend3MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend3MethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend3MethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlend3 { } unsafe impl GodotObject for AnimationNodeBlend3 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlend3" } } impl std :: ops :: Deref for AnimationNodeBlend3 { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlend3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlend3 { } impl Instanciable for AnimationNodeBlend3 { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeBlend3 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlend3MethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_sync : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeBlend3MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlend3MethodTable = AnimationNodeBlend3MethodTable { class_constructor : None , is_using_sync : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeBlend3MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlend3\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_using_sync = (gd_api . godot_method_bind_get_method) (class_name , "is_using_sync\0" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:208:8325 [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 PrismMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_prismmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPrismMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PrismMesh { this : RawObject < Self > , } impl PrismMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PrismMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge."] # [doc = ""] # [inline] pub fn left_to_right (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_left_to_right ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Size of the prism."] # [doc = ""] # [inline] pub fn size (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Number of added edge loops along the Z axis."] # [doc = ""] # [inline] pub fn subdivide_depth (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_subdivide_depth ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of added edge loops along the Y axis."] # [doc = ""] # [inline] pub fn subdivide_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_subdivide_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of added edge loops along the X axis."] # [doc = ""] # [inline] pub fn subdivide_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_subdivide_width ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge."] # [doc = ""] # [inline] pub fn set_left_to_right (& self , left_to_right : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_left_to_right ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , left_to_right) ; } } # [doc = "Size of the prism."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Number of added edge loops along the Z axis."] # [doc = ""] # [inline] pub fn set_subdivide_depth (& self , segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_subdivide_depth ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , segments) ; } } # [doc = "Number of added edge loops along the Y axis."] # [doc = ""] # [inline] pub fn set_subdivide_height (& self , segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_subdivide_height ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , segments) ; } } # [doc = "Number of added edge loops along the X axis."] # [doc = ""] # [inline] pub fn set_subdivide_width (& self , segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_subdivide_width ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , segments) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PrismMesh { } unsafe impl GodotObject for PrismMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PrismMesh" } } impl std :: ops :: Deref for PrismMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PrismMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for PrismMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for PrismMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PrismMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PrismMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for PrismMesh { } impl Instanciable for PrismMesh { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PrismMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PrismMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_left_to_right : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_subdivide_depth : * mut sys :: godot_method_bind , pub get_subdivide_height : * mut sys :: godot_method_bind , pub get_subdivide_width : * mut sys :: godot_method_bind , pub set_left_to_right : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_subdivide_depth : * mut sys :: godot_method_bind , pub set_subdivide_height : * mut sys :: godot_method_bind , pub set_subdivide_width : * mut sys :: godot_method_bind } impl PrismMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PrismMeshMethodTable = PrismMeshMethodTable { class_constructor : None , get_left_to_right : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_subdivide_depth : 0 as * mut sys :: godot_method_bind , get_subdivide_height : 0 as * mut sys :: godot_method_bind , get_subdivide_width : 0 as * mut sys :: godot_method_bind , set_left_to_right : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_subdivide_depth : 0 as * mut sys :: godot_method_bind , set_subdivide_height : 0 as * mut sys :: godot_method_bind , set_subdivide_width : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PrismMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PrismMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_left_to_right = (gd_api . godot_method_bind_get_method) (class_name , "get_left_to_right\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_depth\0" . as_ptr () as * const c_char) ; table . get_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_height\0" . as_ptr () as * const c_char) ; table . get_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_width\0" . as_ptr () as * const c_char) ; table . set_left_to_right = (gd_api . godot_method_bind_get_method) (class_name , "set_left_to_right\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_depth\0" . as_ptr () as * const c_char) ; table . set_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_height\0" . as_ptr () as * const c_char) ; table . set_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_width\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:214:5646 [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 GridContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_gridcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`GridContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGridContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GridContainer { this : RawObject < Self > , } impl GridContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GridContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The number of columns in the [GridContainer]. If modified, [GridContainer] reorders its Control-derived children to accommodate the new layout."] # [doc = ""] # [inline] pub fn columns (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridContainerMethodTable :: get (get_api ()) . get_columns ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of columns in the [GridContainer]. If modified, [GridContainer] reorders its Control-derived children to accommodate the new layout."] # [doc = ""] # [inline] pub fn set_columns (& self , columns : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridContainerMethodTable :: get (get_api ()) . set_columns ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , columns) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GridContainer { } unsafe impl GodotObject for GridContainer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GridContainer" } } impl QueueFree for GridContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GridContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GridContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for GridContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for GridContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for GridContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for GridContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for GridContainer { } impl Instanciable for GridContainer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { GridContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GridContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_columns : * mut sys :: godot_method_bind , pub set_columns : * mut sys :: godot_method_bind } impl GridContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GridContainerMethodTable = GridContainerMethodTable { class_constructor : None , get_columns : 0 as * mut sys :: godot_method_bind , set_columns : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { GridContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GridContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_columns = (gd_api . godot_method_bind_get_method) (class_name , "get_columns\0" . as_ptr () as * const c_char) ; table . set_columns = (gd_api . godot_method_bind_get_method) (class_name , "set_columns\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:220:14980 [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 PhysicalBone` inherits `PhysicsBody` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physicalbone.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`PhysicalBone` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPhysicalBone inherits methods from:\n - [PhysicsBody](struct.PhysicsBody.html)\n - [CollisionObject](struct.CollisionObject.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicalBone { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct JointType (pub i64) ; impl JointType { pub const NONE : JointType = JointType (0i64) ; pub const PIN : JointType = JointType (1i64) ; pub const CONE : JointType = JointType (2i64) ; pub const HINGE : JointType = JointType (3i64) ; pub const SLIDER : JointType = JointType (4i64) ; pub const _6DOF : JointType = JointType (5i64) ; } impl From < i64 > for JointType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < JointType > for i64 { # [inline] fn from (v : JointType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PhysicalBone { pub const JOINT_TYPE_6DOF : i64 = 5i64 ; pub const JOINT_TYPE_CONE : i64 = 2i64 ; pub const JOINT_TYPE_HINGE : i64 = 3i64 ; pub const JOINT_TYPE_NONE : i64 = 0i64 ; pub const JOINT_TYPE_PIN : i64 = 1i64 ; pub const JOINT_TYPE_SLIDER : i64 = 4i64 ; } impl PhysicalBone { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PhysicalBoneMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn apply_central_impulse (& self , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . apply_central_impulse ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn apply_impulse (& self , position : Vector3 , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . apply_impulse ; let ret = crate :: icalls :: icallptr_void_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , position , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_offset (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_body_offset ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bone_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_bone_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn gravity_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_gravity_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn joint_offset (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_joint_offset ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn joint_type (& self) -> crate :: generated :: physical_bone :: JointType { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_joint_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: physical_bone :: JointType (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn mass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_mass ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_simulate_physics (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_simulate_physics ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn weight (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_weight ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_simulating_physics (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . is_simulating_physics ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_static_body (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . is_static_body ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_body_offset (& self , offset : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_body_offset ; let ret = crate :: icalls :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_gravity_scale (& self , gravity_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_gravity_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gravity_scale) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joint_offset (& self , offset : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_joint_offset ; let ret = crate :: icalls :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joint_type (& self , joint_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_joint_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , joint_type) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mass (& self , mass : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_mass ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mass) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_weight (& self , weight : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_weight ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , weight) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicalBone { } unsafe impl GodotObject for PhysicalBone { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicalBone" } } impl QueueFree for PhysicalBone { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PhysicalBone { type Target = crate :: generated :: physics_body :: PhysicsBody ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicalBone { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body :: PhysicsBody > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: collision_object :: CollisionObject > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: node :: Node > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: object :: Object > for PhysicalBone { } impl Instanciable for PhysicalBone { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PhysicalBone :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicalBoneMethodTable { pub class_constructor : sys :: godot_class_constructor , pub apply_central_impulse : * mut sys :: godot_method_bind , pub apply_impulse : * mut sys :: godot_method_bind , pub get_body_offset : * mut sys :: godot_method_bind , pub get_bone_id : * mut sys :: godot_method_bind , pub get_bounce : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub get_gravity_scale : * mut sys :: godot_method_bind , pub get_joint_offset : * mut sys :: godot_method_bind , pub get_joint_type : * mut sys :: godot_method_bind , pub get_mass : * mut sys :: godot_method_bind , pub get_simulate_physics : * mut sys :: godot_method_bind , pub get_weight : * mut sys :: godot_method_bind , pub is_simulating_physics : * mut sys :: godot_method_bind , pub is_static_body : * mut sys :: godot_method_bind , pub set_body_offset : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_gravity_scale : * mut sys :: godot_method_bind , pub set_joint_offset : * mut sys :: godot_method_bind , pub set_joint_type : * mut sys :: godot_method_bind , pub set_mass : * mut sys :: godot_method_bind , pub set_weight : * mut sys :: godot_method_bind } impl PhysicalBoneMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicalBoneMethodTable = PhysicalBoneMethodTable { class_constructor : None , apply_central_impulse : 0 as * mut sys :: godot_method_bind , apply_impulse : 0 as * mut sys :: godot_method_bind , get_body_offset : 0 as * mut sys :: godot_method_bind , get_bone_id : 0 as * mut sys :: godot_method_bind , get_bounce : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , get_gravity_scale : 0 as * mut sys :: godot_method_bind , get_joint_offset : 0 as * mut sys :: godot_method_bind , get_joint_type : 0 as * mut sys :: godot_method_bind , get_mass : 0 as * mut sys :: godot_method_bind , get_simulate_physics : 0 as * mut sys :: godot_method_bind , get_weight : 0 as * mut sys :: godot_method_bind , is_simulating_physics : 0 as * mut sys :: godot_method_bind , is_static_body : 0 as * mut sys :: godot_method_bind , set_body_offset : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_gravity_scale : 0 as * mut sys :: godot_method_bind , set_joint_offset : 0 as * mut sys :: godot_method_bind , set_joint_type : 0 as * mut sys :: godot_method_bind , set_mass : 0 as * mut sys :: godot_method_bind , set_weight : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PhysicalBoneMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicalBone\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . get_body_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_body_offset\0" . as_ptr () as * const c_char) ; table . get_bone_id = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_id\0" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\0" . as_ptr () as * const c_char) ; table . get_joint_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_offset\0" . as_ptr () as * const c_char) ; table . get_joint_type = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_type\0" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\0" . as_ptr () as * const c_char) ; table . get_simulate_physics = (gd_api . godot_method_bind_get_method) (class_name , "get_simulate_physics\0" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\0" . as_ptr () as * const c_char) ; table . is_simulating_physics = (gd_api . godot_method_bind_get_method) (class_name , "is_simulating_physics\0" . as_ptr () as * const c_char) ; table . is_static_body = (gd_api . godot_method_bind_get_method) (class_name , "is_static_body\0" . as_ptr () as * const c_char) ; table . set_body_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_body_offset\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\0" . as_ptr () as * const c_char) ; table . set_joint_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_offset\0" . as_ptr () as * const c_char) ; table . set_joint_type = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_type\0" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\0" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:226:16499 [INFO] [stdout] | [INFO] [stdout] 226 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 226 | # [doc = "`core class SurfaceTool` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_surfacetool.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSurfaceTool inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SurfaceTool { this : RawObject < Self > , } impl SurfaceTool { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SurfaceToolMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an array of bones for the next vertex to use. `bones` must contain 4 integers."] # [doc = ""] # [inline] pub fn add_bones (& self , bones : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_bones ; let ret = crate :: icalls :: icallptr_void_i32arr (method_bind , self . this . sys () . as_ptr () , bones) ; } } # [doc = "Specifies a [Color] for the next vertex to use."] # [doc = ""] # [inline] pub fn add_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices."] # [doc = ""] # [inline] pub fn add_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "Specifies a normal for the next vertex to use."] # [doc = ""] # [inline] pub fn add_normal (& self , normal : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_normal ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , normal) ; } } # [doc = "Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation."] # [doc = ""] # [inline] pub fn add_smooth_group (& self , smooth : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_smooth_group ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , smooth) ; } } # [doc = "Specifies a tangent for the next vertex to use."] # [doc = ""] # [inline] pub fn add_tangent (& self , tangent : Plane) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_tangent ; let ret = crate :: icalls :: icallptr_void_plane (method_bind , self . this . sys () . as_ptr () , tangent) ; } } # [doc = "Inserts a triangle fan made of array data into [Mesh] being constructed.\nRequires the primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES].\n# Default Arguments\n* `uvs` - `PoolVector2Array( )`\n* `colors` - `PoolColorArray( )`\n* `uv2s` - `PoolVector2Array( )`\n* `normals` - `PoolVector3Array( )`\n* `tangents` - `[ ]`"] # [doc = ""] # [inline] pub fn add_triangle_fan (& self , vertices : Vector3Array , uvs : Vector2Array , colors : ColorArray , uv2s : Vector2Array , normals : Vector3Array , tangents : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_triangle_fan ; let ret = crate :: icalls :: icallptr_void_vec3arr_vec2arr_colorarr_vec2arr_vec3arr_arr (method_bind , self . this . sys () . as_ptr () , vertices , uvs , colors , uv2s , normals , tangents) ; } } # [doc = "Specifies a set of UV coordinates to use for the next vertex."] # [doc = ""] # [inline] pub fn add_uv (& self , uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_uv ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , uv) ; } } # [doc = "Specifies an optional second set of UV coordinates to use for the next vertex."] # [doc = ""] # [inline] pub fn add_uv2 (& self , uv2 : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_uv2 ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , uv2) ; } } # [doc = "Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV)."] # [doc = ""] # [inline] pub fn add_vertex (& self , vertex : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_vertex ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , vertex) ; } } # [doc = "Specifies weight values for next vertex to use. `weights` must contain 4 values."] # [doc = ""] # [inline] pub fn add_weights (& self , weights : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_weights ; let ret = crate :: icalls :: icallptr_void_f32arr (method_bind , self . this . sys () . as_ptr () , weights) ; } } # [doc = "Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform]."] # [doc = ""] # [inline] pub fn append_from (& self , existing : impl AsArg < crate :: generated :: mesh :: Mesh > , surface : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . append_from ; let ret = crate :: icalls :: icallptr_void_obj_i64_trans (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface , transform) ; } } # [doc = "Called before adding any vertices. Takes the primitive type as an argument (e.g. [constant Mesh.PRIMITIVE_TRIANGLES])."] # [doc = ""] # [inline] pub fn begin (& self , primitive : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . begin ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , primitive) ; } } # [doc = "Clear all information passed into the surface tool so far."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].\nDefault flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See `ARRAY_COMPRESS_*` constants in [enum Mesh.ArrayFormat] for other flags.\n# Default Arguments\n* `existing` - `null`\n* `flags` - `97280`"] # [doc = ""] # [inline] pub fn commit (& self , existing : impl AsArg < crate :: generated :: array_mesh :: ArrayMesh > , flags : i64) -> Option < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . commit ; let ret = crate :: icalls :: icallptr_obj_obj_i64 (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , flags) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] API."] # [doc = ""] # [inline] pub fn commit_to_arrays (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . commit_to_arrays ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a vertex array from an existing [Mesh]."] # [doc = ""] # [inline] pub fn create_from (& self , existing : impl AsArg < crate :: generated :: mesh :: Mesh > , surface : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . create_from ; let ret = crate :: icalls :: icallptr_void_obj_i64 (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface) ; } } # [doc = "Creates a vertex array from the specified blend shape of an existing [Mesh]. This can be used to extract a specific pose from a blend shape."] # [doc = ""] # [inline] pub fn create_from_blend_shape (& self , existing : impl AsArg < crate :: generated :: mesh :: Mesh > , surface : i64 , blend_shape : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . create_from_blend_shape ; let ret = crate :: icalls :: icallptr_void_obj_i64_str (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface , blend_shape . into ()) ; } } # [doc = "Removes the index array by expanding the vertex array."] # [doc = ""] # [inline] pub fn deindex (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . deindex ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Generates normals from vertices so you do not have to do it manually. If `flip` is `true`, the resulting normals will be inverted.\nRequires the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].\n# Default Arguments\n* `flip` - `false`"] # [doc = ""] # [inline] pub fn generate_normals (& self , flip : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . generate_normals ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip) ; } } # [doc = "Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already."] # [doc = ""] # [inline] pub fn generate_tangents (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . generate_tangents ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shrinks the vertex array by creating an index array (avoids reusing vertices)."] # [doc = ""] # [inline] pub fn index (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . index ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets [Material] to be used by the [Mesh] you are constructing."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SurfaceTool { } unsafe impl GodotObject for SurfaceTool { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SurfaceTool" } } impl std :: ops :: Deref for SurfaceTool { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SurfaceTool { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SurfaceTool { } unsafe impl SubClass < crate :: generated :: object :: Object > for SurfaceTool { } impl Instanciable for SurfaceTool { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SurfaceTool :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SurfaceToolMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bones : * mut sys :: godot_method_bind , pub add_color : * mut sys :: godot_method_bind , pub add_index : * mut sys :: godot_method_bind , pub add_normal : * mut sys :: godot_method_bind , pub add_smooth_group : * mut sys :: godot_method_bind , pub add_tangent : * mut sys :: godot_method_bind , pub add_triangle_fan : * mut sys :: godot_method_bind , pub add_uv : * mut sys :: godot_method_bind , pub add_uv2 : * mut sys :: godot_method_bind , pub add_vertex : * mut sys :: godot_method_bind , pub add_weights : * mut sys :: godot_method_bind , pub append_from : * mut sys :: godot_method_bind , pub begin : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub commit : * mut sys :: godot_method_bind , pub commit_to_arrays : * mut sys :: godot_method_bind , pub create_from : * mut sys :: godot_method_bind , pub create_from_blend_shape : * mut sys :: godot_method_bind , pub deindex : * mut sys :: godot_method_bind , pub generate_normals : * mut sys :: godot_method_bind , pub generate_tangents : * mut sys :: godot_method_bind , pub index : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind } impl SurfaceToolMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SurfaceToolMethodTable = SurfaceToolMethodTable { class_constructor : None , add_bones : 0 as * mut sys :: godot_method_bind , add_color : 0 as * mut sys :: godot_method_bind , add_index : 0 as * mut sys :: godot_method_bind , add_normal : 0 as * mut sys :: godot_method_bind , add_smooth_group : 0 as * mut sys :: godot_method_bind , add_tangent : 0 as * mut sys :: godot_method_bind , add_triangle_fan : 0 as * mut sys :: godot_method_bind , add_uv : 0 as * mut sys :: godot_method_bind , add_uv2 : 0 as * mut sys :: godot_method_bind , add_vertex : 0 as * mut sys :: godot_method_bind , add_weights : 0 as * mut sys :: godot_method_bind , append_from : 0 as * mut sys :: godot_method_bind , begin : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , commit : 0 as * mut sys :: godot_method_bind , commit_to_arrays : 0 as * mut sys :: godot_method_bind , create_from : 0 as * mut sys :: godot_method_bind , create_from_blend_shape : 0 as * mut sys :: godot_method_bind , deindex : 0 as * mut sys :: godot_method_bind , generate_normals : 0 as * mut sys :: godot_method_bind , generate_tangents : 0 as * mut sys :: godot_method_bind , index : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SurfaceToolMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SurfaceTool\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bones = (gd_api . godot_method_bind_get_method) (class_name , "add_bones\0" . as_ptr () as * const c_char) ; table . add_color = (gd_api . godot_method_bind_get_method) (class_name , "add_color\0" . as_ptr () as * const c_char) ; table . add_index = (gd_api . godot_method_bind_get_method) (class_name , "add_index\0" . as_ptr () as * const c_char) ; table . add_normal = (gd_api . godot_method_bind_get_method) (class_name , "add_normal\0" . as_ptr () as * const c_char) ; table . add_smooth_group = (gd_api . godot_method_bind_get_method) (class_name , "add_smooth_group\0" . as_ptr () as * const c_char) ; table . add_tangent = (gd_api . godot_method_bind_get_method) (class_name , "add_tangent\0" . as_ptr () as * const c_char) ; table . add_triangle_fan = (gd_api . godot_method_bind_get_method) (class_name , "add_triangle_fan\0" . as_ptr () as * const c_char) ; table . add_uv = (gd_api . godot_method_bind_get_method) (class_name , "add_uv\0" . as_ptr () as * const c_char) ; table . add_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "add_uv2\0" . as_ptr () as * const c_char) ; table . add_vertex = (gd_api . godot_method_bind_get_method) (class_name , "add_vertex\0" . as_ptr () as * const c_char) ; table . add_weights = (gd_api . godot_method_bind_get_method) (class_name , "add_weights\0" . as_ptr () as * const c_char) ; table . append_from = (gd_api . godot_method_bind_get_method) (class_name , "append_from\0" . as_ptr () as * const c_char) ; table . begin = (gd_api . godot_method_bind_get_method) (class_name , "begin\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . commit = (gd_api . godot_method_bind_get_method) (class_name , "commit\0" . as_ptr () as * const c_char) ; table . commit_to_arrays = (gd_api . godot_method_bind_get_method) (class_name , "commit_to_arrays\0" . as_ptr () as * const c_char) ; table . create_from = (gd_api . godot_method_bind_get_method) (class_name , "create_from\0" . as_ptr () as * const c_char) ; table . create_from_blend_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_from_blend_shape\0" . as_ptr () as * const c_char) ; table . deindex = (gd_api . godot_method_bind_get_method) (class_name , "deindex\0" . as_ptr () as * const c_char) ; table . generate_normals = (gd_api . godot_method_bind_get_method) (class_name , "generate_normals\0" . as_ptr () as * const c_char) ; table . generate_tangents = (gd_api . godot_method_bind_get_method) (class_name , "generate_tangents\0" . as_ptr () as * const c_char) ; table . index = (gd_api . godot_method_bind_get_method) (class_name , "index\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:232:3380 [INFO] [stdout] | [INFO] [stdout] 232 | ...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] 232 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:238:6131 [INFO] [stdout] | [INFO] [stdout] 238 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 238 | # [doc = "`core class VisualShaderNodeVectorOp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorop.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorOp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorOp { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operator (pub i64) ; impl Operator { pub const ADD : Operator = Operator (0i64) ; pub const SUB : Operator = Operator (1i64) ; pub const MUL : Operator = Operator (2i64) ; pub const DIV : Operator = Operator (3i64) ; pub const MOD : Operator = Operator (4i64) ; pub const POW : Operator = Operator (5i64) ; pub const MAX : Operator = Operator (6i64) ; pub const MIN : Operator = Operator (7i64) ; pub const CROSS : Operator = Operator (8i64) ; pub const ATAN2 : Operator = Operator (9i64) ; pub const REFLECT : Operator = Operator (10i64) ; pub const STEP : Operator = Operator (11i64) ; } impl From < i64 > for Operator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operator > for i64 { # [inline] fn from (v : Operator) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeVectorOp { pub const OP_ADD : i64 = 0i64 ; pub const OP_ATAN2 : i64 = 9i64 ; pub const OP_CROSS : i64 = 8i64 ; pub const OP_DIV : i64 = 3i64 ; pub const OP_MAX : i64 = 6i64 ; pub const OP_MIN : i64 = 7i64 ; pub const OP_MOD : i64 = 4i64 ; pub const OP_MUL : i64 = 2i64 ; pub const OP_POW : i64 = 5i64 ; pub const OP_REFLECT : i64 = 10i64 ; pub const OP_STEP : i64 = 11i64 ; pub const OP_SUB : i64 = 1i64 ; } impl VisualShaderNodeVectorOp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorOpMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The operator to be used. See [enum Operator] for options."] # [doc = ""] # [inline] pub fn operator (& self) -> crate :: generated :: visual_shader_node_vector_op :: Operator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVectorOpMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_vector_op :: Operator (ret) } } # [doc = "The operator to be used. See [enum Operator] for options."] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVectorOpMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorOp { } unsafe impl GodotObject for VisualShaderNodeVectorOp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorOp" } } impl std :: ops :: Deref for VisualShaderNodeVectorOp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorOp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorOp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorOp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorOp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorOp { } impl Instanciable for VisualShaderNodeVectorOp { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorOp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorOpMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind } impl VisualShaderNodeVectorOpMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorOpMethodTable = VisualShaderNodeVectorOpMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorOpMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorOp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:244:9922 [INFO] [stdout] | [INFO] [stdout] 244 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 244 | # [doc = "`core class Texture` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_texture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTexture inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Texture { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const FLAG_MIPMAPS : Flags = Flags (1i64) ; pub const FLAG_REPEAT : Flags = Flags (2i64) ; pub const FLAG_FILTER : Flags = Flags (4i64) ; pub const FLAGS_DEFAULT : Flags = Flags (7i64) ; pub const FLAG_ANISOTROPIC_FILTER : Flags = Flags (8i64) ; pub const FLAG_CONVERT_TO_LINEAR : Flags = Flags (16i64) ; pub const FLAG_MIRRORED_REPEAT : Flags = Flags (32i64) ; pub const FLAG_VIDEO_SURFACE : Flags = Flags (2048i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Texture { pub const FLAGS_DEFAULT : i64 = 7i64 ; pub const FLAG_ANISOTROPIC_FILTER : i64 = 8i64 ; pub const FLAG_CONVERT_TO_LINEAR : i64 = 16i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const FLAG_MIRRORED_REPEAT : i64 = 32i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; pub const FLAG_VIDEO_SURFACE : i64 = 2048i64 ; } impl Texture { # [doc = "Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified `position`. Equivalent to [method VisualServer.canvas_item_add_texture_rect] with a rect at `position` and the size of this [Texture].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw (& self , canvas_item : Rid , position : Vector2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallptr_void_rid_vec2_color_bool_obj (method_bind , self . this . sys () . as_ptr () , canvas_item , position , modulate , transpose , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw_rect (& self , canvas_item : Rid , rect : Rect2 , tile : bool , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw_rect ; let ret = crate :: icalls :: icallptr_void_rid_rect2_bool_color_bool_obj (method_bind , self . this . sys () . as_ptr () , canvas_item , rect , tile , modulate , transpose , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect_region].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`\n* `clip_uv` - `true`"] # [doc = ""] # [inline] pub fn draw_rect_region (& self , canvas_item : Rid , rect : Rect2 , src_rect : Rect2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: texture :: Texture > , clip_uv : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw_rect_region ; let ret = crate :: icalls :: icallptr_void_rid_rect2_rect2_color_bool_obj_bool (method_bind , self . this . sys () . as_ptr () , canvas_item , rect , src_rect , modulate , transpose , normal_map . as_arg_ptr () , clip_uv) ; } } # [doc = "Returns an [Image] that is a copy of data from this [Texture]. [Image]s can be accessed and manipulated directly."] # [doc = ""] # [inline] pub fn get_data (& self) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture]."] # [doc = ""] # [inline] pub fn flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_flags ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the texture height."] # [doc = ""] # [inline] pub fn get_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the texture size."] # [doc = ""] # [inline] pub fn get_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the texture width."] # [doc = ""] # [inline] pub fn get_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this [Texture] has an alpha channel."] # [doc = ""] # [inline] pub fn has_alpha (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . has_alpha ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture]."] # [doc = ""] # [inline] pub fn set_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . set_flags ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , flags) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Texture { } unsafe impl GodotObject for Texture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Texture" } } impl std :: ops :: Deref for Texture { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Texture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Texture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Texture { } unsafe impl SubClass < crate :: generated :: object :: Object > for Texture { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub draw : * mut sys :: godot_method_bind , pub draw_rect : * mut sys :: godot_method_bind , pub draw_rect_region : * mut sys :: godot_method_bind , pub get_data : * mut sys :: godot_method_bind , pub get_flags : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub has_alpha : * mut sys :: godot_method_bind , pub set_flags : * mut sys :: godot_method_bind } impl TextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureMethodTable = TextureMethodTable { class_constructor : None , draw : 0 as * mut sys :: godot_method_bind , draw_rect : 0 as * mut sys :: godot_method_bind , draw_rect_region : 0 as * mut sys :: godot_method_bind , get_data : 0 as * mut sys :: godot_method_bind , get_flags : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , has_alpha : 0 as * mut sys :: godot_method_bind , set_flags : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { TextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Texture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . draw_rect = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect\0" . as_ptr () as * const c_char) ; table . draw_rect_region = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect_region\0" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . has_alpha = (gd_api . godot_method_bind_get_method) (class_name , "has_alpha\0" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:250:7494 [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 = "`tools class EditorSpatialGizmoPlugin` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorspatialgizmoplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorSpatialGizmoPlugin inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSpatialGizmoPlugin { this : RawObject < Self > , } impl EditorSpatialGizmoPlugin { # [doc = "Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden."] # [doc = ""] # [inline] pub fn add_material (& self , name : impl Into < GodotString > , material : impl AsArg < crate :: generated :: spatial_material :: SpatialMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . add_material ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , material . as_arg_ptr ()) ; } } # [doc = "Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_handles]. Should not be overridden.\n# Default Arguments\n* `billboard` - `false`"] # [doc = ""] # [inline] pub fn create_handle_material (& self , name : impl Into < GodotString > , billboard : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . create_handle_material ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , name . into () , billboard) ; } } # [doc = "Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_unscaled_billboard]. Should not be overridden.\n# Default Arguments\n* `on_top` - `false`\n* `color` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn create_icon_material (& self , name : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: texture :: Texture > , on_top : bool , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . create_icon_material ; let ret = crate :: icalls :: icallptr_void_str_obj_bool_color (method_bind , self . this . sys () . as_ptr () , name . into () , texture . as_arg_ptr () , on_top , color) ; } } # [doc = "Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_mesh] and [method EditorSpatialGizmo.add_lines]. Should not be overridden.\n# Default Arguments\n* `billboard` - `false`\n* `on_top` - `false`\n* `use_vertex_color` - `false`"] # [doc = ""] # [inline] pub fn create_material (& self , name : impl Into < GodotString > , color : Color , billboard : bool , on_top : bool , use_vertex_color : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . create_material ; let ret = crate :: icalls :: icallptr_void_str_color_bool_bool_bool (method_bind , self . this . sys () . as_ptr () , name . into () , color , billboard , on_top , use_vertex_color) ; } } # [doc = "Gets material from the internal list of materials. If an [EditorSpatialGizmo] is provided, it will try to get the corresponding variant (selected and/or editable)."] # [doc = ""] # [inline] pub fn get_material (& self , name : impl Into < GodotString > , gizmo : impl AsArg < crate :: generated :: editor_spatial_gizmo :: EditorSpatialGizmo >) -> Option < Ref < crate :: generated :: spatial_material :: SpatialMaterial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , gizmo . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: spatial_material :: SpatialMaterial , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSpatialGizmoPlugin { } unsafe impl GodotObject for EditorSpatialGizmoPlugin { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSpatialGizmoPlugin" } } impl std :: ops :: Deref for EditorSpatialGizmoPlugin { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSpatialGizmoPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for EditorSpatialGizmoPlugin { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for EditorSpatialGizmoPlugin { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorSpatialGizmoPlugin { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorSpatialGizmoPluginMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_material : * mut sys :: godot_method_bind , pub create_handle_material : * mut sys :: godot_method_bind , pub create_icon_material : * mut sys :: godot_method_bind , pub create_material : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind } impl EditorSpatialGizmoPluginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorSpatialGizmoPluginMethodTable = EditorSpatialGizmoPluginMethodTable { class_constructor : None , add_material : 0 as * mut sys :: godot_method_bind , create_handle_material : 0 as * mut sys :: godot_method_bind , create_icon_material : 0 as * mut sys :: godot_method_bind , create_material : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorSpatialGizmoPluginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorSpatialGizmoPlugin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_material = (gd_api . godot_method_bind_get_method) (class_name , "add_material\0" . as_ptr () as * const c_char) ; table . create_handle_material = (gd_api . godot_method_bind_get_method) (class_name , "create_handle_material\0" . as_ptr () as * const c_char) ; table . create_icon_material = (gd_api . godot_method_bind_get_method) (class_name , "create_icon_material\0" . as_ptr () as * const c_char) ; table . create_material = (gd_api . godot_method_bind_get_method) (class_name , "create_material\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:256:4375 [INFO] [stdout] | [INFO] [stdout] 256 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 256 | # [doc = "`core class VideoStreamTheora` inherits `VideoStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_videostreamtheora.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVideoStreamTheora inherits methods from:\n - [VideoStream](struct.VideoStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VideoStreamTheora { this : RawObject < Self > , } impl VideoStreamTheora { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VideoStreamTheoraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamTheoraMethodTable :: get (get_api ()) . get_file ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamTheoraMethodTable :: get (get_api ()) . set_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VideoStreamTheora { } unsafe impl GodotObject for VideoStreamTheora { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamTheora" } } impl std :: ops :: Deref for VideoStreamTheora { type Target = crate :: generated :: video_stream :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamTheora { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: video_stream :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: video_stream :: VideoStream > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: object :: Object > for VideoStreamTheora { } impl Instanciable for VideoStreamTheora { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VideoStreamTheora :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VideoStreamTheoraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_file : * mut sys :: godot_method_bind , pub set_file : * mut sys :: godot_method_bind } impl VideoStreamTheoraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VideoStreamTheoraMethodTable = VideoStreamTheoraMethodTable { class_constructor : None , get_file : 0 as * mut sys :: godot_method_bind , set_file : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VideoStreamTheoraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VideoStreamTheora\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\0" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:262:45605 [INFO] [stdout] | [INFO] [stdout] 262 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 262 | # [doc = "`core 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:268:4298 [INFO] [stdout] | [INFO] [stdout] 268 | ...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] 268 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:274:8668 [INFO] [stdout] | [INFO] [stdout] 274 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 274 | # [doc = "`core class Navigation2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_navigation2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Navigation2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigation2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Navigation2D { this : RawObject < Self > , } impl Navigation2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Navigation2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the navigation point closest to the point given. Points are in local coordinate space."] # [doc = ""] # [inline] pub fn get_closest_point (& self , to_point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; mem :: transmute (ret) } } # [doc = "Returns the owner of the [NavigationPolygon] which contains the navigation point closest to the point given. This is usually a [NavigationPolygonInstance]. For polygons added via [method navpoly_add], returns the owner that was given (or `null` if the `owner` parameter was omitted)."] # [doc = ""] # [inline] pub fn get_closest_point_owner (& self , to_point : Vector2) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_closest_point_owner ; let ret = crate :: icalls :: icallptr_obj_vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the path between two given points. Points are in local coordinate space. If `optimize` is `true` (the default), the path is smoothed by merging path segments where possible.\n# Default Arguments\n* `optimize` - `true`"] # [doc = ""] # [inline] pub fn get_simple_path (& self , start : Vector2 , end : Vector2 , optimize : bool) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_simple_path ; let ret = crate :: icalls :: icallptr_vec2arr_vec2_vec2_bool (method_bind , self . this . sys () . as_ptr () , start , end , optimize) ; Vector2Array :: from_sys (ret) } } # [doc = "Adds a [NavigationPolygon]. Returns an ID for use with [method navpoly_remove] or [method navpoly_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional `owner` is used as return value for [method get_closest_point_owner].\n# Default Arguments\n* `owner` - `null`"] # [doc = ""] # [inline] pub fn navpoly_add (& self , mesh : impl AsArg < crate :: generated :: navigation_polygon :: NavigationPolygon > , xform : Transform2D , owner : impl AsArg < crate :: generated :: object :: Object >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . navpoly_add ; let ret = crate :: icalls :: icallptr_i64_obj_trans2D_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , xform , owner . as_arg_ptr ()) ; ret as _ } } # [doc = "Removes the [NavigationPolygon] with the given ID."] # [doc = ""] # [inline] pub fn navpoly_remove (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . navpoly_remove ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Sets the transform applied to the [NavigationPolygon] with the given ID."] # [doc = ""] # [inline] pub fn navpoly_set_transform (& self , id : i64 , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . navpoly_set_transform ; let ret = crate :: icalls :: icallptr_void_i64_trans2D (method_bind , self . this . sys () . as_ptr () , id , xform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Navigation2D { } unsafe impl GodotObject for Navigation2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Navigation2D" } } impl QueueFree for Navigation2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Navigation2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Navigation2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Navigation2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Navigation2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Navigation2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Navigation2D { } impl Instanciable for Navigation2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Navigation2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Navigation2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_closest_point : * mut sys :: godot_method_bind , pub get_closest_point_owner : * mut sys :: godot_method_bind , pub get_simple_path : * mut sys :: godot_method_bind , pub navpoly_add : * mut sys :: godot_method_bind , pub navpoly_remove : * mut sys :: godot_method_bind , pub navpoly_set_transform : * mut sys :: godot_method_bind } impl Navigation2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Navigation2DMethodTable = Navigation2DMethodTable { class_constructor : None , get_closest_point : 0 as * mut sys :: godot_method_bind , get_closest_point_owner : 0 as * mut sys :: godot_method_bind , get_simple_path : 0 as * mut sys :: godot_method_bind , navpoly_add : 0 as * mut sys :: godot_method_bind , navpoly_remove : 0 as * mut sys :: godot_method_bind , navpoly_set_transform : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Navigation2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Navigation2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_closest_point_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_owner\0" . as_ptr () as * const c_char) ; table . get_simple_path = (gd_api . godot_method_bind_get_method) (class_name , "get_simple_path\0" . as_ptr () as * const c_char) ; table . navpoly_add = (gd_api . godot_method_bind_get_method) (class_name , "navpoly_add\0" . as_ptr () as * const c_char) ; table . navpoly_remove = (gd_api . godot_method_bind_get_method) (class_name , "navpoly_remove\0" . as_ptr () as * const c_char) ; table . navpoly_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "navpoly_set_transform\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:280:4494 [INFO] [stdout] | [INFO] [stdout] 280 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 280 | # [doc = "`core class PanoramaSky` inherits `Sky` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_panoramasky.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPanoramaSky inherits methods from:\n - [Sky](struct.Sky.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PanoramaSky { this : RawObject < Self > , } impl PanoramaSky { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PanoramaSkyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "[Texture] to be applied to the PanoramaSky."] # [doc = ""] # [inline] pub fn panorama (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PanoramaSkyMethodTable :: get (get_api ()) . get_panorama ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "[Texture] to be applied to the PanoramaSky."] # [doc = ""] # [inline] pub fn set_panorama (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PanoramaSkyMethodTable :: get (get_api ()) . set_panorama ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PanoramaSky { } unsafe impl GodotObject for PanoramaSky { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PanoramaSky" } } impl std :: ops :: Deref for PanoramaSky { type Target = crate :: generated :: sky :: Sky ; # [inline] fn deref (& self) -> & crate :: generated :: sky :: Sky { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PanoramaSky { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: sky :: Sky { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: sky :: Sky > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: object :: Object > for PanoramaSky { } impl Instanciable for PanoramaSky { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PanoramaSky :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PanoramaSkyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_panorama : * mut sys :: godot_method_bind , pub set_panorama : * mut sys :: godot_method_bind } impl PanoramaSkyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PanoramaSkyMethodTable = PanoramaSkyMethodTable { class_constructor : None , get_panorama : 0 as * mut sys :: godot_method_bind , set_panorama : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PanoramaSkyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PanoramaSky\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_panorama = (gd_api . godot_method_bind_get_method) (class_name , "get_panorama\0" . as_ptr () as * const c_char) ; table . set_panorama = (gd_api . godot_method_bind_get_method) (class_name , "set_panorama\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:286:5487 [INFO] [stdout] | [INFO] [stdout] 286 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 286 | # [doc = "`core class VisualScriptLocalVarSet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptlocalvarset.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptLocalVarSet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptLocalVarSet { this : RawObject < Self > , } impl VisualScriptLocalVarSet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptLocalVarSetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarSetMethodTable :: get (get_api ()) . get_var_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarSetMethodTable :: get (get_api ()) . get_var_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarSetMethodTable :: get (get_api ()) . set_var_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_type (& self , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarSetMethodTable :: get (get_api ()) . set_var_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLocalVarSet { } unsafe impl GodotObject for VisualScriptLocalVarSet { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLocalVarSet" } } impl std :: ops :: Deref for VisualScriptLocalVarSet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLocalVarSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptLocalVarSet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptLocalVarSet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptLocalVarSet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptLocalVarSet { } impl Instanciable for VisualScriptLocalVarSet { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptLocalVarSet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptLocalVarSetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_var_name : * mut sys :: godot_method_bind , pub get_var_type : * mut sys :: godot_method_bind , pub set_var_name : * mut sys :: godot_method_bind , pub set_var_type : * mut sys :: godot_method_bind } impl VisualScriptLocalVarSetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptLocalVarSetMethodTable = VisualScriptLocalVarSetMethodTable { class_constructor : None , get_var_name : 0 as * mut sys :: godot_method_bind , get_var_type : 0 as * mut sys :: godot_method_bind , set_var_name : 0 as * mut sys :: godot_method_bind , set_var_type : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptLocalVarSetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptLocalVarSet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_var_name = (gd_api . godot_method_bind_get_method) (class_name , "get_var_name\0" . as_ptr () as * const c_char) ; table . get_var_type = (gd_api . godot_method_bind_get_method) (class_name , "get_var_type\0" . as_ptr () as * const c_char) ; table . set_var_name = (gd_api . godot_method_bind_get_method) (class_name , "set_var_name\0" . as_ptr () as * const c_char) ; table . set_var_type = (gd_api . godot_method_bind_get_method) (class_name , "set_var_type\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:292:3805 [INFO] [stdout] | [INFO] [stdout] 292 | ...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] 292 | # [doc = "`core class VisualShaderNodeOuterProduct` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodeouterproduct.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeOuterProduct inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeOuterProduct { this : RawObject < Self > , } impl VisualShaderNodeOuterProduct { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeOuterProductMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeOuterProduct { } unsafe impl GodotObject for VisualShaderNodeOuterProduct { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeOuterProduct" } } impl std :: ops :: Deref for VisualShaderNodeOuterProduct { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeOuterProduct { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeOuterProduct { } impl Instanciable for VisualShaderNodeOuterProduct { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeOuterProduct :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeOuterProductMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeOuterProductMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeOuterProductMethodTable = VisualShaderNodeOuterProductMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeOuterProductMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeOuterProduct\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:298:6340 [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 Thread` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_thread.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nThread inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Thread { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Priority (pub i64) ; impl Priority { pub const LOW : Priority = Priority (0i64) ; pub const NORMAL : Priority = Priority (1i64) ; pub const HIGH : Priority = Priority (2i64) ; } impl From < i64 > for Priority { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Priority > for i64 { # [inline] fn from (v : Priority) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Thread { pub const PRIORITY_HIGH : i64 = 2i64 ; pub const PRIORITY_LOW : i64 = 0i64 ; pub const PRIORITY_NORMAL : i64 = 1i64 ; } impl Thread { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ThreadMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the current [Thread]'s ID, uniquely identifying it among all threads. If the [Thread] is not running this returns an empty string."] # [doc = ""] # [inline] pub fn get_id (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . get_id ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if this [Thread] is currently active. An active [Thread] cannot start work on a new method but can be joined with [method wait_to_finish]."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Starts a new [Thread] that runs `method` on object `instance` with `userdata` passed as an argument. Even if no userdata is passed, `method` must accept one argument and it will be null. The `priority` of the [Thread] can be changed by passing a value from the [enum Priority] enum.\nReturns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure.\n# Default Arguments\n* `userdata` - `null`\n* `priority` - `1`"] # [doc = ""] # [inline] pub fn start (& self , instance : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant , priority : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallptr_i64_obj_str_var_i64 (method_bind , self . this . sys () . as_ptr () , instance . as_arg_ptr () , method . into () , userdata . owned_to_variant () , priority) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Joins the [Thread] and waits for it to finish. Returns what the method called returned."] # [doc = ""] # [inline] pub fn wait_to_finish (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . wait_to_finish ; let ret = crate :: icalls :: icallptr_var (method_bind , self . this . sys () . as_ptr ()) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Thread { } unsafe impl GodotObject for Thread { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Thread" } } impl std :: ops :: Deref for Thread { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Thread { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Thread { } unsafe impl SubClass < crate :: generated :: object :: Object > for Thread { } impl Instanciable for Thread { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Thread :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ThreadMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_id : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub wait_to_finish : * mut sys :: godot_method_bind } impl ThreadMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ThreadMethodTable = ThreadMethodTable { class_constructor : None , get_id : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , wait_to_finish : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ThreadMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Thread\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_id = (gd_api . godot_method_bind_get_method) (class_name , "get_id\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . wait_to_finish = (gd_api . godot_method_bind_get_method) (class_name , "wait_to_finish\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:304:5986 [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 InputEventScreenTouch` inherits `InputEvent` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventscreentouch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventScreenTouch inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventScreenTouch { this : RawObject < Self > , } impl InputEventScreenTouch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventScreenTouchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The touch index in the case of a multi-touch event. One index = one finger."] # [doc = ""] # [inline] pub fn index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . get_index ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The touch position."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The touch index in the case of a multi-touch event. One index = one finger."] # [doc = ""] # [inline] pub fn set_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . set_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "The touch position."] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "If `true`, the touch's state is pressed. If `false`, the touch's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventScreenTouch { } unsafe impl GodotObject for InputEventScreenTouch { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventScreenTouch" } } impl std :: ops :: Deref for InputEventScreenTouch { type Target = crate :: generated :: input_event :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventScreenTouch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventScreenTouch { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventScreenTouch { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventScreenTouch { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventScreenTouch { } impl Instanciable for InputEventScreenTouch { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventScreenTouch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventScreenTouchMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_index : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub set_index : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind } impl InputEventScreenTouchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventScreenTouchMethodTable = InputEventScreenTouchMethodTable { class_constructor : None , get_index : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , set_index : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { InputEventScreenTouchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventScreenTouch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:310:13904 [INFO] [stdout] | [INFO] [stdout] 310 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 310 | # [doc = "`core class AnimatedSprite` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animatedsprite.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`AnimatedSprite` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAnimatedSprite inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimatedSprite { this : RawObject < Self > , } impl AnimatedSprite { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimatedSpriteMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The current animation from the `frames` resource. If this value changes, the `frame` counter is reset."] # [doc = ""] # [inline] pub fn animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_animation ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The displayed animation frame's index."] # [doc = ""] # [inline] pub fn frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The animation speed is multiplied by this value."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn sprite_frames (& self) -> Option < Ref < crate :: generated :: sprite_frames :: SpriteFrames , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_sprite_frames ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: sprite_frames :: SpriteFrames , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn is_centered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_centered ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn is_flipped_h (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_flipped_h ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn is_flipped_v (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_flipped_v ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if an animation is currently being played."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Plays the animation named `anim`. If no `anim` is provided, the current animation is played. If `backwards` is `true`, the animation will be played in reverse.\n# Default Arguments\n* `anim` - `\"\"`\n* `backwards` - `false`"] # [doc = ""] # [inline] pub fn play (& self , anim : impl Into < GodotString > , backwards : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , anim . into () , backwards) ; } } # [doc = "The current animation from the `frames` resource. If this value changes, the `frame` counter is reset."] # [doc = ""] # [inline] pub fn set_animation (& self , animation : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_animation ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , animation . into ()) ; } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn set_centered (& self , centered : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_centered ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , centered) ; } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn set_flip_h (& self , flip_h : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_flip_h ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_h) ; } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn set_flip_v (& self , flip_v : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_flip_v ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_v) ; } } # [doc = "The displayed animation frame's index."] # [doc = ""] # [inline] pub fn set_frame (& self , frame : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The animation speed is multiplied by this value."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , speed_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , speed_scale) ; } } # [doc = "The [SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn set_sprite_frames (& self , sprite_frames : impl AsArg < crate :: generated :: sprite_frames :: SpriteFrames >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_sprite_frames ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , sprite_frames . as_arg_ptr ()) ; } } # [doc = "Stops the current animation (does not reset the frame counter)."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimatedSprite { } unsafe impl GodotObject for AnimatedSprite { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AnimatedSprite" } } impl QueueFree for AnimatedSprite { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AnimatedSprite { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimatedSprite { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: node :: Node > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimatedSprite { } impl Instanciable for AnimatedSprite { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimatedSprite :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimatedSpriteMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_animation : * mut sys :: godot_method_bind , pub get_frame : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_sprite_frames : * mut sys :: godot_method_bind , pub is_centered : * mut sys :: godot_method_bind , pub is_flipped_h : * mut sys :: godot_method_bind , pub is_flipped_v : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub set_animation : * mut sys :: godot_method_bind , pub set_centered : * mut sys :: godot_method_bind , pub set_flip_h : * mut sys :: godot_method_bind , pub set_flip_v : * mut sys :: godot_method_bind , pub set_frame : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_sprite_frames : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AnimatedSpriteMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimatedSpriteMethodTable = AnimatedSpriteMethodTable { class_constructor : None , get_animation : 0 as * mut sys :: godot_method_bind , get_frame : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_sprite_frames : 0 as * mut sys :: godot_method_bind , is_centered : 0 as * mut sys :: godot_method_bind , is_flipped_h : 0 as * mut sys :: godot_method_bind , is_flipped_v : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , set_animation : 0 as * mut sys :: godot_method_bind , set_centered : 0 as * mut sys :: godot_method_bind , set_flip_h : 0 as * mut sys :: godot_method_bind , set_flip_v : 0 as * mut sys :: godot_method_bind , set_frame : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_sprite_frames : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimatedSpriteMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimatedSprite\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_animation\0" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_sprite_frames\0" . as_ptr () as * const c_char) ; table . is_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_centered\0" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\0" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . set_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_animation\0" . as_ptr () as * const c_char) ; table . set_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_centered\0" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\0" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_sprite_frames\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:316:8763 [INFO] [stdout] | [INFO] [stdout] 316 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 316 | # [doc = "`core class ARVRAnchor` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_arvranchor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ARVRAnchor` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nARVRAnchor inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRAnchor { this : RawObject < Self > , } impl ARVRAnchor { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRAnchorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The anchor's ID. You can set this before the anchor itself exists. The first anchor gets an ID of `1`, the second an ID of `2`, etc. When anchors get removed, the engine can then assign the corresponding ID to new anchors. The most common situation where anchors \"disappear\" is when the AR server identifies that two anchors represent different parts of the same plane and merges them."] # [doc = ""] # [inline] pub fn anchor_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_anchor_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the name given to this anchor."] # [doc = ""] # [inline] pub fn get_anchor_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_anchor_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if the anchor is being tracked and `false` if no anchor with this ID is currently known."] # [doc = ""] # [inline] pub fn get_is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_is_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If provided by the [ARVRInterface], this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes."] # [doc = ""] # [inline] pub fn get_mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns a plane aligned with our anchor; handy for intersection testing."] # [doc = ""] # [inline] pub fn get_plane (& self) -> Plane { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_plane ; let ret = crate :: icalls :: icallptr_plane (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table."] # [doc = ""] # [inline] pub fn get_size (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The anchor's ID. You can set this before the anchor itself exists. The first anchor gets an ID of `1`, the second an ID of `2`, etc. When anchors get removed, the engine can then assign the corresponding ID to new anchors. The most common situation where anchors \"disappear\" is when the AR server identifies that two anchors represent different parts of the same plane and merges them."] # [doc = ""] # [inline] pub fn set_anchor_id (& self , anchor_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . set_anchor_id ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , anchor_id) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRAnchor { } unsafe impl GodotObject for ARVRAnchor { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVRAnchor" } } impl QueueFree for ARVRAnchor { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ARVRAnchor { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRAnchor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ARVRAnchor { } unsafe impl SubClass < crate :: generated :: node :: Node > for ARVRAnchor { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRAnchor { } impl Instanciable for ARVRAnchor { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ARVRAnchor :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRAnchorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_anchor_id : * mut sys :: godot_method_bind , pub get_anchor_name : * mut sys :: godot_method_bind , pub get_is_active : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_plane : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub set_anchor_id : * mut sys :: godot_method_bind } impl ARVRAnchorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRAnchorMethodTable = ARVRAnchorMethodTable { class_constructor : None , get_anchor_id : 0 as * mut sys :: godot_method_bind , get_anchor_name : 0 as * mut sys :: godot_method_bind , get_is_active : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_plane : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , set_anchor_id : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ARVRAnchorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRAnchor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_anchor_id = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_id\0" . as_ptr () as * const c_char) ; table . get_anchor_name = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_name\0" . as_ptr () as * const c_char) ; table . get_is_active = (gd_api . godot_method_bind_get_method) (class_name , "get_is_active\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_plane = (gd_api . godot_method_bind_get_method) (class_name , "get_plane\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . set_anchor_id = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_id\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:322:22273 [INFO] [stdout] | [INFO] [stdout] 322 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 322 | # [doc = "`core class GraphNode` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_graphnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`GraphNode` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGraphNode inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GraphNode { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Overlay (pub i64) ; impl Overlay { pub const DISABLED : Overlay = Overlay (0i64) ; pub const BREAKPOINT : Overlay = Overlay (1i64) ; pub const POSITION : Overlay = Overlay (2i64) ; } impl From < i64 > for Overlay { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Overlay > for i64 { # [inline] fn from (v : Overlay) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GraphNode { pub const OVERLAY_BREAKPOINT : i64 = 1i64 ; pub const OVERLAY_DISABLED : i64 = 0i64 ; pub const OVERLAY_POSITION : i64 = 2i64 ; } impl GraphNode { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GraphNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Disables all input and output slots of the GraphNode."] # [doc = ""] # [inline] pub fn clear_all_slots (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . clear_all_slots ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Disables input and output slot whose index is `idx`."] # [doc = ""] # [inline] pub fn clear_slot (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . clear_slot ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "Returns the color of the input connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_input_color (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_input_color ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the number of enabled input slots (connections) to the GraphNode."] # [doc = ""] # [inline] pub fn get_connection_input_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_input_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the position of the input connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_input_position (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_input_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the type of the input connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_input_type (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_input_type ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the color of the output connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_output_color (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_output_color ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the number of enabled output slots (connections) of the GraphNode."] # [doc = ""] # [inline] pub fn get_connection_output_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_output_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the position of the output connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_output_position (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_output_position ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the type of the output connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_output_type (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_output_type ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "The offset of the GraphNode, relative to the scroll offset of the [GraphEdit].\n**Note:** You cannot use position directly, as [GraphEdit] is a [Container]."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Sets the overlay shown above the GraphNode. See [enum Overlay]."] # [doc = ""] # [inline] pub fn overlay (& self) -> crate :: generated :: graph_node :: Overlay { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_overlay ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: graph_node :: Overlay (ret) } } # [doc = "Returns the color set to `idx` left (input) slot."] # [doc = ""] # [inline] pub fn get_slot_color_left (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_slot_color_left ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the color set to `idx` right (output) slot."] # [doc = ""] # [inline] pub fn get_slot_color_right (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_slot_color_right ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the (integer) type of left (input) `idx` slot."] # [doc = ""] # [inline] pub fn get_slot_type_left (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_slot_type_left ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the (integer) type of right (output) `idx` slot."] # [doc = ""] # [inline] pub fn get_slot_type_right (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_slot_type_right ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "The text displayed in the GraphNode's title bar."] # [doc = ""] # [inline] pub fn title (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_title ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If `true`, the close button will be visible.\n**Note:** Pressing it will only emit the [signal close_request] signal, the GraphNode needs to be removed manually."] # [doc = ""] # [inline] pub fn is_close_button_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_close_button_visible ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the GraphNode is a comment node."] # [doc = ""] # [inline] pub fn is_comment (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_comment ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the user can resize the GraphNode.\n**Note:** Dragging the handle will only emit the [signal resize_request] signal, the GraphNode needs to be resized manually."] # [doc = ""] # [inline] pub fn is_resizable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_resizable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the GraphNode is selected."] # [doc = ""] # [inline] pub fn is_selected (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_selected ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if left (input) slot `idx` is enabled, `false` otherwise."] # [doc = ""] # [inline] pub fn is_slot_enabled_left (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_slot_enabled_left ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns `true` if right (output) slot `idx` is enabled, `false` otherwise."] # [doc = ""] # [inline] pub fn is_slot_enabled_right (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_slot_enabled_right ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "If `true`, the GraphNode is a comment node."] # [doc = ""] # [inline] pub fn set_comment (& self , comment : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_comment ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , comment) ; } } # [doc = "The offset of the GraphNode, relative to the scroll offset of the [GraphEdit].\n**Note:** You cannot use position directly, as [GraphEdit] is a [Container]."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Sets the overlay shown above the GraphNode. See [enum Overlay]."] # [doc = ""] # [inline] pub fn set_overlay (& self , overlay : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_overlay ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , overlay) ; } } # [doc = "If `true`, the user can resize the GraphNode.\n**Note:** Dragging the handle will only emit the [signal resize_request] signal, the GraphNode needs to be resized manually."] # [doc = ""] # [inline] pub fn set_resizable (& self , resizable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_resizable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , resizable) ; } } # [doc = "If `true`, the GraphNode is selected."] # [doc = ""] # [inline] pub fn set_selected (& self , selected : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_selected ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , selected) ; } } # [doc = "If `true`, the close button will be visible.\n**Note:** Pressing it will only emit the [signal close_request] signal, the GraphNode needs to be removed manually."] # [doc = ""] # [inline] pub fn set_show_close_button (& self , show : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_show_close_button ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , show) ; } } # [doc = "Sets properties of the slot with ID `idx`.\nIf `enable_left`/`right`, a port will appear and the slot will be able to be connected from this side.\n`type_left`/`right` is an arbitrary type of the port. Only ports with the same type values can be connected.\n`color_left`/`right` is the tint of the port's icon on this side.\n`custom_left`/`right` is a custom texture for this side's port.\n**Note:** This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode.\n# Default Arguments\n* `custom_left` - `null`\n* `custom_right` - `null`"] # [doc = ""] # [inline] pub fn set_slot (& self , idx : i64 , enable_left : bool , type_left : i64 , color_left : Color , enable_right : bool , type_right : i64 , color_right : Color , custom_left : impl AsArg < crate :: generated :: texture :: Texture > , custom_right : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_slot ; let ret = crate :: icalls :: icallptr_void_i64_bool_i64_color_bool_i64_color_obj_obj (method_bind , self . this . sys () . as_ptr () , idx , enable_left , type_left , color_left , enable_right , type_right , color_right , custom_left . as_arg_ptr () , custom_right . as_arg_ptr ()) ; } } # [doc = "The text displayed in the GraphNode's title bar."] # [doc = ""] # [inline] pub fn set_title (& self , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_title ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , title . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GraphNode { } unsafe impl GodotObject for GraphNode { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GraphNode" } } impl QueueFree for GraphNode { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GraphNode { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GraphNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for GraphNode { } unsafe impl SubClass < crate :: generated :: control :: Control > for GraphNode { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for GraphNode { } unsafe impl SubClass < crate :: generated :: node :: Node > for GraphNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for GraphNode { } impl Instanciable for GraphNode { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { GraphNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GraphNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear_all_slots : * mut sys :: godot_method_bind , pub clear_slot : * mut sys :: godot_method_bind , pub get_connection_input_color : * mut sys :: godot_method_bind , pub get_connection_input_count : * mut sys :: godot_method_bind , pub get_connection_input_position : * mut sys :: godot_method_bind , pub get_connection_input_type : * mut sys :: godot_method_bind , pub get_connection_output_color : * mut sys :: godot_method_bind , pub get_connection_output_count : * mut sys :: godot_method_bind , pub get_connection_output_position : * mut sys :: godot_method_bind , pub get_connection_output_type : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_overlay : * mut sys :: godot_method_bind , pub get_slot_color_left : * mut sys :: godot_method_bind , pub get_slot_color_right : * mut sys :: godot_method_bind , pub get_slot_type_left : * mut sys :: godot_method_bind , pub get_slot_type_right : * mut sys :: godot_method_bind , pub get_title : * mut sys :: godot_method_bind , pub is_close_button_visible : * mut sys :: godot_method_bind , pub is_comment : * mut sys :: godot_method_bind , pub is_resizable : * mut sys :: godot_method_bind , pub is_selected : * mut sys :: godot_method_bind , pub is_slot_enabled_left : * mut sys :: godot_method_bind , pub is_slot_enabled_right : * mut sys :: godot_method_bind , pub set_comment : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_overlay : * mut sys :: godot_method_bind , pub set_resizable : * mut sys :: godot_method_bind , pub set_selected : * mut sys :: godot_method_bind , pub set_show_close_button : * mut sys :: godot_method_bind , pub set_slot : * mut sys :: godot_method_bind , pub set_title : * mut sys :: godot_method_bind } impl GraphNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GraphNodeMethodTable = GraphNodeMethodTable { class_constructor : None , clear_all_slots : 0 as * mut sys :: godot_method_bind , clear_slot : 0 as * mut sys :: godot_method_bind , get_connection_input_color : 0 as * mut sys :: godot_method_bind , get_connection_input_count : 0 as * mut sys :: godot_method_bind , get_connection_input_position : 0 as * mut sys :: godot_method_bind , get_connection_input_type : 0 as * mut sys :: godot_method_bind , get_connection_output_color : 0 as * mut sys :: godot_method_bind , get_connection_output_count : 0 as * mut sys :: godot_method_bind , get_connection_output_position : 0 as * mut sys :: godot_method_bind , get_connection_output_type : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_overlay : 0 as * mut sys :: godot_method_bind , get_slot_color_left : 0 as * mut sys :: godot_method_bind , get_slot_color_right : 0 as * mut sys :: godot_method_bind , get_slot_type_left : 0 as * mut sys :: godot_method_bind , get_slot_type_right : 0 as * mut sys :: godot_method_bind , get_title : 0 as * mut sys :: godot_method_bind , is_close_button_visible : 0 as * mut sys :: godot_method_bind , is_comment : 0 as * mut sys :: godot_method_bind , is_resizable : 0 as * mut sys :: godot_method_bind , is_selected : 0 as * mut sys :: godot_method_bind , is_slot_enabled_left : 0 as * mut sys :: godot_method_bind , is_slot_enabled_right : 0 as * mut sys :: godot_method_bind , set_comment : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_overlay : 0 as * mut sys :: godot_method_bind , set_resizable : 0 as * mut sys :: godot_method_bind , set_selected : 0 as * mut sys :: godot_method_bind , set_show_close_button : 0 as * mut sys :: godot_method_bind , set_slot : 0 as * mut sys :: godot_method_bind , set_title : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { GraphNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GraphNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_all_slots = (gd_api . godot_method_bind_get_method) (class_name , "clear_all_slots\0" . as_ptr () as * const c_char) ; table . clear_slot = (gd_api . godot_method_bind_get_method) (class_name , "clear_slot\0" . as_ptr () as * const c_char) ; table . get_connection_input_color = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_color\0" . as_ptr () as * const c_char) ; table . get_connection_input_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_count\0" . as_ptr () as * const c_char) ; table . get_connection_input_position = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_position\0" . as_ptr () as * const c_char) ; table . get_connection_input_type = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_type\0" . as_ptr () as * const c_char) ; table . get_connection_output_color = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_color\0" . as_ptr () as * const c_char) ; table . get_connection_output_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_count\0" . as_ptr () as * const c_char) ; table . get_connection_output_position = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_position\0" . as_ptr () as * const c_char) ; table . get_connection_output_type = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_type\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_overlay = (gd_api . godot_method_bind_get_method) (class_name , "get_overlay\0" . as_ptr () as * const c_char) ; table . get_slot_color_left = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_color_left\0" . as_ptr () as * const c_char) ; table . get_slot_color_right = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_color_right\0" . as_ptr () as * const c_char) ; table . get_slot_type_left = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_type_left\0" . as_ptr () as * const c_char) ; table . get_slot_type_right = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_type_right\0" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\0" . as_ptr () as * const c_char) ; table . is_close_button_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_close_button_visible\0" . as_ptr () as * const c_char) ; table . is_comment = (gd_api . godot_method_bind_get_method) (class_name , "is_comment\0" . as_ptr () as * const c_char) ; table . is_resizable = (gd_api . godot_method_bind_get_method) (class_name , "is_resizable\0" . as_ptr () as * const c_char) ; table . is_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_selected\0" . as_ptr () as * const c_char) ; table . is_slot_enabled_left = (gd_api . godot_method_bind_get_method) (class_name , "is_slot_enabled_left\0" . as_ptr () as * const c_char) ; table . is_slot_enabled_right = (gd_api . godot_method_bind_get_method) (class_name , "is_slot_enabled_right\0" . as_ptr () as * const c_char) ; table . set_comment = (gd_api . godot_method_bind_get_method) (class_name , "set_comment\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_overlay = (gd_api . godot_method_bind_get_method) (class_name , "set_overlay\0" . as_ptr () as * const c_char) ; table . set_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_resizable\0" . as_ptr () as * const c_char) ; table . set_selected = (gd_api . godot_method_bind_get_method) (class_name , "set_selected\0" . as_ptr () as * const c_char) ; table . set_show_close_button = (gd_api . godot_method_bind_get_method) (class_name , "set_show_close_button\0" . as_ptr () as * const c_char) ; table . set_slot = (gd_api . godot_method_bind_get_method) (class_name , "set_slot\0" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:328:4038 [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 Shape` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_shape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nShape inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Shape { this : RawObject < Self > , } impl Shape { # [doc = ""] # [doc = ""] # [inline] pub fn get_debug_mesh (& self) -> Option < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . get_debug_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: array_mesh :: ArrayMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , margin) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Shape { } unsafe impl GodotObject for Shape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Shape" } } impl std :: ops :: Deref for Shape { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Shape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Shape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Shape { } unsafe impl SubClass < crate :: generated :: object :: Object > for Shape { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_debug_mesh : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind } impl ShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ShapeMethodTable = ShapeMethodTable { class_constructor : None , get_debug_mesh : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Shape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_debug_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_debug_mesh\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:334:4658 [INFO] [stdout] | [INFO] [stdout] 334 | ...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] 334 | # [doc = "`core class VisualScriptCustomNode` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptcustomnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptCustomNode inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptCustomNode { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StartMode (pub i64) ; impl StartMode { pub const BEGIN_SEQUENCE : StartMode = StartMode (0i64) ; pub const CONTINUE_SEQUENCE : StartMode = StartMode (1i64) ; pub const RESUME_YIELD : StartMode = StartMode (2i64) ; } impl From < i64 > for StartMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StartMode > for i64 { # [inline] fn from (v : StartMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptCustomNode { pub const START_MODE_BEGIN_SEQUENCE : i64 = 0i64 ; pub const START_MODE_CONTINUE_SEQUENCE : i64 = 1i64 ; pub const START_MODE_RESUME_YIELD : i64 = 2i64 ; pub const STEP_EXIT_FUNCTION_BIT : i64 = 134217728i64 ; pub const STEP_GO_BACK_BIT : i64 = 33554432i64 ; pub const STEP_NO_ADVANCE_BIT : i64 = 67108864i64 ; pub const STEP_PUSH_STACK_BIT : i64 = 16777216i64 ; pub const STEP_YIELD_BIT : i64 = 268435456i64 ; } impl VisualScriptCustomNode { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptCustomNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptCustomNode { } unsafe impl GodotObject for VisualScriptCustomNode { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptCustomNode" } } impl std :: ops :: Deref for VisualScriptCustomNode { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptCustomNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptCustomNode { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptCustomNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptCustomNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptCustomNode { } impl Instanciable for VisualScriptCustomNode { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptCustomNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptCustomNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptCustomNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptCustomNodeMethodTable = VisualScriptCustomNodeMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptCustomNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptCustomNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:340:15446 [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 Directory` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_directory.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nDirectory inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Directory { this : RawObject < Self > , } impl Directory { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DirectoryMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. `newdir` or `../newdir`), or an absolute path (e.g. `/tmp/newdir` or `res://somedir/newdir`).\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn change_dir (& self , todir : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . change_dir ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , todir . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Copies the `from` file to the `to` destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn copy (& self , from : impl Into < GodotString > , to : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . copy ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns whether the current item processed with the last [method get_next] call is a directory (`.` and `..` are considered directories)."] # [doc = ""] # [inline] pub fn current_is_dir (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . current_is_dir ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path."] # [doc = ""] # [inline] pub fn dir_exists (& self , path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . dir_exists ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [doc = "Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path."] # [doc = ""] # [inline] pub fn file_exists (& self , path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . file_exists ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; ret as _ } } # [doc = "Returns the absolute path to the currently opened directory (e.g. `res://folder` or `C:\\tmp\\folder`)."] # [doc = ""] # [inline] pub fn get_current_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_current_dir ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the currently opened directory's drive index. See [method get_drive] to convert returned index to the name of the drive."] # [doc = ""] # [inline] pub fn get_current_drive (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_current_drive ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "On Windows, returns the name of the drive (partition) passed as an argument (e.g. `C:`). On other platforms, or if the requested drive does not existed, the method returns an empty String."] # [doc = ""] # [inline] pub fn get_drive (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_drive ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "On Windows, returns the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0."] # [doc = ""] # [inline] pub fn get_drive_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_drive_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the next element (file or directory) in the current directory (including `.` and `..`, unless `skip_navigational` was given to [method list_dir_begin]).\nThe name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case)."] # [doc = ""] # [inline] pub fn get_next (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_next ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "On UNIX desktop systems, returns the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1."] # [doc = ""] # [inline] pub fn get_space_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_space_left ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Initializes the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end].\nIf `skip_navigational` is `true`, `.` and `..` are filtered out.\nIf `skip_hidden` is `true`, hidden files are filtered out.\n# Default Arguments\n* `skip_navigational` - `false`\n* `skip_hidden` - `false`"] # [doc = ""] # [inline] pub fn list_dir_begin (& self , skip_navigational : bool , skip_hidden : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . list_dir_begin ; let ret = crate :: icalls :: icallptr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , skip_navigational , skip_hidden) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter)."] # [doc = ""] # [inline] pub fn list_dir_end (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . list_dir_end ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]).\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn make_dir (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . make_dir ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn make_dir_recursive (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . make_dir_recursive ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Opens an existing directory of the filesystem. The `path` argument can be within the project tree (`res://folder`), the user directory (`user://folder`) or an absolute path of the user filesystem (e.g. `/tmp/folder` or `C:\\tmp\\folder`).\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn open (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . open ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn remove (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . remove ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Renames (move) the `from` file to the `to` destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.\nReturns one of the [enum Error] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn rename (& self , from : impl Into < GodotString > , to : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . rename ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for Directory { } unsafe impl GodotObject for Directory { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Directory" } } impl std :: ops :: Deref for Directory { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Directory { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Directory { } unsafe impl SubClass < crate :: generated :: object :: Object > for Directory { } impl Instanciable for Directory { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Directory :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DirectoryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub change_dir : * mut sys :: godot_method_bind , pub copy : * mut sys :: godot_method_bind , pub current_is_dir : * mut sys :: godot_method_bind , pub dir_exists : * mut sys :: godot_method_bind , pub file_exists : * mut sys :: godot_method_bind , pub get_current_dir : * mut sys :: godot_method_bind , pub get_current_drive : * mut sys :: godot_method_bind , pub get_drive : * mut sys :: godot_method_bind , pub get_drive_count : * mut sys :: godot_method_bind , pub get_next : * mut sys :: godot_method_bind , pub get_space_left : * mut sys :: godot_method_bind , pub list_dir_begin : * mut sys :: godot_method_bind , pub list_dir_end : * mut sys :: godot_method_bind , pub make_dir : * mut sys :: godot_method_bind , pub make_dir_recursive : * mut sys :: godot_method_bind , pub open : * mut sys :: godot_method_bind , pub remove : * mut sys :: godot_method_bind , pub rename : * mut sys :: godot_method_bind } impl DirectoryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DirectoryMethodTable = DirectoryMethodTable { class_constructor : None , change_dir : 0 as * mut sys :: godot_method_bind , copy : 0 as * mut sys :: godot_method_bind , current_is_dir : 0 as * mut sys :: godot_method_bind , dir_exists : 0 as * mut sys :: godot_method_bind , file_exists : 0 as * mut sys :: godot_method_bind , get_current_dir : 0 as * mut sys :: godot_method_bind , get_current_drive : 0 as * mut sys :: godot_method_bind , get_drive : 0 as * mut sys :: godot_method_bind , get_drive_count : 0 as * mut sys :: godot_method_bind , get_next : 0 as * mut sys :: godot_method_bind , get_space_left : 0 as * mut sys :: godot_method_bind , list_dir_begin : 0 as * mut sys :: godot_method_bind , list_dir_end : 0 as * mut sys :: godot_method_bind , make_dir : 0 as * mut sys :: godot_method_bind , make_dir_recursive : 0 as * mut sys :: godot_method_bind , open : 0 as * mut sys :: godot_method_bind , remove : 0 as * mut sys :: godot_method_bind , rename : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { DirectoryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Directory\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . change_dir = (gd_api . godot_method_bind_get_method) (class_name , "change_dir\0" . as_ptr () as * const c_char) ; table . copy = (gd_api . godot_method_bind_get_method) (class_name , "copy\0" . as_ptr () as * const c_char) ; table . current_is_dir = (gd_api . godot_method_bind_get_method) (class_name , "current_is_dir\0" . as_ptr () as * const c_char) ; table . dir_exists = (gd_api . godot_method_bind_get_method) (class_name , "dir_exists\0" . as_ptr () as * const c_char) ; table . file_exists = (gd_api . godot_method_bind_get_method) (class_name , "file_exists\0" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\0" . as_ptr () as * const c_char) ; table . get_current_drive = (gd_api . godot_method_bind_get_method) (class_name , "get_current_drive\0" . as_ptr () as * const c_char) ; table . get_drive = (gd_api . godot_method_bind_get_method) (class_name , "get_drive\0" . as_ptr () as * const c_char) ; table . get_drive_count = (gd_api . godot_method_bind_get_method) (class_name , "get_drive_count\0" . as_ptr () as * const c_char) ; table . get_next = (gd_api . godot_method_bind_get_method) (class_name , "get_next\0" . as_ptr () as * const c_char) ; table . get_space_left = (gd_api . godot_method_bind_get_method) (class_name , "get_space_left\0" . as_ptr () as * const c_char) ; table . list_dir_begin = (gd_api . godot_method_bind_get_method) (class_name , "list_dir_begin\0" . as_ptr () as * const c_char) ; table . list_dir_end = (gd_api . godot_method_bind_get_method) (class_name , "list_dir_end\0" . as_ptr () as * const c_char) ; table . make_dir = (gd_api . godot_method_bind_get_method) (class_name , "make_dir\0" . as_ptr () as * const c_char) ; table . make_dir_recursive = (gd_api . godot_method_bind_get_method) (class_name , "make_dir_recursive\0" . as_ptr () as * const c_char) ; table . open = (gd_api . godot_method_bind_get_method) (class_name , "open\0" . as_ptr () as * const c_char) ; table . remove = (gd_api . godot_method_bind_get_method) (class_name , "remove\0" . as_ptr () as * const c_char) ; table . rename = (gd_api . godot_method_bind_get_method) (class_name , "rename\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:346:5045 [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 LineShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_lineshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nLineShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LineShape2D { this : RawObject < Self > , } impl LineShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LineShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The line's distance from the origin."] # [doc = ""] # [inline] pub fn d (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineShape2DMethodTable :: get (get_api ()) . get_d ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The line's normal."] # [doc = ""] # [inline] pub fn normal (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineShape2DMethodTable :: get (get_api ()) . get_normal ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The line's distance from the origin."] # [doc = ""] # [inline] pub fn set_d (& self , d : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineShape2DMethodTable :: get (get_api ()) . set_d ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , d) ; } } # [doc = "The line's normal."] # [doc = ""] # [inline] pub fn set_normal (& self , normal : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineShape2DMethodTable :: get (get_api ()) . set_normal ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , normal) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LineShape2D { } unsafe impl GodotObject for LineShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "LineShape2D" } } impl std :: ops :: Deref for LineShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LineShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for LineShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for LineShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for LineShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for LineShape2D { } impl Instanciable for LineShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { LineShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LineShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_d : * mut sys :: godot_method_bind , pub get_normal : * mut sys :: godot_method_bind , pub set_d : * mut sys :: godot_method_bind , pub set_normal : * mut sys :: godot_method_bind } impl LineShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LineShape2DMethodTable = LineShape2DMethodTable { class_constructor : None , get_d : 0 as * mut sys :: godot_method_bind , get_normal : 0 as * mut sys :: godot_method_bind , set_d : 0 as * mut sys :: godot_method_bind , set_normal : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { LineShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LineShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_d = (gd_api . godot_method_bind_get_method) (class_name , "get_d\0" . as_ptr () as * const c_char) ; table . get_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_normal\0" . as_ptr () as * const c_char) ; table . set_d = (gd_api . godot_method_bind_get_method) (class_name , "set_d\0" . as_ptr () as * const c_char) ; table . set_normal = (gd_api . godot_method_bind_get_method) (class_name , "set_normal\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:352:15260 [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 UPNP` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_upnp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nUPNP inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UPNP { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct UpnpResult (pub i64) ; impl UpnpResult { pub const SUCCESS : UpnpResult = UpnpResult (0i64) ; pub const NOT_AUTHORIZED : UpnpResult = UpnpResult (1i64) ; pub const PORT_MAPPING_NOT_FOUND : UpnpResult = UpnpResult (2i64) ; pub const INCONSISTENT_PARAMETERS : UpnpResult = UpnpResult (3i64) ; pub const NO_SUCH_ENTRY_IN_ARRAY : UpnpResult = UpnpResult (4i64) ; pub const ACTION_FAILED : UpnpResult = UpnpResult (5i64) ; pub const SRC_IP_WILDCARD_NOT_PERMITTED : UpnpResult = UpnpResult (6i64) ; pub const EXT_PORT_WILDCARD_NOT_PERMITTED : UpnpResult = UpnpResult (7i64) ; pub const INT_PORT_WILDCARD_NOT_PERMITTED : UpnpResult = UpnpResult (8i64) ; pub const REMOTE_HOST_MUST_BE_WILDCARD : UpnpResult = UpnpResult (9i64) ; pub const EXT_PORT_MUST_BE_WILDCARD : UpnpResult = UpnpResult (10i64) ; pub const NO_PORT_MAPS_AVAILABLE : UpnpResult = UpnpResult (11i64) ; pub const CONFLICT_WITH_OTHER_MECHANISM : UpnpResult = UpnpResult (12i64) ; pub const CONFLICT_WITH_OTHER_MAPPING : UpnpResult = UpnpResult (13i64) ; pub const SAME_PORT_VALUES_REQUIRED : UpnpResult = UpnpResult (14i64) ; pub const ONLY_PERMANENT_LEASE_SUPPORTED : UpnpResult = UpnpResult (15i64) ; pub const INVALID_GATEWAY : UpnpResult = UpnpResult (16i64) ; pub const INVALID_PORT : UpnpResult = UpnpResult (17i64) ; pub const INVALID_PROTOCOL : UpnpResult = UpnpResult (18i64) ; pub const INVALID_DURATION : UpnpResult = UpnpResult (19i64) ; pub const INVALID_ARGS : UpnpResult = UpnpResult (20i64) ; pub const INVALID_RESPONSE : UpnpResult = UpnpResult (21i64) ; pub const INVALID_PARAM : UpnpResult = UpnpResult (22i64) ; pub const HTTP_ERROR : UpnpResult = UpnpResult (23i64) ; pub const SOCKET_ERROR : UpnpResult = UpnpResult (24i64) ; pub const MEM_ALLOC_ERROR : UpnpResult = UpnpResult (25i64) ; pub const NO_GATEWAY : UpnpResult = UpnpResult (26i64) ; pub const NO_DEVICES : UpnpResult = UpnpResult (27i64) ; pub const UNKNOWN_ERROR : UpnpResult = UpnpResult (28i64) ; } impl From < i64 > for UpnpResult { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < UpnpResult > for i64 { # [inline] fn from (v : UpnpResult) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UPNP { pub const UPNP_RESULT_ACTION_FAILED : i64 = 5i64 ; pub const UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING : i64 = 13i64 ; pub const UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM : i64 = 12i64 ; pub const UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD : i64 = 10i64 ; pub const UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED : i64 = 7i64 ; pub const UPNP_RESULT_HTTP_ERROR : i64 = 23i64 ; pub const UPNP_RESULT_INCONSISTENT_PARAMETERS : i64 = 3i64 ; pub const UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED : i64 = 8i64 ; pub const UPNP_RESULT_INVALID_ARGS : i64 = 20i64 ; pub const UPNP_RESULT_INVALID_DURATION : i64 = 19i64 ; pub const UPNP_RESULT_INVALID_GATEWAY : i64 = 16i64 ; pub const UPNP_RESULT_INVALID_PARAM : i64 = 22i64 ; pub const UPNP_RESULT_INVALID_PORT : i64 = 17i64 ; pub const UPNP_RESULT_INVALID_PROTOCOL : i64 = 18i64 ; pub const UPNP_RESULT_INVALID_RESPONSE : i64 = 21i64 ; pub const UPNP_RESULT_MEM_ALLOC_ERROR : i64 = 25i64 ; pub const UPNP_RESULT_NOT_AUTHORIZED : i64 = 1i64 ; pub const UPNP_RESULT_NO_DEVICES : i64 = 27i64 ; pub const UPNP_RESULT_NO_GATEWAY : i64 = 26i64 ; pub const UPNP_RESULT_NO_PORT_MAPS_AVAILABLE : i64 = 11i64 ; pub const UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY : i64 = 4i64 ; pub const UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED : i64 = 15i64 ; pub const UPNP_RESULT_PORT_MAPPING_NOT_FOUND : i64 = 2i64 ; pub const UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD : i64 = 9i64 ; pub const UPNP_RESULT_SAME_PORT_VALUES_REQUIRED : i64 = 14i64 ; pub const UPNP_RESULT_SOCKET_ERROR : i64 = 24i64 ; pub const UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED : i64 = 6i64 ; pub const UPNP_RESULT_SUCCESS : i64 = 0i64 ; pub const UPNP_RESULT_UNKNOWN_ERROR : i64 = 28i64 ; } impl UPNP { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UPNPMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_device (& self , device : impl AsArg < crate :: generated :: upnp_device :: UPNPDevice >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . add_device ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , device . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_port_mapping (& self , port : i64 , port_internal : i64 , desc : impl Into < GodotString > , proto : impl Into < GodotString > , duration : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . add_port_mapping ; let ret = crate :: icalls :: icallptr_i64_i64_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , port , port_internal , desc . into () , proto . into () , duration) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_devices (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . clear_devices ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn delete_port_mapping (& self , port : i64 , proto : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . delete_port_mapping ; let ret = crate :: icalls :: icallptr_i64_i64_str (method_bind , self . this . sys () . as_ptr () , port , proto . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn discover (& self , timeout : i64 , ttl : i64 , device_filter : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . discover ; let ret = crate :: icalls :: icallptr_i64_i64_i64_str (method_bind , self . this . sys () . as_ptr () , timeout , ttl , device_filter . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_device (& self , index : i64) -> Option < Ref < crate :: generated :: upnp_device :: UPNPDevice , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_device ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , index) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: upnp_device :: UPNPDevice , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_device_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_device_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn discover_local_port (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_discover_local_port ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn discover_multicast_if (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_discover_multicast_if ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_gateway (& self) -> Option < Ref < crate :: generated :: upnp_device :: UPNPDevice , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_gateway ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: upnp_device :: UPNPDevice , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_discover_ipv6 (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . is_discover_ipv6 ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn query_external_address (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . query_external_address ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_device (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . remove_device ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_device (& self , index : i64 , device : impl AsArg < crate :: generated :: upnp_device :: UPNPDevice >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . set_device ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , index , device . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_discover_ipv6 (& self , ipv6 : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . set_discover_ipv6 ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ipv6) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_discover_local_port (& self , port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . set_discover_local_port ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , port) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_discover_multicast_if (& self , m_if : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . set_discover_multicast_if ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , m_if . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for UPNP { } unsafe impl GodotObject for UPNP { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UPNP" } } impl std :: ops :: Deref for UPNP { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UPNP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for UPNP { } unsafe impl SubClass < crate :: generated :: object :: Object > for UPNP { } impl Instanciable for UPNP { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { UPNP :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UPNPMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_device : * mut sys :: godot_method_bind , pub add_port_mapping : * mut sys :: godot_method_bind , pub clear_devices : * mut sys :: godot_method_bind , pub delete_port_mapping : * mut sys :: godot_method_bind , pub discover : * mut sys :: godot_method_bind , pub get_device : * mut sys :: godot_method_bind , pub get_device_count : * mut sys :: godot_method_bind , pub get_discover_local_port : * mut sys :: godot_method_bind , pub get_discover_multicast_if : * mut sys :: godot_method_bind , pub get_gateway : * mut sys :: godot_method_bind , pub is_discover_ipv6 : * mut sys :: godot_method_bind , pub query_external_address : * mut sys :: godot_method_bind , pub remove_device : * mut sys :: godot_method_bind , pub set_device : * mut sys :: godot_method_bind , pub set_discover_ipv6 : * mut sys :: godot_method_bind , pub set_discover_local_port : * mut sys :: godot_method_bind , pub set_discover_multicast_if : * mut sys :: godot_method_bind } impl UPNPMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UPNPMethodTable = UPNPMethodTable { class_constructor : None , add_device : 0 as * mut sys :: godot_method_bind , add_port_mapping : 0 as * mut sys :: godot_method_bind , clear_devices : 0 as * mut sys :: godot_method_bind , delete_port_mapping : 0 as * mut sys :: godot_method_bind , discover : 0 as * mut sys :: godot_method_bind , get_device : 0 as * mut sys :: godot_method_bind , get_device_count : 0 as * mut sys :: godot_method_bind , get_discover_local_port : 0 as * mut sys :: godot_method_bind , get_discover_multicast_if : 0 as * mut sys :: godot_method_bind , get_gateway : 0 as * mut sys :: godot_method_bind , is_discover_ipv6 : 0 as * mut sys :: godot_method_bind , query_external_address : 0 as * mut sys :: godot_method_bind , remove_device : 0 as * mut sys :: godot_method_bind , set_device : 0 as * mut sys :: godot_method_bind , set_discover_ipv6 : 0 as * mut sys :: godot_method_bind , set_discover_local_port : 0 as * mut sys :: godot_method_bind , set_discover_multicast_if : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { UPNPMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UPNP\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_device = (gd_api . godot_method_bind_get_method) (class_name , "add_device\0" . as_ptr () as * const c_char) ; table . add_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_port_mapping\0" . as_ptr () as * const c_char) ; table . clear_devices = (gd_api . godot_method_bind_get_method) (class_name , "clear_devices\0" . as_ptr () as * const c_char) ; table . delete_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "delete_port_mapping\0" . as_ptr () as * const c_char) ; table . discover = (gd_api . godot_method_bind_get_method) (class_name , "discover\0" . as_ptr () as * const c_char) ; table . get_device = (gd_api . godot_method_bind_get_method) (class_name , "get_device\0" . as_ptr () as * const c_char) ; table . get_device_count = (gd_api . godot_method_bind_get_method) (class_name , "get_device_count\0" . as_ptr () as * const c_char) ; table . get_discover_local_port = (gd_api . godot_method_bind_get_method) (class_name , "get_discover_local_port\0" . as_ptr () as * const c_char) ; table . get_discover_multicast_if = (gd_api . godot_method_bind_get_method) (class_name , "get_discover_multicast_if\0" . as_ptr () as * const c_char) ; table . get_gateway = (gd_api . godot_method_bind_get_method) (class_name , "get_gateway\0" . as_ptr () as * const c_char) ; table . is_discover_ipv6 = (gd_api . godot_method_bind_get_method) (class_name , "is_discover_ipv6\0" . as_ptr () as * const c_char) ; table . query_external_address = (gd_api . godot_method_bind_get_method) (class_name , "query_external_address\0" . as_ptr () as * const c_char) ; table . remove_device = (gd_api . godot_method_bind_get_method) (class_name , "remove_device\0" . as_ptr () as * const c_char) ; table . set_device = (gd_api . godot_method_bind_get_method) (class_name , "set_device\0" . as_ptr () as * const c_char) ; table . set_discover_ipv6 = (gd_api . godot_method_bind_get_method) (class_name , "set_discover_ipv6\0" . as_ptr () as * const c_char) ; table . set_discover_local_port = (gd_api . godot_method_bind_get_method) (class_name , "set_discover_local_port\0" . as_ptr () as * const c_char) ; table . set_discover_multicast_if = (gd_api . godot_method_bind_get_method) (class_name , "set_discover_multicast_if\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:358:3889 [INFO] [stdout] | [INFO] [stdout] 358 | ...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] 358 | # [doc = "`core class VisualShaderNodeScalarSmoothStep` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodescalarsmoothstep.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarSmoothStep inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeScalarSmoothStep { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarSmoothStepMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarSmoothStep { } unsafe impl GodotObject for VisualShaderNodeScalarSmoothStep { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeScalarSmoothStep { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarSmoothStep { } impl Instanciable for VisualShaderNodeScalarSmoothStep { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeScalarSmoothStep :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarSmoothStepMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarSmoothStepMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarSmoothStepMethodTable = VisualShaderNodeScalarSmoothStepMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarSmoothStepMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarSmoothStep\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:364:3784 [INFO] [stdout] | [INFO] [stdout] 364 | ...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] 364 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:370:15292 [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 AudioStreamPlayer` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreamplayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`AudioStreamPlayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAudioStreamPlayer inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamPlayer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MixTarget (pub i64) ; impl MixTarget { pub const STEREO : MixTarget = MixTarget (0i64) ; pub const SURROUND : MixTarget = MixTarget (1i64) ; pub const CENTER : MixTarget = MixTarget (2i64) ; } impl From < i64 > for MixTarget { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MixTarget > for i64 { # [inline] fn from (v : MixTarget) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioStreamPlayer { pub const MIX_TARGET_CENTER : i64 = 2i64 ; pub const MIX_TARGET_STEREO : i64 = 0i64 ; pub const MIX_TARGET_SURROUND : i64 = 1i64 ; } impl AudioStreamPlayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamPlayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Bus on which this audio is playing."] # [doc = ""] # [inline] pub fn bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_bus ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants."] # [doc = ""] # [inline] pub fn mix_target (& self) -> crate :: generated :: audio_stream_player :: MixTarget { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_mix_target ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_player :: MixTarget (ret) } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn pitch_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_pitch_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the position in the [AudioStream] in seconds."] # [doc = ""] # [inline] pub fn get_playback_position (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_playback_position ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream :: AudioStream , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, the playback is paused. You can resume it by setting `stream_paused` to `false`."] # [doc = ""] # [inline] pub fn stream_paused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_stream_paused ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer]."] # [doc = ""] # [inline] pub fn get_stream_playback (& self) -> Option < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_stream_playback ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: audio_stream_playback :: AudioStreamPlayback , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Volume of sound, in dB."] # [doc = ""] # [inline] pub fn volume_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_volume_db ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, audio plays when added to scene tree."] # [doc = ""] # [inline] pub fn is_autoplay_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . is_autoplay_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, audio is playing."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Plays the audio from the given `from_position`, in seconds.\n# Default Arguments\n* `from_position` - `0.0`"] # [doc = ""] # [inline] pub fn play (& self , from_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , from_position) ; } } # [doc = "Sets the position from which audio will be played, in seconds."] # [doc = ""] # [inline] pub fn seek (& self , to_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } # [doc = "If `true`, audio plays when added to scene tree."] # [doc = ""] # [inline] pub fn set_autoplay (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_autoplay ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Bus on which this audio is playing."] # [doc = ""] # [inline] pub fn set_bus (& self , bus : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_bus ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , bus . into ()) ; } } # [doc = "If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants."] # [doc = ""] # [inline] pub fn set_mix_target (& self , mix_target : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_mix_target ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mix_target) ; } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn set_pitch_scale (& self , pitch_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_pitch_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pitch_scale) ; } } # [doc = "The [AudioStream] object to be played."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: audio_stream :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr ()) ; } } # [doc = "If `true`, the playback is paused. You can resume it by setting `stream_paused` to `false`."] # [doc = ""] # [inline] pub fn set_stream_paused (& self , pause : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_stream_paused ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pause) ; } } # [doc = "Volume of sound, in dB."] # [doc = ""] # [inline] pub fn set_volume_db (& self , volume_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_volume_db ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , volume_db) ; } } # [doc = "Stops the audio."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayer { } unsafe impl GodotObject for AudioStreamPlayer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AudioStreamPlayer" } } impl QueueFree for AudioStreamPlayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AudioStreamPlayer { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for AudioStreamPlayer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamPlayer { } impl Instanciable for AudioStreamPlayer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioStreamPlayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamPlayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bus : * mut sys :: godot_method_bind , pub get_mix_target : * mut sys :: godot_method_bind , pub get_pitch_scale : * mut sys :: godot_method_bind , pub get_playback_position : * mut sys :: godot_method_bind , pub get_stream : * mut sys :: godot_method_bind , pub get_stream_paused : * mut sys :: godot_method_bind , pub get_stream_playback : * mut sys :: godot_method_bind , pub get_volume_db : * mut sys :: godot_method_bind , pub is_autoplay_enabled : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_autoplay : * mut sys :: godot_method_bind , pub set_bus : * mut sys :: godot_method_bind , pub set_mix_target : * mut sys :: godot_method_bind , pub set_pitch_scale : * mut sys :: godot_method_bind , pub set_stream : * mut sys :: godot_method_bind , pub set_stream_paused : * mut sys :: godot_method_bind , pub set_volume_db : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AudioStreamPlayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamPlayerMethodTable = AudioStreamPlayerMethodTable { class_constructor : None , get_bus : 0 as * mut sys :: godot_method_bind , get_mix_target : 0 as * mut sys :: godot_method_bind , get_pitch_scale : 0 as * mut sys :: godot_method_bind , get_playback_position : 0 as * mut sys :: godot_method_bind , get_stream : 0 as * mut sys :: godot_method_bind , get_stream_paused : 0 as * mut sys :: godot_method_bind , get_stream_playback : 0 as * mut sys :: godot_method_bind , get_volume_db : 0 as * mut sys :: godot_method_bind , is_autoplay_enabled : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_autoplay : 0 as * mut sys :: godot_method_bind , set_bus : 0 as * mut sys :: godot_method_bind , set_mix_target : 0 as * mut sys :: godot_method_bind , set_pitch_scale : 0 as * mut sys :: godot_method_bind , set_stream : 0 as * mut sys :: godot_method_bind , set_stream_paused : 0 as * mut sys :: godot_method_bind , set_volume_db : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioStreamPlayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamPlayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\0" . as_ptr () as * const c_char) ; table . get_mix_target = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_target\0" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\0" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\0" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\0" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\0" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\0" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\0" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\0" . as_ptr () as * const c_char) ; table . set_mix_target = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_target\0" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\0" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\0" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\0" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:376:4054 [INFO] [stdout] | [INFO] [stdout] 376 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 376 | # [doc = "`core class 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:382:10366 [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 RemoteTransform2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_remotetransform2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`RemoteTransform2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRemoteTransform2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RemoteTransform2D { this : RawObject < Self > , } impl RemoteTransform2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RemoteTransform2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "[RemoteTransform2D] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again."] # [doc = ""] # [inline] pub fn force_update_cache (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . force_update_cache ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The [NodePath] to the remote node, relative to the RemoteTransform2D's position in the scene."] # [doc = ""] # [inline] pub fn remote_node (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_remote_node ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "If `true`, the remote node's position is updated."] # [doc = ""] # [inline] pub fn update_position (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_update_position ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the remote node's rotation is updated."] # [doc = ""] # [inline] pub fn update_rotation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_update_rotation ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the remote node's scale is updated."] # [doc = ""] # [inline] pub fn update_scale (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_update_scale ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, global coordinates are used. If `false`, local coordinates are used."] # [doc = ""] # [inline] pub fn use_global_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_use_global_coordinates ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The [NodePath] to the remote node, relative to the RemoteTransform2D's position in the scene."] # [doc = ""] # [inline] pub fn set_remote_node (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_remote_node ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "If `true`, the remote node's position is updated."] # [doc = ""] # [inline] pub fn set_update_position (& self , update_remote_position : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_update_position ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_position) ; } } # [doc = "If `true`, the remote node's rotation is updated."] # [doc = ""] # [inline] pub fn set_update_rotation (& self , update_remote_rotation : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_update_rotation ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_rotation) ; } } # [doc = "If `true`, the remote node's scale is updated."] # [doc = ""] # [inline] pub fn set_update_scale (& self , update_remote_scale : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_update_scale ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , update_remote_scale) ; } } # [doc = "If `true`, global coordinates are used. If `false`, local coordinates are used."] # [doc = ""] # [inline] pub fn set_use_global_coordinates (& self , use_global_coordinates : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_use_global_coordinates ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_global_coordinates) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RemoteTransform2D { } unsafe impl GodotObject for RemoteTransform2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RemoteTransform2D" } } impl QueueFree for RemoteTransform2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RemoteTransform2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RemoteTransform2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for RemoteTransform2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for RemoteTransform2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for RemoteTransform2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for RemoteTransform2D { } impl Instanciable for RemoteTransform2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RemoteTransform2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RemoteTransform2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub force_update_cache : * mut sys :: godot_method_bind , pub get_remote_node : * mut sys :: godot_method_bind , pub get_update_position : * mut sys :: godot_method_bind , pub get_update_rotation : * mut sys :: godot_method_bind , pub get_update_scale : * mut sys :: godot_method_bind , pub get_use_global_coordinates : * mut sys :: godot_method_bind , pub set_remote_node : * mut sys :: godot_method_bind , pub set_update_position : * mut sys :: godot_method_bind , pub set_update_rotation : * mut sys :: godot_method_bind , pub set_update_scale : * mut sys :: godot_method_bind , pub set_use_global_coordinates : * mut sys :: godot_method_bind } impl RemoteTransform2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RemoteTransform2DMethodTable = RemoteTransform2DMethodTable { class_constructor : None , force_update_cache : 0 as * mut sys :: godot_method_bind , get_remote_node : 0 as * mut sys :: godot_method_bind , get_update_position : 0 as * mut sys :: godot_method_bind , get_update_rotation : 0 as * mut sys :: godot_method_bind , get_update_scale : 0 as * mut sys :: godot_method_bind , get_use_global_coordinates : 0 as * mut sys :: godot_method_bind , set_remote_node : 0 as * mut sys :: godot_method_bind , set_update_position : 0 as * mut sys :: godot_method_bind , set_update_rotation : 0 as * mut sys :: godot_method_bind , set_update_scale : 0 as * mut sys :: godot_method_bind , set_use_global_coordinates : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RemoteTransform2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RemoteTransform2D\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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:388:3847 [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 VisualShaderNodeVectorDistance` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectordistance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorDistance inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorDistance { this : RawObject < Self > , } impl VisualShaderNodeVectorDistance { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorDistanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorDistance { } unsafe impl GodotObject for VisualShaderNodeVectorDistance { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorDistance" } } impl std :: ops :: Deref for VisualShaderNodeVectorDistance { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorDistance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorDistance { } impl Instanciable for VisualShaderNodeVectorDistance { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorDistance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorDistanceMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorDistanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorDistanceMethodTable = VisualShaderNodeVectorDistanceMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorDistanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorDistance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:394:3393 [INFO] [stdout] | [INFO] [stdout] 394 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 394 | # [doc = "`core class 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:400:4437 [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 ProxyTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_proxytexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nProxyTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ProxyTexture { this : RawObject < Self > , } impl ProxyTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ProxyTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn base (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ProxyTextureMethodTable :: get (get_api ()) . get_base ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base (& self , base : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProxyTextureMethodTable :: get (get_api ()) . set_base ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , base . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProxyTexture { } unsafe impl GodotObject for ProxyTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ProxyTexture" } } impl std :: ops :: Deref for ProxyTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProxyTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for ProxyTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ProxyTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ProxyTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for ProxyTexture { } impl Instanciable for ProxyTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ProxyTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ProxyTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base : * mut sys :: godot_method_bind , pub set_base : * mut sys :: godot_method_bind } impl ProxyTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ProxyTextureMethodTable = ProxyTextureMethodTable { class_constructor : None , get_base : 0 as * mut sys :: godot_method_bind , set_base : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ProxyTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ProxyTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base = (gd_api . godot_method_bind_get_method) (class_name , "get_base\0" . as_ptr () as * const c_char) ; table . set_base = (gd_api . godot_method_bind_get_method) (class_name , "set_base\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:406:4969 [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 AnimationNodeAnimation` inherits `AnimationRootNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeanimation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeAnimation inherits methods from:\n - [AnimationRootNode](struct.AnimationRootNode.html)\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeAnimation { this : RawObject < Self > , } impl AnimationNodeAnimation { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeAnimationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]."] # [doc = ""] # [inline] pub fn animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAnimationMethodTable :: get (get_api ()) . get_animation ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]."] # [doc = ""] # [inline] pub fn set_animation (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAnimationMethodTable :: get (get_api ()) . set_animation ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeAnimation { } unsafe impl GodotObject for AnimationNodeAnimation { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeAnimation" } } impl std :: ops :: Deref for AnimationNodeAnimation { type Target = crate :: generated :: animation_root_node :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeAnimation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_root_node :: AnimationRootNode > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeAnimation { } impl Instanciable for AnimationNodeAnimation { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeAnimation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeAnimationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_animation : * mut sys :: godot_method_bind , pub set_animation : * mut sys :: godot_method_bind } impl AnimationNodeAnimationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeAnimationMethodTable = AnimationNodeAnimationMethodTable { class_constructor : None , get_animation : 0 as * mut sys :: godot_method_bind , set_animation : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeAnimationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeAnimation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_animation\0" . as_ptr () as * const c_char) ; table . set_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_animation\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:412:8780 [INFO] [stdout] | [INFO] [stdout] 412 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 412 | # [doc = "`core class 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:418:15877 [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 singleton class ClassDB` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_classdb.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nClassDB inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ClassDB { this : RawObject < Self > , } impl ClassDB { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("ClassDB\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns `true` if you can instance objects from the specified `class`, `false` in other case."] # [doc = ""] # [inline] pub fn can_instance (& self , class : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . can_instance ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; ret as _ } } # [doc = "Returns whether the specified `class` is available or not."] # [doc = ""] # [inline] pub fn class_exists (& self , class : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_exists ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; ret as _ } } # [doc = "Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required."] # [doc = ""] # [inline] pub fn class_get_category (& self , class : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_category ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the value of the integer constant `name` of `class` or its ancestry. Always returns 0 when the constant could not be found."] # [doc = ""] # [inline] pub fn class_get_integer_constant (& self , class : impl Into < GodotString > , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_integer_constant ; let ret = crate :: icalls :: icallptr_i64_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , name . into ()) ; ret as _ } } # [doc = "Returns an array with the names all the integer constants of `class` or its ancestry.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_integer_constant_list (& self , class : impl Into < GodotString > , no_inheritance : bool) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_integer_constant_list ; let ret = crate :: icalls :: icallptr_strarr_str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance) ; StringArray :: from_sys (ret) } } # [doc = "Returns an array with all the methods of `class` or its ancestry if `no_inheritance` is `false`. Every element of the array is a [Dictionary] with the following keys: `args`, `default_args`, `flags`, `id`, `name`, `return: (class_name, hint, hint_string, name, type, usage)`.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_method_list (& self , class : impl Into < GodotString > , no_inheritance : bool) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_method_list ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of `property` of `class` or its ancestry."] # [doc = ""] # [inline] pub fn class_get_property (& self , object : impl AsArg < crate :: generated :: object :: Object > , property : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_property ; let ret = crate :: icalls :: icallptr_var_obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns an array with all the properties of `class` or its ancestry if `no_inheritance` is `false`.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_property_list (& self , class : impl Into < GodotString > , no_inheritance : bool) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_property_list ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the `signal` data of `class` or its ancestry. The returned value is a [Dictionary] with the following keys: `args`, `default_args`, `flags`, `id`, `name`, `return: (class_name, hint, hint_string, name, type, usage)`."] # [doc = ""] # [inline] pub fn class_get_signal (& self , class : impl Into < GodotString > , signal : impl Into < GodotString >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_signal ; let ret = crate :: icalls :: icallptr_dict_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , signal . into ()) ; Dictionary :: from_sys (ret) } } # [doc = "Returns an array with all the signals of `class` or its ancestry if `no_inheritance` is `false`. Every element of the array is a [Dictionary] as described in [method class_get_signal].\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_signal_list (& self , class : impl Into < GodotString > , no_inheritance : bool) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_signal_list ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether `class` or its ancestry has an integer constant called `name` or not."] # [doc = ""] # [inline] pub fn class_has_integer_constant (& self , class : impl Into < GodotString > , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_has_integer_constant ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , name . into ()) ; ret as _ } } # [doc = "Returns whether `class` (or its ancestry if `no_inheritance` is `false`) has a method called `method` or not.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_has_method (& self , class : impl Into < GodotString > , method : impl Into < GodotString > , no_inheritance : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_has_method ; let ret = crate :: icalls :: icallptr_bool_str_str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , method . into () , no_inheritance) ; ret as _ } } # [doc = "Returns whether `class` or its ancestry has a signal called `signal` or not."] # [doc = ""] # [inline] pub fn class_has_signal (& self , class : impl Into < GodotString > , signal : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_has_signal ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , signal . into ()) ; ret as _ } } # [doc = "Sets `property` value of `class` to `value`."] # [doc = ""] # [inline] pub fn class_set_property (& self , object : impl AsArg < crate :: generated :: object :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_set_property ; let ret = crate :: icalls :: icallptr_i64_obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns the names of all the classes available."] # [doc = ""] # [inline] pub fn get_class_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . get_class_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the names of all the classes that directly or indirectly inherit from `class`."] # [doc = ""] # [inline] pub fn get_inheriters_from_class (& self , class : impl Into < GodotString >) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . get_inheriters_from_class ; let ret = crate :: icalls :: icallptr_strarr_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the parent class of `class`."] # [doc = ""] # [inline] pub fn get_parent_class (& self , class : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . get_parent_class ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Creates an instance of `class`."] # [doc = ""] # [inline] pub fn instance (& self , class : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . instance ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns whether this `class` is enabled or not."] # [doc = ""] # [inline] pub fn is_class_enabled (& self , class : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . is_class_enabled ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; ret as _ } } # [doc = "Returns whether `inherits` is an ancestor of `class` or not."] # [doc = ""] # [inline] pub fn is_parent_class (& self , class : impl Into < GodotString > , inherits : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . is_parent_class ; let ret = crate :: icalls :: icallptr_bool_str_str (method_bind , self . this . sys () . as_ptr () , class . into () , inherits . into ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for ClassDB { } unsafe impl GodotObject for ClassDB { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ClassDB" } } impl std :: ops :: Deref for ClassDB { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ClassDB { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for ClassDB { } unsafe impl Send for ClassDB { } unsafe impl Sync for ClassDB { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ClassDBMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_instance : * mut sys :: godot_method_bind , pub class_exists : * mut sys :: godot_method_bind , pub class_get_category : * mut sys :: godot_method_bind , pub class_get_integer_constant : * mut sys :: godot_method_bind , pub class_get_integer_constant_list : * mut sys :: godot_method_bind , pub class_get_method_list : * mut sys :: godot_method_bind , pub class_get_property : * mut sys :: godot_method_bind , pub class_get_property_list : * mut sys :: godot_method_bind , pub class_get_signal : * mut sys :: godot_method_bind , pub class_get_signal_list : * mut sys :: godot_method_bind , pub class_has_integer_constant : * mut sys :: godot_method_bind , pub class_has_method : * mut sys :: godot_method_bind , pub class_has_signal : * mut sys :: godot_method_bind , pub class_set_property : * mut sys :: godot_method_bind , pub get_class_list : * mut sys :: godot_method_bind , pub get_inheriters_from_class : * mut sys :: godot_method_bind , pub get_parent_class : * mut sys :: godot_method_bind , pub instance : * mut sys :: godot_method_bind , pub is_class_enabled : * mut sys :: godot_method_bind , pub is_parent_class : * mut sys :: godot_method_bind } impl ClassDBMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ClassDBMethodTable = ClassDBMethodTable { class_constructor : None , can_instance : 0 as * mut sys :: godot_method_bind , class_exists : 0 as * mut sys :: godot_method_bind , class_get_category : 0 as * mut sys :: godot_method_bind , class_get_integer_constant : 0 as * mut sys :: godot_method_bind , class_get_integer_constant_list : 0 as * mut sys :: godot_method_bind , class_get_method_list : 0 as * mut sys :: godot_method_bind , class_get_property : 0 as * mut sys :: godot_method_bind , class_get_property_list : 0 as * mut sys :: godot_method_bind , class_get_signal : 0 as * mut sys :: godot_method_bind , class_get_signal_list : 0 as * mut sys :: godot_method_bind , class_has_integer_constant : 0 as * mut sys :: godot_method_bind , class_has_method : 0 as * mut sys :: godot_method_bind , class_has_signal : 0 as * mut sys :: godot_method_bind , class_set_property : 0 as * mut sys :: godot_method_bind , get_class_list : 0 as * mut sys :: godot_method_bind , get_inheriters_from_class : 0 as * mut sys :: godot_method_bind , get_parent_class : 0 as * mut sys :: godot_method_bind , instance : 0 as * mut sys :: godot_method_bind , is_class_enabled : 0 as * mut sys :: godot_method_bind , is_parent_class : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ClassDBMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_ClassDB\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_instance = (gd_api . godot_method_bind_get_method) (class_name , "can_instance\0" . as_ptr () as * const c_char) ; table . class_exists = (gd_api . godot_method_bind_get_method) (class_name , "class_exists\0" . as_ptr () as * const c_char) ; table . class_get_category = (gd_api . godot_method_bind_get_method) (class_name , "class_get_category\0" . as_ptr () as * const c_char) ; table . class_get_integer_constant = (gd_api . godot_method_bind_get_method) (class_name , "class_get_integer_constant\0" . as_ptr () as * const c_char) ; table . class_get_integer_constant_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_integer_constant_list\0" . as_ptr () as * const c_char) ; table . class_get_method_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_method_list\0" . as_ptr () as * const c_char) ; table . class_get_property = (gd_api . godot_method_bind_get_method) (class_name , "class_get_property\0" . as_ptr () as * const c_char) ; table . class_get_property_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_property_list\0" . as_ptr () as * const c_char) ; table . class_get_signal = (gd_api . godot_method_bind_get_method) (class_name , "class_get_signal\0" . as_ptr () as * const c_char) ; table . class_get_signal_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_signal_list\0" . as_ptr () as * const c_char) ; table . class_has_integer_constant = (gd_api . godot_method_bind_get_method) (class_name , "class_has_integer_constant\0" . as_ptr () as * const c_char) ; table . class_has_method = (gd_api . godot_method_bind_get_method) (class_name , "class_has_method\0" . as_ptr () as * const c_char) ; table . class_has_signal = (gd_api . godot_method_bind_get_method) (class_name , "class_has_signal\0" . as_ptr () as * const c_char) ; table . class_set_property = (gd_api . godot_method_bind_get_method) (class_name , "class_set_property\0" . as_ptr () as * const c_char) ; table . get_class_list = (gd_api . godot_method_bind_get_method) (class_name , "get_class_list\0" . as_ptr () as * const c_char) ; table . get_inheriters_from_class = (gd_api . godot_method_bind_get_method) (class_name , "get_inheriters_from_class\0" . as_ptr () as * const c_char) ; table . get_parent_class = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_class\0" . as_ptr () as * const c_char) ; table . instance = (gd_api . godot_method_bind_get_method) (class_name , "instance\0" . as_ptr () as * const c_char) ; table . is_class_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_class_enabled\0" . as_ptr () as * const c_char) ; table . is_parent_class = (gd_api . godot_method_bind_get_method) (class_name , "is_parent_class\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:424:3641 [INFO] [stdout] | [INFO] [stdout] 424 | ...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] 424 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:430:3393 [INFO] [stdout] | [INFO] [stdout] 430 | ...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] 430 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:436:33105 [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 = "The base class of most Godot classes."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_object.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Object` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = ""] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Object { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ConnectFlags (pub i64) ; impl ConnectFlags { pub const DEFERRED : ConnectFlags = ConnectFlags (1i64) ; pub const PERSIST : ConnectFlags = ConnectFlags (2i64) ; pub const ONESHOT : ConnectFlags = ConnectFlags (4i64) ; pub const REFERENCE_COUNTED : ConnectFlags = ConnectFlags (8i64) ; } impl From < i64 > for ConnectFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ConnectFlags > for i64 { # [inline] fn from (v : ConnectFlags) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Object { pub const CONNECT_DEFERRED : i64 = 1i64 ; pub const CONNECT_ONESHOT : i64 = 4i64 ; pub const CONNECT_PERSIST : i64 = 2i64 ; pub const CONNECT_REFERENCE_COUNTED : i64 = 8i64 ; pub const NOTIFICATION_POSTINITIALIZE : i64 = 0i64 ; pub const NOTIFICATION_PREDELETE : i64 = 1i64 ; } impl Object { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ObjectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a user-defined `signal`. Arguments are optional, but can be added as an [Array] of dictionaries, each containing `name: String` and `type: int` (see [enum Variant.Type]) entries.\n# Default Arguments\n* `arguments` - `[ ]`"] # [doc = ""] # [inline] pub fn add_user_signal (& self , signal : impl Into < GodotString > , arguments : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . add_user_signal ; let ret = crate :: icalls :: icallptr_void_str_arr (method_bind , self . this . sys () . as_ptr () , signal . into () , arguments) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCalls the `method` on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:\n```gdscript\ncall(\"set\", \"position\", Vector2(42.0, 0.0))\n```\n**Note:** In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = "\n# Safety\nThis function bypasses Rust's static type checks (aliasing, thread boundaries, calls to free(), ...)."] # [inline] pub unsafe fn call (& self , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . call ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , method . into () , varargs) ; ret } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCalls the `method` on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:\n```gdscript\ncall_deferred(\"set\", \"position\", Vector2(42.0, 0.0))\n```\n**Note:** In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = "\n# Safety\nThis function bypasses Rust's static type checks (aliasing, thread boundaries, calls to free(), ...)."] # [inline] pub unsafe fn call_deferred (& self , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . call_deferred ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , method . into () , varargs) ; ret } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCalls the `method` on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array].\n```gdscript\ncallv(\"set\", [ \"position\", Vector2(42.0, 0.0) ])\n```"] # [doc = "\n# Safety\nThis function bypasses Rust's static type checks (aliasing, thread boundaries, calls to free(), ...)."] # [inline] pub unsafe fn callv (& self , method : impl Into < GodotString > , arg_array : VariantArray) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . callv ; let ret = crate :: icalls :: icallptr_var_str_arr (method_bind , self . this . sys () . as_ptr () , method . into () , arg_array) ; Variant :: from_sys (ret) } } # [doc = "Returns `true` if the object can translate strings. See [method set_message_translation] and [method tr]."] # [doc = ""] # [inline] pub fn can_translate_messages (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . can_translate_messages ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nConnects a `signal` to a `method` on a `target` object. Pass optional `binds` to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use `flags` to set deferred or one-shot connections. See [enum ConnectFlags] constants.\nA `signal` can only be connected once to a `method`. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.\nIf the `target` is destroyed in the game's lifecycle, the connection will be lost.\nExamples:\n```gdscript\nconnect(\"pressed\", self, \"_on_Button_pressed\") # BaseButton signal\nconnect(\"text_entered\", self, \"_on_LineEdit_text_entered\") # LineEdit signal\nconnect(\"hit\", self, \"_on_Player_hit\", [ weapon_type, damage ]) # User-defined signal\n```\nAn example of the relationship between `binds` passed to [method connect] and parameters used when calling [method emit_signal]:\n```gdscript\nconnect(\"hit\", self, \"_on_Player_hit\", [ weapon_type, damage ]) # weapon_type and damage are passed last\nemit_signal(\"hit\", \"Dark lord\", 5) # \"Dark lord\" and 5 are passed first\nfunc _on_Player_hit(hit_by, level, weapon_type, damage):\n print(\"Hit by %s (lvl %d) with weapon %s for %d damage\" % [hit_by, level, weapon_type, damage])\n```\n# Default Arguments\n* `binds` - `[ ]`\n* `flags` - `0`"] # [doc = ""] # [inline] pub fn connect (& self , signal : impl Into < GodotString > , target : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , binds : VariantArray , flags : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . connect ; let ret = crate :: icalls :: icallptr_i64_str_obj_str_arr_i64 (method_bind , self . this . sys () . as_ptr () , signal . into () , target . as_arg_ptr () , method . into () , binds , flags) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Disconnects a `signal` from a `method` on the given `target`.\nIf you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists."] # [doc = ""] # [inline] pub fn disconnect (& self , signal : impl Into < GodotString > , target : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . disconnect ; let ret = crate :: icalls :: icallptr_void_str_obj_str (method_bind , self . this . sys () . as_ptr () , signal . into () , target . as_arg_ptr () , method . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nEmits the given `signal`. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:\n```gdscript\nemit_signal(\"hit\", weapon_type, damage)\nemit_signal(\"game_over\")\n```"] # [doc = ""] # [inline] pub fn emit_signal (& self , signal : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . emit_signal ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , signal . into () , varargs) ; ret } } # [doc = "Returns the [Variant] value of the given `property`. If the `property` doesn't exist, this will return `null`.\n**Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = ""] # [inline] pub fn get (& self , property : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the object's class as a [String]."] # [doc = ""] # [inline] pub fn get_class (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_class ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns an [Array] of dictionaries with information about signals that are connected to the object.\nEach [Dictionary] contains three String entries:\n- `source` is a reference to the signal emitter.\n- `signal_name` is the name of the connected signal.\n- `method_name` is the name of the method to which the signal is connected."] # [doc = ""] # [inline] pub fn get_incoming_connections (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_incoming_connections ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character (`:`) to access nested properties. Examples: `\"position:x\"` or `\"material:next_pass:blend_mode\"`."] # [doc = ""] # [inline] pub fn get_indexed (& self , property : impl Into < NodePath >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_indexed ; let ret = crate :: icalls :: icallptr_var_nodepath (method_bind , self . this . sys () . as_ptr () , property . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the object's unique instance ID.\nThis ID can be saved in [EncodedObjectAsID], and can be used to retrieve the object instance with [method @GDScript.instance_from_id]."] # [doc = ""] # [inline] pub fn get_instance_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_instance_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the object's metadata entry for the given `name`."] # [doc = ""] # [inline] pub fn get_meta (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_meta ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "Returns the object's metadata as a [PoolStringArray]."] # [doc = ""] # [inline] pub fn get_meta_list (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_meta_list ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "Returns the object's methods and their signatures as an [Array]."] # [doc = ""] # [inline] pub fn get_method_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_method_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the object's property list as an [Array] of dictionaries.\nEach property's [Dictionary] contain at least `name: String` and `type: int` (see [enum Variant.Type]) entries. Optionally, it can also include `hint: int` (see [enum PropertyHint]), `hint_string: String`, and `usage: int` (see [enum PropertyUsageFlags])."] # [doc = ""] # [inline] pub fn get_property_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_property_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the object's [Script] instance, or `null` if none is assigned."] # [doc = ""] # [inline] pub fn get_script (& self) -> Option < Ref < crate :: generated :: reference :: Reference , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_script ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: reference :: Reference , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns an [Array] of connections for the given `signal`."] # [doc = ""] # [inline] pub fn get_signal_connection_list (& self , signal : impl Into < GodotString >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_signal_connection_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , signal . into ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of signals as an [Array] of dictionaries."] # [doc = ""] # [inline] pub fn get_signal_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_signal_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if a metadata entry is found with the given `name`."] # [doc = ""] # [inline] pub fn has_meta (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . has_meta ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns `true` if the object contains the given `method`."] # [doc = ""] # [inline] pub fn has_method (& self , method : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . has_method ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , method . into ()) ; ret as _ } } # [doc = "Returns `true` if the given `signal` exists."] # [doc = ""] # [inline] pub fn has_signal (& self , signal : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . has_signal ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , signal . into ()) ; ret as _ } } # [doc = "Returns `true` if the given user-defined `signal` exists. Only signals added using [method add_user_signal] are taken into account."] # [doc = ""] # [inline] pub fn has_user_signal (& self , signal : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . has_user_signal ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , signal . into ()) ; ret as _ } } # [doc = "Returns `true` if signal emission blocking is enabled."] # [doc = ""] # [inline] pub fn is_blocking_signals (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . is_blocking_signals ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the object inherits from the given `class`."] # [doc = ""] # [inline] pub fn is_class (& self , class : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . is_class ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; ret as _ } } # [doc = "Returns `true` if a connection exists for a given `signal`, `target`, and `method`."] # [doc = ""] # [inline] pub fn is_connected (& self , signal : impl Into < GodotString > , target : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . is_connected ; let ret = crate :: icalls :: icallptr_bool_str_obj_str (method_bind , self . this . sys () . as_ptr () , signal . into () , target . as_arg_ptr () , method . into ()) ; ret as _ } } # [doc = "Returns `true` if the [method Node.queue_free] method was called for the object."] # [doc = ""] # [inline] pub fn is_queued_for_deletion (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . is_queued_for_deletion ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Send a given notification to the object, which will also trigger a call to the [method _notification] method of all classes that the object inherits from.\nIf `reversed` is `true`, [method _notification] is called first on the object's own class, and then up to its successive parent classes. If `reversed` is `false`, [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes.\n# Default Arguments\n* `reversed` - `false`"] # [doc = ""] # [inline] pub fn notification (& self , what : i64 , reversed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . notification ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , what , reversed) ; } } # [doc = "Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds."] # [doc = ""] # [inline] pub fn property_list_changed_notify (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . property_list_changed_notify ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a given entry from the object's metadata. See also [method set_meta]."] # [doc = ""] # [inline] pub fn remove_meta (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . remove_meta ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Assigns a new value to the given property. If the `property` does not exist, nothing will happen.\n**Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = ""] # [inline] pub fn set (& self , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set ; let ret = crate :: icalls :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "If set to `true`, signal emission is blocked."] # [doc = ""] # [inline] pub fn set_block_signals (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_block_signals ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. `call_deferred(\"set\", property, value)`.\n**Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = ""] # [inline] pub fn set_deferred (& self , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_deferred ; let ret = crate :: icalls :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAssigns a new value to the property identified by the [NodePath]. The node path should be relative to the current object and can use the colon character (`:`) to access nested properties. Example:\n```gdscript\nset_indexed(\"position\", Vector2(42, 0))\nset_indexed(\"position:y\", -10)\nprint(position) # (42, -10)\n```"] # [doc = ""] # [inline] pub fn set_indexed (& self , property : impl Into < NodePath > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_indexed ; let ret = crate :: icalls :: icallptr_void_nodepath_var (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Defines whether the object can translate strings (with calls to [method tr]). Enabled by default."] # [doc = ""] # [inline] pub fn set_message_translation (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_message_translation ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value.\nTo remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to `null`. This means you can also use `set_meta(\"name\", null)` to remove metadata for `\"name\"`."] # [doc = ""] # [inline] pub fn set_meta (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_meta ; let ret = crate :: icalls :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } # [doc = "Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.\nIf the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's [method _init] method will be called."] # [doc = ""] # [inline] pub fn set_script (& self , script : impl AsArg < crate :: generated :: reference :: Reference >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_script ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , script . as_arg_ptr ()) ; } } # [doc = "Returns a [String] representing the object. If not overridden, defaults to `\"[ClassName:RID]\"`.\nOverride the method [method _to_string] to customize the [String] representation."] # [doc = ""] # [inline] pub fn to_string (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . to_string ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Translates a message using translation catalogs configured in the Project Settings.\nOnly works if message translation is enabled (which it is by default), otherwise it returns the `message` unchanged. See [method set_message_translation]."] # [doc = ""] # [inline] pub fn tr (& self , message : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . tr ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , message . into ()) ; GodotString :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Object { } unsafe impl GodotObject for Object { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Object" } } impl Instanciable for Object { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Object :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ObjectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_user_signal : * mut sys :: godot_method_bind , pub call : * mut sys :: godot_method_bind , pub call_deferred : * mut sys :: godot_method_bind , pub callv : * mut sys :: godot_method_bind , pub can_translate_messages : * mut sys :: godot_method_bind , pub connect : * mut sys :: godot_method_bind , pub disconnect : * mut sys :: godot_method_bind , pub emit_signal : * mut sys :: godot_method_bind , pub get : * mut sys :: godot_method_bind , pub get_class : * mut sys :: godot_method_bind , pub get_incoming_connections : * mut sys :: godot_method_bind , pub get_indexed : * mut sys :: godot_method_bind , pub get_instance_id : * mut sys :: godot_method_bind , pub get_meta : * mut sys :: godot_method_bind , pub get_meta_list : * mut sys :: godot_method_bind , pub get_method_list : * mut sys :: godot_method_bind , pub get_property_list : * mut sys :: godot_method_bind , pub get_script : * mut sys :: godot_method_bind , pub get_signal_connection_list : * mut sys :: godot_method_bind , pub get_signal_list : * mut sys :: godot_method_bind , pub has_meta : * mut sys :: godot_method_bind , pub has_method : * mut sys :: godot_method_bind , pub has_signal : * mut sys :: godot_method_bind , pub has_user_signal : * mut sys :: godot_method_bind , pub is_blocking_signals : * mut sys :: godot_method_bind , pub is_class : * mut sys :: godot_method_bind , pub is_connected : * mut sys :: godot_method_bind , pub is_queued_for_deletion : * mut sys :: godot_method_bind , pub notification : * mut sys :: godot_method_bind , pub property_list_changed_notify : * mut sys :: godot_method_bind , pub remove_meta : * mut sys :: godot_method_bind , pub set : * mut sys :: godot_method_bind , pub set_block_signals : * mut sys :: godot_method_bind , pub set_deferred : * mut sys :: godot_method_bind , pub set_indexed : * mut sys :: godot_method_bind , pub set_message_translation : * mut sys :: godot_method_bind , pub set_meta : * mut sys :: godot_method_bind , pub set_script : * mut sys :: godot_method_bind , pub to_string : * mut sys :: godot_method_bind , pub tr : * mut sys :: godot_method_bind } impl ObjectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ObjectMethodTable = ObjectMethodTable { class_constructor : None , add_user_signal : 0 as * mut sys :: godot_method_bind , call : 0 as * mut sys :: godot_method_bind , call_deferred : 0 as * mut sys :: godot_method_bind , callv : 0 as * mut sys :: godot_method_bind , can_translate_messages : 0 as * mut sys :: godot_method_bind , connect : 0 as * mut sys :: godot_method_bind , disconnect : 0 as * mut sys :: godot_method_bind , emit_signal : 0 as * mut sys :: godot_method_bind , get : 0 as * mut sys :: godot_method_bind , get_class : 0 as * mut sys :: godot_method_bind , get_incoming_connections : 0 as * mut sys :: godot_method_bind , get_indexed : 0 as * mut sys :: godot_method_bind , get_instance_id : 0 as * mut sys :: godot_method_bind , get_meta : 0 as * mut sys :: godot_method_bind , get_meta_list : 0 as * mut sys :: godot_method_bind , get_method_list : 0 as * mut sys :: godot_method_bind , get_property_list : 0 as * mut sys :: godot_method_bind , get_script : 0 as * mut sys :: godot_method_bind , get_signal_connection_list : 0 as * mut sys :: godot_method_bind , get_signal_list : 0 as * mut sys :: godot_method_bind , has_meta : 0 as * mut sys :: godot_method_bind , has_method : 0 as * mut sys :: godot_method_bind , has_signal : 0 as * mut sys :: godot_method_bind , has_user_signal : 0 as * mut sys :: godot_method_bind , is_blocking_signals : 0 as * mut sys :: godot_method_bind , is_class : 0 as * mut sys :: godot_method_bind , is_connected : 0 as * mut sys :: godot_method_bind , is_queued_for_deletion : 0 as * mut sys :: godot_method_bind , notification : 0 as * mut sys :: godot_method_bind , property_list_changed_notify : 0 as * mut sys :: godot_method_bind , remove_meta : 0 as * mut sys :: godot_method_bind , set : 0 as * mut sys :: godot_method_bind , set_block_signals : 0 as * mut sys :: godot_method_bind , set_deferred : 0 as * mut sys :: godot_method_bind , set_indexed : 0 as * mut sys :: godot_method_bind , set_message_translation : 0 as * mut sys :: godot_method_bind , set_meta : 0 as * mut sys :: godot_method_bind , set_script : 0 as * mut sys :: godot_method_bind , to_string : 0 as * mut sys :: godot_method_bind , tr : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ObjectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Object\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_user_signal = (gd_api . godot_method_bind_get_method) (class_name , "add_user_signal\0" . as_ptr () as * const c_char) ; table . call = (gd_api . godot_method_bind_get_method) (class_name , "call\0" . as_ptr () as * const c_char) ; table . call_deferred = (gd_api . godot_method_bind_get_method) (class_name , "call_deferred\0" . as_ptr () as * const c_char) ; table . callv = (gd_api . godot_method_bind_get_method) (class_name , "callv\0" . as_ptr () as * const c_char) ; table . can_translate_messages = (gd_api . godot_method_bind_get_method) (class_name , "can_translate_messages\0" . as_ptr () as * const c_char) ; table . connect = (gd_api . godot_method_bind_get_method) (class_name , "connect\0" . as_ptr () as * const c_char) ; table . disconnect = (gd_api . godot_method_bind_get_method) (class_name , "disconnect\0" . as_ptr () as * const c_char) ; table . emit_signal = (gd_api . godot_method_bind_get_method) (class_name , "emit_signal\0" . as_ptr () as * const c_char) ; table . get = (gd_api . godot_method_bind_get_method) (class_name , "get\0" . as_ptr () as * const c_char) ; table . get_class = (gd_api . godot_method_bind_get_method) (class_name , "get_class\0" . as_ptr () as * const c_char) ; table . get_incoming_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_incoming_connections\0" . as_ptr () as * const c_char) ; table . get_indexed = (gd_api . godot_method_bind_get_method) (class_name , "get_indexed\0" . as_ptr () as * const c_char) ; table . get_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_id\0" . as_ptr () as * const c_char) ; table . get_meta = (gd_api . godot_method_bind_get_method) (class_name , "get_meta\0" . as_ptr () as * const c_char) ; table . get_meta_list = (gd_api . godot_method_bind_get_method) (class_name , "get_meta_list\0" . as_ptr () as * const c_char) ; table . get_method_list = (gd_api . godot_method_bind_get_method) (class_name , "get_method_list\0" . as_ptr () as * const c_char) ; table . get_property_list = (gd_api . godot_method_bind_get_method) (class_name , "get_property_list\0" . as_ptr () as * const c_char) ; table . get_script = (gd_api . godot_method_bind_get_method) (class_name , "get_script\0" . as_ptr () as * const c_char) ; table . get_signal_connection_list = (gd_api . godot_method_bind_get_method) (class_name , "get_signal_connection_list\0" . as_ptr () as * const c_char) ; table . get_signal_list = (gd_api . godot_method_bind_get_method) (class_name , "get_signal_list\0" . as_ptr () as * const c_char) ; table . has_meta = (gd_api . godot_method_bind_get_method) (class_name , "has_meta\0" . as_ptr () as * const c_char) ; table . has_method = (gd_api . godot_method_bind_get_method) (class_name , "has_method\0" . as_ptr () as * const c_char) ; table . has_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_signal\0" . as_ptr () as * const c_char) ; table . has_user_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_user_signal\0" . as_ptr () as * const c_char) ; table . is_blocking_signals = (gd_api . godot_method_bind_get_method) (class_name , "is_blocking_signals\0" . as_ptr () as * const c_char) ; table . is_class = (gd_api . godot_method_bind_get_method) (class_name , "is_class\0" . as_ptr () as * const c_char) ; table . is_connected = (gd_api . godot_method_bind_get_method) (class_name , "is_connected\0" . as_ptr () as * const c_char) ; table . is_queued_for_deletion = (gd_api . godot_method_bind_get_method) (class_name , "is_queued_for_deletion\0" . as_ptr () as * const c_char) ; table . notification = (gd_api . godot_method_bind_get_method) (class_name , "notification\0" . as_ptr () as * const c_char) ; table . property_list_changed_notify = (gd_api . godot_method_bind_get_method) (class_name , "property_list_changed_notify\0" . as_ptr () as * const c_char) ; table . remove_meta = (gd_api . godot_method_bind_get_method) (class_name , "remove_meta\0" . as_ptr () as * const c_char) ; table . set = (gd_api . godot_method_bind_get_method) (class_name , "set\0" . as_ptr () as * const c_char) ; table . set_block_signals = (gd_api . godot_method_bind_get_method) (class_name , "set_block_signals\0" . as_ptr () as * const c_char) ; table . set_deferred = (gd_api . godot_method_bind_get_method) (class_name , "set_deferred\0" . as_ptr () as * const c_char) ; table . set_indexed = (gd_api . godot_method_bind_get_method) (class_name , "set_indexed\0" . as_ptr () as * const c_char) ; table . set_message_translation = (gd_api . godot_method_bind_get_method) (class_name , "set_message_translation\0" . as_ptr () as * const c_char) ; table . set_meta = (gd_api . godot_method_bind_get_method) (class_name , "set_meta\0" . as_ptr () as * const c_char) ; table . set_script = (gd_api . godot_method_bind_get_method) (class_name , "set_script\0" . as_ptr () as * const c_char) ; table . to_string = (gd_api . godot_method_bind_get_method) (class_name , "to_string\0" . as_ptr () as * const c_char) ; table . tr = (gd_api . godot_method_bind_get_method) (class_name , "tr\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:442:4083 [INFO] [stdout] | [INFO] [stdout] 442 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 442 | # [doc = "`tools class EditorInspector` inherits `ScrollContainer` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorinspector.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorInspector inherits methods from:\n - [ScrollContainer](struct.ScrollContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorInspector { this : RawObject < Self > , } impl EditorInspector { # [doc = "Refreshes the inspector.\n**Note:** To save on CPU resources, calling this method will do nothing if the time specified in `docks/property_editor/auto_refresh_interval` editor setting hasn't passed yet since this method was last called. (By default, this interval is set to 0.3 seconds.)"] # [doc = ""] # [inline] pub fn refresh (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInspectorMethodTable :: get (get_api ()) . refresh ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorInspector { } unsafe impl GodotObject for EditorInspector { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorInspector" } } impl QueueFree for EditorInspector { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorInspector { type Target = crate :: generated :: scroll_container :: ScrollContainer ; # [inline] fn deref (& self) -> & crate :: generated :: scroll_container :: ScrollContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorInspector { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: scroll_container :: ScrollContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: scroll_container :: ScrollContainer > for EditorInspector { } unsafe impl SubClass < crate :: generated :: container :: Container > for EditorInspector { } unsafe impl SubClass < crate :: generated :: control :: Control > for EditorInspector { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for EditorInspector { } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorInspector { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorInspector { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorInspectorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub refresh : * mut sys :: godot_method_bind } impl EditorInspectorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorInspectorMethodTable = EditorInspectorMethodTable { class_constructor : None , refresh : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorInspectorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorInspector\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . refresh = (gd_api . godot_method_bind_get_method) (class_name , "refresh\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:448:6325 [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 ConeTwistJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_conetwistjoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ConeTwistJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nConeTwistJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConeTwistJoint { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const SWING_SPAN : Param = Param (0i64) ; pub const TWIST_SPAN : Param = Param (1i64) ; pub const BIAS : Param = Param (2i64) ; pub const SOFTNESS : Param = Param (3i64) ; pub const RELAXATION : Param = Param (4i64) ; pub const MAX : Param = Param (5i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ConeTwistJoint { pub const PARAM_BIAS : i64 = 2i64 ; pub const PARAM_MAX : i64 = 5i64 ; pub const PARAM_RELAXATION : i64 = 4i64 ; pub const PARAM_SOFTNESS : i64 = 3i64 ; pub const PARAM_SWING_SPAN : i64 = 0i64 ; pub const PARAM_TWIST_SPAN : i64 = 1i64 ; } impl ConeTwistJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConeTwistJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConeTwistJoint { } unsafe impl GodotObject for ConeTwistJoint { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ConeTwistJoint" } } impl QueueFree for ConeTwistJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ConeTwistJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConeTwistJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConeTwistJoint { } impl Instanciable for ConeTwistJoint { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ConeTwistJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConeTwistJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_param : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind } impl ConeTwistJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConeTwistJointMethodTable = ConeTwistJointMethodTable { class_constructor : None , get_param : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ConeTwistJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConeTwistJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:454:11175 [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 StaticBody2D` inherits `PhysicsBody2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_staticbody2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`StaticBody2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nStaticBody2D inherits methods from:\n - [PhysicsBody2D](struct.PhysicsBody2D.html)\n - [CollisionObject2D](struct.CollisionObject2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StaticBody2D { this : RawObject < Self > , } impl StaticBody2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StaticBody2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]."] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating."] # [doc = ""] # [inline] pub fn constant_angular_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_constant_angular_velocity ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving."] # [doc = ""] # [inline] pub fn constant_linear_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_constant_linear_velocity ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The body's friction. Values range from `0` (no friction) to `1` (full friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]."] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn physics_material_override (& self) -> Option < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]."] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [doc = "The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating."] # [doc = ""] # [inline] pub fn set_constant_angular_velocity (& self , vel : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_constant_angular_velocity ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , vel) ; } } # [doc = "The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving."] # [doc = ""] # [inline] pub fn set_constant_linear_velocity (& self , vel : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_constant_linear_velocity ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , vel) ; } } # [doc = "The body's friction. Values range from `0` (no friction) to `1` (full friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]."] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn set_physics_material_override (& self , physics_material_override : impl AsArg < crate :: generated :: physics_material :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , physics_material_override . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StaticBody2D { } unsafe impl GodotObject for StaticBody2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "StaticBody2D" } } impl QueueFree for StaticBody2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for StaticBody2D { type Target = crate :: generated :: physics_body_2d :: PhysicsBody2D ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StaticBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body_2d :: PhysicsBody2D > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: collision_object_2d :: CollisionObject2D > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for StaticBody2D { } impl Instanciable for StaticBody2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { StaticBody2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StaticBody2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bounce : * mut sys :: godot_method_bind , pub get_constant_angular_velocity : * mut sys :: godot_method_bind , pub get_constant_linear_velocity : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub get_physics_material_override : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_constant_angular_velocity : * mut sys :: godot_method_bind , pub set_constant_linear_velocity : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_physics_material_override : * mut sys :: godot_method_bind } impl StaticBody2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StaticBody2DMethodTable = StaticBody2DMethodTable { class_constructor : None , get_bounce : 0 as * mut sys :: godot_method_bind , get_constant_angular_velocity : 0 as * mut sys :: godot_method_bind , get_constant_linear_velocity : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , get_physics_material_override : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_constant_angular_velocity : 0 as * mut sys :: godot_method_bind , set_constant_linear_velocity : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_physics_material_override : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { StaticBody2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StaticBody2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:460:8095 [INFO] [stdout] | [INFO] [stdout] 460 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 460 | # [doc = "`core class 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:466:4309 [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 QuadMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_quadmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nQuadMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct QuadMesh { this : RawObject < Self > , } impl QuadMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = QuadMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Size on the X and Y axes."] # [doc = ""] # [inline] pub fn size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = QuadMeshMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Size on the X and Y axes."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = QuadMeshMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for QuadMesh { } unsafe impl GodotObject for QuadMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "QuadMesh" } } impl std :: ops :: Deref for QuadMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for QuadMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for QuadMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for QuadMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for QuadMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for QuadMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for QuadMesh { } impl Instanciable for QuadMesh { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { QuadMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct QuadMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_size : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind } impl QuadMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : QuadMeshMethodTable = QuadMeshMethodTable { class_constructor : None , get_size : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { QuadMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "QuadMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:472:16373 [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 SpriteBase3D` inherits `GeometryInstance` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_spritebase3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nSpriteBase3D inherits methods from:\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpriteBase3D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AlphaCutMode (pub i64) ; impl AlphaCutMode { pub const DISABLED : AlphaCutMode = AlphaCutMode (0i64) ; pub const DISCARD : AlphaCutMode = AlphaCutMode (1i64) ; pub const OPAQUE_PREPASS : AlphaCutMode = AlphaCutMode (2i64) ; } impl From < i64 > for AlphaCutMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AlphaCutMode > for i64 { # [inline] fn from (v : AlphaCutMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawFlags (pub i64) ; impl DrawFlags { pub const TRANSPARENT : DrawFlags = DrawFlags (0i64) ; pub const SHADED : DrawFlags = DrawFlags (1i64) ; pub const DOUBLE_SIDED : DrawFlags = DrawFlags (2i64) ; pub const MAX : DrawFlags = DrawFlags (3i64) ; } impl From < i64 > for DrawFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawFlags > for i64 { # [inline] fn from (v : DrawFlags) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SpriteBase3D { pub const ALPHA_CUT_DISABLED : i64 = 0i64 ; pub const ALPHA_CUT_DISCARD : i64 = 1i64 ; pub const ALPHA_CUT_OPAQUE_PREPASS : i64 = 2i64 ; pub const FLAG_DOUBLE_SIDED : i64 = 2i64 ; pub const FLAG_MAX : i64 = 3i64 ; pub const FLAG_SHADED : i64 = 1i64 ; pub const FLAG_TRANSPARENT : i64 = 0i64 ; } impl SpriteBase3D { # [doc = ""] # [doc = ""] # [inline] pub fn generate_triangle_mesh (& self) -> Option < Ref < crate :: generated :: triangle_mesh :: TriangleMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . generate_triangle_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: triangle_mesh :: TriangleMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn alpha_cut_mode (& self) -> crate :: generated :: sprite_base_3d :: AlphaCutMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_alpha_cut_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: sprite_base_3d :: AlphaCutMode (ret) } } # [doc = "The direction in which the front of the texture faces."] # [doc = ""] # [inline] pub fn axis (& self) -> vector3 :: Axis { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_axis ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret as u32) } } # [doc = ""] # [doc = ""] # [inline] pub fn billboard_mode (& self) -> crate :: generated :: spatial_material :: BillboardMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_billboard_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: spatial_material :: BillboardMode (ret) } } # [doc = "If `true`, the texture's transparency and the opacity are used to make those parts of the sprite invisible."] # [doc = ""] # [inline] pub fn draw_flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = "Returns the rectangle representing this sprite."] # [doc = ""] # [inline] pub fn get_item_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_item_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light."] # [doc = ""] # [inline] pub fn modulate (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_modulate ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The objects visibility on a scale from `0` fully invisible to `1` fully visible."] # [doc = ""] # [inline] pub fn opacity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_opacity ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The size of one pixel's width on the sprite to scale it in 3D."] # [doc = ""] # [inline] pub fn pixel_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_pixel_size ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn is_centered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . is_centered ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn is_flipped_h (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . is_flipped_h ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn is_flipped_v (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . is_flipped_v ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_alpha_cut_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_alpha_cut_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The direction in which the front of the texture faces."] # [doc = ""] # [inline] pub fn set_axis (& self , axis : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_axis ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , axis) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_billboard_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_billboard_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn set_centered (& self , centered : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_centered ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , centered) ; } } # [doc = "If `true`, the texture's transparency and the opacity are used to make those parts of the sprite invisible."] # [doc = ""] # [inline] pub fn set_draw_flag (& self , flag : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , enabled) ; } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn set_flip_h (& self , flip_h : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_flip_h ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_h) ; } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn set_flip_v (& self , flip_v : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_flip_v ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , flip_v) ; } } # [doc = "A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light."] # [doc = ""] # [inline] pub fn set_modulate (& self , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_modulate ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , modulate) ; } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The objects visibility on a scale from `0` fully invisible to `1` fully visible."] # [doc = ""] # [inline] pub fn set_opacity (& self , opacity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_opacity ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , opacity) ; } } # [doc = "The size of one pixel's width on the sprite to scale it in 3D."] # [doc = ""] # [inline] pub fn set_pixel_size (& self , pixel_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_pixel_size ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , pixel_size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpriteBase3D { } unsafe impl GodotObject for SpriteBase3D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SpriteBase3D" } } impl QueueFree for SpriteBase3D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SpriteBase3D { type Target = crate :: generated :: geometry_instance :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpriteBase3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: geometry_instance :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: node :: Node > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpriteBase3D { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpriteBase3DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub generate_triangle_mesh : * mut sys :: godot_method_bind , pub get_alpha_cut_mode : * mut sys :: godot_method_bind , pub get_axis : * mut sys :: godot_method_bind , pub get_billboard_mode : * mut sys :: godot_method_bind , pub get_draw_flag : * mut sys :: godot_method_bind , pub get_item_rect : * mut sys :: godot_method_bind , pub get_modulate : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_opacity : * mut sys :: godot_method_bind , pub get_pixel_size : * mut sys :: godot_method_bind , pub is_centered : * mut sys :: godot_method_bind , pub is_flipped_h : * mut sys :: godot_method_bind , pub is_flipped_v : * mut sys :: godot_method_bind , pub set_alpha_cut_mode : * mut sys :: godot_method_bind , pub set_axis : * mut sys :: godot_method_bind , pub set_billboard_mode : * mut sys :: godot_method_bind , pub set_centered : * mut sys :: godot_method_bind , pub set_draw_flag : * mut sys :: godot_method_bind , pub set_flip_h : * mut sys :: godot_method_bind , pub set_flip_v : * mut sys :: godot_method_bind , pub set_modulate : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_opacity : * mut sys :: godot_method_bind , pub set_pixel_size : * mut sys :: godot_method_bind } impl SpriteBase3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpriteBase3DMethodTable = SpriteBase3DMethodTable { class_constructor : None , generate_triangle_mesh : 0 as * mut sys :: godot_method_bind , get_alpha_cut_mode : 0 as * mut sys :: godot_method_bind , get_axis : 0 as * mut sys :: godot_method_bind , get_billboard_mode : 0 as * mut sys :: godot_method_bind , get_draw_flag : 0 as * mut sys :: godot_method_bind , get_item_rect : 0 as * mut sys :: godot_method_bind , get_modulate : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_opacity : 0 as * mut sys :: godot_method_bind , get_pixel_size : 0 as * mut sys :: godot_method_bind , is_centered : 0 as * mut sys :: godot_method_bind , is_flipped_h : 0 as * mut sys :: godot_method_bind , is_flipped_v : 0 as * mut sys :: godot_method_bind , set_alpha_cut_mode : 0 as * mut sys :: godot_method_bind , set_axis : 0 as * mut sys :: godot_method_bind , set_billboard_mode : 0 as * mut sys :: godot_method_bind , set_centered : 0 as * mut sys :: godot_method_bind , set_draw_flag : 0 as * mut sys :: godot_method_bind , set_flip_h : 0 as * mut sys :: godot_method_bind , set_flip_v : 0 as * mut sys :: godot_method_bind , set_modulate : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_opacity : 0 as * mut sys :: godot_method_bind , set_pixel_size : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SpriteBase3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpriteBase3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . generate_triangle_mesh = (gd_api . godot_method_bind_get_method) (class_name , "generate_triangle_mesh\0" . as_ptr () as * const c_char) ; table . get_alpha_cut_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_alpha_cut_mode\0" . as_ptr () as * const c_char) ; table . get_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_axis\0" . as_ptr () as * const c_char) ; table . get_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_billboard_mode\0" . as_ptr () as * const c_char) ; table . get_draw_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_flag\0" . as_ptr () as * const c_char) ; table . get_item_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_item_rect\0" . as_ptr () as * const c_char) ; table . get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_modulate\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_opacity = (gd_api . godot_method_bind_get_method) (class_name , "get_opacity\0" . as_ptr () as * const c_char) ; table . get_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "get_pixel_size\0" . as_ptr () as * const c_char) ; table . is_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_centered\0" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\0" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\0" . as_ptr () as * const c_char) ; table . set_alpha_cut_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_alpha_cut_mode\0" . as_ptr () as * const c_char) ; table . set_axis = (gd_api . godot_method_bind_get_method) (class_name , "set_axis\0" . as_ptr () as * const c_char) ; table . set_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_billboard_mode\0" . as_ptr () as * const c_char) ; table . set_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_centered\0" . as_ptr () as * const c_char) ; table . set_draw_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_flag\0" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\0" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\0" . as_ptr () as * const c_char) ; table . set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_modulate\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_opacity = (gd_api . godot_method_bind_get_method) (class_name , "set_opacity\0" . as_ptr () as * const c_char) ; table . set_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "set_pixel_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:478:56042 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:484:6230 [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 Listener` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_listener.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Listener` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nListener inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Listener { this : RawObject < Self > , } impl Listener { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ListenerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Disables the listener to use the current camera's listener instead."] # [doc = ""] # [inline] pub fn clear_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ListenerMethodTable :: get (get_api ()) . clear_current ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the listener's global orthonormalized [Transform]."] # [doc = ""] # [inline] pub fn get_listener_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = ListenerMethodTable :: get (get_api ()) . get_listener_transform ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns `true` if the listener was made current using [method make_current], `false` otherwise.\n**Note:** There may be more than one Listener marked as \"current\" in the scene tree, but only the one that was made current last will be used."] # [doc = ""] # [inline] pub fn is_current (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ListenerMethodTable :: get (get_api ()) . is_current ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Enables the listener. This will override the current camera's listener."] # [doc = ""] # [inline] pub fn make_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ListenerMethodTable :: get (get_api ()) . make_current ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Listener { } unsafe impl GodotObject for Listener { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Listener" } } impl QueueFree for Listener { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Listener { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Listener { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Listener { } unsafe impl SubClass < crate :: generated :: node :: Node > for Listener { } unsafe impl SubClass < crate :: generated :: object :: Object > for Listener { } impl Instanciable for Listener { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Listener :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ListenerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear_current : * mut sys :: godot_method_bind , pub get_listener_transform : * mut sys :: godot_method_bind , pub is_current : * mut sys :: godot_method_bind , pub make_current : * mut sys :: godot_method_bind } impl ListenerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ListenerMethodTable = ListenerMethodTable { class_constructor : None , clear_current : 0 as * mut sys :: godot_method_bind , get_listener_transform : 0 as * mut sys :: godot_method_bind , is_current : 0 as * mut sys :: godot_method_bind , make_current : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ListenerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Listener\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_current = (gd_api . godot_method_bind_get_method) (class_name , "clear_current\0" . as_ptr () as * const c_char) ; table . get_listener_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_listener_transform\0" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\0" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:490:23671 [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 EditorInterface` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorinterface.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorInterface inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorInterface { this : RawObject < Self > , } impl EditorInterface { # [doc = ""] # [doc = ""] # [inline] pub fn edit_node (& self , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . edit_node ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Edits the given [Resource]."] # [doc = ""] # [inline] pub fn edit_resource (& self , resource : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . edit_resource ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [doc = "Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly."] # [doc = ""] # [inline] pub fn get_base_control (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_base_control ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the current path being viewed in the [FileSystemDock]."] # [doc = ""] # [inline] pub fn get_current_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_current_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the edited (current) scene's root [Node]."] # [doc = ""] # [inline] pub fn get_edited_scene_root (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_edited_scene_root ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_editor_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_editor_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the editor's [EditorSettings] instance."] # [doc = ""] # [inline] pub fn get_editor_settings (& self) -> Option < Ref < crate :: generated :: editor_settings :: EditorSettings , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_editor_settings ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_settings :: EditorSettings , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the main editor control. Use this as a parent for main screens.\n**Note:** This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically."] # [doc = ""] # [inline] pub fn get_editor_viewport (& self) -> Option < Ref < crate :: generated :: control :: Control , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_editor_viewport ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: control :: Control , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the editor's [FileSystemDock] instance."] # [doc = ""] # [inline] pub fn get_file_system_dock (& self) -> Option < Ref < crate :: generated :: file_system_dock :: FileSystemDock , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_file_system_dock ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: file_system_dock :: FileSystemDock , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the editor's [EditorInspector] instance."] # [doc = ""] # [inline] pub fn get_inspector (& self) -> Option < Ref < crate :: generated :: editor_inspector :: EditorInspector , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_inspector ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_inspector :: EditorInspector , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns an [Array] with the file paths of the currently opened scenes."] # [doc = ""] # [inline] pub fn get_open_scenes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_open_scenes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string."] # [doc = ""] # [inline] pub fn get_playing_scene (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_playing_scene ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the editor's [EditorFileSystem] instance."] # [doc = ""] # [inline] pub fn get_resource_filesystem (& self) -> Option < Ref < crate :: generated :: editor_file_system :: EditorFileSystem , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_resource_filesystem ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system :: EditorFileSystem , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the editor's [EditorResourcePreview] instance."] # [doc = ""] # [inline] pub fn get_resource_previewer (& self) -> Option < Ref < crate :: generated :: editor_resource_preview :: EditorResourcePreview , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_resource_previewer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_resource_preview :: EditorResourcePreview , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the editor's [ScriptEditor] instance."] # [doc = ""] # [inline] pub fn get_script_editor (& self) -> Option < Ref < crate :: generated :: script_editor :: ScriptEditor , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_script_editor ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: script_editor :: ScriptEditor , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the path of the directory currently selected in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead."] # [doc = ""] # [inline] pub fn get_selected_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_selected_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the editor's [EditorSelection] instance."] # [doc = ""] # [inline] pub fn get_selection (& self) -> Option < Ref < crate :: generated :: editor_selection :: EditorSelection , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_selection ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_selection :: EditorSelection , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Shows the given property on the given `object` in the editor's Inspector dock.\n# Default Arguments\n* `for_property` - `\"\"`"] # [doc = ""] # [inline] pub fn inspect_object (& self , object : impl AsArg < crate :: generated :: object :: Object > , for_property : impl Into < GodotString > , inspector_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . inspect_object ; let ret = crate :: icalls :: icallptr_void_obj_str_bool (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , for_property . into () , inspector_only) ; } } # [doc = "If `true`, enables distraction-free mode which hides side docks to increase the space available for the main view."] # [doc = ""] # [inline] pub fn is_distraction_free_mode_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . is_distraction_free_mode_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if a scene is currently being played, `false` otherwise. Paused scenes are considered as being played."] # [doc = ""] # [inline] pub fn is_playing_scene (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . is_playing_scene ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the specified `plugin` is enabled. The plugin name is the same as its directory name."] # [doc = ""] # [inline] pub fn is_plugin_enabled (& self , plugin : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . is_plugin_enabled ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , plugin . into ()) ; ret as _ } } # [doc = "Returns mesh previews rendered at the given size as an [Array] of [Texture]s."] # [doc = ""] # [inline] pub fn make_mesh_previews (& self , meshes : VariantArray , preview_size : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . make_mesh_previews ; let ret = crate :: icalls :: icallvar__arr_i64 (method_bind , self . this . sys () . as_ptr () , meshes , preview_size) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Opens the scene at the given path."] # [doc = ""] # [inline] pub fn open_scene_from_path (& self , scene_filepath : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . open_scene_from_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , scene_filepath . into ()) ; } } # [doc = "Plays the currently active scene."] # [doc = ""] # [inline] pub fn play_current_scene (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . play_current_scene ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Plays the scene specified by its filepath."] # [doc = ""] # [inline] pub fn play_custom_scene (& self , scene_filepath : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . play_custom_scene ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , scene_filepath . into ()) ; } } # [doc = "Plays the main scene."] # [doc = ""] # [inline] pub fn play_main_scene (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . play_main_scene ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Reloads the scene at the given path."] # [doc = ""] # [inline] pub fn reload_scene_from_path (& self , scene_filepath : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . reload_scene_from_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , scene_filepath . into ()) ; } } # [doc = "Saves the scene. Returns either `OK` or `ERR_CANT_CREATE` (see [@GlobalScope] constants)."] # [doc = ""] # [inline] pub fn save_scene (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . save_scene ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the scene as a file at `path`.\n# Default Arguments\n* `with_preview` - `true`"] # [doc = ""] # [inline] pub fn save_scene_as (& self , path : impl Into < GodotString > , with_preview : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . save_scene_as ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , with_preview) ; } } # [doc = "Selects the file, with the path provided by `file`, in the FileSystem dock."] # [doc = ""] # [inline] pub fn select_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . select_file ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "If `true`, enables distraction-free mode which hides side docks to increase the space available for the main view."] # [doc = ""] # [inline] pub fn set_distraction_free_mode (& self , enter : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . set_distraction_free_mode ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enter) ; } } # [doc = "Sets the editor's current main screen to the one specified in `name`. `name` must match the text of the tab in question exactly (`2D`, `3D`, `Script`, `AssetLib`)."] # [doc = ""] # [inline] pub fn set_main_screen_editor (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . set_main_screen_editor ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Sets the enabled status of a plugin. The plugin name is the same as its directory name."] # [doc = ""] # [inline] pub fn set_plugin_enabled (& self , plugin : impl Into < GodotString > , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . set_plugin_enabled ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , plugin . into () , enabled) ; } } # [doc = "Stops the scene that is currently playing."] # [doc = ""] # [inline] pub fn stop_playing_scene (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . stop_playing_scene ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorInterface { } unsafe impl GodotObject for EditorInterface { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorInterface" } } impl QueueFree for EditorInterface { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for EditorInterface { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for EditorInterface { } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorInterface { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub edit_node : * mut sys :: godot_method_bind , pub edit_resource : * mut sys :: godot_method_bind , pub get_base_control : * mut sys :: godot_method_bind , pub get_current_path : * mut sys :: godot_method_bind , pub get_edited_scene_root : * mut sys :: godot_method_bind , pub get_editor_scale : * mut sys :: godot_method_bind , pub get_editor_settings : * mut sys :: godot_method_bind , pub get_editor_viewport : * mut sys :: godot_method_bind , pub get_file_system_dock : * mut sys :: godot_method_bind , pub get_inspector : * mut sys :: godot_method_bind , pub get_open_scenes : * mut sys :: godot_method_bind , pub get_playing_scene : * mut sys :: godot_method_bind , pub get_resource_filesystem : * mut sys :: godot_method_bind , pub get_resource_previewer : * mut sys :: godot_method_bind , pub get_script_editor : * mut sys :: godot_method_bind , pub get_selected_path : * mut sys :: godot_method_bind , pub get_selection : * mut sys :: godot_method_bind , pub inspect_object : * mut sys :: godot_method_bind , pub is_distraction_free_mode_enabled : * mut sys :: godot_method_bind , pub is_playing_scene : * mut sys :: godot_method_bind , pub is_plugin_enabled : * mut sys :: godot_method_bind , pub make_mesh_previews : * mut sys :: godot_method_bind , pub open_scene_from_path : * mut sys :: godot_method_bind , pub play_current_scene : * mut sys :: godot_method_bind , pub play_custom_scene : * mut sys :: godot_method_bind , pub play_main_scene : * mut sys :: godot_method_bind , pub reload_scene_from_path : * mut sys :: godot_method_bind , pub save_scene : * mut sys :: godot_method_bind , pub save_scene_as : * mut sys :: godot_method_bind , pub select_file : * mut sys :: godot_method_bind , pub set_distraction_free_mode : * mut sys :: godot_method_bind , pub set_main_screen_editor : * mut sys :: godot_method_bind , pub set_plugin_enabled : * mut sys :: godot_method_bind , pub stop_playing_scene : * mut sys :: godot_method_bind } impl EditorInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorInterfaceMethodTable = EditorInterfaceMethodTable { class_constructor : None , edit_node : 0 as * mut sys :: godot_method_bind , edit_resource : 0 as * mut sys :: godot_method_bind , get_base_control : 0 as * mut sys :: godot_method_bind , get_current_path : 0 as * mut sys :: godot_method_bind , get_edited_scene_root : 0 as * mut sys :: godot_method_bind , get_editor_scale : 0 as * mut sys :: godot_method_bind , get_editor_settings : 0 as * mut sys :: godot_method_bind , get_editor_viewport : 0 as * mut sys :: godot_method_bind , get_file_system_dock : 0 as * mut sys :: godot_method_bind , get_inspector : 0 as * mut sys :: godot_method_bind , get_open_scenes : 0 as * mut sys :: godot_method_bind , get_playing_scene : 0 as * mut sys :: godot_method_bind , get_resource_filesystem : 0 as * mut sys :: godot_method_bind , get_resource_previewer : 0 as * mut sys :: godot_method_bind , get_script_editor : 0 as * mut sys :: godot_method_bind , get_selected_path : 0 as * mut sys :: godot_method_bind , get_selection : 0 as * mut sys :: godot_method_bind , inspect_object : 0 as * mut sys :: godot_method_bind , is_distraction_free_mode_enabled : 0 as * mut sys :: godot_method_bind , is_playing_scene : 0 as * mut sys :: godot_method_bind , is_plugin_enabled : 0 as * mut sys :: godot_method_bind , make_mesh_previews : 0 as * mut sys :: godot_method_bind , open_scene_from_path : 0 as * mut sys :: godot_method_bind , play_current_scene : 0 as * mut sys :: godot_method_bind , play_custom_scene : 0 as * mut sys :: godot_method_bind , play_main_scene : 0 as * mut sys :: godot_method_bind , reload_scene_from_path : 0 as * mut sys :: godot_method_bind , save_scene : 0 as * mut sys :: godot_method_bind , save_scene_as : 0 as * mut sys :: godot_method_bind , select_file : 0 as * mut sys :: godot_method_bind , set_distraction_free_mode : 0 as * mut sys :: godot_method_bind , set_main_screen_editor : 0 as * mut sys :: godot_method_bind , set_plugin_enabled : 0 as * mut sys :: godot_method_bind , stop_playing_scene : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorInterfaceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorInterface\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . edit_node = (gd_api . godot_method_bind_get_method) (class_name , "edit_node\0" . as_ptr () as * const c_char) ; table . edit_resource = (gd_api . godot_method_bind_get_method) (class_name , "edit_resource\0" . as_ptr () as * const c_char) ; table . get_base_control = (gd_api . godot_method_bind_get_method) (class_name , "get_base_control\0" . as_ptr () as * const c_char) ; table . get_current_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_path\0" . as_ptr () as * const c_char) ; table . get_edited_scene_root = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_scene_root\0" . as_ptr () as * const c_char) ; table . get_editor_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_scale\0" . as_ptr () as * const c_char) ; table . get_editor_settings = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_settings\0" . as_ptr () as * const c_char) ; table . get_editor_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_viewport\0" . as_ptr () as * const c_char) ; table . get_file_system_dock = (gd_api . godot_method_bind_get_method) (class_name , "get_file_system_dock\0" . as_ptr () as * const c_char) ; table . get_inspector = (gd_api . godot_method_bind_get_method) (class_name , "get_inspector\0" . as_ptr () as * const c_char) ; table . get_open_scenes = (gd_api . godot_method_bind_get_method) (class_name , "get_open_scenes\0" . as_ptr () as * const c_char) ; table . get_playing_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_playing_scene\0" . as_ptr () as * const c_char) ; table . get_resource_filesystem = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_filesystem\0" . as_ptr () as * const c_char) ; table . get_resource_previewer = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_previewer\0" . as_ptr () as * const c_char) ; table . get_script_editor = (gd_api . godot_method_bind_get_method) (class_name , "get_script_editor\0" . as_ptr () as * const c_char) ; table . get_selected_path = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_path\0" . as_ptr () as * const c_char) ; table . get_selection = (gd_api . godot_method_bind_get_method) (class_name , "get_selection\0" . as_ptr () as * const c_char) ; table . inspect_object = (gd_api . godot_method_bind_get_method) (class_name , "inspect_object\0" . as_ptr () as * const c_char) ; table . is_distraction_free_mode_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_distraction_free_mode_enabled\0" . as_ptr () as * const c_char) ; table . is_playing_scene = (gd_api . godot_method_bind_get_method) (class_name , "is_playing_scene\0" . as_ptr () as * const c_char) ; table . is_plugin_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_plugin_enabled\0" . as_ptr () as * const c_char) ; table . make_mesh_previews = (gd_api . godot_method_bind_get_method) (class_name , "make_mesh_previews\0" . as_ptr () as * const c_char) ; table . open_scene_from_path = (gd_api . godot_method_bind_get_method) (class_name , "open_scene_from_path\0" . as_ptr () as * const c_char) ; table . play_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "play_current_scene\0" . as_ptr () as * const c_char) ; table . play_custom_scene = (gd_api . godot_method_bind_get_method) (class_name , "play_custom_scene\0" . as_ptr () as * const c_char) ; table . play_main_scene = (gd_api . godot_method_bind_get_method) (class_name , "play_main_scene\0" . as_ptr () as * const c_char) ; table . reload_scene_from_path = (gd_api . godot_method_bind_get_method) (class_name , "reload_scene_from_path\0" . as_ptr () as * const c_char) ; table . save_scene = (gd_api . godot_method_bind_get_method) (class_name , "save_scene\0" . as_ptr () as * const c_char) ; table . save_scene_as = (gd_api . godot_method_bind_get_method) (class_name , "save_scene_as\0" . as_ptr () as * const c_char) ; table . select_file = (gd_api . godot_method_bind_get_method) (class_name , "select_file\0" . as_ptr () as * const c_char) ; table . set_distraction_free_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_distraction_free_mode\0" . as_ptr () as * const c_char) ; table . set_main_screen_editor = (gd_api . godot_method_bind_get_method) (class_name , "set_main_screen_editor\0" . as_ptr () as * const c_char) ; table . set_plugin_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_plugin_enabled\0" . as_ptr () as * const c_char) ; table . stop_playing_scene = (gd_api . godot_method_bind_get_method) (class_name , "stop_playing_scene\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:496:10690 [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 AnimationNodeBlendTree` inherits `AnimationRootNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeblendtree.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlendTree inherits methods from:\n - [AnimationRootNode](struct.AnimationRootNode.html)\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlendTree { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeBlendTree { pub const CONNECTION_ERROR_CONNECTION_EXISTS : i64 = 5i64 ; pub const CONNECTION_ERROR_NO_INPUT : i64 = 1i64 ; pub const CONNECTION_ERROR_NO_INPUT_INDEX : i64 = 2i64 ; pub const CONNECTION_ERROR_NO_OUTPUT : i64 = 3i64 ; pub const CONNECTION_ERROR_SAME_NODE : i64 = 4i64 ; pub const CONNECTION_OK : i64 = 0i64 ; } impl AnimationNodeBlendTree { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlendTreeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an [AnimationNode] at the given `position`. The `name` is used to identify the created sub-node later.\n# Default Arguments\n* `position` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn add_node (& self , name : impl Into < GodotString > , node : impl AsArg < crate :: generated :: animation_node :: AnimationNode > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallptr_void_str_obj_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , node . as_arg_ptr () , position) ; } } # [doc = "Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by `input_index`."] # [doc = ""] # [inline] pub fn connect_node (& self , input_node : impl Into < GodotString > , input_index : i64 , output_node : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . connect_node ; let ret = crate :: icalls :: icallptr_void_str_i64_str (method_bind , self . this . sys () . as_ptr () , input_node . into () , input_index , output_node . into ()) ; } } # [doc = "Disconnects the node connected to the specified input."] # [doc = ""] # [inline] pub fn disconnect_node (& self , input_node : impl Into < GodotString > , input_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . disconnect_node ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , input_node . into () , input_index) ; } } # [doc = "The global offset of all sub-nodes."] # [doc = ""] # [inline] pub fn graph_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . get_graph_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the sub-node with the specified `name`."] # [doc = ""] # [inline] pub fn get_node (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: animation_node :: AnimationNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallptr_obj_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation_node :: AnimationNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the position of the sub-node with the specified `name`."] # [doc = ""] # [inline] pub fn get_node_position (& self , name : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . get_node_position ; let ret = crate :: icalls :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; mem :: transmute (ret) } } # [doc = "Returns `true` if a sub-node with specified `name` exists."] # [doc = ""] # [inline] pub fn has_node (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . has_node ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Removes a sub-node."] # [doc = ""] # [inline] pub fn remove_node (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Changes the name of a sub-node."] # [doc = ""] # [inline] pub fn rename_node (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . rename_node ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = "The global offset of all sub-nodes."] # [doc = ""] # [inline] pub fn set_graph_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . set_graph_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Modifies the position of a sub-node."] # [doc = ""] # [inline] pub fn set_node_position (& self , name : impl Into < GodotString > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . set_node_position ; let ret = crate :: icalls :: icallptr_void_str_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlendTree { } unsafe impl GodotObject for AnimationNodeBlendTree { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlendTree" } } impl std :: ops :: Deref for AnimationNodeBlendTree { type Target = crate :: generated :: animation_root_node :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlendTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_root_node :: AnimationRootNode > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlendTree { } impl Instanciable for AnimationNodeBlendTree { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeBlendTree :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlendTreeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_node : * mut sys :: godot_method_bind , pub connect_node : * mut sys :: godot_method_bind , pub disconnect_node : * mut sys :: godot_method_bind , pub get_graph_offset : * mut sys :: godot_method_bind , pub get_node : * mut sys :: godot_method_bind , pub get_node_position : * mut sys :: godot_method_bind , pub has_node : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind , pub rename_node : * mut sys :: godot_method_bind , pub set_graph_offset : * mut sys :: godot_method_bind , pub set_node_position : * mut sys :: godot_method_bind } impl AnimationNodeBlendTreeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlendTreeMethodTable = AnimationNodeBlendTreeMethodTable { class_constructor : None , add_node : 0 as * mut sys :: godot_method_bind , connect_node : 0 as * mut sys :: godot_method_bind , disconnect_node : 0 as * mut sys :: godot_method_bind , get_graph_offset : 0 as * mut sys :: godot_method_bind , get_node : 0 as * mut sys :: godot_method_bind , get_node_position : 0 as * mut sys :: godot_method_bind , has_node : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind , rename_node : 0 as * mut sys :: godot_method_bind , set_graph_offset : 0 as * mut sys :: godot_method_bind , set_node_position : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeBlendTreeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlendTree\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . connect_node = (gd_api . godot_method_bind_get_method) (class_name , "connect_node\0" . as_ptr () as * const c_char) ; table . disconnect_node = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_node\0" . as_ptr () as * const c_char) ; table . get_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_graph_offset\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . rename_node = (gd_api . godot_method_bind_get_method) (class_name , "rename_node\0" . as_ptr () as * const c_char) ; table . set_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_graph_offset\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:502:5554 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:508:7750 [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 AnimationNodeTransition` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodetransition.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeTransition inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeTransition { this : RawObject < Self > , } impl AnimationNodeTransition { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeTransitionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Cross-fading time (in seconds) between each animation connected to the inputs."] # [doc = ""] # [inline] pub fn cross_fade_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . get_cross_fade_time ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of available input ports for this node."] # [doc = ""] # [inline] pub fn enabled_inputs (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . get_enabled_inputs ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn input_caption (& self , input : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . get_input_caption ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , input) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_input_set_as_auto_advance (& self , input : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . is_input_set_as_auto_advance ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , input) ; ret as _ } } # [doc = "Cross-fading time (in seconds) between each animation connected to the inputs."] # [doc = ""] # [inline] pub fn set_cross_fade_time (& self , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . set_cross_fade_time ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time) ; } } # [doc = "The number of available input ports for this node."] # [doc = ""] # [inline] pub fn set_enabled_inputs (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . set_enabled_inputs ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_input_as_auto_advance (& self , input : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . set_input_as_auto_advance ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , input , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_input_caption (& self , input : i64 , caption : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . set_input_caption ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , input , caption . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeTransition { } unsafe impl GodotObject for AnimationNodeTransition { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeTransition" } } impl std :: ops :: Deref for AnimationNodeTransition { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeTransition { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeTransition { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeTransition { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeTransition { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeTransition { } impl Instanciable for AnimationNodeTransition { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeTransition :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeTransitionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cross_fade_time : * mut sys :: godot_method_bind , pub get_enabled_inputs : * mut sys :: godot_method_bind , pub get_input_caption : * mut sys :: godot_method_bind , pub is_input_set_as_auto_advance : * mut sys :: godot_method_bind , pub set_cross_fade_time : * mut sys :: godot_method_bind , pub set_enabled_inputs : * mut sys :: godot_method_bind , pub set_input_as_auto_advance : * mut sys :: godot_method_bind , pub set_input_caption : * mut sys :: godot_method_bind } impl AnimationNodeTransitionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeTransitionMethodTable = AnimationNodeTransitionMethodTable { class_constructor : None , get_cross_fade_time : 0 as * mut sys :: godot_method_bind , get_enabled_inputs : 0 as * mut sys :: godot_method_bind , get_input_caption : 0 as * mut sys :: godot_method_bind , is_input_set_as_auto_advance : 0 as * mut sys :: godot_method_bind , set_cross_fade_time : 0 as * mut sys :: godot_method_bind , set_enabled_inputs : 0 as * mut sys :: godot_method_bind , set_input_as_auto_advance : 0 as * mut sys :: godot_method_bind , set_input_caption : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeTransitionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeTransition\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cross_fade_time = (gd_api . godot_method_bind_get_method) (class_name , "get_cross_fade_time\0" . as_ptr () as * const c_char) ; table . get_enabled_inputs = (gd_api . godot_method_bind_get_method) (class_name , "get_enabled_inputs\0" . as_ptr () as * const c_char) ; table . get_input_caption = (gd_api . godot_method_bind_get_method) (class_name , "get_input_caption\0" . as_ptr () as * const c_char) ; table . is_input_set_as_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "is_input_set_as_auto_advance\0" . as_ptr () as * const c_char) ; table . set_cross_fade_time = (gd_api . godot_method_bind_get_method) (class_name , "set_cross_fade_time\0" . as_ptr () as * const c_char) ; table . set_enabled_inputs = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled_inputs\0" . as_ptr () as * const c_char) ; table . set_input_as_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "set_input_as_auto_advance\0" . as_ptr () as * const c_char) ; table . set_input_caption = (gd_api . godot_method_bind_get_method) (class_name , "set_input_caption\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:514:15700 [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 MultiplayerAPI` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_multiplayerapi.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMultiplayerAPI inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiplayerAPI { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RpcMode (pub i64) ; impl RpcMode { pub const DISABLED : RpcMode = RpcMode (0i64) ; pub const REMOTE : RpcMode = RpcMode (1i64) ; pub const MASTER : RpcMode = RpcMode (2i64) ; pub const SLAVE : RpcMode = RpcMode (3i64) ; pub const PUPPET : RpcMode = RpcMode (3i64) ; pub const REMOTESYNC : RpcMode = RpcMode (4i64) ; pub const SYNC : RpcMode = RpcMode (4i64) ; pub const MASTERSYNC : RpcMode = RpcMode (5i64) ; pub const PUPPETSYNC : RpcMode = RpcMode (6i64) ; } impl From < i64 > for RpcMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RpcMode > for i64 { # [inline] fn from (v : RpcMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MultiplayerAPI { pub const RPC_MODE_DISABLED : i64 = 0i64 ; pub const RPC_MODE_MASTER : i64 = 2i64 ; pub const RPC_MODE_MASTERSYNC : i64 = 5i64 ; pub const RPC_MODE_PUPPET : i64 = 3i64 ; pub const RPC_MODE_PUPPETSYNC : i64 = 6i64 ; pub const RPC_MODE_REMOTE : i64 = 1i64 ; pub const RPC_MODE_REMOTESYNC : i64 = 4i64 ; pub const RPC_MODE_SLAVE : i64 = 3i64 ; pub const RPC_MODE_SYNC : i64 = 4i64 ; } impl MultiplayerAPI { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiplayerAPIMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing)."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer]."] # [doc = ""] # [inline] pub fn get_network_connected_peers (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_connected_peers ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals."] # [doc = ""] # [inline] pub fn network_peer (& self) -> Option < Ref < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_peer ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the unique peer ID of this MultiplayerAPI's [member network_peer]."] # [doc = ""] # [inline] pub fn get_network_unique_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_unique_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn root_node (& self) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_root_node ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the sender's peer ID for the RPC currently being executed.\n**Note:** If not inside an RPC this method will return 0."] # [doc = ""] # [inline] pub fn get_rpc_sender_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_rpc_sender_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if there is a [member network_peer] set."] # [doc = ""] # [inline] pub fn has_network_peer (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . has_network_peer ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if this MultiplayerAPI's [member network_peer] is in server mode (listening for connections)."] # [doc = ""] # [inline] pub fn is_network_server (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . is_network_server ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true` (or if the [member network_peer] has [member PacketPeer.allow_object_decoding] set to `true`), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn is_object_decoding_allowed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . is_object_decoding_allowed ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the MultiplayerAPI's [member network_peer] refuses new incoming connections."] # [doc = ""] # [inline] pub fn is_refusing_new_network_connections (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . is_refusing_new_network_connections ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [member Node.custom_multiplayer] override or you set [member SceneTree.multiplayer_poll] to `false`. By default, [SceneTree] will poll its MultiplayerAPI for you.\n**Note:** This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. `_process`, `physics`, [Thread])."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sends the given raw `bytes` to a specific peer identified by `id` (see [method NetworkedMultiplayerPeer.set_target_peer]). Default ID is `0`, i.e. broadcast to all peers.\n# Default Arguments\n* `id` - `0`\n* `mode` - `2`"] # [doc = ""] # [inline] pub fn send_bytes (& self , bytes : ByteArray , id : i64 , mode : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . send_bytes ; let ret = crate :: icalls :: icallptr_i64_bytearr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bytes , id , mode) ; GodotError :: result_from_sys (ret as _) } } # [doc = "If `true` (or if the [member network_peer] has [member PacketPeer.allow_object_decoding] set to `true`), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn set_allow_object_decoding (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_allow_object_decoding ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals."] # [doc = ""] # [inline] pub fn set_network_peer (& self , peer : impl AsArg < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_network_peer ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr ()) ; } } # [doc = "If `true`, the MultiplayerAPI's [member network_peer] refuses new incoming connections."] # [doc = ""] # [inline] pub fn set_refuse_new_network_connections (& self , refuse : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_refuse_new_network_connections ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , refuse) ; } } # [doc = "Sets the base root node to use for RPCs. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.\nThis effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene."] # [doc = ""] # [inline] pub fn set_root_node (& self , node : impl AsArg < crate :: generated :: node :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_root_node ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiplayerAPI { } unsafe impl GodotObject for MultiplayerAPI { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiplayerAPI" } } impl std :: ops :: Deref for MultiplayerAPI { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiplayerAPI { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MultiplayerAPI { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiplayerAPI { } impl Instanciable for MultiplayerAPI { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MultiplayerAPI :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiplayerAPIMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub get_network_connected_peers : * mut sys :: godot_method_bind , pub get_network_peer : * mut sys :: godot_method_bind , pub get_network_unique_id : * mut sys :: godot_method_bind , pub get_root_node : * mut sys :: godot_method_bind , pub get_rpc_sender_id : * mut sys :: godot_method_bind , pub has_network_peer : * mut sys :: godot_method_bind , pub is_network_server : * mut sys :: godot_method_bind , pub is_object_decoding_allowed : * mut sys :: godot_method_bind , pub is_refusing_new_network_connections : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub send_bytes : * mut sys :: godot_method_bind , pub set_allow_object_decoding : * mut sys :: godot_method_bind , pub set_network_peer : * mut sys :: godot_method_bind , pub set_refuse_new_network_connections : * mut sys :: godot_method_bind , pub set_root_node : * mut sys :: godot_method_bind } impl MultiplayerAPIMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiplayerAPIMethodTable = MultiplayerAPIMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , get_network_connected_peers : 0 as * mut sys :: godot_method_bind , get_network_peer : 0 as * mut sys :: godot_method_bind , get_network_unique_id : 0 as * mut sys :: godot_method_bind , get_root_node : 0 as * mut sys :: godot_method_bind , get_rpc_sender_id : 0 as * mut sys :: godot_method_bind , has_network_peer : 0 as * mut sys :: godot_method_bind , is_network_server : 0 as * mut sys :: godot_method_bind , is_object_decoding_allowed : 0 as * mut sys :: godot_method_bind , is_refusing_new_network_connections : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , send_bytes : 0 as * mut sys :: godot_method_bind , set_allow_object_decoding : 0 as * mut sys :: godot_method_bind , set_network_peer : 0 as * mut sys :: godot_method_bind , set_refuse_new_network_connections : 0 as * mut sys :: godot_method_bind , set_root_node : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MultiplayerAPIMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiplayerAPI\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_network_connected_peers = (gd_api . godot_method_bind_get_method) (class_name , "get_network_connected_peers\0" . as_ptr () as * const c_char) ; table . get_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_network_peer\0" . as_ptr () as * const c_char) ; table . get_network_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_network_unique_id\0" . as_ptr () as * const c_char) ; table . get_root_node = (gd_api . godot_method_bind_get_method) (class_name , "get_root_node\0" . as_ptr () as * const c_char) ; table . get_rpc_sender_id = (gd_api . godot_method_bind_get_method) (class_name , "get_rpc_sender_id\0" . as_ptr () as * const c_char) ; table . has_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_network_peer\0" . as_ptr () as * const c_char) ; table . is_network_server = (gd_api . godot_method_bind_get_method) (class_name , "is_network_server\0" . as_ptr () as * const c_char) ; table . is_object_decoding_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_object_decoding_allowed\0" . as_ptr () as * const c_char) ; table . is_refusing_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "is_refusing_new_network_connections\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . send_bytes = (gd_api . godot_method_bind_get_method) (class_name , "send_bytes\0" . as_ptr () as * const c_char) ; table . set_allow_object_decoding = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_object_decoding\0" . as_ptr () as * const c_char) ; table . set_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_network_peer\0" . as_ptr () as * const c_char) ; table . set_refuse_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "set_refuse_new_network_connections\0" . as_ptr () as * const c_char) ; table . set_root_node = (gd_api . godot_method_bind_get_method) (class_name , "set_root_node\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:526:20180 [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 StreamPeer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_streampeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamPeer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamPeer { this : RawObject < Self > , } impl StreamPeer { # [doc = "Gets a signed 16-bit value from the stream."] # [doc = ""] # [inline] pub fn get_16 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_16 ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets a signed 32-bit value from the stream."] # [doc = ""] # [inline] pub fn get_32 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_32 ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets a signed 64-bit value from the stream."] # [doc = ""] # [inline] pub fn get_64 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_64 ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets a signed byte from the stream."] # [doc = ""] # [inline] pub fn get_8 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_8 ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the amount of bytes this [StreamPeer] has available."] # [doc = ""] # [inline] pub fn get_available_bytes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_available_bytes ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the `bytes` argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum @GlobalScope.Error] code and a data array."] # [doc = ""] # [inline] pub fn get_data (& self , bytes : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bytes) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets a double-precision float from the stream."] # [doc = ""] # [inline] pub fn get_double (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_double ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets a single-precision float from the stream."] # [doc = ""] # [inline] pub fn get_float (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_float ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the \"bytes\" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum @GlobalScope.Error] code, and a data array."] # [doc = ""] # [inline] pub fn get_partial_data (& self , bytes : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_partial_data ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bytes) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets a string with byte-length `bytes` from the stream. If `bytes` is negative (default) the length will be read from the stream using the reverse process of [method put_string].\n# Default Arguments\n* `bytes` - `-1`"] # [doc = ""] # [inline] pub fn get_string (& self , bytes : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_string ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bytes) ; GodotString :: from_sys (ret) } } # [doc = "Gets an unsigned 16-bit value from the stream."] # [doc = ""] # [inline] pub fn get_u16 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_u16 ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets an unsigned 32-bit value from the stream."] # [doc = ""] # [inline] pub fn get_u32 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_u32 ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets an unsigned 64-bit value from the stream."] # [doc = ""] # [inline] pub fn get_u64 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_u64 ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets an unsigned byte from the stream."] # [doc = ""] # [inline] pub fn get_u8 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_u8 ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets an UTF-8 string with byte-length `bytes` from the stream (this decodes the string sent as UTF-8). If `bytes` is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string].\n# Default Arguments\n* `bytes` - `-1`"] # [doc = ""] # [inline] pub fn get_utf8_string (& self , bytes : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_utf8_string ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , bytes) ; GodotString :: from_sys (ret) } } # [doc = "Gets a Variant from the stream. If `allow_objects` is `true`, decoding objects is allowed.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.\n# Default Arguments\n* `allow_objects` - `false`"] # [doc = ""] # [inline] pub fn get_var (& self , allow_objects : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_var ; let ret = crate :: icalls :: icallptr_var_bool (method_bind , self . this . sys () . as_ptr () , allow_objects) ; Variant :: from_sys (ret) } } # [doc = "If `true`, this [StreamPeer] will using big-endian format for encoding and decoding."] # [doc = ""] # [inline] pub fn is_big_endian_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . is_big_endian_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Puts a signed 16-bit value into the stream."] # [doc = ""] # [inline] pub fn put_16 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_16 ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Puts a signed 32-bit value into the stream."] # [doc = ""] # [inline] pub fn put_32 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_32 ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Puts a signed 64-bit value into the stream."] # [doc = ""] # [inline] pub fn put_64 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_64 ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Puts a signed byte into the stream."] # [doc = ""] # [inline] pub fn put_8 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_8 ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code."] # [doc = ""] # [inline] pub fn put_data (& self , data : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_data ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , data) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Puts a double-precision float into the stream."] # [doc = ""] # [inline] pub fn put_double (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_double ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Puts a single-precision float into the stream."] # [doc = ""] # [inline] pub fn put_float (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_float ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent."] # [doc = ""] # [inline] pub fn put_partial_data (& self , data : ByteArray) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_partial_data ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , data) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nPuts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size.\nNote: To put an ASCII string without prepending its size, you can use [method put_data]:\n```gdscript\nput_data(\"Hello world\".to_ascii())\n```"] # [doc = ""] # [inline] pub fn put_string (& self , value : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_string ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , value . into ()) ; } } # [doc = "Puts an unsigned 16-bit value into the stream."] # [doc = ""] # [inline] pub fn put_u16 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_u16 ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Puts an unsigned 32-bit value into the stream."] # [doc = ""] # [inline] pub fn put_u32 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_u32 ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Puts an unsigned 64-bit value into the stream."] # [doc = ""] # [inline] pub fn put_u64 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_u64 ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Puts an unsigned byte into the stream."] # [doc = ""] # [inline] pub fn put_u8 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_u8 ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nPuts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size.\nNote: To put an UTF-8 string without prepending its size, you can use [method put_data]:\n```gdscript\nput_data(\"Hello world\".to_utf8())\n```"] # [doc = ""] # [inline] pub fn put_utf8_string (& self , value : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_utf8_string ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , value . into ()) ; } } # [doc = "Puts a Variant into the stream. If `full_objects` is `true` encoding objects is allowed (and can potentially include code).\n# Default Arguments\n* `full_objects` - `false`"] # [doc = ""] # [inline] pub fn put_var (& self , value : impl OwnedToVariant , full_objects : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_var ; let ret = crate :: icalls :: icallptr_void_var_bool (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant () , full_objects) ; } } # [doc = "If `true`, this [StreamPeer] will using big-endian format for encoding and decoding."] # [doc = ""] # [inline] pub fn set_big_endian (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . set_big_endian ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeer { } unsafe impl GodotObject for StreamPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeer" } } impl std :: ops :: Deref for StreamPeer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamPeer { } unsafe impl SubClass < crate :: generated :: object :: Object > for StreamPeer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_16 : * mut sys :: godot_method_bind , pub get_32 : * mut sys :: godot_method_bind , pub get_64 : * mut sys :: godot_method_bind , pub get_8 : * mut sys :: godot_method_bind , pub get_available_bytes : * mut sys :: godot_method_bind , pub get_data : * mut sys :: godot_method_bind , pub get_double : * mut sys :: godot_method_bind , pub get_float : * mut sys :: godot_method_bind , pub get_partial_data : * mut sys :: godot_method_bind , pub get_string : * mut sys :: godot_method_bind , pub get_u16 : * mut sys :: godot_method_bind , pub get_u32 : * mut sys :: godot_method_bind , pub get_u64 : * mut sys :: godot_method_bind , pub get_u8 : * mut sys :: godot_method_bind , pub get_utf8_string : * mut sys :: godot_method_bind , pub get_var : * mut sys :: godot_method_bind , pub is_big_endian_enabled : * mut sys :: godot_method_bind , pub put_16 : * mut sys :: godot_method_bind , pub put_32 : * mut sys :: godot_method_bind , pub put_64 : * mut sys :: godot_method_bind , pub put_8 : * mut sys :: godot_method_bind , pub put_data : * mut sys :: godot_method_bind , pub put_double : * mut sys :: godot_method_bind , pub put_float : * mut sys :: godot_method_bind , pub put_partial_data : * mut sys :: godot_method_bind , pub put_string : * mut sys :: godot_method_bind , pub put_u16 : * mut sys :: godot_method_bind , pub put_u32 : * mut sys :: godot_method_bind , pub put_u64 : * mut sys :: godot_method_bind , pub put_u8 : * mut sys :: godot_method_bind , pub put_utf8_string : * mut sys :: godot_method_bind , pub put_var : * mut sys :: godot_method_bind , pub set_big_endian : * mut sys :: godot_method_bind } impl StreamPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamPeerMethodTable = StreamPeerMethodTable { class_constructor : None , get_16 : 0 as * mut sys :: godot_method_bind , get_32 : 0 as * mut sys :: godot_method_bind , get_64 : 0 as * mut sys :: godot_method_bind , get_8 : 0 as * mut sys :: godot_method_bind , get_available_bytes : 0 as * mut sys :: godot_method_bind , get_data : 0 as * mut sys :: godot_method_bind , get_double : 0 as * mut sys :: godot_method_bind , get_float : 0 as * mut sys :: godot_method_bind , get_partial_data : 0 as * mut sys :: godot_method_bind , get_string : 0 as * mut sys :: godot_method_bind , get_u16 : 0 as * mut sys :: godot_method_bind , get_u32 : 0 as * mut sys :: godot_method_bind , get_u64 : 0 as * mut sys :: godot_method_bind , get_u8 : 0 as * mut sys :: godot_method_bind , get_utf8_string : 0 as * mut sys :: godot_method_bind , get_var : 0 as * mut sys :: godot_method_bind , is_big_endian_enabled : 0 as * mut sys :: godot_method_bind , put_16 : 0 as * mut sys :: godot_method_bind , put_32 : 0 as * mut sys :: godot_method_bind , put_64 : 0 as * mut sys :: godot_method_bind , put_8 : 0 as * mut sys :: godot_method_bind , put_data : 0 as * mut sys :: godot_method_bind , put_double : 0 as * mut sys :: godot_method_bind , put_float : 0 as * mut sys :: godot_method_bind , put_partial_data : 0 as * mut sys :: godot_method_bind , put_string : 0 as * mut sys :: godot_method_bind , put_u16 : 0 as * mut sys :: godot_method_bind , put_u32 : 0 as * mut sys :: godot_method_bind , put_u64 : 0 as * mut sys :: godot_method_bind , put_u8 : 0 as * mut sys :: godot_method_bind , put_utf8_string : 0 as * mut sys :: godot_method_bind , put_var : 0 as * mut sys :: godot_method_bind , set_big_endian : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { StreamPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_16 = (gd_api . godot_method_bind_get_method) (class_name , "get_16\0" . as_ptr () as * const c_char) ; table . get_32 = (gd_api . godot_method_bind_get_method) (class_name , "get_32\0" . as_ptr () as * const c_char) ; table . get_64 = (gd_api . godot_method_bind_get_method) (class_name , "get_64\0" . as_ptr () as * const c_char) ; table . get_8 = (gd_api . godot_method_bind_get_method) (class_name , "get_8\0" . as_ptr () as * const c_char) ; table . get_available_bytes = (gd_api . godot_method_bind_get_method) (class_name , "get_available_bytes\0" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_double = (gd_api . godot_method_bind_get_method) (class_name , "get_double\0" . as_ptr () as * const c_char) ; table . get_float = (gd_api . godot_method_bind_get_method) (class_name , "get_float\0" . as_ptr () as * const c_char) ; table . get_partial_data = (gd_api . godot_method_bind_get_method) (class_name , "get_partial_data\0" . as_ptr () as * const c_char) ; table . get_string = (gd_api . godot_method_bind_get_method) (class_name , "get_string\0" . as_ptr () as * const c_char) ; table . get_u16 = (gd_api . godot_method_bind_get_method) (class_name , "get_u16\0" . as_ptr () as * const c_char) ; table . get_u32 = (gd_api . godot_method_bind_get_method) (class_name , "get_u32\0" . as_ptr () as * const c_char) ; table . get_u64 = (gd_api . godot_method_bind_get_method) (class_name , "get_u64\0" . as_ptr () as * const c_char) ; table . get_u8 = (gd_api . godot_method_bind_get_method) (class_name , "get_u8\0" . as_ptr () as * const c_char) ; table . get_utf8_string = (gd_api . godot_method_bind_get_method) (class_name , "get_utf8_string\0" . as_ptr () as * const c_char) ; table . get_var = (gd_api . godot_method_bind_get_method) (class_name , "get_var\0" . as_ptr () as * const c_char) ; table . is_big_endian_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_big_endian_enabled\0" . as_ptr () as * const c_char) ; table . put_16 = (gd_api . godot_method_bind_get_method) (class_name , "put_16\0" . as_ptr () as * const c_char) ; table . put_32 = (gd_api . godot_method_bind_get_method) (class_name , "put_32\0" . as_ptr () as * const c_char) ; table . put_64 = (gd_api . godot_method_bind_get_method) (class_name , "put_64\0" . as_ptr () as * const c_char) ; table . put_8 = (gd_api . godot_method_bind_get_method) (class_name , "put_8\0" . as_ptr () as * const c_char) ; table . put_data = (gd_api . godot_method_bind_get_method) (class_name , "put_data\0" . as_ptr () as * const c_char) ; table . put_double = (gd_api . godot_method_bind_get_method) (class_name , "put_double\0" . as_ptr () as * const c_char) ; table . put_float = (gd_api . godot_method_bind_get_method) (class_name , "put_float\0" . as_ptr () as * const c_char) ; table . put_partial_data = (gd_api . godot_method_bind_get_method) (class_name , "put_partial_data\0" . as_ptr () as * const c_char) ; table . put_string = (gd_api . godot_method_bind_get_method) (class_name , "put_string\0" . as_ptr () as * const c_char) ; table . put_u16 = (gd_api . godot_method_bind_get_method) (class_name , "put_u16\0" . as_ptr () as * const c_char) ; table . put_u32 = (gd_api . godot_method_bind_get_method) (class_name , "put_u32\0" . as_ptr () as * const c_char) ; table . put_u64 = (gd_api . godot_method_bind_get_method) (class_name , "put_u64\0" . as_ptr () as * const c_char) ; table . put_u8 = (gd_api . godot_method_bind_get_method) (class_name , "put_u8\0" . as_ptr () as * const c_char) ; table . put_utf8_string = (gd_api . godot_method_bind_get_method) (class_name , "put_utf8_string\0" . as_ptr () as * const c_char) ; table . put_var = (gd_api . godot_method_bind_get_method) (class_name , "put_var\0" . as_ptr () as * const c_char) ; table . set_big_endian = (gd_api . godot_method_bind_get_method) (class_name , "set_big_endian\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:532:9464 [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 SpinBox` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_spinbox.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`SpinBox` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSpinBox inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpinBox { this : RawObject < Self > , } impl SpinBox { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpinBoxMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Applies the current value of this [SpinBox]."] # [doc = ""] # [inline] pub fn apply (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . apply ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the text alignment of the [SpinBox]."] # [doc = ""] # [inline] pub fn align (& self) -> crate :: generated :: line_edit :: Align { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . get_align ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_edit :: Align (ret) } } # [doc = "Returns the [LineEdit] instance from this [SpinBox]. You can use it to access properties and methods of [LineEdit]."] # [doc = ""] # [inline] pub fn get_line_edit (& self) -> Option < Ref < crate :: generated :: line_edit :: LineEdit , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . get_line_edit ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: line_edit :: LineEdit , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Adds the specified `prefix` string before the numerical value of the [SpinBox]."] # [doc = ""] # [inline] pub fn prefix (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . get_prefix ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Adds the specified `suffix` string after the numerical value of the [SpinBox]."] # [doc = ""] # [inline] pub fn suffix (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . get_suffix ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If `true`, the [SpinBox] will be editable. Otherwise, it will be read only."] # [doc = ""] # [inline] pub fn is_editable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . is_editable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the text alignment of the [SpinBox]."] # [doc = ""] # [inline] pub fn set_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . set_align ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "If `true`, the [SpinBox] will be editable. Otherwise, it will be read only."] # [doc = ""] # [inline] pub fn set_editable (& self , editable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . set_editable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , editable) ; } } # [doc = "Adds the specified `prefix` string before the numerical value of the [SpinBox]."] # [doc = ""] # [inline] pub fn set_prefix (& self , prefix : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . set_prefix ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , prefix . into ()) ; } } # [doc = "Adds the specified `suffix` string after the numerical value of the [SpinBox]."] # [doc = ""] # [inline] pub fn set_suffix (& self , suffix : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . set_suffix ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , suffix . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpinBox { } unsafe impl GodotObject for SpinBox { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SpinBox" } } impl QueueFree for SpinBox { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SpinBox { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpinBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for SpinBox { } unsafe impl SubClass < crate :: generated :: control :: Control > for SpinBox { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for SpinBox { } unsafe impl SubClass < crate :: generated :: node :: Node > for SpinBox { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpinBox { } impl Instanciable for SpinBox { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SpinBox :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpinBoxMethodTable { pub class_constructor : sys :: godot_class_constructor , pub apply : * mut sys :: godot_method_bind , pub get_align : * mut sys :: godot_method_bind , pub get_line_edit : * mut sys :: godot_method_bind , pub get_prefix : * mut sys :: godot_method_bind , pub get_suffix : * mut sys :: godot_method_bind , pub is_editable : * mut sys :: godot_method_bind , pub set_align : * mut sys :: godot_method_bind , pub set_editable : * mut sys :: godot_method_bind , pub set_prefix : * mut sys :: godot_method_bind , pub set_suffix : * mut sys :: godot_method_bind } impl SpinBoxMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpinBoxMethodTable = SpinBoxMethodTable { class_constructor : None , apply : 0 as * mut sys :: godot_method_bind , get_align : 0 as * mut sys :: godot_method_bind , get_line_edit : 0 as * mut sys :: godot_method_bind , get_prefix : 0 as * mut sys :: godot_method_bind , get_suffix : 0 as * mut sys :: godot_method_bind , is_editable : 0 as * mut sys :: godot_method_bind , set_align : 0 as * mut sys :: godot_method_bind , set_editable : 0 as * mut sys :: godot_method_bind , set_prefix : 0 as * mut sys :: godot_method_bind , set_suffix : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SpinBoxMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpinBox\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . apply = (gd_api . godot_method_bind_get_method) (class_name , "apply\0" . as_ptr () as * const c_char) ; table . get_align = (gd_api . godot_method_bind_get_method) (class_name , "get_align\0" . as_ptr () as * const c_char) ; table . get_line_edit = (gd_api . godot_method_bind_get_method) (class_name , "get_line_edit\0" . as_ptr () as * const c_char) ; table . get_prefix = (gd_api . godot_method_bind_get_method) (class_name , "get_prefix\0" . as_ptr () as * const c_char) ; table . get_suffix = (gd_api . godot_method_bind_get_method) (class_name , "get_suffix\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_prefix = (gd_api . godot_method_bind_get_method) (class_name , "set_prefix\0" . as_ptr () as * const c_char) ; table . set_suffix = (gd_api . godot_method_bind_get_method) (class_name , "set_suffix\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:538:3666 [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 singleton class JavaScript` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_javascript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nJavaScript inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JavaScript { this : RawObject < Self > , } impl JavaScript { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("JavaScript\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Execute the string `code` as JavaScript code within the browser window. This is a call to the actual global JavaScript function `eval()`.\nIf `use_global_execution_context` is `true`, the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment.\n# Default Arguments\n* `use_global_execution_context` - `false`"] # [doc = ""] # [inline] pub fn eval (& self , code : impl Into < GodotString > , use_global_execution_context : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaScriptMethodTable :: get (get_api ()) . eval ; let ret = crate :: icalls :: icallptr_var_str_bool (method_bind , self . this . sys () . as_ptr () , code . into () , use_global_execution_context) ; Variant :: from_sys (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for JavaScript { } unsafe impl GodotObject for JavaScript { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JavaScript" } } impl std :: ops :: Deref for JavaScript { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JavaScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for JavaScript { } unsafe impl Send for JavaScript { } unsafe impl Sync for JavaScript { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JavaScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub eval : * mut sys :: godot_method_bind } impl JavaScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JavaScriptMethodTable = JavaScriptMethodTable { class_constructor : None , eval : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { JavaScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "JavaScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . eval = (gd_api . godot_method_bind_get_method) (class_name , "eval\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:544:11051 [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 AudioEffectCompressor` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectcompressor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectCompressor inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectCompressor { this : RawObject < Self > , } impl AudioEffectCompressor { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectCompressorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000."] # [doc = ""] # [inline] pub fn attack_us (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_attack_us ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gain applied to the output signal."] # [doc = ""] # [inline] pub fn gain (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_gain ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet)."] # [doc = ""] # [inline] pub fn mix (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_mix ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48."] # [doc = ""] # [inline] pub fn ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000."] # [doc = ""] # [inline] pub fn release_ms (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_release_ms ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Reduce the sound level using another audio bus for threshold detection."] # [doc = ""] # [inline] pub fn sidechain (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_sidechain ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The level above which compression is applied to the audio. Value can range from -60 to 0."] # [doc = ""] # [inline] pub fn threshold (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_threshold ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000."] # [doc = ""] # [inline] pub fn set_attack_us (& self , attack_us : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_attack_us ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , attack_us) ; } } # [doc = "Gain applied to the output signal."] # [doc = ""] # [inline] pub fn set_gain (& self , gain : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_gain ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gain) ; } } # [doc = "Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet)."] # [doc = ""] # [inline] pub fn set_mix (& self , mix : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_mix ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mix) ; } } # [doc = "Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48."] # [doc = ""] # [inline] pub fn set_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_ratio ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = "Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000."] # [doc = ""] # [inline] pub fn set_release_ms (& self , release_ms : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_release_ms ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , release_ms) ; } } # [doc = "Reduce the sound level using another audio bus for threshold detection."] # [doc = ""] # [inline] pub fn set_sidechain (& self , sidechain : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_sidechain ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , sidechain . into ()) ; } } # [doc = "The level above which compression is applied to the audio. Value can range from -60 to 0."] # [doc = ""] # [inline] pub fn set_threshold (& self , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_threshold ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , threshold) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectCompressor { } unsafe impl GodotObject for AudioEffectCompressor { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectCompressor" } } impl std :: ops :: Deref for AudioEffectCompressor { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectCompressor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectCompressor { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectCompressor { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectCompressor { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectCompressor { } impl Instanciable for AudioEffectCompressor { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectCompressor :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectCompressorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_attack_us : * mut sys :: godot_method_bind , pub get_gain : * mut sys :: godot_method_bind , pub get_mix : * mut sys :: godot_method_bind , pub get_ratio : * mut sys :: godot_method_bind , pub get_release_ms : * mut sys :: godot_method_bind , pub get_sidechain : * mut sys :: godot_method_bind , pub get_threshold : * mut sys :: godot_method_bind , pub set_attack_us : * mut sys :: godot_method_bind , pub set_gain : * mut sys :: godot_method_bind , pub set_mix : * mut sys :: godot_method_bind , pub set_ratio : * mut sys :: godot_method_bind , pub set_release_ms : * mut sys :: godot_method_bind , pub set_sidechain : * mut sys :: godot_method_bind , pub set_threshold : * mut sys :: godot_method_bind } impl AudioEffectCompressorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectCompressorMethodTable = AudioEffectCompressorMethodTable { class_constructor : None , get_attack_us : 0 as * mut sys :: godot_method_bind , get_gain : 0 as * mut sys :: godot_method_bind , get_mix : 0 as * mut sys :: godot_method_bind , get_ratio : 0 as * mut sys :: godot_method_bind , get_release_ms : 0 as * mut sys :: godot_method_bind , get_sidechain : 0 as * mut sys :: godot_method_bind , get_threshold : 0 as * mut sys :: godot_method_bind , set_attack_us : 0 as * mut sys :: godot_method_bind , set_gain : 0 as * mut sys :: godot_method_bind , set_mix : 0 as * mut sys :: godot_method_bind , set_ratio : 0 as * mut sys :: godot_method_bind , set_release_ms : 0 as * mut sys :: godot_method_bind , set_sidechain : 0 as * mut sys :: godot_method_bind , set_threshold : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectCompressorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectCompressor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_attack_us = (gd_api . godot_method_bind_get_method) (class_name , "get_attack_us\0" . as_ptr () as * const c_char) ; table . get_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_gain\0" . as_ptr () as * const c_char) ; table . get_mix = (gd_api . godot_method_bind_get_method) (class_name , "get_mix\0" . as_ptr () as * const c_char) ; table . get_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_ratio\0" . as_ptr () as * const c_char) ; table . get_release_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_release_ms\0" . as_ptr () as * const c_char) ; table . get_sidechain = (gd_api . godot_method_bind_get_method) (class_name , "get_sidechain\0" . as_ptr () as * const c_char) ; table . get_threshold = (gd_api . godot_method_bind_get_method) (class_name , "get_threshold\0" . as_ptr () as * const c_char) ; table . set_attack_us = (gd_api . godot_method_bind_get_method) (class_name , "set_attack_us\0" . as_ptr () as * const c_char) ; table . set_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_gain\0" . as_ptr () as * const c_char) ; table . set_mix = (gd_api . godot_method_bind_get_method) (class_name , "set_mix\0" . as_ptr () as * const c_char) ; table . set_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_ratio\0" . as_ptr () as * const c_char) ; table . set_release_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_release_ms\0" . as_ptr () as * const c_char) ; table . set_sidechain = (gd_api . godot_method_bind_get_method) (class_name , "set_sidechain\0" . as_ptr () as * const c_char) ; table . set_threshold = (gd_api . godot_method_bind_get_method) (class_name , "set_threshold\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:550:32579 [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 singleton class Input` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_input.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nInput inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Input { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CursorShape (pub i64) ; impl CursorShape { pub const ARROW : CursorShape = CursorShape (0i64) ; pub const IBEAM : CursorShape = CursorShape (1i64) ; pub const POINTING_HAND : CursorShape = CursorShape (2i64) ; pub const CROSS : CursorShape = CursorShape (3i64) ; pub const WAIT : CursorShape = CursorShape (4i64) ; pub const BUSY : CursorShape = CursorShape (5i64) ; pub const DRAG : CursorShape = CursorShape (6i64) ; pub const CAN_DROP : CursorShape = CursorShape (7i64) ; pub const FORBIDDEN : CursorShape = CursorShape (8i64) ; pub const VSIZE : CursorShape = CursorShape (9i64) ; pub const HSIZE : CursorShape = CursorShape (10i64) ; pub const BDIAGSIZE : CursorShape = CursorShape (11i64) ; pub const FDIAGSIZE : CursorShape = CursorShape (12i64) ; pub const MOVE : CursorShape = CursorShape (13i64) ; pub const VSPLIT : CursorShape = CursorShape (14i64) ; pub const HSPLIT : CursorShape = CursorShape (15i64) ; pub const HELP : CursorShape = CursorShape (16i64) ; } impl From < i64 > for CursorShape { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CursorShape > for i64 { # [inline] fn from (v : CursorShape) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MouseMode (pub i64) ; impl MouseMode { pub const VISIBLE : MouseMode = MouseMode (0i64) ; pub const HIDDEN : MouseMode = MouseMode (1i64) ; pub const CAPTURED : MouseMode = MouseMode (2i64) ; pub const CONFINED : MouseMode = MouseMode (3i64) ; } impl From < i64 > for MouseMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MouseMode > for i64 { # [inline] fn from (v : MouseMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Input { pub const CURSOR_ARROW : i64 = 0i64 ; pub const CURSOR_BDIAGSIZE : i64 = 11i64 ; pub const CURSOR_BUSY : i64 = 5i64 ; pub const CURSOR_CAN_DROP : i64 = 7i64 ; pub const CURSOR_CROSS : i64 = 3i64 ; pub const CURSOR_DRAG : i64 = 6i64 ; pub const CURSOR_FDIAGSIZE : i64 = 12i64 ; pub const CURSOR_FORBIDDEN : i64 = 8i64 ; pub const CURSOR_HELP : i64 = 16i64 ; pub const CURSOR_HSIZE : i64 = 10i64 ; pub const CURSOR_HSPLIT : i64 = 15i64 ; pub const CURSOR_IBEAM : i64 = 1i64 ; pub const CURSOR_MOVE : i64 = 13i64 ; pub const CURSOR_POINTING_HAND : i64 = 2i64 ; pub const CURSOR_VSIZE : i64 = 9i64 ; pub const CURSOR_VSPLIT : i64 = 14i64 ; pub const CURSOR_WAIT : i64 = 4i64 ; pub const MOUSE_MODE_CAPTURED : i64 = 2i64 ; pub const MOUSE_MODE_CONFINED : i64 = 3i64 ; pub const MOUSE_MODE_HIDDEN : i64 = 1i64 ; pub const MOUSE_MODE_VISIBLE : i64 = 0i64 ; } impl Input { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Input\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "This will simulate pressing the specified action.\nThe strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action.\n**Note:** This method will not cause any [method Node._input] calls. It is intended to be used with [method is_action_pressed] and [method is_action_just_pressed]. If you want to simulate `_input`, use [method parse_input_event] instead.\n# Default Arguments\n* `strength` - `1.0`"] # [doc = ""] # [inline] pub fn action_press (& self , action : impl Into < GodotString > , strength : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . action_press ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , strength) ; } } # [doc = "If the specified action is already pressed, this will release it."] # [doc = ""] # [inline] pub fn action_release (& self , action : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . action_release ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.\n# Default Arguments\n* `update_existing` - `false`"] # [doc = ""] # [inline] pub fn add_joy_mapping (& self , mapping : impl Into < GodotString > , update_existing : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . add_joy_mapping ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , mapping . into () , update_existing) ; } } # [doc = "Returns the acceleration of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\nNote this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer.\n**Note:** This method only works on iOS, Android, and UWP. On other platforms, it always returns [constant Vector3.ZERO]."] # [doc = ""] # [inline] pub fn get_accelerometer (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_accelerometer ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1."] # [doc = ""] # [inline] pub fn get_action_strength (& self , action : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_action_strength ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns an [Array] containing the device IDs of all currently connected joypads."] # [doc = ""] # [inline] pub fn get_connected_joypads (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_connected_joypads ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the currently assigned cursor shape (see [enum CursorShape])."] # [doc = ""] # [inline] pub fn get_current_cursor_shape (& self) -> crate :: generated :: input :: CursorShape { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_current_cursor_shape ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: input :: CursorShape (ret) } } # [doc = "Returns the gravity of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\n**Note:** This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]."] # [doc = ""] # [inline] pub fn get_gravity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\n**Note:** This method only works on Android. On other platforms, it always returns [constant Vector3.ZERO]."] # [doc = ""] # [inline] pub fn get_gyroscope (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_gyroscope ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the current value of the joypad axis at given index (see [enum JoystickList])."] # [doc = ""] # [inline] pub fn get_joy_axis (& self , device : i64 , axis : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_axis ; let ret = crate :: icalls :: icallptr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , device , axis) ; ret as _ } } # [doc = "Returns the index of the provided axis name."] # [doc = ""] # [inline] pub fn get_joy_axis_index_from_string (& self , axis : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_axis_index_from_string ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , axis . into ()) ; ret as _ } } # [doc = "Receives a [enum JoystickList] axis and returns its equivalent name as a string."] # [doc = ""] # [inline] pub fn get_joy_axis_string (& self , axis_index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_axis_string ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , axis_index) ; GodotString :: from_sys (ret) } } # [doc = "Returns the index of the provided button name."] # [doc = ""] # [inline] pub fn get_joy_button_index_from_string (& self , button : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_button_index_from_string ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , button . into ()) ; ret as _ } } # [doc = "Receives a gamepad button from [enum JoystickList] and returns its equivalent name as a string."] # [doc = ""] # [inline] pub fn get_joy_button_string (& self , button_index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_button_string ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , button_index) ; GodotString :: from_sys (ret) } } # [doc = "Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns `\"Default Gamepad\"` otherwise."] # [doc = ""] # [inline] pub fn get_joy_guid (& self , device : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_guid ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , device) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the joypad at the specified device index."] # [doc = ""] # [inline] pub fn get_joy_name (& self , device : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , device) ; GodotString :: from_sys (ret) } } # [doc = "Returns the duration of the current vibration effect in seconds."] # [doc = ""] # [inline] pub fn get_joy_vibration_duration (& self , device : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_vibration_duration ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , device) ; ret as _ } } # [doc = "Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor."] # [doc = ""] # [inline] pub fn get_joy_vibration_strength (& self , device : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_vibration_strength ; let ret = crate :: icalls :: icallptr_vec2_i64 (method_bind , self . this . sys () . as_ptr () , device) ; mem :: transmute (ret) } } # [doc = "Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion."] # [doc = ""] # [inline] pub fn get_last_mouse_speed (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_last_mouse_speed ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the the magnetic field strength in micro-Tesla for all axes of the device's magnetometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].\n**Note:** This method only works on Android and UWP. On other platforms, it always returns [constant Vector3.ZERO]."] # [doc = ""] # [inline] pub fn get_magnetometer (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_magnetometer ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together."] # [doc = ""] # [inline] pub fn get_mouse_button_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_mouse_button_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the mouse mode. See the constants for more information."] # [doc = ""] # [inline] pub fn get_mouse_mode (& self) -> crate :: generated :: input :: MouseMode { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_mouse_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: input :: MouseMode (ret) } } # [doc = "Returns `true` when the user starts pressing the action event, meaning it's `true` only on the frame that the user pressed down the button.\nThis is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed."] # [doc = ""] # [inline] pub fn is_action_just_pressed (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_just_pressed ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns `true` when the user stops pressing the action event, meaning it's `true` only on the frame that the user released the button."] # [doc = ""] # [inline] pub fn is_action_just_released (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_just_released ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns `true` if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed."] # [doc = ""] # [inline] pub fn is_action_pressed (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_pressed ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; ret as _ } } # [doc = "Returns `true` if you are pressing the joypad button (see [enum JoystickList])."] # [doc = ""] # [inline] pub fn is_joy_button_pressed (& self , device : i64 , button : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_joy_button_pressed ; let ret = crate :: icalls :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , device , button) ; ret as _ } } # [doc = "Returns `true` if the system knows the specified device. This means that it sets all button and axis indices exactly as defined in [enum JoystickList]. Unknown joypads are not expected to match these constants, but you can still retrieve events from them."] # [doc = ""] # [inline] pub fn is_joy_known (& self , device : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_joy_known ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , device) ; ret as _ } } # [doc = "Returns `true` if you are pressing the key. You can pass a [enum KeyList] constant."] # [doc = ""] # [inline] pub fn is_key_pressed (& self , scancode : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_key_pressed ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , scancode) ; ret as _ } } # [doc = "Returns `true` if you are pressing the mouse button specified with [enum ButtonList]."] # [doc = ""] # [inline] pub fn is_mouse_button_pressed (& self , button : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_mouse_button_pressed ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , button) ; ret as _ } } # [doc = "Notifies the [Input] singleton that a connection has changed, to update the state for the `device` index.\nThis is used internally and should not have to be called from user scripts. See [signal joy_connection_changed] for the signal emitted when this is triggered internally."] # [doc = ""] # [inline] pub fn joy_connection_changed (& self , device : i64 , connected : bool , name : impl Into < GodotString > , guid : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . joy_connection_changed ; let ret = crate :: icalls :: icallptr_void_i64_bool_str_str (method_bind , self . this . sys () . as_ptr () , device , connected , name . into () , guid . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nFeeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls.\nExample:\n```gdscript\nvar a = InputEventAction.new()\na.action = \"ui_cancel\"\na.pressed = true\nInput.parse_input_event(a)\n```"] # [doc = ""] # [inline] pub fn parse_input_event (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . parse_input_event ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; } } # [doc = "Removes all mappings from the internal database that match the given GUID."] # [doc = ""] # [inline] pub fn remove_joy_mapping (& self , guid : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . remove_joy_mapping ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , guid . into ()) ; } } # [doc = "Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing `null` to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes.\n`image`'s size must be lower than 256×256.\n`hotspot` must be within `image`'s size.\n**Note:** [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed.\n**Note:** Only images imported with the **Lossless**, **Lossy** or **Uncompressed** compression modes are supported. The **Video RAM** compression mode can't be used for custom cursors.\n# Default Arguments\n* `shape` - `0`\n* `hotspot` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn set_custom_mouse_cursor (& self , image : impl AsArg < crate :: generated :: resource :: Resource > , shape : i64 , hotspot : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_custom_mouse_cursor ; let ret = crate :: icalls :: icallptr_void_obj_i64_vec2 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , shape , hotspot) ; } } # [doc = "Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW].\n**Note:** If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead.\n**Note:** This method generates an [InputEventMouseMotion] to update cursor immediately.\n# Default Arguments\n* `shape` - `0`"] # [doc = ""] # [inline] pub fn set_default_cursor_shape (& self , shape : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_default_cursor_shape ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "Sets the mouse mode. See the constants for more information."] # [doc = ""] # [inline] pub fn set_mouse_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_mouse_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.\nInput accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input."] # [doc = ""] # [inline] pub fn set_use_accumulated_input (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_use_accumulated_input ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. `weak_magnitude` is the strength of the weak motor (between 0 and 1) and `strong_magnitude` is the strength of the strong motor (between 0 and 1). `duration` is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).\n**Note:** Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds.\n# Default Arguments\n* `duration` - `0`"] # [doc = ""] # [inline] pub fn start_joy_vibration (& self , device : i64 , weak_magnitude : f64 , strong_magnitude : f64 , duration : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . start_joy_vibration ; let ret = crate :: icalls :: icallptr_void_i64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , device , weak_magnitude , strong_magnitude , duration) ; } } # [doc = "Stops the vibration of the joypad."] # [doc = ""] # [inline] pub fn stop_joy_vibration (& self , device : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . stop_joy_vibration ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , device) ; } } # [doc = "Vibrate Android and iOS devices.\n**Note:** It needs VIBRATE permission for Android at export settings. iOS does not support duration.\n# Default Arguments\n* `duration_ms` - `500`"] # [doc = ""] # [inline] pub fn vibrate_handheld (& self , duration_ms : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . vibrate_handheld ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , duration_ms) ; } } # [doc = "Sets the mouse position to the specified vector."] # [doc = ""] # [inline] pub fn warp_mouse_position (& self , to : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . warp_mouse_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , to) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Input { } unsafe impl GodotObject for Input { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Input" } } impl std :: ops :: Deref for Input { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Input { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for Input { } unsafe impl Send for Input { } unsafe impl Sync for Input { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputMethodTable { pub class_constructor : sys :: godot_class_constructor , pub action_press : * mut sys :: godot_method_bind , pub action_release : * mut sys :: godot_method_bind , pub add_joy_mapping : * mut sys :: godot_method_bind , pub get_accelerometer : * mut sys :: godot_method_bind , pub get_action_strength : * mut sys :: godot_method_bind , pub get_connected_joypads : * mut sys :: godot_method_bind , pub get_current_cursor_shape : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_gyroscope : * mut sys :: godot_method_bind , pub get_joy_axis : * mut sys :: godot_method_bind , pub get_joy_axis_index_from_string : * mut sys :: godot_method_bind , pub get_joy_axis_string : * mut sys :: godot_method_bind , pub get_joy_button_index_from_string : * mut sys :: godot_method_bind , pub get_joy_button_string : * mut sys :: godot_method_bind , pub get_joy_guid : * mut sys :: godot_method_bind , pub get_joy_name : * mut sys :: godot_method_bind , pub get_joy_vibration_duration : * mut sys :: godot_method_bind , pub get_joy_vibration_strength : * mut sys :: godot_method_bind , pub get_last_mouse_speed : * mut sys :: godot_method_bind , pub get_magnetometer : * mut sys :: godot_method_bind , pub get_mouse_button_mask : * mut sys :: godot_method_bind , pub get_mouse_mode : * mut sys :: godot_method_bind , pub is_action_just_pressed : * mut sys :: godot_method_bind , pub is_action_just_released : * mut sys :: godot_method_bind , pub is_action_pressed : * mut sys :: godot_method_bind , pub is_joy_button_pressed : * mut sys :: godot_method_bind , pub is_joy_known : * mut sys :: godot_method_bind , pub is_key_pressed : * mut sys :: godot_method_bind , pub is_mouse_button_pressed : * mut sys :: godot_method_bind , pub joy_connection_changed : * mut sys :: godot_method_bind , pub parse_input_event : * mut sys :: godot_method_bind , pub remove_joy_mapping : * mut sys :: godot_method_bind , pub set_custom_mouse_cursor : * mut sys :: godot_method_bind , pub set_default_cursor_shape : * mut sys :: godot_method_bind , pub set_mouse_mode : * mut sys :: godot_method_bind , pub set_use_accumulated_input : * mut sys :: godot_method_bind , pub start_joy_vibration : * mut sys :: godot_method_bind , pub stop_joy_vibration : * mut sys :: godot_method_bind , pub vibrate_handheld : * mut sys :: godot_method_bind , pub warp_mouse_position : * mut sys :: godot_method_bind } impl InputMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputMethodTable = InputMethodTable { class_constructor : None , action_press : 0 as * mut sys :: godot_method_bind , action_release : 0 as * mut sys :: godot_method_bind , add_joy_mapping : 0 as * mut sys :: godot_method_bind , get_accelerometer : 0 as * mut sys :: godot_method_bind , get_action_strength : 0 as * mut sys :: godot_method_bind , get_connected_joypads : 0 as * mut sys :: godot_method_bind , get_current_cursor_shape : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_gyroscope : 0 as * mut sys :: godot_method_bind , get_joy_axis : 0 as * mut sys :: godot_method_bind , get_joy_axis_index_from_string : 0 as * mut sys :: godot_method_bind , get_joy_axis_string : 0 as * mut sys :: godot_method_bind , get_joy_button_index_from_string : 0 as * mut sys :: godot_method_bind , get_joy_button_string : 0 as * mut sys :: godot_method_bind , get_joy_guid : 0 as * mut sys :: godot_method_bind , get_joy_name : 0 as * mut sys :: godot_method_bind , get_joy_vibration_duration : 0 as * mut sys :: godot_method_bind , get_joy_vibration_strength : 0 as * mut sys :: godot_method_bind , get_last_mouse_speed : 0 as * mut sys :: godot_method_bind , get_magnetometer : 0 as * mut sys :: godot_method_bind , get_mouse_button_mask : 0 as * mut sys :: godot_method_bind , get_mouse_mode : 0 as * mut sys :: godot_method_bind , is_action_just_pressed : 0 as * mut sys :: godot_method_bind , is_action_just_released : 0 as * mut sys :: godot_method_bind , is_action_pressed : 0 as * mut sys :: godot_method_bind , is_joy_button_pressed : 0 as * mut sys :: godot_method_bind , is_joy_known : 0 as * mut sys :: godot_method_bind , is_key_pressed : 0 as * mut sys :: godot_method_bind , is_mouse_button_pressed : 0 as * mut sys :: godot_method_bind , joy_connection_changed : 0 as * mut sys :: godot_method_bind , parse_input_event : 0 as * mut sys :: godot_method_bind , remove_joy_mapping : 0 as * mut sys :: godot_method_bind , set_custom_mouse_cursor : 0 as * mut sys :: godot_method_bind , set_default_cursor_shape : 0 as * mut sys :: godot_method_bind , set_mouse_mode : 0 as * mut sys :: godot_method_bind , set_use_accumulated_input : 0 as * mut sys :: godot_method_bind , start_joy_vibration : 0 as * mut sys :: godot_method_bind , stop_joy_vibration : 0 as * mut sys :: godot_method_bind , vibrate_handheld : 0 as * mut sys :: godot_method_bind , warp_mouse_position : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { InputMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Input\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . action_press = (gd_api . godot_method_bind_get_method) (class_name , "action_press\0" . as_ptr () as * const c_char) ; table . action_release = (gd_api . godot_method_bind_get_method) (class_name , "action_release\0" . as_ptr () as * const c_char) ; table . add_joy_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_joy_mapping\0" . as_ptr () as * const c_char) ; table . get_accelerometer = (gd_api . godot_method_bind_get_method) (class_name , "get_accelerometer\0" . as_ptr () as * const c_char) ; table . get_action_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_action_strength\0" . as_ptr () as * const c_char) ; table . get_connected_joypads = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_joypads\0" . as_ptr () as * const c_char) ; table . get_current_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_current_cursor_shape\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_gyroscope = (gd_api . godot_method_bind_get_method) (class_name , "get_gyroscope\0" . as_ptr () as * const c_char) ; table . get_joy_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis\0" . as_ptr () as * const c_char) ; table . get_joy_axis_index_from_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis_index_from_string\0" . as_ptr () as * const c_char) ; table . get_joy_axis_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis_string\0" . as_ptr () as * const c_char) ; table . get_joy_button_index_from_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_button_index_from_string\0" . as_ptr () as * const c_char) ; table . get_joy_button_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_button_string\0" . as_ptr () as * const c_char) ; table . get_joy_guid = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_guid\0" . as_ptr () as * const c_char) ; table . get_joy_name = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_name\0" . as_ptr () as * const c_char) ; table . get_joy_vibration_duration = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_vibration_duration\0" . as_ptr () as * const c_char) ; table . get_joy_vibration_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_vibration_strength\0" . as_ptr () as * const c_char) ; table . get_last_mouse_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_last_mouse_speed\0" . as_ptr () as * const c_char) ; table . get_magnetometer = (gd_api . godot_method_bind_get_method) (class_name , "get_magnetometer\0" . as_ptr () as * const c_char) ; table . get_mouse_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_button_mask\0" . as_ptr () as * const c_char) ; table . get_mouse_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_mode\0" . as_ptr () as * const c_char) ; table . is_action_just_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_action_just_pressed\0" . as_ptr () as * const c_char) ; table . is_action_just_released = (gd_api . godot_method_bind_get_method) (class_name , "is_action_just_released\0" . as_ptr () as * const c_char) ; table . is_action_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_action_pressed\0" . as_ptr () as * const c_char) ; table . is_joy_button_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_joy_button_pressed\0" . as_ptr () as * const c_char) ; table . is_joy_known = (gd_api . godot_method_bind_get_method) (class_name , "is_joy_known\0" . as_ptr () as * const c_char) ; table . is_key_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_key_pressed\0" . as_ptr () as * const c_char) ; table . is_mouse_button_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_mouse_button_pressed\0" . as_ptr () as * const c_char) ; table . joy_connection_changed = (gd_api . godot_method_bind_get_method) (class_name , "joy_connection_changed\0" . as_ptr () as * const c_char) ; table . parse_input_event = (gd_api . godot_method_bind_get_method) (class_name , "parse_input_event\0" . as_ptr () as * const c_char) ; table . remove_joy_mapping = (gd_api . godot_method_bind_get_method) (class_name , "remove_joy_mapping\0" . as_ptr () as * const c_char) ; table . set_custom_mouse_cursor = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_mouse_cursor\0" . as_ptr () as * const c_char) ; table . set_default_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_default_cursor_shape\0" . as_ptr () as * const c_char) ; table . set_mouse_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mouse_mode\0" . as_ptr () as * const c_char) ; table . set_use_accumulated_input = (gd_api . godot_method_bind_get_method) (class_name , "set_use_accumulated_input\0" . as_ptr () as * const c_char) ; table . start_joy_vibration = (gd_api . godot_method_bind_get_method) (class_name , "start_joy_vibration\0" . as_ptr () as * const c_char) ; table . stop_joy_vibration = (gd_api . godot_method_bind_get_method) (class_name , "stop_joy_vibration\0" . as_ptr () as * const c_char) ; table . vibrate_handheld = (gd_api . godot_method_bind_get_method) (class_name , "vibrate_handheld\0" . as_ptr () as * const c_char) ; table . warp_mouse_position = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse_position\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:556:7499 [INFO] [stdout] | [INFO] [stdout] 556 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 556 | # [doc = "`core class OmniLight` inherits `Light` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_omnilight.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`OmniLight` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nOmniLight inherits methods from:\n - [Light](struct.Light.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OmniLight { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowDetail (pub i64) ; impl ShadowDetail { pub const VERTICAL : ShadowDetail = ShadowDetail (0i64) ; pub const HORIZONTAL : ShadowDetail = ShadowDetail (1i64) ; } impl From < i64 > for ShadowDetail { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowDetail > for i64 { # [inline] fn from (v : ShadowDetail) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowMode (pub i64) ; impl ShadowMode { pub const DUAL_PARABOLOID : ShadowMode = ShadowMode (0i64) ; pub const CUBE : ShadowMode = ShadowMode (1i64) ; } impl From < i64 > for ShadowMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowMode > for i64 { # [inline] fn from (v : ShadowMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl OmniLight { pub const SHADOW_CUBE : i64 = 1i64 ; pub const SHADOW_DETAIL_HORIZONTAL : i64 = 1i64 ; pub const SHADOW_DETAIL_VERTICAL : i64 = 0i64 ; pub const SHADOW_DUAL_PARABOLOID : i64 = 0i64 ; } impl OmniLight { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = OmniLightMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "See [enum ShadowDetail]."] # [doc = ""] # [inline] pub fn shadow_detail (& self) -> crate :: generated :: omni_light :: ShadowDetail { unsafe { let method_bind : * mut sys :: godot_method_bind = OmniLightMethodTable :: get (get_api ()) . get_shadow_detail ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: omni_light :: ShadowDetail (ret) } } # [doc = "See [enum ShadowMode]."] # [doc = ""] # [inline] pub fn shadow_mode (& self) -> crate :: generated :: omni_light :: ShadowMode { unsafe { let method_bind : * mut sys :: godot_method_bind = OmniLightMethodTable :: get (get_api ()) . get_shadow_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: omni_light :: ShadowMode (ret) } } # [doc = "See [enum ShadowDetail]."] # [doc = ""] # [inline] pub fn set_shadow_detail (& self , detail : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OmniLightMethodTable :: get (get_api ()) . set_shadow_detail ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , detail) ; } } # [doc = "See [enum ShadowMode]."] # [doc = ""] # [inline] pub fn set_shadow_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OmniLightMethodTable :: get (get_api ()) . set_shadow_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OmniLight { } unsafe impl GodotObject for OmniLight { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "OmniLight" } } impl QueueFree for OmniLight { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for OmniLight { type Target = crate :: generated :: light :: Light ; # [inline] fn deref (& self) -> & crate :: generated :: light :: Light { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OmniLight { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: light :: Light { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: light :: Light > for OmniLight { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for OmniLight { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for OmniLight { } unsafe impl SubClass < crate :: generated :: node :: Node > for OmniLight { } unsafe impl SubClass < crate :: generated :: object :: Object > for OmniLight { } impl Instanciable for OmniLight { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { OmniLight :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OmniLightMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_shadow_detail : * mut sys :: godot_method_bind , pub get_shadow_mode : * mut sys :: godot_method_bind , pub set_shadow_detail : * mut sys :: godot_method_bind , pub set_shadow_mode : * mut sys :: godot_method_bind } impl OmniLightMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OmniLightMethodTable = OmniLightMethodTable { class_constructor : None , get_shadow_detail : 0 as * mut sys :: godot_method_bind , get_shadow_mode : 0 as * mut sys :: godot_method_bind , set_shadow_detail : 0 as * mut sys :: godot_method_bind , set_shadow_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { OmniLightMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "OmniLight\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_shadow_detail = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_detail\0" . as_ptr () as * const c_char) ; table . get_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_mode\0" . as_ptr () as * const c_char) ; table . set_shadow_detail = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_detail\0" . as_ptr () as * const c_char) ; table . set_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:562:3904 [INFO] [stdout] | [INFO] [stdout] 562 | ...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] 562 | # [doc = "`core class VisualScriptComposeArray` inherits `VisualScriptLists` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptcomposearray.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptComposeArray inherits methods from:\n - [VisualScriptLists](struct.VisualScriptLists.html)\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptComposeArray { this : RawObject < Self > , } impl VisualScriptComposeArray { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptComposeArrayMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptComposeArray { } unsafe impl GodotObject for VisualScriptComposeArray { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptComposeArray" } } impl std :: ops :: Deref for VisualScriptComposeArray { type Target = crate :: generated :: visual_script_lists :: VisualScriptLists ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_lists :: VisualScriptLists { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptComposeArray { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_lists :: VisualScriptLists { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_lists :: VisualScriptLists > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptComposeArray { } impl Instanciable for VisualScriptComposeArray { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptComposeArray :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptComposeArrayMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptComposeArrayMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptComposeArrayMethodTable = VisualScriptComposeArrayMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptComposeArrayMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptComposeArray\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:568:4051 [INFO] [stdout] | [INFO] [stdout] 568 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 568 | # [doc = "`core class VisualShaderNodeScalarSwitch` inherits `VisualShaderNodeSwitch` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodescalarswitch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarSwitch inherits methods from:\n - [VisualShaderNodeSwitch](struct.VisualShaderNodeSwitch.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarSwitch { this : RawObject < Self > , } impl VisualShaderNodeScalarSwitch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarSwitchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarSwitch { } unsafe impl GodotObject for VisualShaderNodeScalarSwitch { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarSwitch" } } impl std :: ops :: Deref for VisualShaderNodeScalarSwitch { type Target = crate :: generated :: visual_shader_node_switch :: VisualShaderNodeSwitch ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_switch :: VisualShaderNodeSwitch { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarSwitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_switch :: VisualShaderNodeSwitch { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_switch :: VisualShaderNodeSwitch > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarSwitch { } impl Instanciable for VisualShaderNodeScalarSwitch { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeScalarSwitch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarSwitchMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarSwitchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarSwitchMethodTable = VisualShaderNodeScalarSwitchMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarSwitchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarSwitch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:574:6114 [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 AudioStreamOGGVorbis` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreamoggvorbis.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamOGGVorbis inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamOGGVorbis { this : RawObject < Self > , } impl AudioStreamOGGVorbis { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamOGGVorbisMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn data (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn loop_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . get_loop_offset ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_data (& self , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop_offset (& self , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . set_loop_offset ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , seconds) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamOGGVorbis { } unsafe impl GodotObject for AudioStreamOGGVorbis { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamOGGVorbis" } } impl std :: ops :: Deref for AudioStreamOGGVorbis { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamOGGVorbis { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamOGGVorbis { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamOGGVorbis { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamOGGVorbis { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamOGGVorbis { } impl Instanciable for AudioStreamOGGVorbis { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioStreamOGGVorbis :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamOGGVorbisMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_data : * mut sys :: godot_method_bind , pub get_loop_offset : * mut sys :: godot_method_bind , pub has_loop : * mut sys :: godot_method_bind , pub set_data : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind , pub set_loop_offset : * mut sys :: godot_method_bind } impl AudioStreamOGGVorbisMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamOGGVorbisMethodTable = AudioStreamOGGVorbisMethodTable { class_constructor : None , get_data : 0 as * mut sys :: godot_method_bind , get_loop_offset : 0 as * mut sys :: godot_method_bind , has_loop : 0 as * mut sys :: godot_method_bind , set_data : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind , set_loop_offset : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioStreamOGGVorbisMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamOGGVorbis\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_offset\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_offset\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:580:27207 [INFO] [stdout] | [INFO] [stdout] 580 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 580 | # [doc = "`core class Area2D` inherits `CollisionObject2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_area2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Area2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nArea2D inherits methods from:\n - [CollisionObject2D](struct.CollisionObject2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Area2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpaceOverride (pub i64) ; impl SpaceOverride { pub const DISABLED : SpaceOverride = SpaceOverride (0i64) ; pub const COMBINE : SpaceOverride = SpaceOverride (1i64) ; pub const COMBINE_REPLACE : SpaceOverride = SpaceOverride (2i64) ; pub const REPLACE : SpaceOverride = SpaceOverride (3i64) ; pub const REPLACE_COMBINE : SpaceOverride = SpaceOverride (4i64) ; } impl From < i64 > for SpaceOverride { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpaceOverride > for i64 { # [inline] fn from (v : SpaceOverride) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Area2D { pub const SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; } impl Area2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Area2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from `0` (no damping) to `1` (full damping)."] # [doc = ""] # [inline] pub fn angular_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_angular_damp ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The name of the area's audio bus."] # [doc = ""] # [inline] pub fn audio_bus_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_audio_bus_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns an individual bit on the collision mask. Describes whether this area will collide with others on the given layer."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction."] # [doc = ""] # [inline] pub fn gravity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance."] # [doc = ""] # [inline] pub fn gravity_distance_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_gravity_distance_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction."] # [doc = ""] # [inline] pub fn gravity_vector (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_gravity_vector ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from `0` (no damping) to `1` (full damping)."] # [doc = ""] # [inline] pub fn linear_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_linear_damp ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of intersecting [Area2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_overlapping_areas (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_overlapping_areas ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a list of intersecting [PhysicsBody2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_overlapping_bodies (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_overlapping_bodies ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The area's priority. Higher priority areas are processed first."] # [doc = ""] # [inline] pub fn priority (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_priority ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values."] # [doc = ""] # [inline] pub fn space_override_mode (& self) -> crate :: generated :: area_2d :: SpaceOverride { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_space_override_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: area_2d :: SpaceOverride (ret) } } # [doc = "If `true`, gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]."] # [doc = ""] # [inline] pub fn is_gravity_a_point (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . is_gravity_a_point ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, other monitoring areas can detect this area."] # [doc = ""] # [inline] pub fn is_monitorable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . is_monitorable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the area detects bodies or areas entering and exiting it."] # [doc = ""] # [inline] pub fn is_monitoring (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . is_monitoring ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the area's audio bus overrides the default audio bus."] # [doc = ""] # [inline] pub fn is_overriding_audio_bus (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . is_overriding_audio_bus ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the given area overlaps the Area2D.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead."] # [doc = ""] # [inline] pub fn overlaps_area (& self , area : impl AsArg < crate :: generated :: node :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . overlaps_area ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , area . as_arg_ptr ()) ; ret as _ } } # [doc = "If `true`, the given physics body overlaps the Area2D.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.\nThe `body` argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body)."] # [doc = ""] # [inline] pub fn overlaps_body (& self , body : impl AsArg < crate :: generated :: node :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . overlaps_body ; let ret = crate :: icalls :: icallptr_bool_obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; ret as _ } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from `0` (no damping) to `1` (full damping)."] # [doc = ""] # [inline] pub fn set_angular_damp (& self , angular_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_angular_damp ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angular_damp) ; } } # [doc = "The name of the area's audio bus."] # [doc = ""] # [inline] pub fn set_audio_bus_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_audio_bus_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "If `true`, the area's audio bus overrides the default audio bus."] # [doc = ""] # [inline] pub fn set_audio_bus_override (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_audio_bus_override ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , collision_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_layer) ; } } # [doc = "Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , collision_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , collision_mask) ; } } # [doc = "Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction."] # [doc = ""] # [inline] pub fn set_gravity (& self , gravity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_gravity ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gravity) ; } } # [doc = "The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance."] # [doc = ""] # [inline] pub fn set_gravity_distance_scale (& self , distance_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_gravity_distance_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , distance_scale) ; } } # [doc = "If `true`, gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]."] # [doc = ""] # [inline] pub fn set_gravity_is_point (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_gravity_is_point ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction."] # [doc = ""] # [inline] pub fn set_gravity_vector (& self , vector : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_gravity_vector ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , vector) ; } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from `0` (no damping) to `1` (full damping)."] # [doc = ""] # [inline] pub fn set_linear_damp (& self , linear_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_linear_damp ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , linear_damp) ; } } # [doc = "If `true`, other monitoring areas can detect this area."] # [doc = ""] # [inline] pub fn set_monitorable (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_monitorable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the area detects bodies or areas entering and exiting it."] # [doc = ""] # [inline] pub fn set_monitoring (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_monitoring ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The area's priority. Higher priority areas are processed first."] # [doc = ""] # [inline] pub fn set_priority (& self , priority : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_priority ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , priority) ; } } # [doc = "Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values."] # [doc = ""] # [inline] pub fn set_space_override_mode (& self , space_override_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_space_override_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , space_override_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Area2D { } unsafe impl GodotObject for Area2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Area2D" } } impl QueueFree for Area2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Area2D { type Target = crate :: generated :: collision_object_2d :: CollisionObject2D ; # [inline] fn deref (& self) -> & crate :: generated :: collision_object_2d :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Area2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: collision_object_2d :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: collision_object_2d :: CollisionObject2D > for Area2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Area2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Area2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Area2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Area2D { } impl Instanciable for Area2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Area2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Area2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_angular_damp : * mut sys :: godot_method_bind , pub get_audio_bus_name : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_gravity_distance_scale : * mut sys :: godot_method_bind , pub get_gravity_vector : * mut sys :: godot_method_bind , pub get_linear_damp : * mut sys :: godot_method_bind , pub get_overlapping_areas : * mut sys :: godot_method_bind , pub get_overlapping_bodies : * mut sys :: godot_method_bind , pub get_priority : * mut sys :: godot_method_bind , pub get_space_override_mode : * mut sys :: godot_method_bind , pub is_gravity_a_point : * mut sys :: godot_method_bind , pub is_monitorable : * mut sys :: godot_method_bind , pub is_monitoring : * mut sys :: godot_method_bind , pub is_overriding_audio_bus : * mut sys :: godot_method_bind , pub overlaps_area : * mut sys :: godot_method_bind , pub overlaps_body : * mut sys :: godot_method_bind , pub set_angular_damp : * mut sys :: godot_method_bind , pub set_audio_bus_name : * mut sys :: godot_method_bind , pub set_audio_bus_override : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_gravity : * mut sys :: godot_method_bind , pub set_gravity_distance_scale : * mut sys :: godot_method_bind , pub set_gravity_is_point : * mut sys :: godot_method_bind , pub set_gravity_vector : * mut sys :: godot_method_bind , pub set_linear_damp : * mut sys :: godot_method_bind , pub set_monitorable : * mut sys :: godot_method_bind , pub set_monitoring : * mut sys :: godot_method_bind , pub set_priority : * mut sys :: godot_method_bind , pub set_space_override_mode : * mut sys :: godot_method_bind } impl Area2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Area2DMethodTable = Area2DMethodTable { class_constructor : None , get_angular_damp : 0 as * mut sys :: godot_method_bind , get_audio_bus_name : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_gravity_distance_scale : 0 as * mut sys :: godot_method_bind , get_gravity_vector : 0 as * mut sys :: godot_method_bind , get_linear_damp : 0 as * mut sys :: godot_method_bind , get_overlapping_areas : 0 as * mut sys :: godot_method_bind , get_overlapping_bodies : 0 as * mut sys :: godot_method_bind , get_priority : 0 as * mut sys :: godot_method_bind , get_space_override_mode : 0 as * mut sys :: godot_method_bind , is_gravity_a_point : 0 as * mut sys :: godot_method_bind , is_monitorable : 0 as * mut sys :: godot_method_bind , is_monitoring : 0 as * mut sys :: godot_method_bind , is_overriding_audio_bus : 0 as * mut sys :: godot_method_bind , overlaps_area : 0 as * mut sys :: godot_method_bind , overlaps_body : 0 as * mut sys :: godot_method_bind , set_angular_damp : 0 as * mut sys :: godot_method_bind , set_audio_bus_name : 0 as * mut sys :: godot_method_bind , set_audio_bus_override : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_gravity : 0 as * mut sys :: godot_method_bind , set_gravity_distance_scale : 0 as * mut sys :: godot_method_bind , set_gravity_is_point : 0 as * mut sys :: godot_method_bind , set_gravity_vector : 0 as * mut sys :: godot_method_bind , set_linear_damp : 0 as * mut sys :: godot_method_bind , set_monitorable : 0 as * mut sys :: godot_method_bind , set_monitoring : 0 as * mut sys :: godot_method_bind , set_priority : 0 as * mut sys :: godot_method_bind , set_space_override_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Area2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Area2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_audio_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_bus_name\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_gravity_distance_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_distance_scale\0" . as_ptr () as * const c_char) ; table . get_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_vector\0" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\0" . as_ptr () as * const c_char) ; table . get_overlapping_areas = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_areas\0" . as_ptr () as * const c_char) ; table . get_overlapping_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_bodies\0" . as_ptr () as * const c_char) ; table . get_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_priority\0" . as_ptr () as * const c_char) ; table . get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_space_override_mode\0" . as_ptr () as * const c_char) ; table . is_gravity_a_point = (gd_api . godot_method_bind_get_method) (class_name , "is_gravity_a_point\0" . as_ptr () as * const c_char) ; table . is_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "is_monitorable\0" . as_ptr () as * const c_char) ; table . is_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "is_monitoring\0" . as_ptr () as * const c_char) ; table . is_overriding_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_audio_bus\0" . as_ptr () as * const c_char) ; table . overlaps_area = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_area\0" . as_ptr () as * const c_char) ; table . overlaps_body = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_body\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_audio_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus_name\0" . as_ptr () as * const c_char) ; table . set_audio_bus_override = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus_override\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_gravity_distance_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_distance_scale\0" . as_ptr () as * const c_char) ; table . set_gravity_is_point = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_is_point\0" . as_ptr () as * const c_char) ; table . set_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_vector\0" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\0" . as_ptr () as * const c_char) ; table . set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "set_monitorable\0" . as_ptr () as * const c_char) ; table . set_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "set_monitoring\0" . as_ptr () as * const c_char) ; table . set_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_priority\0" . as_ptr () as * const c_char) ; table . set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_space_override_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:586:5473 [INFO] [stdout] | [INFO] [stdout] 586 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 586 | # [doc = "`core class ColorRect` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_colorrect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ColorRect` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nColorRect inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ColorRect { this : RawObject < Self > , } impl ColorRect { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ColorRectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe fill color.\n```gdscript\n$ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red.\n```"] # [doc = ""] # [inline] pub fn frame_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorRectMethodTable :: get (get_api ()) . get_frame_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe fill color.\n```gdscript\n$ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red.\n```"] # [doc = ""] # [inline] pub fn set_frame_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorRectMethodTable :: get (get_api ()) . set_frame_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ColorRect { } unsafe impl GodotObject for ColorRect { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ColorRect" } } impl QueueFree for ColorRect { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ColorRect { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ColorRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for ColorRect { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ColorRect { } unsafe impl SubClass < crate :: generated :: node :: Node > for ColorRect { } unsafe impl SubClass < crate :: generated :: object :: Object > for ColorRect { } impl Instanciable for ColorRect { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ColorRect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ColorRectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_frame_color : * mut sys :: godot_method_bind , pub set_frame_color : * mut sys :: godot_method_bind } impl ColorRectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ColorRectMethodTable = ColorRectMethodTable { class_constructor : None , get_frame_color : 0 as * mut sys :: godot_method_bind , set_frame_color : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ColorRectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ColorRect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_frame_color = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_color\0" . as_ptr () as * const c_char) ; table . set_frame_color = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_color\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:592:7729 [INFO] [stdout] | [INFO] [stdout] 592 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 592 | # [doc = "`core class SplitContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_splitcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nSplitContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SplitContainer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DraggerVisibility (pub i64) ; impl DraggerVisibility { pub const VISIBLE : DraggerVisibility = DraggerVisibility (0i64) ; pub const HIDDEN : DraggerVisibility = DraggerVisibility (1i64) ; pub const HIDDEN_COLLAPSED : DraggerVisibility = DraggerVisibility (2i64) ; } impl From < i64 > for DraggerVisibility { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DraggerVisibility > for i64 { # [inline] fn from (v : DraggerVisibility) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SplitContainer { pub const DRAGGER_HIDDEN : i64 = 1i64 ; pub const DRAGGER_HIDDEN_COLLAPSED : i64 = 2i64 ; pub const DRAGGER_VISIBLE : i64 = 0i64 ; } impl SplitContainer { # [doc = "Clamps the [member split_offset] value to not go outside the currently possible minimal and maximum values."] # [doc = ""] # [inline] pub fn clamp_split_offset (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . clamp_split_offset ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Determines the dragger's visibility. See [enum DraggerVisibility] for details."] # [doc = ""] # [inline] pub fn dragger_visibility (& self) -> crate :: generated :: split_container :: DraggerVisibility { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . get_dragger_visibility ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: split_container :: DraggerVisibility (ret) } } # [doc = "The initial offset of the splitting between the two [Control]s, with `0` being at the end of the first [Control]."] # [doc = ""] # [inline] pub fn split_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . get_split_offset ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the area of the first [Control] will be collapsed and the dragger will be disabled."] # [doc = ""] # [inline] pub fn is_collapsed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . is_collapsed ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the area of the first [Control] will be collapsed and the dragger will be disabled."] # [doc = ""] # [inline] pub fn set_collapsed (& self , collapsed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . set_collapsed ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , collapsed) ; } } # [doc = "Determines the dragger's visibility. See [enum DraggerVisibility] for details."] # [doc = ""] # [inline] pub fn set_dragger_visibility (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . set_dragger_visibility ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The initial offset of the splitting between the two [Control]s, with `0` being at the end of the first [Control]."] # [doc = ""] # [inline] pub fn set_split_offset (& self , offset : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . set_split_offset ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , offset) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SplitContainer { } unsafe impl GodotObject for SplitContainer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SplitContainer" } } impl QueueFree for SplitContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SplitContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SplitContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for SplitContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for SplitContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for SplitContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for SplitContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for SplitContainer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SplitContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clamp_split_offset : * mut sys :: godot_method_bind , pub get_dragger_visibility : * mut sys :: godot_method_bind , pub get_split_offset : * mut sys :: godot_method_bind , pub is_collapsed : * mut sys :: godot_method_bind , pub set_collapsed : * mut sys :: godot_method_bind , pub set_dragger_visibility : * mut sys :: godot_method_bind , pub set_split_offset : * mut sys :: godot_method_bind } impl SplitContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SplitContainerMethodTable = SplitContainerMethodTable { class_constructor : None , clamp_split_offset : 0 as * mut sys :: godot_method_bind , get_dragger_visibility : 0 as * mut sys :: godot_method_bind , get_split_offset : 0 as * mut sys :: godot_method_bind , is_collapsed : 0 as * mut sys :: godot_method_bind , set_collapsed : 0 as * mut sys :: godot_method_bind , set_dragger_visibility : 0 as * mut sys :: godot_method_bind , set_split_offset : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SplitContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SplitContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clamp_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "clamp_split_offset\0" . as_ptr () as * const c_char) ; table . get_dragger_visibility = (gd_api . godot_method_bind_get_method) (class_name , "get_dragger_visibility\0" . as_ptr () as * const c_char) ; table . get_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_split_offset\0" . as_ptr () as * const c_char) ; table . is_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "is_collapsed\0" . as_ptr () as * const c_char) ; table . set_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "set_collapsed\0" . as_ptr () as * const c_char) ; table . set_dragger_visibility = (gd_api . godot_method_bind_get_method) (class_name , "set_dragger_visibility\0" . as_ptr () as * const c_char) ; table . set_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_split_offset\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:598:10367 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:604:5847 [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 VisualShaderNodeScalarOp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodescalarop.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarOp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarOp { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operator (pub i64) ; impl Operator { pub const ADD : Operator = Operator (0i64) ; pub const SUB : Operator = Operator (1i64) ; pub const MUL : Operator = Operator (2i64) ; pub const DIV : Operator = Operator (3i64) ; pub const MOD : Operator = Operator (4i64) ; pub const POW : Operator = Operator (5i64) ; pub const MAX : Operator = Operator (6i64) ; pub const MIN : Operator = Operator (7i64) ; pub const ATAN2 : Operator = Operator (8i64) ; pub const STEP : Operator = Operator (9i64) ; } impl From < i64 > for Operator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operator > for i64 { # [inline] fn from (v : Operator) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeScalarOp { pub const OP_ADD : i64 = 0i64 ; pub const OP_ATAN2 : i64 = 8i64 ; pub const OP_DIV : i64 = 3i64 ; pub const OP_MAX : i64 = 6i64 ; pub const OP_MIN : i64 = 7i64 ; pub const OP_MOD : i64 = 4i64 ; pub const OP_MUL : i64 = 2i64 ; pub const OP_POW : i64 = 5i64 ; pub const OP_STEP : i64 = 9i64 ; pub const OP_SUB : i64 = 1i64 ; } impl VisualShaderNodeScalarOp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarOpMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn operator (& self) -> crate :: generated :: visual_shader_node_scalar_op :: Operator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarOpMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_scalar_op :: Operator (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarOpMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , op) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarOp { } unsafe impl GodotObject for VisualShaderNodeScalarOp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarOp" } } impl std :: ops :: Deref for VisualShaderNodeScalarOp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarOp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarOp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarOp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarOp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarOp { } impl Instanciable for VisualShaderNodeScalarOp { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeScalarOp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarOpMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind } impl VisualShaderNodeScalarOpMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarOpMethodTable = VisualShaderNodeScalarOpMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarOpMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarOp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:610:18273 [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 ArrayMesh` inherits `Mesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_arraymesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nArrayMesh inherits methods from:\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ArrayMesh { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayFormat (pub i64) ; impl ArrayFormat { pub const VERTEX : ArrayFormat = ArrayFormat (1i64) ; pub const NORMAL : ArrayFormat = ArrayFormat (2i64) ; pub const TANGENT : ArrayFormat = ArrayFormat (4i64) ; pub const COLOR : ArrayFormat = ArrayFormat (8i64) ; pub const TEX_UV : ArrayFormat = ArrayFormat (16i64) ; pub const TEX_UV2 : ArrayFormat = ArrayFormat (32i64) ; pub const BONES : ArrayFormat = ArrayFormat (64i64) ; pub const WEIGHTS : ArrayFormat = ArrayFormat (128i64) ; pub const INDEX : ArrayFormat = ArrayFormat (256i64) ; } impl From < i64 > for ArrayFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayFormat > for i64 { # [inline] fn from (v : ArrayFormat) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayType (pub i64) ; impl ArrayType { pub const VERTEX : ArrayType = ArrayType (0i64) ; pub const NORMAL : ArrayType = ArrayType (1i64) ; pub const TANGENT : ArrayType = ArrayType (2i64) ; pub const COLOR : ArrayType = ArrayType (3i64) ; pub const TEX_UV : ArrayType = ArrayType (4i64) ; pub const TEX_UV2 : ArrayType = ArrayType (5i64) ; pub const BONES : ArrayType = ArrayType (6i64) ; pub const WEIGHTS : ArrayType = ArrayType (7i64) ; pub const INDEX : ArrayType = ArrayType (8i64) ; pub const MAX : ArrayType = ArrayType (9i64) ; } impl From < i64 > for ArrayType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayType > for i64 { # [inline] fn from (v : ArrayType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ArrayMesh { pub const ARRAY_BONES : i64 = 6i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const ARRAY_VERTEX : i64 = 0i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const ARRAY_WEIGHTS_SIZE : i64 = 4i64 ; pub const NO_INDEX_ARRAY : i64 = - 1i64 ; } impl ArrayMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ArrayMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added."] # [doc = ""] # [inline] pub fn add_blend_shape (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . add_blend_shape ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Creates a new surface.\nSurfaces are created to be rendered using a `primitive`, which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the `surf_idx` for this new surface.\nThe `arrays` argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, `arrays[0]` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into \"index mode\" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used.\nAdding an index array puts this function into \"index mode\" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.\n# Default Arguments\n* `blend_shapes` - `[ ]`\n* `compress_flags` - `97280`"] # [doc = ""] # [inline] pub fn add_surface_from_arrays (& self , primitive : i64 , arrays : VariantArray , blend_shapes : VariantArray , compress_flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . add_surface_from_arrays ; let ret = crate :: icalls :: icallptr_void_i64_arr_arr_i64 (method_bind , self . this . sys () . as_ptr () , primitive , arrays , blend_shapes , compress_flags) ; } } # [doc = "Removes all blend shapes from this [ArrayMesh]."] # [doc = ""] # [inline] pub fn clear_blend_shapes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . clear_blend_shapes ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the number of blend shapes that the [ArrayMesh] holds."] # [doc = ""] # [inline] pub fn get_blend_shape_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_blend_shape_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]."] # [doc = ""] # [inline] pub fn blend_shape_mode (& self) -> crate :: generated :: mesh :: BlendShapeMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_blend_shape_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: mesh :: BlendShapeMode (ret) } } # [doc = "Returns the name of the blend shape at this index."] # [doc = ""] # [inline] pub fn get_blend_shape_name (& self , index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_blend_shape_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , index) ; GodotString :: from_sys (ret) } } # [doc = "Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn custom_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_custom_aabb ; let ret = crate :: icalls :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping."] # [doc = ""] # [inline] pub fn lightmap_unwrap (& self , transform : Transform , texel_size : f64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . lightmap_unwrap ; let ret = crate :: icalls :: icallptr_i64_trans_f64 (method_bind , self . this . sys () . as_ptr () , transform , texel_size) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Will regenerate normal maps for the [ArrayMesh]."] # [doc = ""] # [inline] pub fn regen_normalmaps (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . regen_normalmaps ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]."] # [doc = ""] # [inline] pub fn set_blend_shape_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . set_blend_shape_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn set_custom_aabb (& self , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . set_custom_aabb ; let ret = crate :: icalls :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned."] # [doc = ""] # [inline] pub fn surface_find_by_name (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_find_by_name ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_array_index_len (& self , surf_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_array_index_len ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ret as _ } } # [doc = "Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_array_len (& self , surf_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_array_len ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ret as _ } } # [doc = "Returns the format mask of the requested surface (see [method add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_format (& self , surf_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_format ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; ret as _ } } # [doc = "Gets the name assigned to this surface."] # [doc = ""] # [inline] pub fn surface_get_name (& self , surf_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the primitive type of the requested surface (see [method add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_primitive_type (& self , surf_idx : i64) -> crate :: generated :: mesh :: PrimitiveType { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_primitive_type ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; crate :: generated :: mesh :: PrimitiveType (ret) } } # [doc = "Removes a surface at position `surf_idx`, shifting greater surfaces one `surf_idx` slot down."] # [doc = ""] # [inline] pub fn surface_remove (& self , surf_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_remove ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , surf_idx) ; } } # [doc = "Sets a name for a given surface."] # [doc = ""] # [inline] pub fn surface_set_name (& self , surf_idx : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_set_name ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , surf_idx , name . into ()) ; } } # [doc = "Updates a specified region of mesh arrays on the GPU.\n**Warning:** Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments."] # [doc = ""] # [inline] pub fn surface_update_region (& self , surf_idx : i64 , offset : i64 , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_update_region ; let ret = crate :: icalls :: icallptr_void_i64_i64_bytearr (method_bind , self . this . sys () . as_ptr () , surf_idx , offset , data) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ArrayMesh { } unsafe impl GodotObject for ArrayMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ArrayMesh" } } impl std :: ops :: Deref for ArrayMesh { type Target = crate :: generated :: mesh :: Mesh ; # [inline] fn deref (& self) -> & crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ArrayMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: mesh :: Mesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for ArrayMesh { } impl Instanciable for ArrayMesh { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ArrayMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ArrayMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_blend_shape : * mut sys :: godot_method_bind , pub add_surface_from_arrays : * mut sys :: godot_method_bind , pub clear_blend_shapes : * mut sys :: godot_method_bind , pub get_blend_shape_count : * mut sys :: godot_method_bind , pub get_blend_shape_mode : * mut sys :: godot_method_bind , pub get_blend_shape_name : * mut sys :: godot_method_bind , pub get_custom_aabb : * mut sys :: godot_method_bind , pub lightmap_unwrap : * mut sys :: godot_method_bind , pub regen_normalmaps : * mut sys :: godot_method_bind , pub set_blend_shape_mode : * mut sys :: godot_method_bind , pub set_custom_aabb : * mut sys :: godot_method_bind , pub surface_find_by_name : * mut sys :: godot_method_bind , pub surface_get_array_index_len : * mut sys :: godot_method_bind , pub surface_get_array_len : * mut sys :: godot_method_bind , pub surface_get_format : * mut sys :: godot_method_bind , pub surface_get_name : * mut sys :: godot_method_bind , pub surface_get_primitive_type : * mut sys :: godot_method_bind , pub surface_remove : * mut sys :: godot_method_bind , pub surface_set_name : * mut sys :: godot_method_bind , pub surface_update_region : * mut sys :: godot_method_bind } impl ArrayMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ArrayMeshMethodTable = ArrayMeshMethodTable { class_constructor : None , add_blend_shape : 0 as * mut sys :: godot_method_bind , add_surface_from_arrays : 0 as * mut sys :: godot_method_bind , clear_blend_shapes : 0 as * mut sys :: godot_method_bind , get_blend_shape_count : 0 as * mut sys :: godot_method_bind , get_blend_shape_mode : 0 as * mut sys :: godot_method_bind , get_blend_shape_name : 0 as * mut sys :: godot_method_bind , get_custom_aabb : 0 as * mut sys :: godot_method_bind , lightmap_unwrap : 0 as * mut sys :: godot_method_bind , regen_normalmaps : 0 as * mut sys :: godot_method_bind , set_blend_shape_mode : 0 as * mut sys :: godot_method_bind , set_custom_aabb : 0 as * mut sys :: godot_method_bind , surface_find_by_name : 0 as * mut sys :: godot_method_bind , surface_get_array_index_len : 0 as * mut sys :: godot_method_bind , surface_get_array_len : 0 as * mut sys :: godot_method_bind , surface_get_format : 0 as * mut sys :: godot_method_bind , surface_get_name : 0 as * mut sys :: godot_method_bind , surface_get_primitive_type : 0 as * mut sys :: godot_method_bind , surface_remove : 0 as * mut sys :: godot_method_bind , surface_set_name : 0 as * mut sys :: godot_method_bind , surface_update_region : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ArrayMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ArrayMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_blend_shape = (gd_api . godot_method_bind_get_method) (class_name , "add_blend_shape\0" . as_ptr () as * const c_char) ; table . add_surface_from_arrays = (gd_api . godot_method_bind_get_method) (class_name , "add_surface_from_arrays\0" . as_ptr () as * const c_char) ; table . clear_blend_shapes = (gd_api . godot_method_bind_get_method) (class_name , "clear_blend_shapes\0" . as_ptr () as * const c_char) ; table . get_blend_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_shape_count\0" . as_ptr () as * const c_char) ; table . get_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . get_blend_shape_name = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_shape_name\0" . as_ptr () as * const c_char) ; table . get_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_aabb\0" . as_ptr () as * const c_char) ; table . lightmap_unwrap = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_unwrap\0" . as_ptr () as * const c_char) ; table . regen_normalmaps = (gd_api . godot_method_bind_get_method) (class_name , "regen_normalmaps\0" . as_ptr () as * const c_char) ; table . set_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\0" . as_ptr () as * const c_char) ; table . surface_find_by_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_find_by_name\0" . as_ptr () as * const c_char) ; table . surface_get_array_index_len = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_array_index_len\0" . as_ptr () as * const c_char) ; table . surface_get_array_len = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_array_len\0" . as_ptr () as * const c_char) ; table . surface_get_format = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_format\0" . as_ptr () as * const c_char) ; table . surface_get_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_name\0" . as_ptr () as * const c_char) ; table . surface_get_primitive_type = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_primitive_type\0" . as_ptr () as * const c_char) ; table . surface_remove = (gd_api . godot_method_bind_get_method) (class_name , "surface_remove\0" . as_ptr () as * const c_char) ; table . surface_set_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_set_name\0" . as_ptr () as * const c_char) ; table . surface_update_region = (gd_api . godot_method_bind_get_method) (class_name , "surface_update_region\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:616:26008 [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 VisualScript` inherits `Script` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScript inherits methods from:\n - [Script](struct.Script.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScript { this : RawObject < Self > , } impl VisualScript { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_custom_signal (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_custom_signal ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_function (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_function ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_node (& self , func : impl Into < GodotString > , id : i64 , node : impl AsArg < crate :: generated :: visual_script_node :: VisualScriptNode > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallptr_void_str_i64_obj_vec2 (method_bind , self . this . sys () . as_ptr () , func . into () , id , node . as_arg_ptr () , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_variable (& self , name : impl Into < GodotString > , default_value : impl OwnedToVariant , export : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_variable ; let ret = crate :: icalls :: icallptr_void_str_var_bool (method_bind , self . this . sys () . as_ptr () , name . into () , default_value . owned_to_variant () , export) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_add_argument (& self , name : impl Into < GodotString > , _type : i64 , argname : impl Into < GodotString > , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_add_argument ; let ret = crate :: icalls :: icallptr_void_str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , _type , argname . into () , index) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_get_argument_count (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_get_argument_count ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_get_argument_name (& self , name : impl Into < GodotString > , argidx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_get_argument_name ; let ret = crate :: icalls :: icallptr_str_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_get_argument_type (& self , name : impl Into < GodotString > , argidx : i64) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_get_argument_type ; let ret = crate :: icalls :: icallptr_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_remove_argument (& self , name : impl Into < GodotString > , argidx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_remove_argument ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_set_argument_name (& self , name : impl Into < GodotString > , argidx : i64 , argname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_set_argument_name ; let ret = crate :: icalls :: icallptr_void_str_i64_str (method_bind , self . this . sys () . as_ptr () , name . into () , argidx , argname . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_set_argument_type (& self , name : impl Into < GodotString > , argidx : i64 , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_set_argument_type ; let ret = crate :: icalls :: icallptr_void_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx , _type) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_swap_argument (& self , name : impl Into < GodotString > , argidx : i64 , withidx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_swap_argument ; let ret = crate :: icalls :: icallptr_void_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx , withidx) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn data_connect (& self , func : impl Into < GodotString > , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . data_connect ; let ret = crate :: icalls :: icallptr_void_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_port , to_node , to_port) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn data_disconnect (& self , func : impl Into < GodotString > , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . data_disconnect ; let ret = crate :: icalls :: icallptr_void_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_port , to_node , to_port) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_function_node_id (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_function_node_id ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_function_scroll (& self , name : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_function_scroll ; let ret = crate :: icalls :: icallptr_vec2_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_node (& self , func : impl Into < GodotString > , id : i64) -> Option < Ref < crate :: generated :: visual_script_node :: VisualScriptNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallptr_obj_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: visual_script_node :: VisualScriptNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_node_position (& self , func : impl Into < GodotString > , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_node_position ; let ret = crate :: icalls :: icallptr_vec2_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_variable_default_value (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_variable_default_value ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_variable_export (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_variable_export ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_variable_info (& self , name : impl Into < GodotString >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_variable_info ; let ret = crate :: icalls :: icallptr_dict_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Dictionary :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_custom_signal (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_custom_signal ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_data_connection (& self , func : impl Into < GodotString > , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_data_connection ; let ret = crate :: icalls :: icallptr_bool_str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_port , to_node , to_port) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_function (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_function ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_node (& self , func : impl Into < GodotString > , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_node ; let ret = crate :: icalls :: icallptr_bool_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_sequence_connection (& self , func : impl Into < GodotString > , from_node : i64 , from_output : i64 , to_node : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_sequence_connection ; let ret = crate :: icalls :: icallptr_bool_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_output , to_node) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn has_variable (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_variable ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_custom_signal (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_custom_signal ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_function (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_function ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_node (& self , func : impl Into < GodotString > , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_variable (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_variable ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_custom_signal (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . rename_custom_signal ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_function (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . rename_function ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_variable (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . rename_variable ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn sequence_connect (& self , func : impl Into < GodotString > , from_node : i64 , from_output : i64 , to_node : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . sequence_connect ; let ret = crate :: icalls :: icallptr_void_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_output , to_node) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn sequence_disconnect (& self , func : impl Into < GodotString > , from_node : i64 , from_output : i64 , to_node : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . sequence_disconnect ; let ret = crate :: icalls :: icallptr_void_str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node , from_output , to_node) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_function_scroll (& self , name : impl Into < GodotString > , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_function_scroll ; let ret = crate :: icalls :: icallptr_void_str_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , ofs) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_instance_base_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_instance_base_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_node_position (& self , func : impl Into < GodotString > , id : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_node_position ; let ret = crate :: icalls :: icallptr_void_str_i64_vec2 (method_bind , self . this . sys () . as_ptr () , func . into () , id , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable_default_value (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_variable_default_value ; let ret = crate :: icalls :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable_export (& self , name : impl Into < GodotString > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_variable_export ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , name . into () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable_info (& self , name : impl Into < GodotString > , value : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_variable_info ; let ret = crate :: icalls :: icallptr_void_str_dict (method_bind , self . this . sys () . as_ptr () , name . into () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScript { } unsafe impl GodotObject for VisualScript { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScript" } } impl std :: ops :: Deref for VisualScript { type Target = crate :: generated :: script :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: script :: Script > for VisualScript { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScript { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScript { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScript { } impl Instanciable for VisualScript { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScript :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_custom_signal : * mut sys :: godot_method_bind , pub add_function : * mut sys :: godot_method_bind , pub add_node : * mut sys :: godot_method_bind , pub add_variable : * mut sys :: godot_method_bind , pub custom_signal_add_argument : * mut sys :: godot_method_bind , pub custom_signal_get_argument_count : * mut sys :: godot_method_bind , pub custom_signal_get_argument_name : * mut sys :: godot_method_bind , pub custom_signal_get_argument_type : * mut sys :: godot_method_bind , pub custom_signal_remove_argument : * mut sys :: godot_method_bind , pub custom_signal_set_argument_name : * mut sys :: godot_method_bind , pub custom_signal_set_argument_type : * mut sys :: godot_method_bind , pub custom_signal_swap_argument : * mut sys :: godot_method_bind , pub data_connect : * mut sys :: godot_method_bind , pub data_disconnect : * mut sys :: godot_method_bind , pub get_function_node_id : * mut sys :: godot_method_bind , pub get_function_scroll : * mut sys :: godot_method_bind , pub get_node : * mut sys :: godot_method_bind , pub get_node_position : * mut sys :: godot_method_bind , pub get_variable_default_value : * mut sys :: godot_method_bind , pub get_variable_export : * mut sys :: godot_method_bind , pub get_variable_info : * mut sys :: godot_method_bind , pub has_custom_signal : * mut sys :: godot_method_bind , pub has_data_connection : * mut sys :: godot_method_bind , pub has_function : * mut sys :: godot_method_bind , pub has_node : * mut sys :: godot_method_bind , pub has_sequence_connection : * mut sys :: godot_method_bind , pub has_variable : * mut sys :: godot_method_bind , pub remove_custom_signal : * mut sys :: godot_method_bind , pub remove_function : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind , pub remove_variable : * mut sys :: godot_method_bind , pub rename_custom_signal : * mut sys :: godot_method_bind , pub rename_function : * mut sys :: godot_method_bind , pub rename_variable : * mut sys :: godot_method_bind , pub sequence_connect : * mut sys :: godot_method_bind , pub sequence_disconnect : * mut sys :: godot_method_bind , pub set_function_scroll : * mut sys :: godot_method_bind , pub set_instance_base_type : * mut sys :: godot_method_bind , pub set_node_position : * mut sys :: godot_method_bind , pub set_variable_default_value : * mut sys :: godot_method_bind , pub set_variable_export : * mut sys :: godot_method_bind , pub set_variable_info : * mut sys :: godot_method_bind } impl VisualScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptMethodTable = VisualScriptMethodTable { class_constructor : None , add_custom_signal : 0 as * mut sys :: godot_method_bind , add_function : 0 as * mut sys :: godot_method_bind , add_node : 0 as * mut sys :: godot_method_bind , add_variable : 0 as * mut sys :: godot_method_bind , custom_signal_add_argument : 0 as * mut sys :: godot_method_bind , custom_signal_get_argument_count : 0 as * mut sys :: godot_method_bind , custom_signal_get_argument_name : 0 as * mut sys :: godot_method_bind , custom_signal_get_argument_type : 0 as * mut sys :: godot_method_bind , custom_signal_remove_argument : 0 as * mut sys :: godot_method_bind , custom_signal_set_argument_name : 0 as * mut sys :: godot_method_bind , custom_signal_set_argument_type : 0 as * mut sys :: godot_method_bind , custom_signal_swap_argument : 0 as * mut sys :: godot_method_bind , data_connect : 0 as * mut sys :: godot_method_bind , data_disconnect : 0 as * mut sys :: godot_method_bind , get_function_node_id : 0 as * mut sys :: godot_method_bind , get_function_scroll : 0 as * mut sys :: godot_method_bind , get_node : 0 as * mut sys :: godot_method_bind , get_node_position : 0 as * mut sys :: godot_method_bind , get_variable_default_value : 0 as * mut sys :: godot_method_bind , get_variable_export : 0 as * mut sys :: godot_method_bind , get_variable_info : 0 as * mut sys :: godot_method_bind , has_custom_signal : 0 as * mut sys :: godot_method_bind , has_data_connection : 0 as * mut sys :: godot_method_bind , has_function : 0 as * mut sys :: godot_method_bind , has_node : 0 as * mut sys :: godot_method_bind , has_sequence_connection : 0 as * mut sys :: godot_method_bind , has_variable : 0 as * mut sys :: godot_method_bind , remove_custom_signal : 0 as * mut sys :: godot_method_bind , remove_function : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind , remove_variable : 0 as * mut sys :: godot_method_bind , rename_custom_signal : 0 as * mut sys :: godot_method_bind , rename_function : 0 as * mut sys :: godot_method_bind , rename_variable : 0 as * mut sys :: godot_method_bind , sequence_connect : 0 as * mut sys :: godot_method_bind , sequence_disconnect : 0 as * mut sys :: godot_method_bind , set_function_scroll : 0 as * mut sys :: godot_method_bind , set_instance_base_type : 0 as * mut sys :: godot_method_bind , set_node_position : 0 as * mut sys :: godot_method_bind , set_variable_default_value : 0 as * mut sys :: godot_method_bind , set_variable_export : 0 as * mut sys :: godot_method_bind , set_variable_info : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_signal\0" . as_ptr () as * const c_char) ; table . add_function = (gd_api . godot_method_bind_get_method) (class_name , "add_function\0" . as_ptr () as * const c_char) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . add_variable = (gd_api . godot_method_bind_get_method) (class_name , "add_variable\0" . as_ptr () as * const c_char) ; table . custom_signal_add_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_add_argument\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_count = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_count\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_name = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_name\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_type = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_type\0" . as_ptr () as * const c_char) ; table . custom_signal_remove_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_remove_argument\0" . as_ptr () as * const c_char) ; table . custom_signal_set_argument_name = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_set_argument_name\0" . as_ptr () as * const c_char) ; table . custom_signal_set_argument_type = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_set_argument_type\0" . as_ptr () as * const c_char) ; table . custom_signal_swap_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_swap_argument\0" . as_ptr () as * const c_char) ; table . data_connect = (gd_api . godot_method_bind_get_method) (class_name , "data_connect\0" . as_ptr () as * const c_char) ; table . data_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "data_disconnect\0" . as_ptr () as * const c_char) ; table . get_function_node_id = (gd_api . godot_method_bind_get_method) (class_name , "get_function_node_id\0" . as_ptr () as * const c_char) ; table . get_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_function_scroll\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . get_variable_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_default_value\0" . as_ptr () as * const c_char) ; table . get_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_export\0" . as_ptr () as * const c_char) ; table . get_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_info\0" . as_ptr () as * const c_char) ; table . has_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_custom_signal\0" . as_ptr () as * const c_char) ; table . has_data_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_data_connection\0" . as_ptr () as * const c_char) ; table . has_function = (gd_api . godot_method_bind_get_method) (class_name , "has_function\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . has_sequence_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_sequence_connection\0" . as_ptr () as * const c_char) ; table . has_variable = (gd_api . godot_method_bind_get_method) (class_name , "has_variable\0" . as_ptr () as * const c_char) ; table . remove_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_signal\0" . as_ptr () as * const c_char) ; table . remove_function = (gd_api . godot_method_bind_get_method) (class_name , "remove_function\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . remove_variable = (gd_api . godot_method_bind_get_method) (class_name , "remove_variable\0" . as_ptr () as * const c_char) ; table . rename_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "rename_custom_signal\0" . as_ptr () as * const c_char) ; table . rename_function = (gd_api . godot_method_bind_get_method) (class_name , "rename_function\0" . as_ptr () as * const c_char) ; table . rename_variable = (gd_api . godot_method_bind_get_method) (class_name , "rename_variable\0" . as_ptr () as * const c_char) ; table . sequence_connect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_connect\0" . as_ptr () as * const c_char) ; table . sequence_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_disconnect\0" . as_ptr () as * const c_char) ; table . set_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_function_scroll\0" . as_ptr () as * const c_char) ; table . set_instance_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_base_type\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; table . set_variable_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_default_value\0" . as_ptr () as * const c_char) ; table . set_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_export\0" . as_ptr () as * const c_char) ; table . set_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_info\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:622:6387 [INFO] [stdout] | [INFO] [stdout] 622 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 622 | # [doc = "`core class Crypto` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_crypto.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCrypto inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Crypto { this : RawObject < Self > , } impl Crypto { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CryptoMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Generates a [PoolByteArray] of cryptographically secure random bytes with given `size`."] # [doc = ""] # [inline] pub fn generate_random_bytes (& self , size : i64) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . generate_random_bytes ; let ret = crate :: icalls :: icallptr_bytearr_i64 (method_bind , self . this . sys () . as_ptr () , size) ; ByteArray :: from_sys (ret) } } # [doc = "Generates an RSA [CryptoKey] that can be used for creating self-signed certificates and passed to [method StreamPeerSSL.accept_stream]."] # [doc = ""] # [inline] pub fn generate_rsa (& self , size : i64) -> Option < Ref < crate :: generated :: crypto_key :: CryptoKey , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . generate_rsa ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , size) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: crypto_key :: CryptoKey , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nGenerates a self-signed [X509Certificate] from the given [CryptoKey] and `issuer_name`. The certificate validity will be defined by `not_before` and `not_after` (first valid date and last valid date). The `issuer_name` must contain at least \"CN=\" (common name, i.e. the domain name), \"O=\" (organization, i.e. your company name), \"C=\" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in).\nA small example to generate an RSA key and a X509 self-signed certificate.\n```gdscript\nvar crypto = Crypto.new()\n# Generate 4096 bits RSA key.\nvar key = crypto.generate_rsa(4096)\n# Generate self-signed certificate using the given key.\nvar cert = crypto.generate_self_signed_certificate(key, \"CN=example.com,O=A Game Company,C=IT\")\n```\n# Default Arguments\n* `issuer_name` - `\"CN=myserver,O=myorganisation,C=IT\"`\n* `not_before` - `\"20140101000000\"`\n* `not_after` - `\"20340101000000\"`"] # [doc = ""] # [inline] pub fn generate_self_signed_certificate (& self , key : impl AsArg < crate :: generated :: crypto_key :: CryptoKey > , issuer_name : impl Into < GodotString > , not_before : impl Into < GodotString > , not_after : impl Into < GodotString >) -> Option < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . generate_self_signed_certificate ; let ret = crate :: icalls :: icallptr_obj_obj_str_str_str (method_bind , self . this . sys () . as_ptr () , key . as_arg_ptr () , issuer_name . into () , not_before . into () , not_after . into ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: x509_certificate :: X509Certificate , thread_access :: Shared >> :: move_from_sys (sys)) } } } impl gdnative_core :: private :: godot_object :: Sealed for Crypto { } unsafe impl GodotObject for Crypto { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Crypto" } } impl std :: ops :: Deref for Crypto { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Crypto { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Crypto { } unsafe impl SubClass < crate :: generated :: object :: Object > for Crypto { } impl Instanciable for Crypto { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Crypto :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CryptoMethodTable { pub class_constructor : sys :: godot_class_constructor , pub generate_random_bytes : * mut sys :: godot_method_bind , pub generate_rsa : * mut sys :: godot_method_bind , pub generate_self_signed_certificate : * mut sys :: godot_method_bind } impl CryptoMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CryptoMethodTable = CryptoMethodTable { class_constructor : None , generate_random_bytes : 0 as * mut sys :: godot_method_bind , generate_rsa : 0 as * mut sys :: godot_method_bind , generate_self_signed_certificate : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CryptoMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Crypto\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . generate_random_bytes = (gd_api . godot_method_bind_get_method) (class_name , "generate_random_bytes\0" . as_ptr () as * const c_char) ; table . generate_rsa = (gd_api . godot_method_bind_get_method) (class_name , "generate_rsa\0" . as_ptr () as * const c_char) ; table . generate_self_signed_certificate = (gd_api . godot_method_bind_get_method) (class_name , "generate_self_signed_certificate\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:628:13036 [INFO] [stdout] | [INFO] [stdout] 628 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 628 | # [doc = "`core class AudioStreamSample` inherits `AudioStream` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostreamsample.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamSample inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamSample { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Format (pub i64) ; impl Format { pub const _8_BITS : Format = Format (0i64) ; pub const _16_BITS : Format = Format (1i64) ; pub const IMA_ADPCM : Format = Format (2i64) ; } impl From < i64 > for Format { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Format > for i64 { # [inline] fn from (v : Format) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LoopMode (pub i64) ; impl LoopMode { pub const DISABLED : LoopMode = LoopMode (0i64) ; pub const FORWARD : LoopMode = LoopMode (1i64) ; pub const PING_PONG : LoopMode = LoopMode (2i64) ; pub const BACKWARD : LoopMode = LoopMode (3i64) ; } impl From < i64 > for LoopMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LoopMode > for i64 { # [inline] fn from (v : LoopMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioStreamSample { pub const FORMAT_16_BITS : i64 = 1i64 ; pub const FORMAT_8_BITS : i64 = 0i64 ; pub const FORMAT_IMA_ADPCM : i64 = 2i64 ; pub const LOOP_BACKWARD : i64 = 3i64 ; pub const LOOP_DISABLED : i64 = 0i64 ; pub const LOOP_FORWARD : i64 = 1i64 ; pub const LOOP_PING_PONG : i64 = 2i64 ; } impl AudioStreamSample { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamSampleMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Contains the audio data in bytes.\n**Note:** This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte."] # [doc = ""] # [inline] pub fn data (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "Audio format. See [enum Format] constants for values."] # [doc = ""] # [inline] pub fn format (& self) -> crate :: generated :: audio_stream_sample :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_sample :: Format (ret) } } # [doc = "The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present."] # [doc = ""] # [inline] pub fn loop_begin (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_loop_begin ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present."] # [doc = ""] # [inline] pub fn loop_end (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_loop_end ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values."] # [doc = ""] # [inline] pub fn loop_mode (& self) -> crate :: generated :: audio_stream_sample :: LoopMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_loop_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: audio_stream_sample :: LoopMode (ret) } } # [doc = "The sample rate for mixing this audio."] # [doc = ""] # [inline] pub fn mix_rate (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_mix_rate ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, audio is stereo."] # [doc = ""] # [inline] pub fn is_stereo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . is_stereo ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Saves the AudioStreamSample as a WAV file to `path`. Samples with IMA ADPCM format can't be saved.\n**Note:** A `.wav` extension is automatically appended to `path` if it is missing."] # [doc = ""] # [inline] pub fn save_to_wav (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . save_to_wav ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Contains the audio data in bytes.\n**Note:** This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte."] # [doc = ""] # [inline] pub fn set_data (& self , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = "Audio format. See [enum Format] constants for values."] # [doc = ""] # [inline] pub fn set_format (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_format ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [doc = "The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present."] # [doc = ""] # [inline] pub fn set_loop_begin (& self , loop_begin : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_loop_begin ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , loop_begin) ; } } # [doc = "The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present."] # [doc = ""] # [inline] pub fn set_loop_end (& self , loop_end : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_loop_end ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , loop_end) ; } } # [doc = "The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values."] # [doc = ""] # [inline] pub fn set_loop_mode (& self , loop_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_loop_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , loop_mode) ; } } # [doc = "The sample rate for mixing this audio."] # [doc = ""] # [inline] pub fn set_mix_rate (& self , mix_rate : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_mix_rate ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mix_rate) ; } } # [doc = "If `true`, audio is stereo."] # [doc = ""] # [inline] pub fn set_stereo (& self , stereo : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_stereo ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , stereo) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamSample { } unsafe impl GodotObject for AudioStreamSample { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamSample" } } impl std :: ops :: Deref for AudioStreamSample { type Target = crate :: generated :: audio_stream :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamSample { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_stream :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_stream :: AudioStream > for AudioStreamSample { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStreamSample { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStreamSample { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStreamSample { } impl Instanciable for AudioStreamSample { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioStreamSample :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamSampleMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_data : * mut sys :: godot_method_bind , pub get_format : * mut sys :: godot_method_bind , pub get_loop_begin : * mut sys :: godot_method_bind , pub get_loop_end : * mut sys :: godot_method_bind , pub get_loop_mode : * mut sys :: godot_method_bind , pub get_mix_rate : * mut sys :: godot_method_bind , pub is_stereo : * mut sys :: godot_method_bind , pub save_to_wav : * mut sys :: godot_method_bind , pub set_data : * mut sys :: godot_method_bind , pub set_format : * mut sys :: godot_method_bind , pub set_loop_begin : * mut sys :: godot_method_bind , pub set_loop_end : * mut sys :: godot_method_bind , pub set_loop_mode : * mut sys :: godot_method_bind , pub set_mix_rate : * mut sys :: godot_method_bind , pub set_stereo : * mut sys :: godot_method_bind } impl AudioStreamSampleMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamSampleMethodTable = AudioStreamSampleMethodTable { class_constructor : None , get_data : 0 as * mut sys :: godot_method_bind , get_format : 0 as * mut sys :: godot_method_bind , get_loop_begin : 0 as * mut sys :: godot_method_bind , get_loop_end : 0 as * mut sys :: godot_method_bind , get_loop_mode : 0 as * mut sys :: godot_method_bind , get_mix_rate : 0 as * mut sys :: godot_method_bind , is_stereo : 0 as * mut sys :: godot_method_bind , save_to_wav : 0 as * mut sys :: godot_method_bind , set_data : 0 as * mut sys :: godot_method_bind , set_format : 0 as * mut sys :: godot_method_bind , set_loop_begin : 0 as * mut sys :: godot_method_bind , set_loop_end : 0 as * mut sys :: godot_method_bind , set_loop_mode : 0 as * mut sys :: godot_method_bind , set_mix_rate : 0 as * mut sys :: godot_method_bind , set_stereo : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioStreamSampleMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamSample\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_loop_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_begin\0" . as_ptr () as * const c_char) ; table . get_loop_end = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_end\0" . as_ptr () as * const c_char) ; table . get_loop_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_mode\0" . as_ptr () as * const c_char) ; table . get_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_rate\0" . as_ptr () as * const c_char) ; table . is_stereo = (gd_api . godot_method_bind_get_method) (class_name , "is_stereo\0" . as_ptr () as * const c_char) ; table . save_to_wav = (gd_api . godot_method_bind_get_method) (class_name , "save_to_wav\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_format = (gd_api . godot_method_bind_get_method) (class_name , "set_format\0" . as_ptr () as * const c_char) ; table . set_loop_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_begin\0" . as_ptr () as * const c_char) ; table . set_loop_end = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_end\0" . as_ptr () as * const c_char) ; table . set_loop_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_mode\0" . as_ptr () as * const c_char) ; table . set_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_rate\0" . as_ptr () as * const c_char) ; table . set_stereo = (gd_api . godot_method_bind_get_method) (class_name , "set_stereo\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:634:3797 [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 MultiplayerPeerGDNative` inherits `NetworkedMultiplayerPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_multiplayerpeergdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMultiplayerPeerGDNative inherits methods from:\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiplayerPeerGDNative { this : RawObject < Self > , } impl MultiplayerPeerGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiplayerPeerGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiplayerPeerGDNative { } unsafe impl GodotObject for MultiplayerPeerGDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiplayerPeerGDNative" } } impl std :: ops :: Deref for MultiplayerPeerGDNative { type Target = crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiplayerPeerGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: networked_multiplayer_peer :: NetworkedMultiplayerPeer > for MultiplayerPeerGDNative { } unsafe impl SubClass < crate :: generated :: packet_peer :: PacketPeer > for MultiplayerPeerGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MultiplayerPeerGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiplayerPeerGDNative { } impl Instanciable for MultiplayerPeerGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MultiplayerPeerGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiplayerPeerGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl MultiplayerPeerGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiplayerPeerGDNativeMethodTable = MultiplayerPeerGDNativeMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MultiplayerPeerGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiplayerPeerGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:640:7737 [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 PhysicsMaterial` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physicsmaterial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysicsMaterial inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsMaterial { this : RawObject < Self > , } impl PhysicsMaterial { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PhysicsMaterialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness)."] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction)."] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, subtracts the bounciness from the colliding object's bounciness instead of adding it."] # [doc = ""] # [inline] pub fn is_absorbent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . is_absorbent ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the physics engine will use the friction of the object marked as \"rough\" when two objects collide. If `false`, the physics engine will use the lowest friction of all colliding objects instead. If `true` for both colliding objects, the physics engine will use the highest friction."] # [doc = ""] # [inline] pub fn is_rough (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . is_rough ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, subtracts the bounciness from the colliding object's bounciness instead of adding it."] # [doc = ""] # [inline] pub fn set_absorbent (& self , absorbent : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . set_absorbent ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , absorbent) ; } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness)."] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction)."] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [doc = "If `true`, the physics engine will use the friction of the object marked as \"rough\" when two objects collide. If `false`, the physics engine will use the lowest friction of all colliding objects instead. If `true` for both colliding objects, the physics engine will use the highest friction."] # [doc = ""] # [inline] pub fn set_rough (& self , rough : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . set_rough ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , rough) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsMaterial { } unsafe impl GodotObject for PhysicsMaterial { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PhysicsMaterial" } } impl std :: ops :: Deref for PhysicsMaterial { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PhysicsMaterial { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PhysicsMaterial { } unsafe impl SubClass < crate :: generated :: object :: Object > for PhysicsMaterial { } impl Instanciable for PhysicsMaterial { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PhysicsMaterial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsMaterialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bounce : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub is_absorbent : * mut sys :: godot_method_bind , pub is_rough : * mut sys :: godot_method_bind , pub set_absorbent : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_rough : * mut sys :: godot_method_bind } impl PhysicsMaterialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsMaterialMethodTable = PhysicsMaterialMethodTable { class_constructor : None , get_bounce : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , is_absorbent : 0 as * mut sys :: godot_method_bind , is_rough : 0 as * mut sys :: godot_method_bind , set_absorbent : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_rough : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PhysicsMaterialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsMaterial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . is_absorbent = (gd_api . godot_method_bind_get_method) (class_name , "is_absorbent\0" . as_ptr () as * const c_char) ; table . is_rough = (gd_api . godot_method_bind_get_method) (class_name , "is_rough\0" . as_ptr () as * const c_char) ; table . set_absorbent = (gd_api . godot_method_bind_get_method) (class_name , "set_absorbent\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_rough = (gd_api . godot_method_bind_get_method) (class_name , "set_rough\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:646:3083 [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 AudioStream` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audiostream.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStream inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStream { this : RawObject < Self > , } impl AudioStream { # [doc = "Returns the length of the audio stream in seconds."] # [doc = ""] # [inline] pub fn get_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStream { } unsafe impl GodotObject for AudioStream { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStream" } } impl std :: ops :: Deref for AudioStream { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStream { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioStream { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioStream { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioStream { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_length : * mut sys :: godot_method_bind } impl AudioStreamMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamMethodTable = AudioStreamMethodTable { class_constructor : None , get_length : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioStreamMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStream\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) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:652:30796 [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 LineEdit` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_lineedit.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`LineEdit` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLineEdit inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LineEdit { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Align (pub i64) ; impl Align { pub const LEFT : Align = Align (0i64) ; pub const CENTER : Align = Align (1i64) ; pub const RIGHT : Align = Align (2i64) ; pub const FILL : Align = Align (3i64) ; } impl From < i64 > for Align { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Align > for i64 { # [inline] fn from (v : Align) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MenuItems (pub i64) ; impl MenuItems { pub const CUT : MenuItems = MenuItems (0i64) ; pub const COPY : MenuItems = MenuItems (1i64) ; pub const PASTE : MenuItems = MenuItems (2i64) ; pub const CLEAR : MenuItems = MenuItems (3i64) ; pub const SELECT_ALL : MenuItems = MenuItems (4i64) ; pub const UNDO : MenuItems = MenuItems (5i64) ; pub const REDO : MenuItems = MenuItems (6i64) ; pub const MAX : MenuItems = MenuItems (7i64) ; } impl From < i64 > for MenuItems { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MenuItems > for i64 { # [inline] fn from (v : MenuItems) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl LineEdit { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const MENU_CLEAR : i64 = 3i64 ; pub const MENU_COPY : i64 = 1i64 ; pub const MENU_CUT : i64 = 0i64 ; pub const MENU_MAX : i64 = 7i64 ; pub const MENU_PASTE : i64 = 2i64 ; pub const MENU_REDO : i64 = 6i64 ; pub const MENU_SELECT_ALL : i64 = 4i64 ; pub const MENU_UNDO : i64 = 5i64 ; } impl LineEdit { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LineEditMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds `text` after the cursor. If the resulting value is longer than [member max_length], nothing happens."] # [doc = ""] # [inline] pub fn append_at_cursor (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . append_at_cursor ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Erases the [LineEdit]'s [member text]."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the caret (visual cursor) blinks."] # [doc = ""] # [inline] pub fn cursor_get_blink_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_get_blink_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Duration (in seconds) of a caret's blinking cycle."] # [doc = ""] # [inline] pub fn cursor_get_blink_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_get_blink_speed ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the caret (visual cursor) blinks."] # [doc = ""] # [inline] pub fn cursor_set_blink_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_set_blink_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Duration (in seconds) of a caret's blinking cycle."] # [doc = ""] # [inline] pub fn cursor_set_blink_speed (& self , blink_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_set_blink_speed ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , blink_speed) ; } } # [doc = "Deletes one character at the cursor's current position (equivalent to pressing the `Delete` key)."] # [doc = ""] # [inline] pub fn delete_char_at_cursor (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . delete_char_at_cursor ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Deletes a section of the [member text] going from position `from_column` to `to_column`. Both parameters should be within the text's length."] # [doc = ""] # [inline] pub fn delete_text (& self , from_column : i64 , to_column : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . delete_text ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_column , to_column) ; } } # [doc = "Clears the current selection."] # [doc = ""] # [inline] pub fn deselect (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . deselect ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Text alignment as defined in the [enum Align] enum."] # [doc = ""] # [inline] pub fn align (& self) -> crate :: generated :: line_edit :: Align { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_align ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: line_edit :: Align (ret) } } # [doc = "The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it."] # [doc = ""] # [inline] pub fn cursor_position (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_cursor_position ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the [LineEdit] width will increase to stay longer than the [member text]. It will **not** compress if the [member text] is shortened."] # [doc = ""] # [inline] pub fn expand_to_text_length (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_expand_to_text_length ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum amount of characters that can be entered inside the [LineEdit]. If `0`, there is no limit."] # [doc = ""] # [inline] pub fn max_length (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_max_length ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit]."] # [doc = ""] # [inline] pub fn get_menu (& self) -> Option < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_menu ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: popup_menu :: PopupMenu , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Text shown when the [LineEdit] is empty. It is **not** the [LineEdit]'s default value (see [member text])."] # [doc = ""] # [inline] pub fn placeholder (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_placeholder ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Opacity of the [member placeholder_text]. From `0` to `1`."] # [doc = ""] # [inline] pub fn placeholder_alpha (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_placeholder_alpha ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to `false`."] # [doc = ""] # [inline] pub fn right_icon (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_right_icon ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_scroll_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_scroll_offset ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The character to use to mask secret input (defaults to \"*\"). Only a single character can be used as the secret character."] # [doc = ""] # [inline] pub fn secret_character (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_secret_character ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "String value of the [LineEdit].\n**Note:** Changing text using this property won't emit the [signal text_changed] signal."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "If `true`, the [LineEdit] will show a clear button if `text` is not empty, which can be used to clear the text quickly."] # [doc = ""] # [inline] pub fn is_clear_button_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_clear_button_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the context menu will appear when right-clicked."] # [doc = ""] # [inline] pub fn is_context_menu_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_context_menu_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `false`, existing text cannot be modified and new text cannot be added."] # [doc = ""] # [inline] pub fn is_editable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_editable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, every character is replaced with the secret character (see [member secret_character])."] # [doc = ""] # [inline] pub fn is_secret (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_secret ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `false`, it's impossible to select the text using mouse nor keyboard."] # [doc = ""] # [inline] pub fn is_selecting_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_selecting_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `false`, using shortcuts will be disabled."] # [doc = ""] # [inline] pub fn is_shortcut_keys_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_shortcut_keys_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the native virtual keyboard is shown when focused on platforms that support it."] # [doc = ""] # [inline] pub fn is_virtual_keyboard_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_virtual_keyboard_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Executes a given action as defined in the [enum MenuItems] enum."] # [doc = ""] # [inline] pub fn menu_option (& self , option : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . menu_option ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , option) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSelects characters inside [LineEdit] between `from` and `to`. By default, `from` is at the beginning and `to` at the end.\n```gdscript\ntext = \"Welcome\"\nselect() # Will select \"Welcome\".\nselect(4) # Will select \"ome\".\nselect(2, 5) # Will select \"lco\".\n```\n# Default Arguments\n* `from` - `0`\n* `to` - `-1`"] # [doc = ""] # [inline] pub fn select (& self , from : i64 , to : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . select ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from , to) ; } } # [doc = "Selects the whole [String]."] # [doc = ""] # [inline] pub fn select_all (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . select_all ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Text alignment as defined in the [enum Align] enum."] # [doc = ""] # [inline] pub fn set_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_align ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "If `true`, the [LineEdit] will show a clear button if `text` is not empty, which can be used to clear the text quickly."] # [doc = ""] # [inline] pub fn set_clear_button_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_clear_button_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the context menu will appear when right-clicked."] # [doc = ""] # [inline] pub fn set_context_menu_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_context_menu_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it."] # [doc = ""] # [inline] pub fn set_cursor_position (& self , position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_cursor_position ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "If `false`, existing text cannot be modified and new text cannot be added."] # [doc = ""] # [inline] pub fn set_editable (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_editable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the [LineEdit] width will increase to stay longer than the [member text]. It will **not** compress if the [member text] is shortened."] # [doc = ""] # [inline] pub fn set_expand_to_text_length (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_expand_to_text_length ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Maximum amount of characters that can be entered inside the [LineEdit]. If `0`, there is no limit."] # [doc = ""] # [inline] pub fn set_max_length (& self , chars : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_max_length ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , chars) ; } } # [doc = "Text shown when the [LineEdit] is empty. It is **not** the [LineEdit]'s default value (see [member text])."] # [doc = ""] # [inline] pub fn set_placeholder (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_placeholder ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Opacity of the [member placeholder_text]. From `0` to `1`."] # [doc = ""] # [inline] pub fn set_placeholder_alpha (& self , alpha : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_placeholder_alpha ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , alpha) ; } } # [doc = "Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to `false`."] # [doc = ""] # [inline] pub fn set_right_icon (& self , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_right_icon ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , icon . as_arg_ptr ()) ; } } # [doc = "If `true`, every character is replaced with the secret character (see [member secret_character])."] # [doc = ""] # [inline] pub fn set_secret (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_secret ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The character to use to mask secret input (defaults to \"*\"). Only a single character can be used as the secret character."] # [doc = ""] # [inline] pub fn set_secret_character (& self , character : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_secret_character ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , character . into ()) ; } } # [doc = "If `false`, it's impossible to select the text using mouse nor keyboard."] # [doc = ""] # [inline] pub fn set_selecting_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_selecting_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `false`, using shortcuts will be disabled."] # [doc = ""] # [inline] pub fn set_shortcut_keys_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_shortcut_keys_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "String value of the [LineEdit].\n**Note:** Changing text using this property won't emit the [signal text_changed] signal."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, the native virtual keyboard is shown when focused on platforms that support it."] # [doc = ""] # [inline] pub fn set_virtual_keyboard_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_virtual_keyboard_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LineEdit { } unsafe impl GodotObject for LineEdit { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "LineEdit" } } impl QueueFree for LineEdit { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for LineEdit { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LineEdit { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for LineEdit { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for LineEdit { } unsafe impl SubClass < crate :: generated :: node :: Node > for LineEdit { } unsafe impl SubClass < crate :: generated :: object :: Object > for LineEdit { } impl Instanciable for LineEdit { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { LineEdit :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LineEditMethodTable { pub class_constructor : sys :: godot_class_constructor , pub append_at_cursor : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub cursor_get_blink_enabled : * mut sys :: godot_method_bind , pub cursor_get_blink_speed : * mut sys :: godot_method_bind , pub cursor_set_blink_enabled : * mut sys :: godot_method_bind , pub cursor_set_blink_speed : * mut sys :: godot_method_bind , pub delete_char_at_cursor : * mut sys :: godot_method_bind , pub delete_text : * mut sys :: godot_method_bind , pub deselect : * mut sys :: godot_method_bind , pub get_align : * mut sys :: godot_method_bind , pub get_cursor_position : * mut sys :: godot_method_bind , pub get_expand_to_text_length : * mut sys :: godot_method_bind , pub get_max_length : * mut sys :: godot_method_bind , pub get_menu : * mut sys :: godot_method_bind , pub get_placeholder : * mut sys :: godot_method_bind , pub get_placeholder_alpha : * mut sys :: godot_method_bind , pub get_right_icon : * mut sys :: godot_method_bind , pub get_scroll_offset : * mut sys :: godot_method_bind , pub get_secret_character : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub is_clear_button_enabled : * mut sys :: godot_method_bind , pub is_context_menu_enabled : * mut sys :: godot_method_bind , pub is_editable : * mut sys :: godot_method_bind , pub is_secret : * mut sys :: godot_method_bind , pub is_selecting_enabled : * mut sys :: godot_method_bind , pub is_shortcut_keys_enabled : * mut sys :: godot_method_bind , pub is_virtual_keyboard_enabled : * mut sys :: godot_method_bind , pub menu_option : * mut sys :: godot_method_bind , pub select : * mut sys :: godot_method_bind , pub select_all : * mut sys :: godot_method_bind , pub set_align : * mut sys :: godot_method_bind , pub set_clear_button_enabled : * mut sys :: godot_method_bind , pub set_context_menu_enabled : * mut sys :: godot_method_bind , pub set_cursor_position : * mut sys :: godot_method_bind , pub set_editable : * mut sys :: godot_method_bind , pub set_expand_to_text_length : * mut sys :: godot_method_bind , pub set_max_length : * mut sys :: godot_method_bind , pub set_placeholder : * mut sys :: godot_method_bind , pub set_placeholder_alpha : * mut sys :: godot_method_bind , pub set_right_icon : * mut sys :: godot_method_bind , pub set_secret : * mut sys :: godot_method_bind , pub set_secret_character : * mut sys :: godot_method_bind , pub set_selecting_enabled : * mut sys :: godot_method_bind , pub set_shortcut_keys_enabled : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_virtual_keyboard_enabled : * mut sys :: godot_method_bind } impl LineEditMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LineEditMethodTable = LineEditMethodTable { class_constructor : None , append_at_cursor : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , cursor_get_blink_enabled : 0 as * mut sys :: godot_method_bind , cursor_get_blink_speed : 0 as * mut sys :: godot_method_bind , cursor_set_blink_enabled : 0 as * mut sys :: godot_method_bind , cursor_set_blink_speed : 0 as * mut sys :: godot_method_bind , delete_char_at_cursor : 0 as * mut sys :: godot_method_bind , delete_text : 0 as * mut sys :: godot_method_bind , deselect : 0 as * mut sys :: godot_method_bind , get_align : 0 as * mut sys :: godot_method_bind , get_cursor_position : 0 as * mut sys :: godot_method_bind , get_expand_to_text_length : 0 as * mut sys :: godot_method_bind , get_max_length : 0 as * mut sys :: godot_method_bind , get_menu : 0 as * mut sys :: godot_method_bind , get_placeholder : 0 as * mut sys :: godot_method_bind , get_placeholder_alpha : 0 as * mut sys :: godot_method_bind , get_right_icon : 0 as * mut sys :: godot_method_bind , get_scroll_offset : 0 as * mut sys :: godot_method_bind , get_secret_character : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , is_clear_button_enabled : 0 as * mut sys :: godot_method_bind , is_context_menu_enabled : 0 as * mut sys :: godot_method_bind , is_editable : 0 as * mut sys :: godot_method_bind , is_secret : 0 as * mut sys :: godot_method_bind , is_selecting_enabled : 0 as * mut sys :: godot_method_bind , is_shortcut_keys_enabled : 0 as * mut sys :: godot_method_bind , is_virtual_keyboard_enabled : 0 as * mut sys :: godot_method_bind , menu_option : 0 as * mut sys :: godot_method_bind , select : 0 as * mut sys :: godot_method_bind , select_all : 0 as * mut sys :: godot_method_bind , set_align : 0 as * mut sys :: godot_method_bind , set_clear_button_enabled : 0 as * mut sys :: godot_method_bind , set_context_menu_enabled : 0 as * mut sys :: godot_method_bind , set_cursor_position : 0 as * mut sys :: godot_method_bind , set_editable : 0 as * mut sys :: godot_method_bind , set_expand_to_text_length : 0 as * mut sys :: godot_method_bind , set_max_length : 0 as * mut sys :: godot_method_bind , set_placeholder : 0 as * mut sys :: godot_method_bind , set_placeholder_alpha : 0 as * mut sys :: godot_method_bind , set_right_icon : 0 as * mut sys :: godot_method_bind , set_secret : 0 as * mut sys :: godot_method_bind , set_secret_character : 0 as * mut sys :: godot_method_bind , set_selecting_enabled : 0 as * mut sys :: godot_method_bind , set_shortcut_keys_enabled : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_virtual_keyboard_enabled : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { LineEditMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LineEdit\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . append_at_cursor = (gd_api . godot_method_bind_get_method) (class_name , "append_at_cursor\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_speed\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_speed\0" . as_ptr () as * const c_char) ; table . delete_char_at_cursor = (gd_api . godot_method_bind_get_method) (class_name , "delete_char_at_cursor\0" . as_ptr () as * const c_char) ; table . delete_text = (gd_api . godot_method_bind_get_method) (class_name , "delete_text\0" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\0" . as_ptr () as * const c_char) ; table . get_align = (gd_api . godot_method_bind_get_method) (class_name , "get_align\0" . as_ptr () as * const c_char) ; table . get_cursor_position = (gd_api . godot_method_bind_get_method) (class_name , "get_cursor_position\0" . as_ptr () as * const c_char) ; table . get_expand_to_text_length = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_to_text_length\0" . as_ptr () as * const c_char) ; table . get_max_length = (gd_api . godot_method_bind_get_method) (class_name , "get_max_length\0" . as_ptr () as * const c_char) ; table . get_menu = (gd_api . godot_method_bind_get_method) (class_name , "get_menu\0" . as_ptr () as * const c_char) ; table . get_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "get_placeholder\0" . as_ptr () as * const c_char) ; table . get_placeholder_alpha = (gd_api . godot_method_bind_get_method) (class_name , "get_placeholder_alpha\0" . as_ptr () as * const c_char) ; table . get_right_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_right_icon\0" . as_ptr () as * const c_char) ; table . get_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_offset\0" . as_ptr () as * const c_char) ; table . get_secret_character = (gd_api . godot_method_bind_get_method) (class_name , "get_secret_character\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . is_clear_button_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_clear_button_enabled\0" . as_ptr () as * const c_char) ; table . is_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . is_secret = (gd_api . godot_method_bind_get_method) (class_name , "is_secret\0" . as_ptr () as * const c_char) ; table . is_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selecting_enabled\0" . as_ptr () as * const c_char) ; table . is_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . is_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; table . menu_option = (gd_api . godot_method_bind_get_method) (class_name , "menu_option\0" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\0" . as_ptr () as * const c_char) ; table . select_all = (gd_api . godot_method_bind_get_method) (class_name , "select_all\0" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\0" . as_ptr () as * const c_char) ; table . set_clear_button_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_clear_button_enabled\0" . as_ptr () as * const c_char) ; table . set_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . set_cursor_position = (gd_api . godot_method_bind_get_method) (class_name , "set_cursor_position\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_expand_to_text_length = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_to_text_length\0" . as_ptr () as * const c_char) ; table . set_max_length = (gd_api . godot_method_bind_get_method) (class_name , "set_max_length\0" . as_ptr () as * const c_char) ; table . set_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "set_placeholder\0" . as_ptr () as * const c_char) ; table . set_placeholder_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_placeholder_alpha\0" . as_ptr () as * const c_char) ; table . set_right_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_right_icon\0" . as_ptr () as * const c_char) ; table . set_secret = (gd_api . godot_method_bind_get_method) (class_name , "set_secret\0" . as_ptr () as * const c_char) ; table . set_secret_character = (gd_api . godot_method_bind_get_method) (class_name , "set_secret_character\0" . as_ptr () as * const c_char) ; table . set_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selecting_enabled\0" . as_ptr () as * const c_char) ; table . set_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:658:40072 [INFO] [stdout] | [INFO] [stdout] 658 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 658 | # [doc = "`core class RichTextLabel` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_richtextlabel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`RichTextLabel` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRichTextLabel inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RichTextLabel { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Align (pub i64) ; impl Align { pub const LEFT : Align = Align (0i64) ; pub const CENTER : Align = Align (1i64) ; pub const RIGHT : Align = Align (2i64) ; pub const FILL : Align = Align (3i64) ; } impl From < i64 > for Align { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Align > for i64 { # [inline] fn from (v : Align) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ItemType (pub i64) ; impl ItemType { pub const FRAME : ItemType = ItemType (0i64) ; pub const TEXT : ItemType = ItemType (1i64) ; pub const IMAGE : ItemType = ItemType (2i64) ; pub const NEWLINE : ItemType = ItemType (3i64) ; pub const FONT : ItemType = ItemType (4i64) ; pub const COLOR : ItemType = ItemType (5i64) ; pub const UNDERLINE : ItemType = ItemType (6i64) ; pub const STRIKETHROUGH : ItemType = ItemType (7i64) ; pub const ALIGN : ItemType = ItemType (8i64) ; pub const INDENT : ItemType = ItemType (9i64) ; pub const LIST : ItemType = ItemType (10i64) ; pub const TABLE : ItemType = ItemType (11i64) ; pub const FADE : ItemType = ItemType (12i64) ; pub const SHAKE : ItemType = ItemType (13i64) ; pub const WAVE : ItemType = ItemType (14i64) ; pub const TORNADO : ItemType = ItemType (15i64) ; pub const RAINBOW : ItemType = ItemType (16i64) ; pub const META : ItemType = ItemType (17i64) ; pub const CUSTOMFX : ItemType = ItemType (18i64) ; } impl From < i64 > for ItemType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ItemType > for i64 { # [inline] fn from (v : ItemType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ListType (pub i64) ; impl ListType { pub const NUMBERS : ListType = ListType (0i64) ; pub const LETTERS : ListType = ListType (1i64) ; pub const DOTS : ListType = ListType (2i64) ; } impl From < i64 > for ListType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ListType > for i64 { # [inline] fn from (v : ListType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RichTextLabel { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const ITEM_ALIGN : i64 = 8i64 ; pub const ITEM_COLOR : i64 = 5i64 ; pub const ITEM_CUSTOMFX : i64 = 18i64 ; pub const ITEM_FADE : i64 = 12i64 ; pub const ITEM_FONT : i64 = 4i64 ; pub const ITEM_FRAME : i64 = 0i64 ; pub const ITEM_IMAGE : i64 = 2i64 ; pub const ITEM_INDENT : i64 = 9i64 ; pub const ITEM_LIST : i64 = 10i64 ; pub const ITEM_META : i64 = 17i64 ; pub const ITEM_NEWLINE : i64 = 3i64 ; pub const ITEM_RAINBOW : i64 = 16i64 ; pub const ITEM_SHAKE : i64 = 13i64 ; pub const ITEM_STRIKETHROUGH : i64 = 7i64 ; pub const ITEM_TABLE : i64 = 11i64 ; pub const ITEM_TEXT : i64 = 1i64 ; pub const ITEM_TORNADO : i64 = 15i64 ; pub const ITEM_UNDERLINE : i64 = 6i64 ; pub const ITEM_WAVE : i64 = 14i64 ; pub const LIST_DOTS : i64 = 2i64 ; pub const LIST_LETTERS : i64 = 1i64 ; pub const LIST_NUMBERS : i64 = 0i64 ; } impl RichTextLabel { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RichTextLabelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an image's opening and closing tags to the tag stack, optionally providing a `width` and `height` to resize the image.\nIf `width` or `height` is set to 0, the image size will be adjusted in order to keep the original aspect ratio.\n# Default Arguments\n* `width` - `0`\n* `height` - `0`"] # [doc = ""] # [inline] pub fn add_image (& self , image : impl AsArg < crate :: generated :: texture :: Texture > , width : i64 , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . add_image ; let ret = crate :: icalls :: icallptr_void_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , width , height) ; } } # [doc = "Adds raw non-BBCode-parsed text to the tag stack."] # [doc = ""] # [inline] pub fn add_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . add_text ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Parses `bbcode` and adds tags to the tag stack as needed. Returns the result of the parsing, [constant OK] if successful."] # [doc = ""] # [inline] pub fn append_bbcode (& self , bbcode : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . append_bbcode ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , bbcode . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Clears the tag stack and sets [member bbcode_text] to an empty string."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.\n**Note:** It is unadvised to use `+=` operator with `bbcode_text` (e.g. `bbcode_text += \"some string\"`) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead."] # [doc = ""] # [inline] pub fn bbcode (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_bbcode ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the height of the content."] # [doc = ""] # [inline] pub fn get_content_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_content_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The currently installed custom effects. This is an array of [RichTextEffect]s.\nTo add a custom effect, it's more convenient to use [method install_effect]."] # [doc = ""] # [inline] pub fn effects (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_effects ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total number of newlines in the tag stack's text tags. Considers wrapped text as one line."] # [doc = ""] # [inline] pub fn get_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_line_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.\n**Note:** Setting this property updates [member visible_characters] based on current [method get_total_character_count]."] # [doc = ""] # [inline] pub fn percent_visible (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_percent_visible ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The number of spaces associated with a single tab length. Does not affect `\\t` in text tags, only indent tags."] # [doc = ""] # [inline] pub fn tab_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_tab_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The raw text of the label.\nWhen set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text]."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the total number of characters from text tags. Does not include BBCodes."] # [doc = ""] # [inline] pub fn get_total_character_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_total_character_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the vertical scrollbar."] # [doc = ""] # [inline] pub fn get_v_scroll (& self) -> Option < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_v_scroll ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The restricted number of characters to display in the label. If `-1`, all characters will be displayed."] # [doc = ""] # [inline] pub fn visible_characters (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_visible_characters ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the number of visible lines."] # [doc = ""] # [inline] pub fn get_visible_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_visible_line_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Installs a custom effect. `effect` should be a valid [RichTextEffect]."] # [doc = ""] # [inline] pub fn install_effect (& self , effect : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . install_effect ; let ret = crate :: icalls :: icallptr_void_var (method_bind , self . this . sys () . as_ptr () , effect . owned_to_variant ()) ; } } # [doc = "If `true`, the label's height will be automatically updated to fit its content.\n**Note:** This property is used as a workaround to fix issues with [RichTextLabel] in [Container]s, but it's unreliable in some cases and will be removed in future versions."] # [doc = ""] # [inline] pub fn is_fit_content_height_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_fit_content_height_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label underlines meta tags such as `[url]{text}[/url]`."] # [doc = ""] # [inline] pub fn is_meta_underlined (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_meta_underlined ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label uses the custom font color."] # [doc = ""] # [inline] pub fn is_overriding_selected_font_color (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_overriding_selected_font_color ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See [method scroll_to_line]."] # [doc = ""] # [inline] pub fn is_scroll_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_scroll_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the window scrolls down to display new content automatically."] # [doc = ""] # [inline] pub fn is_scroll_following (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_scroll_following ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label allows text selection."] # [doc = ""] # [inline] pub fn is_selection_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_selection_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the label uses BBCode formatting."] # [doc = ""] # [inline] pub fn is_using_bbcode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_using_bbcode ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Adds a newline tag to the tag stack."] # [doc = ""] # [inline] pub fn newline (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . newline ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The assignment version of [method append_bbcode]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses `bbcode` successfully."] # [doc = ""] # [inline] pub fn parse_bbcode (& self , bbcode : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . parse_bbcode ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , bbcode . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Parses BBCode parameter `expressions` into a dictionary."] # [doc = ""] # [inline] pub fn parse_expressions_for_values (& self , expressions : StringArray) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . parse_expressions_for_values ; let ret = crate :: icalls :: icallptr_dict_strarr (method_bind , self . this . sys () . as_ptr () , expressions) ; Dictionary :: from_sys (ret) } } # [doc = "Terminates the current tag. Use after `push_*` methods to close BBCodes manually. Does not need to follow `add_*` methods."] # [doc = ""] # [inline] pub fn pop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . pop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds an `[align]` tag based on the given `align` value. See [enum Align] for possible values."] # [doc = ""] # [inline] pub fn push_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_align ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "Adds a `[font]` tag with a bold font to the tag stack. This is the same as adding a `**` tag if not currently in a `[i]` tag."] # [doc = ""] # [inline] pub fn push_bold (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_bold ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[font]` tag with a bold italics font to the tag stack."] # [doc = ""] # [inline] pub fn push_bold_italics (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_bold_italics ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[cell]` tag to the tag stack. Must be inside a `[table]` tag. See [method push_table] for details."] # [doc = ""] # [inline] pub fn push_cell (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_cell ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[color]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Adds a `[font]` tag to the tag stack. Overrides default fonts for its duration."] # [doc = ""] # [inline] pub fn push_font (& self , font : impl AsArg < crate :: generated :: font :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_font ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr ()) ; } } # [doc = "Adds an `[indent]` tag to the tag stack. Multiplies `level` by current [member tab_size] to determine new margin length."] # [doc = ""] # [inline] pub fn push_indent (& self , level : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_indent ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , level) ; } } # [doc = "Adds a `[font]` tag with a italics font to the tag stack. This is the same as adding a `[i]` tag if not currently in a `**` tag."] # [doc = ""] # [inline] pub fn push_italics (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_italics ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[list]` tag to the tag stack. Similar to the BBCodes `[ol]` or `[ul]`, but supports more list types. Not fully implemented!"] # [doc = ""] # [inline] pub fn push_list (& self , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_list ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } # [doc = "Adds a `[meta]` tag to the tag stack. Similar to the BBCode `[url=something]{text}[/url]`, but supports non-[String] metadata types."] # [doc = ""] # [inline] pub fn push_meta (& self , data : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_meta ; let ret = crate :: icalls :: icallptr_void_var (method_bind , self . this . sys () . as_ptr () , data . owned_to_variant ()) ; } } # [doc = "Adds a `[font]` tag with a monospace font to the tag stack."] # [doc = ""] # [inline] pub fn push_mono (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_mono ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[font]` tag with a normal font to the tag stack."] # [doc = ""] # [inline] pub fn push_normal (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_normal ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[s]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_strikethrough (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_strikethrough ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[table=columns]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_table (& self , columns : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_table ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , columns) ; } } # [doc = "Adds a `[u]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_underline (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_underline ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a line of content from the label. Returns `true` if the line exists.\nThe `line` argument is the index of the line to remove, it can take values in the interval `[0, get_line_count() - 1]`."] # [doc = ""] # [inline] pub fn remove_line (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . remove_line ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , line) ; ret as _ } } # [doc = "Scrolls the window's top line to match `line`."] # [doc = ""] # [inline] pub fn scroll_to_line (& self , line : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . scroll_to_line ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , line) ; } } # [doc = "The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.\n**Note:** It is unadvised to use `+=` operator with `bbcode_text` (e.g. `bbcode_text += \"some string\"`) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead."] # [doc = ""] # [inline] pub fn set_bbcode (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_bbcode ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "The currently installed custom effects. This is an array of [RichTextEffect]s.\nTo add a custom effect, it's more convenient to use [method install_effect]."] # [doc = ""] # [inline] pub fn set_effects (& self , effects : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_effects ; let ret = crate :: icalls :: icallptr_void_arr (method_bind , self . this . sys () . as_ptr () , effects) ; } } # [doc = "If `true`, the label's height will be automatically updated to fit its content.\n**Note:** This property is used as a workaround to fix issues with [RichTextLabel] in [Container]s, but it's unreliable in some cases and will be removed in future versions."] # [doc = ""] # [inline] pub fn set_fit_content_height (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_fit_content_height ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, the label underlines meta tags such as `[url]{text}[/url]`."] # [doc = ""] # [inline] pub fn set_meta_underline (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_meta_underline ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the label uses the custom font color."] # [doc = ""] # [inline] pub fn set_override_selected_font_color (& self , _override : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_override_selected_font_color ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _override) ; } } # [doc = "The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.\n**Note:** Setting this property updates [member visible_characters] based on current [method get_total_character_count]."] # [doc = ""] # [inline] pub fn set_percent_visible (& self , percent_visible : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_percent_visible ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , percent_visible) ; } } # [doc = "If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See [method scroll_to_line]."] # [doc = ""] # [inline] pub fn set_scroll_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_scroll_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "If `true`, the window scrolls down to display new content automatically."] # [doc = ""] # [inline] pub fn set_scroll_follow (& self , follow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_scroll_follow ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , follow) ; } } # [doc = "If `true`, the label allows text selection."] # [doc = ""] # [inline] pub fn set_selection_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_selection_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The number of spaces associated with a single tab length. Does not affect `\\t` in text tags, only indent tags."] # [doc = ""] # [inline] pub fn set_tab_size (& self , spaces : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_tab_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , spaces) ; } } # [doc = "Edits the selected column's expansion options. If `expand` is `true`, the column expands in proportion to its expansion ratio versus the other columns' ratios.\nFor example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.\nIf `expand` is `false`, the column will not contribute to the total ratio."] # [doc = ""] # [inline] pub fn set_table_column_expand (& self , column : i64 , expand : bool , ratio : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_table_column_expand ; let ret = crate :: icalls :: icallptr_void_i64_bool_i64 (method_bind , self . this . sys () . as_ptr () , column , expand , ratio) ; } } # [doc = "The raw text of the label.\nWhen set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text]."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, the label uses BBCode formatting."] # [doc = ""] # [inline] pub fn set_use_bbcode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_use_bbcode ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The restricted number of characters to display in the label. If `-1`, all characters will be displayed."] # [doc = ""] # [inline] pub fn set_visible_characters (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_visible_characters ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RichTextLabel { } unsafe impl GodotObject for RichTextLabel { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RichTextLabel" } } impl QueueFree for RichTextLabel { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RichTextLabel { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RichTextLabel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: node :: Node > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: object :: Object > for RichTextLabel { } impl Instanciable for RichTextLabel { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RichTextLabel :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RichTextLabelMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_image : * mut sys :: godot_method_bind , pub add_text : * mut sys :: godot_method_bind , pub append_bbcode : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_bbcode : * mut sys :: godot_method_bind , pub get_content_height : * mut sys :: godot_method_bind , pub get_effects : * mut sys :: godot_method_bind , pub get_line_count : * mut sys :: godot_method_bind , pub get_percent_visible : * mut sys :: godot_method_bind , pub get_tab_size : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub get_total_character_count : * mut sys :: godot_method_bind , pub get_v_scroll : * mut sys :: godot_method_bind , pub get_visible_characters : * mut sys :: godot_method_bind , pub get_visible_line_count : * mut sys :: godot_method_bind , pub install_effect : * mut sys :: godot_method_bind , pub is_fit_content_height_enabled : * mut sys :: godot_method_bind , pub is_meta_underlined : * mut sys :: godot_method_bind , pub is_overriding_selected_font_color : * mut sys :: godot_method_bind , pub is_scroll_active : * mut sys :: godot_method_bind , pub is_scroll_following : * mut sys :: godot_method_bind , pub is_selection_enabled : * mut sys :: godot_method_bind , pub is_using_bbcode : * mut sys :: godot_method_bind , pub newline : * mut sys :: godot_method_bind , pub parse_bbcode : * mut sys :: godot_method_bind , pub parse_expressions_for_values : * mut sys :: godot_method_bind , pub pop : * mut sys :: godot_method_bind , pub push_align : * mut sys :: godot_method_bind , pub push_bold : * mut sys :: godot_method_bind , pub push_bold_italics : * mut sys :: godot_method_bind , pub push_cell : * mut sys :: godot_method_bind , pub push_color : * mut sys :: godot_method_bind , pub push_font : * mut sys :: godot_method_bind , pub push_indent : * mut sys :: godot_method_bind , pub push_italics : * mut sys :: godot_method_bind , pub push_list : * mut sys :: godot_method_bind , pub push_meta : * mut sys :: godot_method_bind , pub push_mono : * mut sys :: godot_method_bind , pub push_normal : * mut sys :: godot_method_bind , pub push_strikethrough : * mut sys :: godot_method_bind , pub push_table : * mut sys :: godot_method_bind , pub push_underline : * mut sys :: godot_method_bind , pub remove_line : * mut sys :: godot_method_bind , pub scroll_to_line : * mut sys :: godot_method_bind , pub set_bbcode : * mut sys :: godot_method_bind , pub set_effects : * mut sys :: godot_method_bind , pub set_fit_content_height : * mut sys :: godot_method_bind , pub set_meta_underline : * mut sys :: godot_method_bind , pub set_override_selected_font_color : * mut sys :: godot_method_bind , pub set_percent_visible : * mut sys :: godot_method_bind , pub set_scroll_active : * mut sys :: godot_method_bind , pub set_scroll_follow : * mut sys :: godot_method_bind , pub set_selection_enabled : * mut sys :: godot_method_bind , pub set_tab_size : * mut sys :: godot_method_bind , pub set_table_column_expand : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_use_bbcode : * mut sys :: godot_method_bind , pub set_visible_characters : * mut sys :: godot_method_bind } impl RichTextLabelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RichTextLabelMethodTable = RichTextLabelMethodTable { class_constructor : None , add_image : 0 as * mut sys :: godot_method_bind , add_text : 0 as * mut sys :: godot_method_bind , append_bbcode : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_bbcode : 0 as * mut sys :: godot_method_bind , get_content_height : 0 as * mut sys :: godot_method_bind , get_effects : 0 as * mut sys :: godot_method_bind , get_line_count : 0 as * mut sys :: godot_method_bind , get_percent_visible : 0 as * mut sys :: godot_method_bind , get_tab_size : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , get_total_character_count : 0 as * mut sys :: godot_method_bind , get_v_scroll : 0 as * mut sys :: godot_method_bind , get_visible_characters : 0 as * mut sys :: godot_method_bind , get_visible_line_count : 0 as * mut sys :: godot_method_bind , install_effect : 0 as * mut sys :: godot_method_bind , is_fit_content_height_enabled : 0 as * mut sys :: godot_method_bind , is_meta_underlined : 0 as * mut sys :: godot_method_bind , is_overriding_selected_font_color : 0 as * mut sys :: godot_method_bind , is_scroll_active : 0 as * mut sys :: godot_method_bind , is_scroll_following : 0 as * mut sys :: godot_method_bind , is_selection_enabled : 0 as * mut sys :: godot_method_bind , is_using_bbcode : 0 as * mut sys :: godot_method_bind , newline : 0 as * mut sys :: godot_method_bind , parse_bbcode : 0 as * mut sys :: godot_method_bind , parse_expressions_for_values : 0 as * mut sys :: godot_method_bind , pop : 0 as * mut sys :: godot_method_bind , push_align : 0 as * mut sys :: godot_method_bind , push_bold : 0 as * mut sys :: godot_method_bind , push_bold_italics : 0 as * mut sys :: godot_method_bind , push_cell : 0 as * mut sys :: godot_method_bind , push_color : 0 as * mut sys :: godot_method_bind , push_font : 0 as * mut sys :: godot_method_bind , push_indent : 0 as * mut sys :: godot_method_bind , push_italics : 0 as * mut sys :: godot_method_bind , push_list : 0 as * mut sys :: godot_method_bind , push_meta : 0 as * mut sys :: godot_method_bind , push_mono : 0 as * mut sys :: godot_method_bind , push_normal : 0 as * mut sys :: godot_method_bind , push_strikethrough : 0 as * mut sys :: godot_method_bind , push_table : 0 as * mut sys :: godot_method_bind , push_underline : 0 as * mut sys :: godot_method_bind , remove_line : 0 as * mut sys :: godot_method_bind , scroll_to_line : 0 as * mut sys :: godot_method_bind , set_bbcode : 0 as * mut sys :: godot_method_bind , set_effects : 0 as * mut sys :: godot_method_bind , set_fit_content_height : 0 as * mut sys :: godot_method_bind , set_meta_underline : 0 as * mut sys :: godot_method_bind , set_override_selected_font_color : 0 as * mut sys :: godot_method_bind , set_percent_visible : 0 as * mut sys :: godot_method_bind , set_scroll_active : 0 as * mut sys :: godot_method_bind , set_scroll_follow : 0 as * mut sys :: godot_method_bind , set_selection_enabled : 0 as * mut sys :: godot_method_bind , set_tab_size : 0 as * mut sys :: godot_method_bind , set_table_column_expand : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_use_bbcode : 0 as * mut sys :: godot_method_bind , set_visible_characters : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RichTextLabelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RichTextLabel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_image = (gd_api . godot_method_bind_get_method) (class_name , "add_image\0" . as_ptr () as * const c_char) ; table . add_text = (gd_api . godot_method_bind_get_method) (class_name , "add_text\0" . as_ptr () as * const c_char) ; table . append_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "append_bbcode\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "get_bbcode\0" . as_ptr () as * const c_char) ; table . get_content_height = (gd_api . godot_method_bind_get_method) (class_name , "get_content_height\0" . as_ptr () as * const c_char) ; table . get_effects = (gd_api . godot_method_bind_get_method) (class_name , "get_effects\0" . as_ptr () as * const c_char) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\0" . as_ptr () as * const c_char) ; table . get_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_percent_visible\0" . as_ptr () as * const c_char) ; table . get_tab_size = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_size\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_total_character_count = (gd_api . godot_method_bind_get_method) (class_name , "get_total_character_count\0" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\0" . as_ptr () as * const c_char) ; table . get_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_characters\0" . as_ptr () as * const c_char) ; table . get_visible_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_line_count\0" . as_ptr () as * const c_char) ; table . install_effect = (gd_api . godot_method_bind_get_method) (class_name , "install_effect\0" . as_ptr () as * const c_char) ; table . is_fit_content_height_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fit_content_height_enabled\0" . as_ptr () as * const c_char) ; table . is_meta_underlined = (gd_api . godot_method_bind_get_method) (class_name , "is_meta_underlined\0" . as_ptr () as * const c_char) ; table . is_overriding_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_selected_font_color\0" . as_ptr () as * const c_char) ; table . is_scroll_active = (gd_api . godot_method_bind_get_method) (class_name , "is_scroll_active\0" . as_ptr () as * const c_char) ; table . is_scroll_following = (gd_api . godot_method_bind_get_method) (class_name , "is_scroll_following\0" . as_ptr () as * const c_char) ; table . is_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selection_enabled\0" . as_ptr () as * const c_char) ; table . is_using_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "is_using_bbcode\0" . as_ptr () as * const c_char) ; table . newline = (gd_api . godot_method_bind_get_method) (class_name , "newline\0" . as_ptr () as * const c_char) ; table . parse_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "parse_bbcode\0" . as_ptr () as * const c_char) ; table . parse_expressions_for_values = (gd_api . godot_method_bind_get_method) (class_name , "parse_expressions_for_values\0" . as_ptr () as * const c_char) ; table . pop = (gd_api . godot_method_bind_get_method) (class_name , "pop\0" . as_ptr () as * const c_char) ; table . push_align = (gd_api . godot_method_bind_get_method) (class_name , "push_align\0" . as_ptr () as * const c_char) ; table . push_bold = (gd_api . godot_method_bind_get_method) (class_name , "push_bold\0" . as_ptr () as * const c_char) ; table . push_bold_italics = (gd_api . godot_method_bind_get_method) (class_name , "push_bold_italics\0" . as_ptr () as * const c_char) ; table . push_cell = (gd_api . godot_method_bind_get_method) (class_name , "push_cell\0" . as_ptr () as * const c_char) ; table . push_color = (gd_api . godot_method_bind_get_method) (class_name , "push_color\0" . as_ptr () as * const c_char) ; table . push_font = (gd_api . godot_method_bind_get_method) (class_name , "push_font\0" . as_ptr () as * const c_char) ; table . push_indent = (gd_api . godot_method_bind_get_method) (class_name , "push_indent\0" . as_ptr () as * const c_char) ; table . push_italics = (gd_api . godot_method_bind_get_method) (class_name , "push_italics\0" . as_ptr () as * const c_char) ; table . push_list = (gd_api . godot_method_bind_get_method) (class_name , "push_list\0" . as_ptr () as * const c_char) ; table . push_meta = (gd_api . godot_method_bind_get_method) (class_name , "push_meta\0" . as_ptr () as * const c_char) ; table . push_mono = (gd_api . godot_method_bind_get_method) (class_name , "push_mono\0" . as_ptr () as * const c_char) ; table . push_normal = (gd_api . godot_method_bind_get_method) (class_name , "push_normal\0" . as_ptr () as * const c_char) ; table . push_strikethrough = (gd_api . godot_method_bind_get_method) (class_name , "push_strikethrough\0" . as_ptr () as * const c_char) ; table . push_table = (gd_api . godot_method_bind_get_method) (class_name , "push_table\0" . as_ptr () as * const c_char) ; table . push_underline = (gd_api . godot_method_bind_get_method) (class_name , "push_underline\0" . as_ptr () as * const c_char) ; table . remove_line = (gd_api . godot_method_bind_get_method) (class_name , "remove_line\0" . as_ptr () as * const c_char) ; table . scroll_to_line = (gd_api . godot_method_bind_get_method) (class_name , "scroll_to_line\0" . as_ptr () as * const c_char) ; table . set_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "set_bbcode\0" . as_ptr () as * const c_char) ; table . set_effects = (gd_api . godot_method_bind_get_method) (class_name , "set_effects\0" . as_ptr () as * const c_char) ; table . set_fit_content_height = (gd_api . godot_method_bind_get_method) (class_name , "set_fit_content_height\0" . as_ptr () as * const c_char) ; table . set_meta_underline = (gd_api . godot_method_bind_get_method) (class_name , "set_meta_underline\0" . as_ptr () as * const c_char) ; table . set_override_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "set_override_selected_font_color\0" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\0" . as_ptr () as * const c_char) ; table . set_scroll_active = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_active\0" . as_ptr () as * const c_char) ; table . set_scroll_follow = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_follow\0" . as_ptr () as * const c_char) ; table . set_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selection_enabled\0" . as_ptr () as * const c_char) ; table . set_tab_size = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_size\0" . as_ptr () as * const c_char) ; table . set_table_column_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_table_column_expand\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_use_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "set_use_bbcode\0" . as_ptr () as * const c_char) ; table . set_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "set_visible_characters\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:664:12374 [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 singleton class ProjectSettings` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_projectsettings.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nProjectSettings inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ProjectSettings { this : RawObject < Self > , } impl ProjectSettings { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("ProjectSettings\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAdds a custom property info to a property. The dictionary must contain:\n- `name`: [String] (the property's name)\n- `type`: [int] (see [enum Variant.Type])\n- optionally `hint`: [int] (see [enum PropertyHint]) and `hint_string`: [String]\n**Example:**\n```gdscript\nProjectSettings.set(\"category/property_name\", 0)\n\nvar property_info = {\n \"name\": \"category/property_name\",\n \"type\": TYPE_INT,\n \"hint\": PROPERTY_HINT_ENUM,\n \"hint_string\": \"one,two,three\"\n}\n\nProjectSettings.add_property_info(property_info)\n```"] # [doc = ""] # [inline] pub fn add_property_info (& self , hint : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . add_property_info ; let ret = crate :: icalls :: icallptr_void_dict (method_bind , self . this . sys () . as_ptr () , hint) ; } } # [doc = "Clears the whole configuration (not recommended, may break things)."] # [doc = ""] # [inline] pub fn clear (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Returns the order of a configuration value (influences when saved to the config file)."] # [doc = ""] # [inline] pub fn get_order (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . get_order ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the value of a setting.\n**Example:**\n```gdscript\nprint(ProjectSettings.get_setting(\"application/config/name\"))\n```"] # [doc = ""] # [inline] pub fn get_setting (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . get_setting ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "Converts a localized path (`res://`) to a full native OS path."] # [doc = ""] # [inline] pub fn globalize_path (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . globalize_path ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if a configuration value is present."] # [doc = ""] # [inline] pub fn has_setting (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . has_setting ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Loads the contents of the .pck or .zip file specified by `pack` into the resource filesystem (`res://`). Returns `true` on success.\n**Note:** If a file from `pack` shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from `pack` unless `replace_files` is set to `false`.\n# Default Arguments\n* `replace_files` - `true`"] # [doc = ""] # [inline] pub fn load_resource_pack (& self , pack : impl Into < GodotString > , replace_files : bool , offset : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . load_resource_pack ; let ret = crate :: icalls :: icallptr_bool_str_bool_i64 (method_bind , self . this . sys () . as_ptr () , pack . into () , replace_files , offset) ; ret as _ } } # [doc = "Convert a path to a localized path (`res://` path)."] # [doc = ""] # [inline] pub fn localize_path (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . localize_path ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns `true` if the specified property exists and its initial value differs from the current value."] # [doc = ""] # [inline] pub fn property_can_revert (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . property_can_revert ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the specified property's initial value. Returns `null` if the property does not exist."] # [doc = ""] # [inline] pub fn property_get_revert (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . property_get_revert ; let ret = crate :: icalls :: icallptr_var_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; Variant :: from_sys (ret) } } # [doc = "Saves the configuration to the `project.godot` file."] # [doc = ""] # [inline] pub fn save (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the configuration to a custom file. The file extension must be `.godot` (to save in text-based [ConfigFile] format) or `.binary` (to save in binary format)."] # [doc = ""] # [inline] pub fn save_custom (& self , file : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . save_custom ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Sets the specified property's initial value. This is the value the property reverts to."] # [doc = ""] # [inline] pub fn set_initial_value (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . set_initial_value ; let ret = crate :: icalls :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } # [doc = "Sets the order of a configuration value (influences when saved to the config file)."] # [doc = ""] # [inline] pub fn set_order (& self , name : impl Into < GodotString > , position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . set_order ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , position) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the value of a setting.\n**Example:**\n```gdscript\nProjectSettings.set_setting(\"application/config/name\", \"Example\")\n```"] # [doc = ""] # [inline] pub fn set_setting (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . set_setting ; let ret = crate :: icalls :: icallptr_void_str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProjectSettings { } unsafe impl GodotObject for ProjectSettings { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ProjectSettings" } } impl std :: ops :: Deref for ProjectSettings { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProjectSettings { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for ProjectSettings { } unsafe impl Send for ProjectSettings { } unsafe impl Sync for ProjectSettings { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ProjectSettingsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_property_info : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_order : * mut sys :: godot_method_bind , pub get_setting : * mut sys :: godot_method_bind , pub globalize_path : * mut sys :: godot_method_bind , pub has_setting : * mut sys :: godot_method_bind , pub load_resource_pack : * mut sys :: godot_method_bind , pub localize_path : * mut sys :: godot_method_bind , pub property_can_revert : * mut sys :: godot_method_bind , pub property_get_revert : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind , pub save_custom : * mut sys :: godot_method_bind , pub set_initial_value : * mut sys :: godot_method_bind , pub set_order : * mut sys :: godot_method_bind , pub set_setting : * mut sys :: godot_method_bind } impl ProjectSettingsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ProjectSettingsMethodTable = ProjectSettingsMethodTable { class_constructor : None , add_property_info : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_order : 0 as * mut sys :: godot_method_bind , get_setting : 0 as * mut sys :: godot_method_bind , globalize_path : 0 as * mut sys :: godot_method_bind , has_setting : 0 as * mut sys :: godot_method_bind , load_resource_pack : 0 as * mut sys :: godot_method_bind , localize_path : 0 as * mut sys :: godot_method_bind , property_can_revert : 0 as * mut sys :: godot_method_bind , property_get_revert : 0 as * mut sys :: godot_method_bind , save : 0 as * mut sys :: godot_method_bind , save_custom : 0 as * mut sys :: godot_method_bind , set_initial_value : 0 as * mut sys :: godot_method_bind , set_order : 0 as * mut sys :: godot_method_bind , set_setting : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ProjectSettingsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ProjectSettings\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_property_info = (gd_api . godot_method_bind_get_method) (class_name , "add_property_info\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_order = (gd_api . godot_method_bind_get_method) (class_name , "get_order\0" . as_ptr () as * const c_char) ; table . get_setting = (gd_api . godot_method_bind_get_method) (class_name , "get_setting\0" . as_ptr () as * const c_char) ; table . globalize_path = (gd_api . godot_method_bind_get_method) (class_name , "globalize_path\0" . as_ptr () as * const c_char) ; table . has_setting = (gd_api . godot_method_bind_get_method) (class_name , "has_setting\0" . as_ptr () as * const c_char) ; table . load_resource_pack = (gd_api . godot_method_bind_get_method) (class_name , "load_resource_pack\0" . as_ptr () as * const c_char) ; table . localize_path = (gd_api . godot_method_bind_get_method) (class_name , "localize_path\0" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\0" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; table . save_custom = (gd_api . godot_method_bind_get_method) (class_name , "save_custom\0" . as_ptr () as * const c_char) ; table . set_initial_value = (gd_api . godot_method_bind_get_method) (class_name , "set_initial_value\0" . as_ptr () as * const c_char) ; table . set_order = (gd_api . godot_method_bind_get_method) (class_name , "set_order\0" . as_ptr () as * const c_char) ; table . set_setting = (gd_api . godot_method_bind_get_method) (class_name , "set_setting\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:670:5159 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:676:5412 [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 PinJoint2D` inherits `Joint2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_pinjoint2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`PinJoint2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPinJoint2D inherits methods from:\n - [Joint2D](struct.Joint2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PinJoint2D { this : RawObject < Self > , } impl PinJoint2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PinJoint2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The higher this value, the more the bond to the pinned partner can flex."] # [doc = ""] # [inline] pub fn softness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PinJoint2DMethodTable :: get (get_api ()) . get_softness ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The higher this value, the more the bond to the pinned partner can flex."] # [doc = ""] # [inline] pub fn set_softness (& self , softness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PinJoint2DMethodTable :: get (get_api ()) . set_softness ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , softness) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PinJoint2D { } unsafe impl GodotObject for PinJoint2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PinJoint2D" } } impl QueueFree for PinJoint2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PinJoint2D { type Target = crate :: generated :: joint_2d :: Joint2D ; # [inline] fn deref (& self) -> & crate :: generated :: joint_2d :: Joint2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PinJoint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint_2d :: Joint2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint_2d :: Joint2D > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for PinJoint2D { } impl Instanciable for PinJoint2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PinJoint2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PinJoint2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_softness : * mut sys :: godot_method_bind , pub set_softness : * mut sys :: godot_method_bind } impl PinJoint2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PinJoint2DMethodTable = PinJoint2DMethodTable { class_constructor : None , get_softness : 0 as * mut sys :: godot_method_bind , set_softness : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PinJoint2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PinJoint2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_softness = (gd_api . godot_method_bind_get_method) (class_name , "get_softness\0" . as_ptr () as * const c_char) ; table . set_softness = (gd_api . godot_method_bind_get_method) (class_name , "set_softness\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:682:4452 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:688:11978 [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 SpriteFrames` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_spriteframes.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSpriteFrames inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpriteFrames { this : RawObject < Self > , } impl SpriteFrames { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpriteFramesMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new animation to the library."] # [doc = ""] # [inline] pub fn add_animation (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . add_animation ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "Adds a frame to the given animation.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_frame (& self , anim : impl Into < GodotString > , frame : impl AsArg < crate :: generated :: texture :: Texture > , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . add_frame ; let ret = crate :: icalls :: icallptr_void_str_obj_i64 (method_bind , self . this . sys () . as_ptr () , anim . into () , frame . as_arg_ptr () , at_position) ; } } # [doc = "Removes all frames from the given animation."] # [doc = ""] # [inline] pub fn clear (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "Removes all animations. A \"default\" animation will be created."] # [doc = ""] # [inline] pub fn clear_all (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . clear_all ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the given animation will loop."] # [doc = ""] # [inline] pub fn get_animation_loop (& self , anim : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_animation_loop ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; ret as _ } } # [doc = "Returns an array containing the names associated to each animation. Values are placed in alphabetical order."] # [doc = ""] # [inline] pub fn get_animation_names (& self) -> StringArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_animation_names ; let ret = crate :: icalls :: icallptr_strarr (method_bind , self . this . sys () . as_ptr ()) ; StringArray :: from_sys (ret) } } # [doc = "The animation's speed in frames per second."] # [doc = ""] # [inline] pub fn get_animation_speed (& self , anim : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_animation_speed ; let ret = crate :: icalls :: icallptr_f64_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; ret as _ } } # [doc = "Returns the animation's selected frame."] # [doc = ""] # [inline] pub fn get_frame (& self , anim : impl Into < GodotString > , idx : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallptr_obj_str_i64 (method_bind , self . this . sys () . as_ptr () , anim . into () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of frames in the animation."] # [doc = ""] # [inline] pub fn get_frame_count (& self , anim : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_frame_count ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; ret as _ } } # [doc = "If `true`, the named animation exists."] # [doc = ""] # [inline] pub fn has_animation (& self , anim : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . has_animation ; let ret = crate :: icalls :: icallptr_bool_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; ret as _ } } # [doc = "Removes the given animation."] # [doc = ""] # [inline] pub fn remove_animation (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . remove_animation ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "Removes the animation's selected frame."] # [doc = ""] # [inline] pub fn remove_frame (& self , anim : impl Into < GodotString > , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . remove_frame ; let ret = crate :: icalls :: icallptr_void_str_i64 (method_bind , self . this . sys () . as_ptr () , anim . into () , idx) ; } } # [doc = "Changes the animation's name to `newname`."] # [doc = ""] # [inline] pub fn rename_animation (& self , anim : impl Into < GodotString > , newname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . rename_animation ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , anim . into () , newname . into ()) ; } } # [doc = "If `true`, the animation will loop."] # [doc = ""] # [inline] pub fn set_animation_loop (& self , anim : impl Into < GodotString > , _loop : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . set_animation_loop ; let ret = crate :: icalls :: icallptr_void_str_bool (method_bind , self . this . sys () . as_ptr () , anim . into () , _loop) ; } } # [doc = "The animation's speed in frames per second."] # [doc = ""] # [inline] pub fn set_animation_speed (& self , anim : impl Into < GodotString > , speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . set_animation_speed ; let ret = crate :: icalls :: icallptr_void_str_f64 (method_bind , self . this . sys () . as_ptr () , anim . into () , speed) ; } } # [doc = "Sets the texture of the given frame."] # [doc = ""] # [inline] pub fn set_frame (& self , anim : impl Into < GodotString > , idx : i64 , txt : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallptr_void_str_i64_obj (method_bind , self . this . sys () . as_ptr () , anim . into () , idx , txt . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpriteFrames { } unsafe impl GodotObject for SpriteFrames { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpriteFrames" } } impl std :: ops :: Deref for SpriteFrames { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpriteFrames { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for SpriteFrames { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SpriteFrames { } unsafe impl SubClass < crate :: generated :: object :: Object > for SpriteFrames { } impl Instanciable for SpriteFrames { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SpriteFrames :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpriteFramesMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_animation : * mut sys :: godot_method_bind , pub add_frame : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub clear_all : * mut sys :: godot_method_bind , pub get_animation_loop : * mut sys :: godot_method_bind , pub get_animation_names : * mut sys :: godot_method_bind , pub get_animation_speed : * mut sys :: godot_method_bind , pub get_frame : * mut sys :: godot_method_bind , pub get_frame_count : * mut sys :: godot_method_bind , pub has_animation : * mut sys :: godot_method_bind , pub remove_animation : * mut sys :: godot_method_bind , pub remove_frame : * mut sys :: godot_method_bind , pub rename_animation : * mut sys :: godot_method_bind , pub set_animation_loop : * mut sys :: godot_method_bind , pub set_animation_speed : * mut sys :: godot_method_bind , pub set_frame : * mut sys :: godot_method_bind } impl SpriteFramesMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpriteFramesMethodTable = SpriteFramesMethodTable { class_constructor : None , add_animation : 0 as * mut sys :: godot_method_bind , add_frame : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , clear_all : 0 as * mut sys :: godot_method_bind , get_animation_loop : 0 as * mut sys :: godot_method_bind , get_animation_names : 0 as * mut sys :: godot_method_bind , get_animation_speed : 0 as * mut sys :: godot_method_bind , get_frame : 0 as * mut sys :: godot_method_bind , get_frame_count : 0 as * mut sys :: godot_method_bind , has_animation : 0 as * mut sys :: godot_method_bind , remove_animation : 0 as * mut sys :: godot_method_bind , remove_frame : 0 as * mut sys :: godot_method_bind , rename_animation : 0 as * mut sys :: godot_method_bind , set_animation_loop : 0 as * mut sys :: godot_method_bind , set_animation_speed : 0 as * mut sys :: godot_method_bind , set_frame : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SpriteFramesMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpriteFrames\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_animation = (gd_api . godot_method_bind_get_method) (class_name , "add_animation\0" . as_ptr () as * const c_char) ; table . add_frame = (gd_api . godot_method_bind_get_method) (class_name , "add_frame\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . clear_all = (gd_api . godot_method_bind_get_method) (class_name , "clear_all\0" . as_ptr () as * const c_char) ; table . get_animation_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_loop\0" . as_ptr () as * const c_char) ; table . get_animation_names = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_names\0" . as_ptr () as * const c_char) ; table . get_animation_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_speed\0" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_frame_count = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_count\0" . as_ptr () as * const c_char) ; table . has_animation = (gd_api . godot_method_bind_get_method) (class_name , "has_animation\0" . as_ptr () as * const c_char) ; table . remove_animation = (gd_api . godot_method_bind_get_method) (class_name , "remove_animation\0" . as_ptr () as * const c_char) ; table . remove_frame = (gd_api . godot_method_bind_get_method) (class_name , "remove_frame\0" . as_ptr () as * const c_char) ; table . rename_animation = (gd_api . godot_method_bind_get_method) (class_name , "rename_animation\0" . as_ptr () as * const c_char) ; table . set_animation_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_loop\0" . as_ptr () as * const c_char) ; table . set_animation_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_speed\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:694:7382 [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 singleton class Performance` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_performance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPerformance inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Performance { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Monitor (pub i64) ; impl Monitor { pub const TIME_FPS : Monitor = Monitor (0i64) ; pub const TIME_PROCESS : Monitor = Monitor (1i64) ; pub const TIME_PHYSICS_PROCESS : Monitor = Monitor (2i64) ; pub const MEMORY_STATIC : Monitor = Monitor (3i64) ; pub const MEMORY_DYNAMIC : Monitor = Monitor (4i64) ; pub const MEMORY_STATIC_MAX : Monitor = Monitor (5i64) ; pub const MEMORY_DYNAMIC_MAX : Monitor = Monitor (6i64) ; pub const MEMORY_MESSAGE_BUFFER_MAX : Monitor = Monitor (7i64) ; pub const OBJECT_COUNT : Monitor = Monitor (8i64) ; pub const OBJECT_RESOURCE_COUNT : Monitor = Monitor (9i64) ; pub const OBJECT_NODE_COUNT : Monitor = Monitor (10i64) ; pub const OBJECT_ORPHAN_NODE_COUNT : Monitor = Monitor (11i64) ; pub const RENDER_OBJECTS_IN_FRAME : Monitor = Monitor (12i64) ; pub const RENDER_VERTICES_IN_FRAME : Monitor = Monitor (13i64) ; pub const RENDER_MATERIAL_CHANGES_IN_FRAME : Monitor = Monitor (14i64) ; pub const RENDER_SHADER_CHANGES_IN_FRAME : Monitor = Monitor (15i64) ; pub const RENDER_SURFACE_CHANGES_IN_FRAME : Monitor = Monitor (16i64) ; pub const RENDER_DRAW_CALLS_IN_FRAME : Monitor = Monitor (17i64) ; pub const RENDER_2D_ITEMS_IN_FRAME : Monitor = Monitor (18i64) ; pub const RENDER_2D_DRAW_CALLS_IN_FRAME : Monitor = Monitor (19i64) ; pub const RENDER_VIDEO_MEM_USED : Monitor = Monitor (20i64) ; pub const RENDER_TEXTURE_MEM_USED : Monitor = Monitor (21i64) ; pub const RENDER_VERTEX_MEM_USED : Monitor = Monitor (22i64) ; pub const RENDER_USAGE_VIDEO_MEM_TOTAL : Monitor = Monitor (23i64) ; pub const PHYSICS_2D_ACTIVE_OBJECTS : Monitor = Monitor (24i64) ; pub const PHYSICS_2D_COLLISION_PAIRS : Monitor = Monitor (25i64) ; pub const PHYSICS_2D_ISLAND_COUNT : Monitor = Monitor (26i64) ; pub const PHYSICS_3D_ACTIVE_OBJECTS : Monitor = Monitor (27i64) ; pub const PHYSICS_3D_COLLISION_PAIRS : Monitor = Monitor (28i64) ; pub const PHYSICS_3D_ISLAND_COUNT : Monitor = Monitor (29i64) ; pub const AUDIO_OUTPUT_LATENCY : Monitor = Monitor (30i64) ; pub const MONITOR_MAX : Monitor = Monitor (31i64) ; } impl From < i64 > for Monitor { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Monitor > for i64 { # [inline] fn from (v : Monitor) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Performance { pub const AUDIO_OUTPUT_LATENCY : i64 = 30i64 ; pub const MEMORY_DYNAMIC : i64 = 4i64 ; pub const MEMORY_DYNAMIC_MAX : i64 = 6i64 ; pub const MEMORY_MESSAGE_BUFFER_MAX : i64 = 7i64 ; pub const MEMORY_STATIC : i64 = 3i64 ; pub const MEMORY_STATIC_MAX : i64 = 5i64 ; pub const MONITOR_MAX : i64 = 31i64 ; pub const OBJECT_COUNT : i64 = 8i64 ; pub const OBJECT_NODE_COUNT : i64 = 10i64 ; pub const OBJECT_ORPHAN_NODE_COUNT : i64 = 11i64 ; pub const OBJECT_RESOURCE_COUNT : i64 = 9i64 ; pub const PHYSICS_2D_ACTIVE_OBJECTS : i64 = 24i64 ; pub const PHYSICS_2D_COLLISION_PAIRS : i64 = 25i64 ; pub const PHYSICS_2D_ISLAND_COUNT : i64 = 26i64 ; pub const PHYSICS_3D_ACTIVE_OBJECTS : i64 = 27i64 ; pub const PHYSICS_3D_COLLISION_PAIRS : i64 = 28i64 ; pub const PHYSICS_3D_ISLAND_COUNT : i64 = 29i64 ; pub const RENDER_2D_DRAW_CALLS_IN_FRAME : i64 = 19i64 ; pub const RENDER_2D_ITEMS_IN_FRAME : i64 = 18i64 ; pub const RENDER_DRAW_CALLS_IN_FRAME : i64 = 17i64 ; pub const RENDER_MATERIAL_CHANGES_IN_FRAME : i64 = 14i64 ; pub const RENDER_OBJECTS_IN_FRAME : i64 = 12i64 ; pub const RENDER_SHADER_CHANGES_IN_FRAME : i64 = 15i64 ; pub const RENDER_SURFACE_CHANGES_IN_FRAME : i64 = 16i64 ; pub const RENDER_TEXTURE_MEM_USED : i64 = 21i64 ; pub const RENDER_USAGE_VIDEO_MEM_TOTAL : i64 = 23i64 ; pub const RENDER_VERTEX_MEM_USED : i64 = 22i64 ; pub const RENDER_VERTICES_IN_FRAME : i64 = 13i64 ; pub const RENDER_VIDEO_MEM_USED : i64 = 20i64 ; pub const TIME_FPS : i64 = 0i64 ; pub const TIME_PHYSICS_PROCESS : i64 = 2i64 ; pub const TIME_PROCESS : i64 = 1i64 ; } impl Performance { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Performance\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this:\n```gdscript\nprint(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console\n```"] # [doc = ""] # [inline] pub fn get_monitor (& self , monitor : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PerformanceMethodTable :: get (get_api ()) . get_monitor ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , monitor) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for Performance { } unsafe impl GodotObject for Performance { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Performance" } } impl std :: ops :: Deref for Performance { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Performance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for Performance { } unsafe impl Send for Performance { } unsafe impl Sync for Performance { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PerformanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_monitor : * mut sys :: godot_method_bind } impl PerformanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PerformanceMethodTable = PerformanceMethodTable { class_constructor : None , get_monitor : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PerformanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Performance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_monitor = (gd_api . godot_method_bind_get_method) (class_name , "get_monitor\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:700:5245 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:706:8641 [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 PhysicsDirectSpaceState` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physicsdirectspacestate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysicsDirectSpaceState inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsDirectSpaceState { this : RawObject < Self > , } impl PhysicsDirectSpaceState { # [doc = "Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of `motion`. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be `[1, 1]`.\nIf the shape can not move, the returned array will be `[0, 0]` under Bullet, and empty under GodotPhysics."] # [doc = ""] # [inline] pub fn cast_motion (& self , shape : impl AsArg < crate :: generated :: physics_shape_query_parameters :: PhysicsShapeQueryParameters > , motion : Vector3) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . cast_motion ; let ret = crate :: icalls :: icallvar__obj_vec3 (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr () , motion) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.\n# Default Arguments\n* `max_results` - `32`"] # [doc = ""] # [inline] pub fn collide_shape (& self , shape : impl AsArg < crate :: generated :: physics_shape_query_parameters :: PhysicsShapeQueryParameters > , max_results : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . collide_shape ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr () , max_results) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields:\n`collider_id`: The colliding object's ID.\n`linear_velocity`: The colliding object's velocity [Vector3]. If the object is an [Area], the result is `(0, 0, 0)`.\n`normal`: The object's surface normal at the intersection point.\n`point`: The intersection point.\n`rid`: The intersecting object's [RID].\n`shape`: The shape index of the colliding shape.\nIf the shape did not intersect anything, then an empty dictionary is returned instead."] # [doc = ""] # [inline] pub fn get_rest_info (& self , shape : impl AsArg < crate :: generated :: physics_shape_query_parameters :: PhysicsShapeQueryParameters >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . get_rest_info ; let ret = crate :: icalls :: icallptr_dict_obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "Intersects a ray in a given space. The returned object is a dictionary with the following fields:\n`collider`: The colliding object.\n`collider_id`: The colliding object's ID.\n`normal`: The object's surface normal at the intersection point.\n`position`: The intersection point.\n`rid`: The intersecting object's [RID].\n`shape`: The shape index of the colliding shape.\nIf the ray did not intersect anything, then an empty dictionary is returned instead.\nAdditionally, the method can take an `exclude` array of objects or [RID]s that are to be excluded from collisions, a `collision_mask` bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody]s or [Area]s, respectively.\n# Default Arguments\n* `exclude` - `[ ]`\n* `collision_mask` - `2147483647`\n* `collide_with_bodies` - `true`\n* `collide_with_areas` - `false`"] # [doc = ""] # [inline] pub fn intersect_ray (& self , from : Vector3 , to : Vector3 , exclude : VariantArray , collision_mask : i64 , collide_with_bodies : bool , collide_with_areas : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . intersect_ray ; let ret = crate :: icalls :: icallptr_dict_vec3_vec3_arr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , from , to , exclude , collision_mask , collide_with_bodies , collide_with_areas) ; Dictionary :: from_sys (ret) } } # [doc = "Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:\n`collider`: The colliding object.\n`collider_id`: The colliding object's ID.\n`rid`: The intersecting object's [RID].\n`shape`: The shape index of the colliding shape.\nThe number of intersections can be limited with the `max_results` parameter, to reduce the processing time.\n# Default Arguments\n* `max_results` - `32`"] # [doc = ""] # [inline] pub fn intersect_shape (& self , shape : impl AsArg < crate :: generated :: physics_shape_query_parameters :: PhysicsShapeQueryParameters > , max_results : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . intersect_shape ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr () , max_results) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsDirectSpaceState { } unsafe impl GodotObject for PhysicsDirectSpaceState { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicsDirectSpaceState" } } impl std :: ops :: Deref for PhysicsDirectSpaceState { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsDirectSpaceState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for PhysicsDirectSpaceState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsDirectSpaceStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub cast_motion : * mut sys :: godot_method_bind , pub collide_shape : * mut sys :: godot_method_bind , pub get_rest_info : * mut sys :: godot_method_bind , pub intersect_ray : * mut sys :: godot_method_bind , pub intersect_shape : * mut sys :: godot_method_bind } impl PhysicsDirectSpaceStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsDirectSpaceStateMethodTable = PhysicsDirectSpaceStateMethodTable { class_constructor : None , cast_motion : 0 as * mut sys :: godot_method_bind , collide_shape : 0 as * mut sys :: godot_method_bind , get_rest_info : 0 as * mut sys :: godot_method_bind , intersect_ray : 0 as * mut sys :: godot_method_bind , intersect_shape : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PhysicsDirectSpaceStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsDirectSpaceState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . cast_motion = (gd_api . godot_method_bind_get_method) (class_name , "cast_motion\0" . as_ptr () as * const c_char) ; table . collide_shape = (gd_api . godot_method_bind_get_method) (class_name , "collide_shape\0" . as_ptr () as * const c_char) ; table . get_rest_info = (gd_api . godot_method_bind_get_method) (class_name , "get_rest_info\0" . as_ptr () as * const c_char) ; table . intersect_ray = (gd_api . godot_method_bind_get_method) (class_name , "intersect_ray\0" . as_ptr () as * const c_char) ; table . intersect_shape = (gd_api . godot_method_bind_get_method) (class_name , "intersect_shape\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:712:6617 [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 CameraTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_cameratexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCameraTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CameraTexture { this : RawObject < Self > , } impl CameraTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CameraTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Convenience property that gives access to the active property of the [CameraFeed]."] # [doc = ""] # [inline] pub fn camera_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . get_camera_active ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The ID of the [CameraFeed] for which we want to display the image."] # [doc = ""] # [inline] pub fn camera_feed_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . get_camera_feed_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component."] # [doc = ""] # [inline] pub fn which_feed (& self) -> crate :: generated :: camera_server :: FeedImage { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . get_which_feed ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: camera_server :: FeedImage (ret) } } # [doc = "Convenience property that gives access to the active property of the [CameraFeed]."] # [doc = ""] # [inline] pub fn set_camera_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . set_camera_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "The ID of the [CameraFeed] for which we want to display the image."] # [doc = ""] # [inline] pub fn set_camera_feed_id (& self , feed_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . set_camera_feed_id ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , feed_id) ; } } # [doc = "Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component."] # [doc = ""] # [inline] pub fn set_which_feed (& self , which_feed : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . set_which_feed ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , which_feed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CameraTexture { } unsafe impl GodotObject for CameraTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CameraTexture" } } impl std :: ops :: Deref for CameraTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CameraTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for CameraTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CameraTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CameraTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for CameraTexture { } impl Instanciable for CameraTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CameraTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CameraTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_camera_active : * mut sys :: godot_method_bind , pub get_camera_feed_id : * mut sys :: godot_method_bind , pub get_which_feed : * mut sys :: godot_method_bind , pub set_camera_active : * mut sys :: godot_method_bind , pub set_camera_feed_id : * mut sys :: godot_method_bind , pub set_which_feed : * mut sys :: godot_method_bind } impl CameraTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CameraTextureMethodTable = CameraTextureMethodTable { class_constructor : None , get_camera_active : 0 as * mut sys :: godot_method_bind , get_camera_feed_id : 0 as * mut sys :: godot_method_bind , get_which_feed : 0 as * mut sys :: godot_method_bind , set_camera_active : 0 as * mut sys :: godot_method_bind , set_camera_feed_id : 0 as * mut sys :: godot_method_bind , set_which_feed : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CameraTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CameraTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_camera_active = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_active\0" . as_ptr () as * const c_char) ; table . get_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_feed_id\0" . as_ptr () as * const c_char) ; table . get_which_feed = (gd_api . godot_method_bind_get_method) (class_name , "get_which_feed\0" . as_ptr () as * const c_char) ; table . set_camera_active = (gd_api . godot_method_bind_get_method) (class_name , "set_camera_active\0" . as_ptr () as * const c_char) ; table . set_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "set_camera_feed_id\0" . as_ptr () as * const c_char) ; table . set_which_feed = (gd_api . godot_method_bind_get_method) (class_name , "set_which_feed\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:718:42840 [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 TileMap` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_tilemap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`TileMap` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTileMap inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TileMap { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct HalfOffset (pub i64) ; impl HalfOffset { pub const X : HalfOffset = HalfOffset (0i64) ; pub const Y : HalfOffset = HalfOffset (1i64) ; pub const DISABLED : HalfOffset = HalfOffset (2i64) ; pub const NEGATIVE_X : HalfOffset = HalfOffset (3i64) ; pub const NEGATIVE_Y : HalfOffset = HalfOffset (4i64) ; } impl From < i64 > for HalfOffset { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < HalfOffset > for i64 { # [inline] fn from (v : HalfOffset) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const SQUARE : Mode = Mode (0i64) ; pub const ISOMETRIC : Mode = Mode (1i64) ; pub const CUSTOM : Mode = Mode (2i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TileOrigin (pub i64) ; impl TileOrigin { pub const TOP_LEFT : TileOrigin = TileOrigin (0i64) ; pub const CENTER : TileOrigin = TileOrigin (1i64) ; pub const BOTTOM_LEFT : TileOrigin = TileOrigin (2i64) ; } impl From < i64 > for TileOrigin { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TileOrigin > for i64 { # [inline] fn from (v : TileOrigin) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TileMap { pub const HALF_OFFSET_DISABLED : i64 = 2i64 ; pub const HALF_OFFSET_NEGATIVE_X : i64 = 3i64 ; pub const HALF_OFFSET_NEGATIVE_Y : i64 = 4i64 ; pub const HALF_OFFSET_X : i64 = 0i64 ; pub const HALF_OFFSET_Y : i64 = 1i64 ; pub const INVALID_CELL : i64 = - 1i64 ; pub const MODE_CUSTOM : i64 = 2i64 ; pub const MODE_ISOMETRIC : i64 = 1i64 ; pub const MODE_SQUARE : i64 = 0i64 ; pub const TILE_ORIGIN_BOTTOM_LEFT : i64 = 2i64 ; pub const TILE_ORIGIN_CENTER : i64 = 1i64 ; pub const TILE_ORIGIN_TOP_LEFT : i64 = 0i64 ; } impl TileMap { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TileMapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears all cells."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears cells that do not exist in the tileset."] # [doc = ""] # [inline] pub fn fix_invalid_tiles (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . fix_invalid_tiles ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the tile index of the given cell. If no tile exists in the cell, returns [constant INVALID_CELL]."] # [doc = ""] # [inline] pub fn get_cell (& self , x : i64 , y : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_cell ; let ret = crate :: icalls :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; ret as _ } } # [doc = "Returns the coordinate (subtile column and row) of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling."] # [doc = ""] # [inline] pub fn get_cell_autotile_coord (& self , x : i64 , y : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_cell_autotile_coord ; let ret = crate :: icalls :: icallptr_vec2_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; mem :: transmute (ret) } } # [doc = "The TileMap's cell size."] # [doc = ""] # [inline] pub fn cell_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_cell_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [constant INVALID_CELL]."] # [doc = ""] # [inline] pub fn get_cellv (& self , position : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_cellv ; let ret = crate :: icalls :: icallptr_i64_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; ret as _ } } # [doc = "If `true`, the cell's UVs will be clipped."] # [doc = ""] # [inline] pub fn clip_uv (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_clip_uv ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Bounce value for static body collisions (see `collision_use_kinematic`)."] # [doc = ""] # [inline] pub fn collision_bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_bounce ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Friction value for static body collisions (see `collision_use_kinematic`)."] # [doc = ""] # [inline] pub fn collision_friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_friction ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the given collision layer bit is set."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the given collision mask bit is set."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = "If `true`, TileMap collisions will be handled as a kinematic body. If `false`, collisions will be handled as static body."] # [doc = ""] # [inline] pub fn collision_use_kinematic (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_use_kinematic ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a [CollisionObject2D]."] # [doc = ""] # [inline] pub fn collision_use_parent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_use_parent ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The custom [Transform2D] to be applied to the TileMap's cells."] # [doc = ""] # [inline] pub fn custom_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_custom_transform ; let ret = crate :: icalls :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Amount to offset alternating tiles. See [enum HalfOffset] for possible values."] # [doc = ""] # [inline] pub fn half_offset (& self) -> crate :: generated :: tile_map :: HalfOffset { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_half_offset ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tile_map :: HalfOffset (ret) } } # [doc = "The TileMap orientation mode. See [enum Mode] for possible values."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: tile_map :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tile_map :: Mode (ret) } } # [doc = "The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s)."] # [doc = ""] # [inline] pub fn occluder_light_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_occluder_light_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size."] # [doc = ""] # [inline] pub fn quadrant_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_quadrant_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Position for tile origin. See [enum TileOrigin] for possible values."] # [doc = ""] # [inline] pub fn tile_origin (& self) -> crate :: generated :: tile_map :: TileOrigin { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_tile_origin ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tile_map :: TileOrigin (ret) } } # [doc = "The assigned [TileSet]."] # [doc = ""] # [inline] pub fn tileset (& self) -> Option < Ref < crate :: generated :: tile_set :: TileSet , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_tileset ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: tile_set :: TileSet , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from `-1`)."] # [doc = ""] # [inline] pub fn get_used_cells (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_used_cells ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of all cells with the given tile index specified in `id`."] # [doc = ""] # [inline] pub fn get_used_cells_by_id (& self , id : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_used_cells_by_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a rectangle enclosing the used (non-empty) tiles of the map."] # [doc = ""] # [inline] pub fn get_used_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_used_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns `true` if the given cell is transposed, i.e. the X and Y axes are swapped."] # [doc = ""] # [inline] pub fn is_cell_transposed (& self , x : i64 , y : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_cell_transposed ; let ret = crate :: icalls :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; ret as _ } } # [doc = "Returns `true` if the given cell is flipped in the X axis."] # [doc = ""] # [inline] pub fn is_cell_x_flipped (& self , x : i64 , y : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_cell_x_flipped ; let ret = crate :: icalls :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; ret as _ } } # [doc = "Returns `true` if the given cell is flipped in the Y axis."] # [doc = ""] # [inline] pub fn is_cell_y_flipped (& self , x : i64 , y : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_cell_y_flipped ; let ret = crate :: icalls :: icallptr_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; ret as _ } } # [doc = "If `true`, the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, [member compatibility_mode] is ignored.\nIf `false`, the texture position start in the top-left corner unless [member compatibility_mode] is enabled."] # [doc = ""] # [inline] pub fn is_centered_textures_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_centered_textures_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing `flip_h`, `flip_v` and `transpose` tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles.\nIf `false`, the textures do not move when doing `flip_h`, `flip_v` operations if no offset is used, nor when changing the tile origin.\nThe compatibility mode doesn't work with the [member centered_textures] option, because displacing textures with the [member cell_tile_origin] option or in irregular tiles is not relevant when centering those textures."] # [doc = ""] # [inline] pub fn is_compatibility_mode_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_compatibility_mode_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_show_collision_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_show_collision_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the TileMap's children will be drawn in order of their Y coordinate."] # [doc = ""] # [inline] pub fn is_y_sort_mode_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_y_sort_mode_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the global position corresponding to the given tilemap (grid-based) coordinates.\nOptionally, the tilemap's half offset can be ignored.\n# Default Arguments\n* `ignore_half_ofs` - `false`"] # [doc = ""] # [inline] pub fn map_to_world (& self , map_position : Vector2 , ignore_half_ofs : bool) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . map_to_world ; let ret = crate :: icalls :: icallptr_vec2_vec2_bool (method_bind , self . this . sys () . as_ptr () , map_position , ignore_half_ofs) ; mem :: transmute (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the tile index for the cell given by a Vector2.\nAn index of `-1` clears the cell.\nOptionally, the tile can also be flipped, transposed, or given autotile coordinates. The autotile coordinate refers to the column and row of the subtile.\n**Note:** Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.\nIf you need these to be immediately updated, you can call [method update_dirty_quadrants].\nOverriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed:\n```gdscript\nfunc set_cell(x, y, tile, flip_x=false, flip_y=false, transpose=false, autotile_coord=Vector2())\n # Write your custom logic here.\n # To call the default method:\n .set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord)\n```\n# Default Arguments\n* `flip_x` - `false`\n* `flip_y` - `false`\n* `transpose` - `false`\n* `autotile_coord` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn set_cell (& self , x : i64 , y : i64 , tile : i64 , flip_x : bool , flip_y : bool , transpose : bool , autotile_coord : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_cell ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64_bool_bool_bool_vec2 (method_bind , self . this . sys () . as_ptr () , x , y , tile , flip_x , flip_y , transpose , autotile_coord) ; } } # [doc = "The TileMap's cell size."] # [doc = ""] # [inline] pub fn set_cell_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_cell_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the tile index for the given cell.\nAn index of `-1` clears the cell.\nOptionally, the tile can also be flipped or transposed.\n**Note:** Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.\nIf you need these to be immediately updated, you can call [method update_dirty_quadrants].\n# Default Arguments\n* `flip_x` - `false`\n* `flip_y` - `false`\n* `transpose` - `false`"] # [doc = ""] # [inline] pub fn set_cellv (& self , position : Vector2 , tile : i64 , flip_x : bool , flip_y : bool , transpose : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_cellv ; let ret = crate :: icalls :: icallptr_void_vec2_i64_bool_bool_bool (method_bind , self . this . sys () . as_ptr () , position , tile , flip_x , flip_y , transpose) ; } } # [doc = "If `true`, the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, [member compatibility_mode] is ignored.\nIf `false`, the texture position start in the top-left corner unless [member compatibility_mode] is enabled."] # [doc = ""] # [inline] pub fn set_centered_textures (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_centered_textures ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the cell's UVs will be clipped."] # [doc = ""] # [inline] pub fn set_clip_uv (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_clip_uv ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Bounce value for static body collisions (see `collision_use_kinematic`)."] # [doc = ""] # [inline] pub fn set_collision_bounce (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_bounce ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Friction value for static body collisions (see `collision_use_kinematic`)."] # [doc = ""] # [inline] pub fn set_collision_friction (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_friction ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = "Sets the given collision layer bit."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "Sets the given collision mask bit."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = "If `true`, TileMap collisions will be handled as a kinematic body. If `false`, collisions will be handled as static body."] # [doc = ""] # [inline] pub fn set_collision_use_kinematic (& self , use_kinematic : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_use_kinematic ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_kinematic) ; } } # [doc = "If `true`, this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a [CollisionObject2D]."] # [doc = ""] # [inline] pub fn set_collision_use_parent (& self , use_parent : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_use_parent ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_parent) ; } } # [doc = "If `true`, the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing `flip_h`, `flip_v` and `transpose` tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles.\nIf `false`, the textures do not move when doing `flip_h`, `flip_v` operations if no offset is used, nor when changing the tile origin.\nThe compatibility mode doesn't work with the [member centered_textures] option, because displacing textures with the [member cell_tile_origin] option or in irregular tiles is not relevant when centering those textures."] # [doc = ""] # [inline] pub fn set_compatibility_mode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_compatibility_mode ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The custom [Transform2D] to be applied to the TileMap's cells."] # [doc = ""] # [inline] pub fn set_custom_transform (& self , custom_transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_custom_transform ; let ret = crate :: icalls :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , custom_transform) ; } } # [doc = "Amount to offset alternating tiles. See [enum HalfOffset] for possible values."] # [doc = ""] # [inline] pub fn set_half_offset (& self , half_offset : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_half_offset ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , half_offset) ; } } # [doc = "The TileMap orientation mode. See [enum Mode] for possible values."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s)."] # [doc = ""] # [inline] pub fn set_occluder_light_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_occluder_light_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = "The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size."] # [doc = ""] # [inline] pub fn set_quadrant_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_quadrant_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_show_collision (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_show_collision ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Position for tile origin. See [enum TileOrigin] for possible values."] # [doc = ""] # [inline] pub fn set_tile_origin (& self , origin : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_tile_origin ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , origin) ; } } # [doc = "The assigned [TileSet]."] # [doc = ""] # [inline] pub fn set_tileset (& self , tileset : impl AsArg < crate :: generated :: tile_set :: TileSet >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_tileset ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , tileset . as_arg_ptr ()) ; } } # [doc = "If `true`, the TileMap's children will be drawn in order of their Y coordinate."] # [doc = ""] # [inline] pub fn set_y_sort_mode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_y_sort_mode ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates."] # [doc = ""] # [inline] pub fn update_bitmask_area (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . update_bitmask_area ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates).\nCalling with invalid (or missing) parameters applies autotiling rules for the entire tilemap.\n# Default Arguments\n* `start` - `Vector2( 0, 0 )`\n* `end` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn update_bitmask_region (& self , start : Vector2 , end : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . update_bitmask_region ; let ret = crate :: icalls :: icallptr_void_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , start , end) ; } } # [doc = "Updates the tile map's quadrants, allowing things such as navigation and collision shapes to be immediately used if modified."] # [doc = ""] # [inline] pub fn update_dirty_quadrants (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . update_dirty_quadrants ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the tilemap (grid-based) coordinates corresponding to the given local position."] # [doc = ""] # [inline] pub fn world_to_map (& self , world_position : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . world_to_map ; let ret = crate :: icalls :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , world_position) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for TileMap { } unsafe impl GodotObject for TileMap { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TileMap" } } impl QueueFree for TileMap { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for TileMap { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TileMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for TileMap { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for TileMap { } unsafe impl SubClass < crate :: generated :: node :: Node > for TileMap { } unsafe impl SubClass < crate :: generated :: object :: Object > for TileMap { } impl Instanciable for TileMap { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { TileMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TileMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub fix_invalid_tiles : * mut sys :: godot_method_bind , pub get_cell : * mut sys :: godot_method_bind , pub get_cell_autotile_coord : * mut sys :: godot_method_bind , pub get_cell_size : * mut sys :: godot_method_bind , pub get_cellv : * mut sys :: godot_method_bind , pub get_clip_uv : * mut sys :: godot_method_bind , pub get_collision_bounce : * mut sys :: godot_method_bind , pub get_collision_friction : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_collision_use_kinematic : * mut sys :: godot_method_bind , pub get_collision_use_parent : * mut sys :: godot_method_bind , pub get_custom_transform : * mut sys :: godot_method_bind , pub get_half_offset : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_occluder_light_mask : * mut sys :: godot_method_bind , pub get_quadrant_size : * mut sys :: godot_method_bind , pub get_tile_origin : * mut sys :: godot_method_bind , pub get_tileset : * mut sys :: godot_method_bind , pub get_used_cells : * mut sys :: godot_method_bind , pub get_used_cells_by_id : * mut sys :: godot_method_bind , pub get_used_rect : * mut sys :: godot_method_bind , pub is_cell_transposed : * mut sys :: godot_method_bind , pub is_cell_x_flipped : * mut sys :: godot_method_bind , pub is_cell_y_flipped : * mut sys :: godot_method_bind , pub is_centered_textures_enabled : * mut sys :: godot_method_bind , pub is_compatibility_mode_enabled : * mut sys :: godot_method_bind , pub is_show_collision_enabled : * mut sys :: godot_method_bind , pub is_y_sort_mode_enabled : * mut sys :: godot_method_bind , pub map_to_world : * mut sys :: godot_method_bind , pub set_cell : * mut sys :: godot_method_bind , pub set_cell_size : * mut sys :: godot_method_bind , pub set_cellv : * mut sys :: godot_method_bind , pub set_centered_textures : * mut sys :: godot_method_bind , pub set_clip_uv : * mut sys :: godot_method_bind , pub set_collision_bounce : * mut sys :: godot_method_bind , pub set_collision_friction : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_collision_use_kinematic : * mut sys :: godot_method_bind , pub set_collision_use_parent : * mut sys :: godot_method_bind , pub set_compatibility_mode : * mut sys :: godot_method_bind , pub set_custom_transform : * mut sys :: godot_method_bind , pub set_half_offset : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_occluder_light_mask : * mut sys :: godot_method_bind , pub set_quadrant_size : * mut sys :: godot_method_bind , pub set_show_collision : * mut sys :: godot_method_bind , pub set_tile_origin : * mut sys :: godot_method_bind , pub set_tileset : * mut sys :: godot_method_bind , pub set_y_sort_mode : * mut sys :: godot_method_bind , pub update_bitmask_area : * mut sys :: godot_method_bind , pub update_bitmask_region : * mut sys :: godot_method_bind , pub update_dirty_quadrants : * mut sys :: godot_method_bind , pub world_to_map : * mut sys :: godot_method_bind } impl TileMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TileMapMethodTable = TileMapMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , fix_invalid_tiles : 0 as * mut sys :: godot_method_bind , get_cell : 0 as * mut sys :: godot_method_bind , get_cell_autotile_coord : 0 as * mut sys :: godot_method_bind , get_cell_size : 0 as * mut sys :: godot_method_bind , get_cellv : 0 as * mut sys :: godot_method_bind , get_clip_uv : 0 as * mut sys :: godot_method_bind , get_collision_bounce : 0 as * mut sys :: godot_method_bind , get_collision_friction : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_collision_use_kinematic : 0 as * mut sys :: godot_method_bind , get_collision_use_parent : 0 as * mut sys :: godot_method_bind , get_custom_transform : 0 as * mut sys :: godot_method_bind , get_half_offset : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_occluder_light_mask : 0 as * mut sys :: godot_method_bind , get_quadrant_size : 0 as * mut sys :: godot_method_bind , get_tile_origin : 0 as * mut sys :: godot_method_bind , get_tileset : 0 as * mut sys :: godot_method_bind , get_used_cells : 0 as * mut sys :: godot_method_bind , get_used_cells_by_id : 0 as * mut sys :: godot_method_bind , get_used_rect : 0 as * mut sys :: godot_method_bind , is_cell_transposed : 0 as * mut sys :: godot_method_bind , is_cell_x_flipped : 0 as * mut sys :: godot_method_bind , is_cell_y_flipped : 0 as * mut sys :: godot_method_bind , is_centered_textures_enabled : 0 as * mut sys :: godot_method_bind , is_compatibility_mode_enabled : 0 as * mut sys :: godot_method_bind , is_show_collision_enabled : 0 as * mut sys :: godot_method_bind , is_y_sort_mode_enabled : 0 as * mut sys :: godot_method_bind , map_to_world : 0 as * mut sys :: godot_method_bind , set_cell : 0 as * mut sys :: godot_method_bind , set_cell_size : 0 as * mut sys :: godot_method_bind , set_cellv : 0 as * mut sys :: godot_method_bind , set_centered_textures : 0 as * mut sys :: godot_method_bind , set_clip_uv : 0 as * mut sys :: godot_method_bind , set_collision_bounce : 0 as * mut sys :: godot_method_bind , set_collision_friction : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_collision_use_kinematic : 0 as * mut sys :: godot_method_bind , set_collision_use_parent : 0 as * mut sys :: godot_method_bind , set_compatibility_mode : 0 as * mut sys :: godot_method_bind , set_custom_transform : 0 as * mut sys :: godot_method_bind , set_half_offset : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_occluder_light_mask : 0 as * mut sys :: godot_method_bind , set_quadrant_size : 0 as * mut sys :: godot_method_bind , set_show_collision : 0 as * mut sys :: godot_method_bind , set_tile_origin : 0 as * mut sys :: godot_method_bind , set_tileset : 0 as * mut sys :: godot_method_bind , set_y_sort_mode : 0 as * mut sys :: godot_method_bind , update_bitmask_area : 0 as * mut sys :: godot_method_bind , update_bitmask_region : 0 as * mut sys :: godot_method_bind , update_dirty_quadrants : 0 as * mut sys :: godot_method_bind , world_to_map : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { TileMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TileMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . fix_invalid_tiles = (gd_api . godot_method_bind_get_method) (class_name , "fix_invalid_tiles\0" . as_ptr () as * const c_char) ; table . get_cell = (gd_api . godot_method_bind_get_method) (class_name , "get_cell\0" . as_ptr () as * const c_char) ; table . get_cell_autotile_coord = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_autotile_coord\0" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\0" . as_ptr () as * const c_char) ; table . get_cellv = (gd_api . godot_method_bind_get_method) (class_name , "get_cellv\0" . as_ptr () as * const c_char) ; table . get_clip_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_clip_uv\0" . as_ptr () as * const c_char) ; table . get_collision_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_bounce\0" . as_ptr () as * const c_char) ; table . get_collision_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_friction\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_collision_use_kinematic = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_use_kinematic\0" . as_ptr () as * const c_char) ; table . get_collision_use_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_use_parent\0" . as_ptr () as * const c_char) ; table . get_custom_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_transform\0" . as_ptr () as * const c_char) ; table . get_half_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_half_offset\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . get_quadrant_size = (gd_api . godot_method_bind_get_method) (class_name , "get_quadrant_size\0" . as_ptr () as * const c_char) ; table . get_tile_origin = (gd_api . godot_method_bind_get_method) (class_name , "get_tile_origin\0" . as_ptr () as * const c_char) ; table . get_tileset = (gd_api . godot_method_bind_get_method) (class_name , "get_tileset\0" . as_ptr () as * const c_char) ; table . get_used_cells = (gd_api . godot_method_bind_get_method) (class_name , "get_used_cells\0" . as_ptr () as * const c_char) ; table . get_used_cells_by_id = (gd_api . godot_method_bind_get_method) (class_name , "get_used_cells_by_id\0" . as_ptr () as * const c_char) ; table . get_used_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_used_rect\0" . as_ptr () as * const c_char) ; table . is_cell_transposed = (gd_api . godot_method_bind_get_method) (class_name , "is_cell_transposed\0" . as_ptr () as * const c_char) ; table . is_cell_x_flipped = (gd_api . godot_method_bind_get_method) (class_name , "is_cell_x_flipped\0" . as_ptr () as * const c_char) ; table . is_cell_y_flipped = (gd_api . godot_method_bind_get_method) (class_name , "is_cell_y_flipped\0" . as_ptr () as * const c_char) ; table . is_centered_textures_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_centered_textures_enabled\0" . as_ptr () as * const c_char) ; table . is_compatibility_mode_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_compatibility_mode_enabled\0" . as_ptr () as * const c_char) ; table . is_show_collision_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_show_collision_enabled\0" . as_ptr () as * const c_char) ; table . is_y_sort_mode_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_y_sort_mode_enabled\0" . as_ptr () as * const c_char) ; table . map_to_world = (gd_api . godot_method_bind_get_method) (class_name , "map_to_world\0" . as_ptr () as * const c_char) ; table . set_cell = (gd_api . godot_method_bind_get_method) (class_name , "set_cell\0" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\0" . as_ptr () as * const c_char) ; table . set_cellv = (gd_api . godot_method_bind_get_method) (class_name , "set_cellv\0" . as_ptr () as * const c_char) ; table . set_centered_textures = (gd_api . godot_method_bind_get_method) (class_name , "set_centered_textures\0" . as_ptr () as * const c_char) ; table . set_clip_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_uv\0" . as_ptr () as * const c_char) ; table . set_collision_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_bounce\0" . as_ptr () as * const c_char) ; table . set_collision_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_friction\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_collision_use_kinematic = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_use_kinematic\0" . as_ptr () as * const c_char) ; table . set_collision_use_parent = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_use_parent\0" . as_ptr () as * const c_char) ; table . set_compatibility_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_compatibility_mode\0" . as_ptr () as * const c_char) ; table . set_custom_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_transform\0" . as_ptr () as * const c_char) ; table . set_half_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_half_offset\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . set_quadrant_size = (gd_api . godot_method_bind_get_method) (class_name , "set_quadrant_size\0" . as_ptr () as * const c_char) ; table . set_show_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_show_collision\0" . as_ptr () as * const c_char) ; table . set_tile_origin = (gd_api . godot_method_bind_get_method) (class_name , "set_tile_origin\0" . as_ptr () as * const c_char) ; table . set_tileset = (gd_api . godot_method_bind_get_method) (class_name , "set_tileset\0" . as_ptr () as * const c_char) ; table . set_y_sort_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_y_sort_mode\0" . as_ptr () as * const c_char) ; table . update_bitmask_area = (gd_api . godot_method_bind_get_method) (class_name , "update_bitmask_area\0" . as_ptr () as * const c_char) ; table . update_bitmask_region = (gd_api . godot_method_bind_get_method) (class_name , "update_bitmask_region\0" . as_ptr () as * const c_char) ; table . update_dirty_quadrants = (gd_api . godot_method_bind_get_method) (class_name , "update_dirty_quadrants\0" . as_ptr () as * const c_char) ; table . world_to_map = (gd_api . godot_method_bind_get_method) (class_name , "world_to_map\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:730:5122 [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 CapsuleShape2D` inherits `Shape2D` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_capsuleshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCapsuleShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CapsuleShape2D { this : RawObject < Self > , } impl CapsuleShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CapsuleShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShape2DMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShape2DMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShape2DMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShape2DMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CapsuleShape2D { } unsafe impl GodotObject for CapsuleShape2D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CapsuleShape2D" } } impl std :: ops :: Deref for CapsuleShape2D { type Target = crate :: generated :: shape_2d :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CapsuleShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape_2d :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape_2d :: Shape2D > for CapsuleShape2D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CapsuleShape2D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CapsuleShape2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for CapsuleShape2D { } impl Instanciable for CapsuleShape2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CapsuleShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CapsuleShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl CapsuleShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CapsuleShape2DMethodTable = CapsuleShape2DMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CapsuleShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CapsuleShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:736:4015 [INFO] [stdout] | [INFO] [stdout] 736 | ...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] 736 | # [doc = "`core class VisualShaderNodeVectorScalarSmoothStep` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorscalarsmoothstep.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorScalarSmoothStep inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarSmoothStep { this : RawObject < Self > , } impl VisualShaderNodeVectorScalarSmoothStep { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorScalarSmoothStepMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl GodotObject for VisualShaderNodeVectorScalarSmoothStep { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorScalarSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorScalarSmoothStep { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorScalarSmoothStep { } impl Instanciable for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorScalarSmoothStep :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorScalarSmoothStepMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorScalarSmoothStepMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorScalarSmoothStepMethodTable = VisualShaderNodeVectorScalarSmoothStepMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorScalarSmoothStepMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorScalarSmoothStep\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:742:4275 [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 BoxShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_boxshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nBoxShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BoxShape { this : RawObject < Self > , } impl BoxShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BoxShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The box's half extents. The width, height and depth of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn extents (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = BoxShapeMethodTable :: get (get_api ()) . get_extents ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The box's half extents. The width, height and depth of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn set_extents (& self , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BoxShapeMethodTable :: get (get_api ()) . set_extents ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BoxShape { } unsafe impl GodotObject for BoxShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BoxShape" } } impl std :: ops :: Deref for BoxShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BoxShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for BoxShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for BoxShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for BoxShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for BoxShape { } impl Instanciable for BoxShape { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { BoxShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BoxShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_extents : * mut sys :: godot_method_bind , pub set_extents : * mut sys :: godot_method_bind } impl BoxShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BoxShapeMethodTable = BoxShapeMethodTable { class_constructor : None , get_extents : 0 as * mut sys :: godot_method_bind , set_extents : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { BoxShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BoxShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\0" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:748:7307 [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 VisualShaderNode` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNode inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNode { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PortType (pub i64) ; impl PortType { pub const SCALAR : PortType = PortType (0i64) ; pub const VECTOR : PortType = PortType (1i64) ; pub const BOOLEAN : PortType = PortType (2i64) ; pub const TRANSFORM : PortType = PortType (3i64) ; pub const SAMPLER : PortType = PortType (4i64) ; pub const MAX : PortType = PortType (5i64) ; } impl From < i64 > for PortType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PortType > for i64 { # [inline] fn from (v : PortType) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNode { pub const PORT_TYPE_BOOLEAN : i64 = 2i64 ; pub const PORT_TYPE_MAX : i64 = 5i64 ; pub const PORT_TYPE_SAMPLER : i64 = 4i64 ; pub const PORT_TYPE_SCALAR : i64 = 0i64 ; pub const PORT_TYPE_TRANSFORM : i64 = 3i64 ; pub const PORT_TYPE_VECTOR : i64 = 1i64 ; } impl VisualShaderNode { # [doc = "Returns an [Array] containing default values for all of the input ports of the node in the form `[index0, value0, index1, value1, ...]`."] # [doc = ""] # [inline] pub fn default_input_values (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . get_default_input_values ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the default value of the input `port`."] # [doc = ""] # [inline] pub fn get_input_port_default_value (& self , port : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . get_input_port_default_value ; let ret = crate :: icalls :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , port) ; Variant :: from_sys (ret) } } # [doc = "Sets the output port index which will be showed for preview. If set to `-1` no port will be open for preview."] # [doc = ""] # [inline] pub fn output_port_for_preview (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . get_output_port_for_preview ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the default input ports values using an [Array] of the form `[index0, value0, index1, value1, ...]`. For example: `[0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)]`."] # [doc = ""] # [inline] pub fn set_default_input_values (& self , values : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . set_default_input_values ; let ret = crate :: icalls :: icallptr_void_arr (method_bind , self . this . sys () . as_ptr () , values) ; } } # [doc = "Sets the default value for the selected input `port`."] # [doc = ""] # [inline] pub fn set_input_port_default_value (& self , port : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . set_input_port_default_value ; let ret = crate :: icalls :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , port , value . owned_to_variant ()) ; } } # [doc = "Sets the output port index which will be showed for preview. If set to `-1` no port will be open for preview."] # [doc = ""] # [inline] pub fn set_output_port_for_preview (& self , port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . set_output_port_for_preview ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , port) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNode { } unsafe impl GodotObject for VisualShaderNode { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNode" } } impl std :: ops :: Deref for VisualShaderNode { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNode { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_default_input_values : * mut sys :: godot_method_bind , pub get_input_port_default_value : * mut sys :: godot_method_bind , pub get_output_port_for_preview : * mut sys :: godot_method_bind , pub set_default_input_values : * mut sys :: godot_method_bind , pub set_input_port_default_value : * mut sys :: godot_method_bind , pub set_output_port_for_preview : * mut sys :: godot_method_bind } impl VisualShaderNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeMethodTable = VisualShaderNodeMethodTable { class_constructor : None , get_default_input_values : 0 as * mut sys :: godot_method_bind , get_input_port_default_value : 0 as * mut sys :: godot_method_bind , get_output_port_for_preview : 0 as * mut sys :: godot_method_bind , set_default_input_values : 0 as * mut sys :: godot_method_bind , set_input_port_default_value : 0 as * mut sys :: godot_method_bind , set_output_port_for_preview : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_input_values = (gd_api . godot_method_bind_get_method) (class_name , "get_default_input_values\0" . as_ptr () as * const c_char) ; table . get_input_port_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_input_port_default_value\0" . as_ptr () as * const c_char) ; table . get_output_port_for_preview = (gd_api . godot_method_bind_get_method) (class_name , "get_output_port_for_preview\0" . as_ptr () as * const c_char) ; table . set_default_input_values = (gd_api . godot_method_bind_get_method) (class_name , "set_default_input_values\0" . as_ptr () as * const c_char) ; table . set_input_port_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_input_port_default_value\0" . as_ptr () as * const c_char) ; table . set_output_port_for_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_output_port_for_preview\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:754:3486 [INFO] [stdout] | [INFO] [stdout] 754 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 754 | # [doc = "`core class ARVRInterfaceGDNative` inherits `ARVRInterface` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_arvrinterfacegdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nARVRInterfaceGDNative inherits methods from:\n - [ARVRInterface](struct.ARVRInterface.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRInterfaceGDNative { this : RawObject < Self > , } impl ARVRInterfaceGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRInterfaceGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRInterfaceGDNative { } unsafe impl GodotObject for ARVRInterfaceGDNative { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ARVRInterfaceGDNative" } } impl std :: ops :: Deref for ARVRInterfaceGDNative { type Target = crate :: generated :: arvr_interface :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRInterfaceGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: arvr_interface :: ARVRInterface > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: object :: Object > for ARVRInterfaceGDNative { } impl Instanciable for ARVRInterfaceGDNative { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ARVRInterfaceGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRInterfaceGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ARVRInterfaceGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRInterfaceGDNativeMethodTable = ARVRInterfaceGDNativeMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ARVRInterfaceGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRInterfaceGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:760:4445 [INFO] [stdout] | [INFO] [stdout] 760 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 760 | # [doc = "`core class ConvexPolygonShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_convexpolygonshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nConvexPolygonShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConvexPolygonShape { this : RawObject < Self > , } impl ConvexPolygonShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConvexPolygonShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The list of 3D points forming the convex polygon shape."] # [doc = ""] # [inline] pub fn points (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShapeMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "The list of 3D points forming the convex polygon shape."] # [doc = ""] # [inline] pub fn set_points (& self , points : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShapeMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , points) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConvexPolygonShape { } unsafe impl GodotObject for ConvexPolygonShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConvexPolygonShape" } } impl std :: ops :: Deref for ConvexPolygonShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConvexPolygonShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for ConvexPolygonShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ConvexPolygonShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ConvexPolygonShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConvexPolygonShape { } impl Instanciable for ConvexPolygonShape { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ConvexPolygonShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConvexPolygonShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_points : * mut sys :: godot_method_bind , pub set_points : * mut sys :: godot_method_bind } impl ConvexPolygonShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConvexPolygonShapeMethodTable = ConvexPolygonShapeMethodTable { class_constructor : None , get_points : 0 as * mut sys :: godot_method_bind , set_points : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ConvexPolygonShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConvexPolygonShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:766:6961 [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 Slider` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_slider.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nSlider inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Slider { this : RawObject < Self > , } impl Slider { # [doc = "Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers."] # [doc = ""] # [inline] pub fn ticks (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . get_ticks ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the slider will display ticks for minimum and maximum values."] # [doc = ""] # [inline] pub fn ticks_on_borders (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . get_ticks_on_borders ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the slider can be interacted with. If `false`, the value can be changed only by code."] # [doc = ""] # [inline] pub fn is_editable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . is_editable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the value can be changed using the mouse wheel."] # [doc = ""] # [inline] pub fn is_scrollable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . is_scrollable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the slider can be interacted with. If `false`, the value can be changed only by code."] # [doc = ""] # [inline] pub fn set_editable (& self , editable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . set_editable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , editable) ; } } # [doc = "If `true`, the value can be changed using the mouse wheel."] # [doc = ""] # [inline] pub fn set_scrollable (& self , scrollable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . set_scrollable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , scrollable) ; } } # [doc = "Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers."] # [doc = ""] # [inline] pub fn set_ticks (& self , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . set_ticks ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , count) ; } } # [doc = "If `true`, the slider will display ticks for minimum and maximum values."] # [doc = ""] # [inline] pub fn set_ticks_on_borders (& self , ticks_on_border : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . set_ticks_on_borders ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ticks_on_border) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Slider { } unsafe impl GodotObject for Slider { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Slider" } } impl QueueFree for Slider { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Slider { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Slider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for Slider { } unsafe impl SubClass < crate :: generated :: control :: Control > for Slider { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Slider { } unsafe impl SubClass < crate :: generated :: node :: Node > for Slider { } unsafe impl SubClass < crate :: generated :: object :: Object > for Slider { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SliderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_ticks : * mut sys :: godot_method_bind , pub get_ticks_on_borders : * mut sys :: godot_method_bind , pub is_editable : * mut sys :: godot_method_bind , pub is_scrollable : * mut sys :: godot_method_bind , pub set_editable : * mut sys :: godot_method_bind , pub set_scrollable : * mut sys :: godot_method_bind , pub set_ticks : * mut sys :: godot_method_bind , pub set_ticks_on_borders : * mut sys :: godot_method_bind } impl SliderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SliderMethodTable = SliderMethodTable { class_constructor : None , get_ticks : 0 as * mut sys :: godot_method_bind , get_ticks_on_borders : 0 as * mut sys :: godot_method_bind , is_editable : 0 as * mut sys :: godot_method_bind , is_scrollable : 0 as * mut sys :: godot_method_bind , set_editable : 0 as * mut sys :: godot_method_bind , set_scrollable : 0 as * mut sys :: godot_method_bind , set_ticks : 0 as * mut sys :: godot_method_bind , set_ticks_on_borders : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SliderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Slider\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_ticks = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks\0" . as_ptr () as * const c_char) ; table . get_ticks_on_borders = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_on_borders\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . is_scrollable = (gd_api . godot_method_bind_get_method) (class_name , "is_scrollable\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_scrollable = (gd_api . godot_method_bind_get_method) (class_name , "set_scrollable\0" . as_ptr () as * const c_char) ; table . set_ticks = (gd_api . godot_method_bind_get_method) (class_name , "set_ticks\0" . as_ptr () as * const c_char) ; table . set_ticks_on_borders = (gd_api . godot_method_bind_get_method) (class_name , "set_ticks_on_borders\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:772:16689 [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 StyleBoxTexture` inherits `StyleBox` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_styleboxtexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStyleBoxTexture inherits methods from:\n - [StyleBox](struct.StyleBox.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StyleBoxTexture { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AxisStretchMode (pub i64) ; impl AxisStretchMode { pub const STRETCH : AxisStretchMode = AxisStretchMode (0i64) ; pub const TILE : AxisStretchMode = AxisStretchMode (1i64) ; pub const TILE_FIT : AxisStretchMode = AxisStretchMode (2i64) ; } impl From < i64 > for AxisStretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AxisStretchMode > for i64 { # [inline] fn from (v : AxisStretchMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl StyleBoxTexture { pub const AXIS_STRETCH_MODE_STRETCH : i64 = 0i64 ; pub const AXIS_STRETCH_MODE_TILE : i64 = 1i64 ; pub const AXIS_STRETCH_MODE_TILE_FIT : i64 = 2i64 ; } impl StyleBoxTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StyleBoxTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Expands the top margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn expand_margin_size (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_expand_margin_size ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn h_axis_stretch_mode (& self) -> crate :: generated :: style_box_texture :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_h_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: style_box_texture :: AxisStretchMode (ret) } } # [doc = "Increases the top margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the top border of the 3×3 box.\nThis is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative."] # [doc = ""] # [inline] pub fn margin_size (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_margin_size ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , margin) ; ret as _ } } # [doc = "Modulates the color of the texture when this style box is drawn."] # [doc = ""] # [inline] pub fn modulate (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_modulate ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The normal map to use when drawing this style box.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Species a sub-region of the texture to use.\nThis is equivalent to first wrapping the texture in an [AtlasTexture] with the same region."] # [doc = ""] # [inline] pub fn region_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_region_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The texture to use when drawing this style box."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Controls how the stylebox's texture will be stretched or tiled vertically. See [enum AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn v_axis_stretch_mode (& self) -> crate :: generated :: style_box_texture :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_v_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: style_box_texture :: AxisStretchMode (ret) } } # [doc = "If `true`, the nine-patch texture's center tile will be drawn."] # [doc = ""] # [inline] pub fn is_draw_center_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . is_draw_center_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the nine-patch texture's center tile will be drawn."] # [doc = ""] # [inline] pub fn set_draw_center (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_draw_center ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Sets the expand margin to `size` pixels for all margins."] # [doc = ""] # [inline] pub fn set_expand_margin_all (& self , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_all ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the expand margin for each margin to `size_left`, `size_top`, `size_right`, and `size_bottom` pixels."] # [doc = ""] # [inline] pub fn set_expand_margin_individual (& self , size_left : f64 , size_top : f64 , size_right : f64 , size_bottom : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_individual ; let ret = crate :: icalls :: icallptr_void_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , size_left , size_top , size_right , size_bottom) ; } } # [doc = "Expands the top margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn set_expand_margin_size (& self , margin : i64 , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_size ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , size) ; } } # [doc = "Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn set_h_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_h_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Increases the top margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the top border of the 3×3 box.\nThis is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative."] # [doc = ""] # [inline] pub fn set_margin_size (& self , margin : i64 , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_margin_size ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , margin , size) ; } } # [doc = "Modulates the color of the texture when this style box is drawn."] # [doc = ""] # [inline] pub fn set_modulate (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_modulate ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The normal map to use when drawing this style box.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_map (& self , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "Species a sub-region of the texture to use.\nThis is equivalent to first wrapping the texture in an [AtlasTexture] with the same region."] # [doc = ""] # [inline] pub fn set_region_rect (& self , region : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_region_rect ; let ret = crate :: icalls :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , region) ; } } # [doc = "The texture to use when drawing this style box."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Controls how the stylebox's texture will be stretched or tiled vertically. See [enum AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn set_v_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_v_axis_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBoxTexture { } unsafe impl GodotObject for StyleBoxTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxTexture" } } impl std :: ops :: Deref for StyleBoxTexture { type Target = crate :: generated :: style_box :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: style_box :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: style_box :: StyleBox > for StyleBoxTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for StyleBoxTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StyleBoxTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for StyleBoxTexture { } impl Instanciable for StyleBoxTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { StyleBoxTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StyleBoxTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_expand_margin_size : * mut sys :: godot_method_bind , pub get_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub get_margin_size : * mut sys :: godot_method_bind , pub get_modulate : * mut sys :: godot_method_bind , pub get_normal_map : * mut sys :: godot_method_bind , pub get_region_rect : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_v_axis_stretch_mode : * mut sys :: godot_method_bind , pub is_draw_center_enabled : * mut sys :: godot_method_bind , pub set_draw_center : * mut sys :: godot_method_bind , pub set_expand_margin_all : * mut sys :: godot_method_bind , pub set_expand_margin_individual : * mut sys :: godot_method_bind , pub set_expand_margin_size : * mut sys :: godot_method_bind , pub set_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub set_margin_size : * mut sys :: godot_method_bind , pub set_modulate : * mut sys :: godot_method_bind , pub set_normal_map : * mut sys :: godot_method_bind , pub set_region_rect : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_v_axis_stretch_mode : * mut sys :: godot_method_bind } impl StyleBoxTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StyleBoxTextureMethodTable = StyleBoxTextureMethodTable { class_constructor : None , get_expand_margin_size : 0 as * mut sys :: godot_method_bind , get_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , get_margin_size : 0 as * mut sys :: godot_method_bind , get_modulate : 0 as * mut sys :: godot_method_bind , get_normal_map : 0 as * mut sys :: godot_method_bind , get_region_rect : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , is_draw_center_enabled : 0 as * mut sys :: godot_method_bind , set_draw_center : 0 as * mut sys :: godot_method_bind , set_expand_margin_all : 0 as * mut sys :: godot_method_bind , set_expand_margin_individual : 0 as * mut sys :: godot_method_bind , set_expand_margin_size : 0 as * mut sys :: godot_method_bind , set_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , set_margin_size : 0 as * mut sys :: godot_method_bind , set_modulate : 0 as * mut sys :: godot_method_bind , set_normal_map : 0 as * mut sys :: godot_method_bind , set_region_rect : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { StyleBoxTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StyleBoxTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_expand_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_margin_size\0" . as_ptr () as * const c_char) ; table . get_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . get_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "get_margin_size\0" . as_ptr () as * const c_char) ; table . get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_modulate\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . is_draw_center_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_center_enabled\0" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\0" . as_ptr () as * const c_char) ; table . set_expand_margin_all = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_all\0" . as_ptr () as * const c_char) ; table . set_expand_margin_individual = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_individual\0" . as_ptr () as * const c_char) ; table . set_expand_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_size\0" . as_ptr () as * const c_char) ; table . set_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "set_margin_size\0" . as_ptr () as * const c_char) ; table . set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_modulate\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:778:5711 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:784:14839 [INFO] [stdout] | [INFO] [stdout] 784 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 784 | # [doc = "`core class SkeletonIK` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_skeletonik.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`SkeletonIK` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSkeletonIK inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SkeletonIK { this : RawObject < Self > , } impl SkeletonIK { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SkeletonIKMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn interpolation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_interpolation ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn magnet_position (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_magnet_position ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn max_iterations (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_max_iterations ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn min_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_min_distance ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_parent_skeleton (& self) -> Option < Ref < crate :: generated :: skeleton :: Skeleton , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_parent_skeleton ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: skeleton :: Skeleton , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn root_bone (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_root_bone ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn target_node (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_target_node ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn target_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_target_transform ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn tip_bone (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_tip_bone ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_override_tip_basis (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . is_override_tip_basis ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_running (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . is_running ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_using_magnet (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . is_using_magnet ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_interpolation (& self , interpolation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_interpolation ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , interpolation) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_magnet_position (& self , local_position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_magnet_position ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , local_position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_max_iterations (& self , iterations : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_max_iterations ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , iterations) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_min_distance (& self , min_distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_min_distance ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , min_distance) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_override_tip_basis (& self , _override : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_override_tip_basis ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _override) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_root_bone (& self , root_bone : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_root_bone ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , root_bone . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_target_node (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_target_node ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_target_transform (& self , target : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_target_transform ; let ret = crate :: icalls :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , target) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_tip_bone (& self , tip_bone : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_tip_bone ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , tip_bone . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_magnet (& self , _use : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_use_magnet ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , _use) ; } } # [doc = "\n# Default Arguments\n* `one_time` - `false`"] # [doc = ""] # [inline] pub fn start (& self , one_time : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , one_time) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SkeletonIK { } unsafe impl GodotObject for SkeletonIK { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SkeletonIK" } } impl QueueFree for SkeletonIK { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for SkeletonIK { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SkeletonIK { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for SkeletonIK { } unsafe impl SubClass < crate :: generated :: object :: Object > for SkeletonIK { } impl Instanciable for SkeletonIK { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SkeletonIK :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkeletonIKMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_interpolation : * mut sys :: godot_method_bind , pub get_magnet_position : * mut sys :: godot_method_bind , pub get_max_iterations : * mut sys :: godot_method_bind , pub get_min_distance : * mut sys :: godot_method_bind , pub get_parent_skeleton : * mut sys :: godot_method_bind , pub get_root_bone : * mut sys :: godot_method_bind , pub get_target_node : * mut sys :: godot_method_bind , pub get_target_transform : * mut sys :: godot_method_bind , pub get_tip_bone : * mut sys :: godot_method_bind , pub is_override_tip_basis : * mut sys :: godot_method_bind , pub is_running : * mut sys :: godot_method_bind , pub is_using_magnet : * mut sys :: godot_method_bind , pub set_interpolation : * mut sys :: godot_method_bind , pub set_magnet_position : * mut sys :: godot_method_bind , pub set_max_iterations : * mut sys :: godot_method_bind , pub set_min_distance : * mut sys :: godot_method_bind , pub set_override_tip_basis : * mut sys :: godot_method_bind , pub set_root_bone : * mut sys :: godot_method_bind , pub set_target_node : * mut sys :: godot_method_bind , pub set_target_transform : * mut sys :: godot_method_bind , pub set_tip_bone : * mut sys :: godot_method_bind , pub set_use_magnet : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl SkeletonIKMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkeletonIKMethodTable = SkeletonIKMethodTable { class_constructor : None , get_interpolation : 0 as * mut sys :: godot_method_bind , get_magnet_position : 0 as * mut sys :: godot_method_bind , get_max_iterations : 0 as * mut sys :: godot_method_bind , get_min_distance : 0 as * mut sys :: godot_method_bind , get_parent_skeleton : 0 as * mut sys :: godot_method_bind , get_root_bone : 0 as * mut sys :: godot_method_bind , get_target_node : 0 as * mut sys :: godot_method_bind , get_target_transform : 0 as * mut sys :: godot_method_bind , get_tip_bone : 0 as * mut sys :: godot_method_bind , is_override_tip_basis : 0 as * mut sys :: godot_method_bind , is_running : 0 as * mut sys :: godot_method_bind , is_using_magnet : 0 as * mut sys :: godot_method_bind , set_interpolation : 0 as * mut sys :: godot_method_bind , set_magnet_position : 0 as * mut sys :: godot_method_bind , set_max_iterations : 0 as * mut sys :: godot_method_bind , set_min_distance : 0 as * mut sys :: godot_method_bind , set_override_tip_basis : 0 as * mut sys :: godot_method_bind , set_root_bone : 0 as * mut sys :: godot_method_bind , set_target_node : 0 as * mut sys :: godot_method_bind , set_target_transform : 0 as * mut sys :: godot_method_bind , set_tip_bone : 0 as * mut sys :: godot_method_bind , set_use_magnet : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SkeletonIKMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SkeletonIK\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "get_interpolation\0" . as_ptr () as * const c_char) ; table . get_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "get_magnet_position\0" . as_ptr () as * const c_char) ; table . get_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "get_max_iterations\0" . as_ptr () as * const c_char) ; table . get_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_min_distance\0" . as_ptr () as * const c_char) ; table . get_parent_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_skeleton\0" . as_ptr () as * const c_char) ; table . get_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_root_bone\0" . as_ptr () as * const c_char) ; table . get_target_node = (gd_api . godot_method_bind_get_method) (class_name , "get_target_node\0" . as_ptr () as * const c_char) ; table . get_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_target_transform\0" . as_ptr () as * const c_char) ; table . get_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_tip_bone\0" . as_ptr () as * const c_char) ; table . is_override_tip_basis = (gd_api . godot_method_bind_get_method) (class_name , "is_override_tip_basis\0" . as_ptr () as * const c_char) ; table . is_running = (gd_api . godot_method_bind_get_method) (class_name , "is_running\0" . as_ptr () as * const c_char) ; table . is_using_magnet = (gd_api . godot_method_bind_get_method) (class_name , "is_using_magnet\0" . as_ptr () as * const c_char) ; table . set_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "set_interpolation\0" . as_ptr () as * const c_char) ; table . set_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "set_magnet_position\0" . as_ptr () as * const c_char) ; table . set_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "set_max_iterations\0" . as_ptr () as * const c_char) ; table . set_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_min_distance\0" . as_ptr () as * const c_char) ; table . set_override_tip_basis = (gd_api . godot_method_bind_get_method) (class_name , "set_override_tip_basis\0" . as_ptr () as * const c_char) ; table . set_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_root_bone\0" . as_ptr () as * const c_char) ; table . set_target_node = (gd_api . godot_method_bind_get_method) (class_name , "set_target_node\0" . as_ptr () as * const c_char) ; table . set_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_target_transform\0" . as_ptr () as * const c_char) ; table . set_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_tip_bone\0" . as_ptr () as * const c_char) ; table . set_use_magnet = (gd_api . godot_method_bind_get_method) (class_name , "set_use_magnet\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:790:36435 [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 RigidBody2D` inherits `PhysicsBody2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_rigidbody2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`RigidBody2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRigidBody2D inherits methods from:\n - [PhysicsBody2D](struct.PhysicsBody2D.html)\n - [CollisionObject2D](struct.CollisionObject2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RigidBody2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CcdMode (pub i64) ; impl CcdMode { pub const DISABLED : CcdMode = CcdMode (0i64) ; pub const CAST_RAY : CcdMode = CcdMode (1i64) ; pub const CAST_SHAPE : CcdMode = CcdMode (2i64) ; } impl From < i64 > for CcdMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CcdMode > for i64 { # [inline] fn from (v : CcdMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const RIGID : Mode = Mode (0i64) ; pub const STATIC : Mode = Mode (1i64) ; pub const CHARACTER : Mode = Mode (2i64) ; pub const KINEMATIC : Mode = Mode (3i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RigidBody2D { pub const CCD_MODE_CAST_RAY : i64 = 1i64 ; pub const CCD_MODE_CAST_SHAPE : i64 = 2i64 ; pub const CCD_MODE_DISABLED : i64 = 0i64 ; pub const MODE_CHARACTER : i64 = 2i64 ; pub const MODE_KINEMATIC : i64 = 3i64 ; pub const MODE_RIGID : i64 = 0i64 ; pub const MODE_STATIC : i64 = 1i64 ; } impl RigidBody2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RigidBody2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a constant directional force without affecting rotation."] # [doc = ""] # [inline] pub fn add_central_force (& self , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . add_central_force ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , force) ; } } # [doc = "Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates."] # [doc = ""] # [inline] pub fn add_force (& self , offset : Vector2 , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . add_force ; let ret = crate :: icalls :: icallptr_void_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , offset , force) ; } } # [doc = "Adds a constant rotational force."] # [doc = ""] # [inline] pub fn add_torque (& self , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . add_torque ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , torque) ; } } # [doc = "Applies a directional impulse without affecting rotation."] # [doc = ""] # [inline] pub fn apply_central_impulse (& self , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . apply_central_impulse ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , impulse) ; } } # [doc = "Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the \"_force\" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin."] # [doc = ""] # [inline] pub fn apply_impulse (& self , offset : Vector2 , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . apply_impulse ; let ret = crate :: icalls :: icallptr_void_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , offset , impulse) ; } } # [doc = "Applies a rotational impulse to the body."] # [doc = ""] # [inline] pub fn apply_torque_impulse (& self , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . apply_torque_impulse ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , torque) ; } } # [doc = "Damps the body's [member angular_velocity]. If `-1`, the body will use the **Default Angular Damp** defined in **Project > Project Settings > Physics > 2d**."] # [doc = ""] # [inline] pub fn angular_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_angular_damp ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's rotational velocity."] # [doc = ""] # [inline] pub fn angular_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_angular_velocity ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's total applied force."] # [doc = ""] # [inline] pub fn applied_force (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_applied_force ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The body's total applied torque."] # [doc = ""] # [inline] pub fn applied_torque (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_applied_torque ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]."] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to `true` and [member contacts_reported] to be set high enough to detect all the collisions.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_colliding_bodies (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_colliding_bodies ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Continuous collision detection mode.\nContinuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [enum CCDMode] for details."] # [doc = ""] # [inline] pub fn continuous_collision_detection_mode (& self) -> crate :: generated :: rigid_body_2d :: CcdMode { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: rigid_body_2d :: CcdMode (ret) } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]."] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Multiplies the gravity applied to the body. The body's gravity is calculated from the **Default Gravity** value in **Project > Project Settings > Physics > 2d** and/or any additional gravity vector applied by [Area2D]s."] # [doc = ""] # [inline] pub fn gravity_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_gravity_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 inertia to return to automatically computing it."] # [doc = ""] # [inline] pub fn inertia (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_inertia ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Damps the body's [member linear_velocity]. If `-1`, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d**."] # [doc = ""] # [inline] pub fn linear_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_linear_damp ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's linear velocity."] # [doc = ""] # [inline] pub fn linear_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_linear_velocity ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The body's mass."] # [doc = ""] # [inline] pub fn mass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_mass ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to `true`.\n**Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner)."] # [doc = ""] # [inline] pub fn max_contacts_reported (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_max_contacts_reported ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The body's mode. See [enum Mode] for possible values."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: rigid_body_2d :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: rigid_body_2d :: Mode (ret) } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn physics_material_override (& self) -> Option < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_material :: PhysicsMaterial , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The body's weight based on its mass and the **Default Gravity** value in **Project > Project Settings > Physics > 2d**."] # [doc = ""] # [inline] pub fn weight (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_weight ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [member sleeping].\n**Note:** A RigidBody2D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to `true`."] # [doc = ""] # [inline] pub fn is_able_to_sleep (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . is_able_to_sleep ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]."] # [doc = ""] # [inline] pub fn is_contact_monitor_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . is_contact_monitor_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods."] # [doc = ""] # [inline] pub fn is_sleeping (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . is_sleeping ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function."] # [doc = ""] # [inline] pub fn is_using_custom_integrator (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . is_using_custom_integrator ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Damps the body's [member angular_velocity]. If `-1`, the body will use the **Default Angular Damp** defined in **Project > Project Settings > Physics > 2d**."] # [doc = ""] # [inline] pub fn set_angular_damp (& self , angular_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_angular_damp ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angular_damp) ; } } # [doc = "The body's rotational velocity."] # [doc = ""] # [inline] pub fn set_angular_velocity (& self , angular_velocity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_angular_velocity ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , angular_velocity) ; } } # [doc = "The body's total applied force."] # [doc = ""] # [inline] pub fn set_applied_force (& self , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_applied_force ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , force) ; } } # [doc = "The body's total applied torque."] # [doc = ""] # [inline] pub fn set_applied_torque (& self , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_applied_torque ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , torque) ; } } # [doc = "Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior."] # [doc = ""] # [inline] pub fn set_axis_velocity (& self , axis_velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_axis_velocity ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , axis_velocity) ; } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]."] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bounce) ; } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [member sleeping].\n**Note:** A RigidBody2D will never enter sleep mode automatically if its [member mode] is [constant MODE_CHARACTER]. It can still be put to sleep manually by setting its [member sleeping] property to `true`."] # [doc = ""] # [inline] pub fn set_can_sleep (& self , able_to_sleep : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_can_sleep ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , able_to_sleep) ; } } # [doc = "If `true`, the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]."] # [doc = ""] # [inline] pub fn set_contact_monitor (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_contact_monitor ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "Continuous collision detection mode.\nContinuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [enum CCDMode] for details."] # [doc = ""] # [inline] pub fn set_continuous_collision_detection_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction).\nDeprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]."] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , friction) ; } } # [doc = "Multiplies the gravity applied to the body. The body's gravity is calculated from the **Default Gravity** value in **Project > Project Settings > Physics > 2d** and/or any additional gravity vector applied by [Area2D]s."] # [doc = ""] # [inline] pub fn set_gravity_scale (& self , gravity_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_gravity_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , gravity_scale) ; } } # [doc = "The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 inertia to return to automatically computing it."] # [doc = ""] # [inline] pub fn set_inertia (& self , inertia : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_inertia ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , inertia) ; } } # [doc = "Damps the body's [member linear_velocity]. If `-1`, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d**."] # [doc = ""] # [inline] pub fn set_linear_damp (& self , linear_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_linear_damp ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , linear_damp) ; } } # [doc = "The body's linear velocity."] # [doc = ""] # [inline] pub fn set_linear_velocity (& self , linear_velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_linear_velocity ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , linear_velocity) ; } } # [doc = "The body's mass."] # [doc = ""] # [inline] pub fn set_mass (& self , mass : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_mass ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , mass) ; } } # [doc = "The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to `true`.\n**Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner)."] # [doc = ""] # [inline] pub fn set_max_contacts_reported (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_max_contacts_reported ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "The body's mode. See [enum Mode] for possible values."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn set_physics_material_override (& self , physics_material_override : impl AsArg < crate :: generated :: physics_material :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , physics_material_override . as_arg_ptr ()) ; } } # [doc = "If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods."] # [doc = ""] # [inline] pub fn set_sleeping (& self , sleeping : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_sleeping ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , sleeping) ; } } # [doc = "If `true`, internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function."] # [doc = ""] # [inline] pub fn set_use_custom_integrator (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_use_custom_integrator ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The body's weight based on its mass and the **Default Gravity** value in **Project > Project Settings > Physics > 2d**."] # [doc = ""] # [inline] pub fn set_weight (& self , weight : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_weight ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , weight) ; } } # [doc = "Returns `true` if a collision would result from moving in the given vector. `margin` increases the size of the shapes involved in the collision detection, and `result` is an object of type [Physics2DTestMotionResult], which contains additional information about the collision (should there be one).\n# Default Arguments\n* `infinite_inertia` - `true`\n* `margin` - `0.08`\n* `result` - `null`"] # [doc = ""] # [inline] pub fn test_motion (& self , motion : Vector2 , infinite_inertia : bool , margin : f64 , result : impl AsArg < crate :: generated :: physics_2d_test_motion_result :: Physics2DTestMotionResult >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . test_motion ; let ret = crate :: icalls :: icallptr_bool_vec2_bool_f64_obj (method_bind , self . this . sys () . as_ptr () , motion , infinite_inertia , margin , result . as_arg_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for RigidBody2D { } unsafe impl GodotObject for RigidBody2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RigidBody2D" } } impl QueueFree for RigidBody2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for RigidBody2D { type Target = crate :: generated :: physics_body_2d :: PhysicsBody2D ; # [inline] fn deref (& self) -> & crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RigidBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: physics_body_2d :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: physics_body_2d :: PhysicsBody2D > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: collision_object_2d :: CollisionObject2D > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for RigidBody2D { } impl Instanciable for RigidBody2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RigidBody2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RigidBody2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_central_force : * mut sys :: godot_method_bind , pub add_force : * mut sys :: godot_method_bind , pub add_torque : * mut sys :: godot_method_bind , pub apply_central_impulse : * mut sys :: godot_method_bind , pub apply_impulse : * mut sys :: godot_method_bind , pub apply_torque_impulse : * mut sys :: godot_method_bind , pub get_angular_damp : * mut sys :: godot_method_bind , pub get_angular_velocity : * mut sys :: godot_method_bind , pub get_applied_force : * mut sys :: godot_method_bind , pub get_applied_torque : * mut sys :: godot_method_bind , pub get_bounce : * mut sys :: godot_method_bind , pub get_colliding_bodies : * mut sys :: godot_method_bind , pub get_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub get_gravity_scale : * mut sys :: godot_method_bind , pub get_inertia : * mut sys :: godot_method_bind , pub get_linear_damp : * mut sys :: godot_method_bind , pub get_linear_velocity : * mut sys :: godot_method_bind , pub get_mass : * mut sys :: godot_method_bind , pub get_max_contacts_reported : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_physics_material_override : * mut sys :: godot_method_bind , pub get_weight : * mut sys :: godot_method_bind , pub is_able_to_sleep : * mut sys :: godot_method_bind , pub is_contact_monitor_enabled : * mut sys :: godot_method_bind , pub is_sleeping : * mut sys :: godot_method_bind , pub is_using_custom_integrator : * mut sys :: godot_method_bind , pub set_angular_damp : * mut sys :: godot_method_bind , pub set_angular_velocity : * mut sys :: godot_method_bind , pub set_applied_force : * mut sys :: godot_method_bind , pub set_applied_torque : * mut sys :: godot_method_bind , pub set_axis_velocity : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_can_sleep : * mut sys :: godot_method_bind , pub set_contact_monitor : * mut sys :: godot_method_bind , pub set_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_gravity_scale : * mut sys :: godot_method_bind , pub set_inertia : * mut sys :: godot_method_bind , pub set_linear_damp : * mut sys :: godot_method_bind , pub set_linear_velocity : * mut sys :: godot_method_bind , pub set_mass : * mut sys :: godot_method_bind , pub set_max_contacts_reported : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_physics_material_override : * mut sys :: godot_method_bind , pub set_sleeping : * mut sys :: godot_method_bind , pub set_use_custom_integrator : * mut sys :: godot_method_bind , pub set_weight : * mut sys :: godot_method_bind , pub test_motion : * mut sys :: godot_method_bind } impl RigidBody2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RigidBody2DMethodTable = RigidBody2DMethodTable { class_constructor : None , add_central_force : 0 as * mut sys :: godot_method_bind , add_force : 0 as * mut sys :: godot_method_bind , add_torque : 0 as * mut sys :: godot_method_bind , apply_central_impulse : 0 as * mut sys :: godot_method_bind , apply_impulse : 0 as * mut sys :: godot_method_bind , apply_torque_impulse : 0 as * mut sys :: godot_method_bind , get_angular_damp : 0 as * mut sys :: godot_method_bind , get_angular_velocity : 0 as * mut sys :: godot_method_bind , get_applied_force : 0 as * mut sys :: godot_method_bind , get_applied_torque : 0 as * mut sys :: godot_method_bind , get_bounce : 0 as * mut sys :: godot_method_bind , get_colliding_bodies : 0 as * mut sys :: godot_method_bind , get_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , get_gravity_scale : 0 as * mut sys :: godot_method_bind , get_inertia : 0 as * mut sys :: godot_method_bind , get_linear_damp : 0 as * mut sys :: godot_method_bind , get_linear_velocity : 0 as * mut sys :: godot_method_bind , get_mass : 0 as * mut sys :: godot_method_bind , get_max_contacts_reported : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_physics_material_override : 0 as * mut sys :: godot_method_bind , get_weight : 0 as * mut sys :: godot_method_bind , is_able_to_sleep : 0 as * mut sys :: godot_method_bind , is_contact_monitor_enabled : 0 as * mut sys :: godot_method_bind , is_sleeping : 0 as * mut sys :: godot_method_bind , is_using_custom_integrator : 0 as * mut sys :: godot_method_bind , set_angular_damp : 0 as * mut sys :: godot_method_bind , set_angular_velocity : 0 as * mut sys :: godot_method_bind , set_applied_force : 0 as * mut sys :: godot_method_bind , set_applied_torque : 0 as * mut sys :: godot_method_bind , set_axis_velocity : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_can_sleep : 0 as * mut sys :: godot_method_bind , set_contact_monitor : 0 as * mut sys :: godot_method_bind , set_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_gravity_scale : 0 as * mut sys :: godot_method_bind , set_inertia : 0 as * mut sys :: godot_method_bind , set_linear_damp : 0 as * mut sys :: godot_method_bind , set_linear_velocity : 0 as * mut sys :: godot_method_bind , set_mass : 0 as * mut sys :: godot_method_bind , set_max_contacts_reported : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_physics_material_override : 0 as * mut sys :: godot_method_bind , set_sleeping : 0 as * mut sys :: godot_method_bind , set_use_custom_integrator : 0 as * mut sys :: godot_method_bind , set_weight : 0 as * mut sys :: godot_method_bind , test_motion : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RigidBody2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RigidBody2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "add_central_force\0" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\0" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\0" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_applied_force = (gd_api . godot_method_bind_get_method) (class_name , "get_applied_force\0" . as_ptr () as * const c_char) ; table . get_applied_torque = (gd_api . godot_method_bind_get_method) (class_name , "get_applied_torque\0" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_colliding_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_colliding_bodies\0" . as_ptr () as * const c_char) ; table . get_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\0" . as_ptr () as * const c_char) ; table . get_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inertia\0" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\0" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\0" . as_ptr () as * const c_char) ; table . get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\0" . as_ptr () as * const c_char) ; table . is_able_to_sleep = (gd_api . godot_method_bind_get_method) (class_name , "is_able_to_sleep\0" . as_ptr () as * const c_char) ; table . is_contact_monitor_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_contact_monitor_enabled\0" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\0" . as_ptr () as * const c_char) ; table . is_using_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "is_using_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_applied_force = (gd_api . godot_method_bind_get_method) (class_name , "set_applied_force\0" . as_ptr () as * const c_char) ; table . set_applied_torque = (gd_api . godot_method_bind_get_method) (class_name , "set_applied_torque\0" . as_ptr () as * const c_char) ; table . set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_velocity\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_can_sleep = (gd_api . godot_method_bind_get_method) (class_name , "set_can_sleep\0" . as_ptr () as * const c_char) ; table . set_contact_monitor = (gd_api . godot_method_bind_get_method) (class_name , "set_contact_monitor\0" . as_ptr () as * const c_char) ; table . set_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\0" . as_ptr () as * const c_char) ; table . set_inertia = (gd_api . godot_method_bind_get_method) (class_name , "set_inertia\0" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\0" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\0" . as_ptr () as * const c_char) ; table . set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "set_sleeping\0" . as_ptr () as * const c_char) ; table . set_use_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "set_use_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\0" . as_ptr () as * const c_char) ; table . test_motion = (gd_api . godot_method_bind_get_method) (class_name , "test_motion\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:796:4680 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:802:8754 [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 MeshInstance2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_meshinstance2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`MeshInstance2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMeshInstance2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MeshInstance2D { this : RawObject < Self > , } impl MeshInstance2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MeshInstance2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [Mesh] that will be drawn by the [MeshInstance2D]."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The normal map that will be used if using the default [CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The [Mesh] that will be drawn by the [MeshInstance2D]."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = "The normal map that will be used if using the default [CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_map (& self , normal_map : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshInstance2D { } unsafe impl GodotObject for MeshInstance2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MeshInstance2D" } } impl QueueFree for MeshInstance2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for MeshInstance2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshInstance2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for MeshInstance2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for MeshInstance2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for MeshInstance2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for MeshInstance2D { } impl Instanciable for MeshInstance2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MeshInstance2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshInstance2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_mesh : * mut sys :: godot_method_bind , pub get_normal_map : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind , pub set_normal_map : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind } impl MeshInstance2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshInstance2DMethodTable = MeshInstance2DMethodTable { class_constructor : None , get_mesh : 0 as * mut sys :: godot_method_bind , get_normal_map : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind , set_normal_map : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MeshInstance2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MeshInstance2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:808:3784 [INFO] [stdout] | [INFO] [stdout] 808 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 808 | # [doc = "`core class VisualShaderNodeScalarClamp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodescalarclamp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarClamp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarClamp { this : RawObject < Self > , } impl VisualShaderNodeScalarClamp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarClampMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarClamp { } unsafe impl GodotObject for VisualShaderNodeScalarClamp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarClamp" } } impl std :: ops :: Deref for VisualShaderNodeScalarClamp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarClamp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarClamp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarClamp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarClamp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarClamp { } impl Instanciable for VisualShaderNodeScalarClamp { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeScalarClamp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarClampMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarClampMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarClampMethodTable = VisualShaderNodeScalarClampMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarClampMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarClamp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:820:3784 [INFO] [stdout] | [INFO] [stdout] 820 | ...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] 820 | # [doc = "`core class VisualShaderNodeVectorClamp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorclamp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorClamp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorClamp { this : RawObject < Self > , } impl VisualShaderNodeVectorClamp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorClampMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorClamp { } unsafe impl GodotObject for VisualShaderNodeVectorClamp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorClamp" } } impl std :: ops :: Deref for VisualShaderNodeVectorClamp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorClamp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorClamp { } impl Instanciable for VisualShaderNodeVectorClamp { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorClamp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorClampMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorClampMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorClampMethodTable = VisualShaderNodeVectorClampMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorClampMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorClamp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:826:6315 [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 VisualScriptInputAction` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptinputaction.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptInputAction inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptInputAction { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const PRESSED : Mode = Mode (0i64) ; pub const RELEASED : Mode = Mode (1i64) ; pub const JUST_PRESSED : Mode = Mode (2i64) ; pub const JUST_RELEASED : Mode = Mode (3i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptInputAction { pub const MODE_JUST_PRESSED : i64 = 2i64 ; pub const MODE_JUST_RELEASED : i64 = 3i64 ; pub const MODE_PRESSED : i64 = 0i64 ; pub const MODE_RELEASED : i64 = 1i64 ; } impl VisualScriptInputAction { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptInputActionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn action_mode (& self) -> crate :: generated :: visual_script_input_action :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptInputActionMethodTable :: get (get_api ()) . get_action_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_input_action :: Mode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn action_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptInputActionMethodTable :: get (get_api ()) . get_action_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_action_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptInputActionMethodTable :: get (get_api ()) . set_action_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_action_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptInputActionMethodTable :: get (get_api ()) . set_action_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptInputAction { } unsafe impl GodotObject for VisualScriptInputAction { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptInputAction" } } impl std :: ops :: Deref for VisualScriptInputAction { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptInputAction { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptInputAction { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptInputAction { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptInputAction { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptInputAction { } impl Instanciable for VisualScriptInputAction { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptInputAction :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptInputActionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_action_mode : * mut sys :: godot_method_bind , pub get_action_name : * mut sys :: godot_method_bind , pub set_action_mode : * mut sys :: godot_method_bind , pub set_action_name : * mut sys :: godot_method_bind } impl VisualScriptInputActionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptInputActionMethodTable = VisualScriptInputActionMethodTable { class_constructor : None , get_action_mode : 0 as * mut sys :: godot_method_bind , get_action_name : 0 as * mut sys :: godot_method_bind , set_action_mode : 0 as * mut sys :: godot_method_bind , set_action_name : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptInputActionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptInputAction\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_action_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_action_mode\0" . as_ptr () as * const c_char) ; table . get_action_name = (gd_api . godot_method_bind_get_method) (class_name , "get_action_name\0" . as_ptr () as * const c_char) ; table . set_action_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_action_mode\0" . as_ptr () as * const c_char) ; table . set_action_name = (gd_api . godot_method_bind_get_method) (class_name , "set_action_name\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:832:10056 [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 AspectRatioContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_aspectratiocontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`AspectRatioContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAspectRatioContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AspectRatioContainer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AlignMode (pub i64) ; impl AlignMode { pub const BEGIN : AlignMode = AlignMode (0i64) ; pub const CENTER : AlignMode = AlignMode (1i64) ; pub const END : AlignMode = AlignMode (2i64) ; } impl From < i64 > for AlignMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AlignMode > for i64 { # [inline] fn from (v : AlignMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StretchMode (pub i64) ; impl StretchMode { pub const WIDTH_CONTROLS_HEIGHT : StretchMode = StretchMode (0i64) ; pub const HEIGHT_CONTROLS_WIDTH : StretchMode = StretchMode (1i64) ; pub const FIT : StretchMode = StretchMode (2i64) ; pub const COVER : StretchMode = StretchMode (3i64) ; } impl From < i64 > for StretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StretchMode > for i64 { # [inline] fn from (v : StretchMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AspectRatioContainer { pub const ALIGN_BEGIN : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_END : i64 = 2i64 ; pub const STRETCH_COVER : i64 = 3i64 ; pub const STRETCH_FIT : i64 = 2i64 ; pub const STRETCH_HEIGHT_CONTROLS_WIDTH : i64 = 1i64 ; pub const STRETCH_WIDTH_CONTROLS_HEIGHT : i64 = 0i64 ; } impl AspectRatioContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AspectRatioContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn alignment_horizontal (& self) -> crate :: generated :: aspect_ratio_container :: AlignMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_alignment_horizontal ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: aspect_ratio_container :: AlignMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn alignment_vertical (& self) -> crate :: generated :: aspect_ratio_container :: AlignMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_alignment_vertical ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: aspect_ratio_container :: AlignMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn stretch_mode (& self) -> crate :: generated :: aspect_ratio_container :: StretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_stretch_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: aspect_ratio_container :: StretchMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_alignment_horizontal (& self , alignment_horizontal : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_alignment_horizontal ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , alignment_horizontal) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_alignment_vertical (& self , alignment_vertical : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_alignment_vertical ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , alignment_vertical) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_ratio ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_stretch_mode (& self , stretch_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_stretch_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , stretch_mode) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AspectRatioContainer { } unsafe impl GodotObject for AspectRatioContainer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AspectRatioContainer" } } impl QueueFree for AspectRatioContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for AspectRatioContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AspectRatioContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for AspectRatioContainer { } impl Instanciable for AspectRatioContainer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AspectRatioContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AspectRatioContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_alignment_horizontal : * mut sys :: godot_method_bind , pub get_alignment_vertical : * mut sys :: godot_method_bind , pub get_ratio : * mut sys :: godot_method_bind , pub get_stretch_mode : * mut sys :: godot_method_bind , pub set_alignment_horizontal : * mut sys :: godot_method_bind , pub set_alignment_vertical : * mut sys :: godot_method_bind , pub set_ratio : * mut sys :: godot_method_bind , pub set_stretch_mode : * mut sys :: godot_method_bind } impl AspectRatioContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AspectRatioContainerMethodTable = AspectRatioContainerMethodTable { class_constructor : None , get_alignment_horizontal : 0 as * mut sys :: godot_method_bind , get_alignment_vertical : 0 as * mut sys :: godot_method_bind , get_ratio : 0 as * mut sys :: godot_method_bind , get_stretch_mode : 0 as * mut sys :: godot_method_bind , set_alignment_horizontal : 0 as * mut sys :: godot_method_bind , set_alignment_vertical : 0 as * mut sys :: godot_method_bind , set_ratio : 0 as * mut sys :: godot_method_bind , set_stretch_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AspectRatioContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AspectRatioContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_alignment_horizontal = (gd_api . godot_method_bind_get_method) (class_name , "get_alignment_horizontal\0" . as_ptr () as * const c_char) ; table . get_alignment_vertical = (gd_api . godot_method_bind_get_method) (class_name , "get_alignment_vertical\0" . as_ptr () as * const c_char) ; table . get_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_ratio\0" . as_ptr () as * const c_char) ; table . get_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_alignment_horizontal = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment_horizontal\0" . as_ptr () as * const c_char) ; table . set_alignment_vertical = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment_vertical\0" . as_ptr () as * const c_char) ; table . set_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_ratio\0" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:838:4420 [INFO] [stdout] | [INFO] [stdout] 838 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 838 | # [doc = "`core class PopupPanel` inherits `Popup` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_popuppanel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`PopupPanel` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPopupPanel inherits methods from:\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PopupPanel { this : RawObject < Self > , } impl PopupPanel { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PopupPanelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for PopupPanel { } unsafe impl GodotObject for PopupPanel { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PopupPanel" } } impl QueueFree for PopupPanel { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PopupPanel { type Target = crate :: generated :: popup :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PopupPanel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: popup :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: popup :: Popup > for PopupPanel { } unsafe impl SubClass < crate :: generated :: control :: Control > for PopupPanel { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for PopupPanel { } unsafe impl SubClass < crate :: generated :: node :: Node > for PopupPanel { } unsafe impl SubClass < crate :: generated :: object :: Object > for PopupPanel { } impl Instanciable for PopupPanel { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PopupPanel :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PopupPanelMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PopupPanelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PopupPanelMethodTable = PopupPanelMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PopupPanelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PopupPanel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:844:4604 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:850:9444 [INFO] [stdout] | [INFO] [stdout] 850 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 850 | # [doc = "`core class WebXRInterface` inherits `ARVRInterface` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_webxrinterface.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebXRInterface inherits methods from:\n - [ARVRInterface](struct.ARVRInterface.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebXRInterface { this : RawObject < Self > , } impl WebXRInterface { # [doc = ""] # [doc = ""] # [inline] pub fn bounds_geometry (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_bounds_geometry ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_controller (& self , controller_id : i64) -> Option < Ref < crate :: generated :: arvr_positional_tracker :: ARVRPositionalTracker , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_controller ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , controller_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: arvr_positional_tracker :: ARVRPositionalTracker , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn optional_features (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_optional_features ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn reference_space_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_reference_space_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn requested_reference_space_types (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_requested_reference_space_types ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn required_features (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_required_features ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn session_mode (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_session_mode ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn visibility_state (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_visibility_state ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_session_supported (& self , session_mode : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . is_session_supported ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , session_mode . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_optional_features (& self , optional_features : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . set_optional_features ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , optional_features . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_requested_reference_space_types (& self , requested_reference_space_types : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . set_requested_reference_space_types ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , requested_reference_space_types . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_required_features (& self , required_features : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . set_required_features ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , required_features . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_session_mode (& self , session_mode : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . set_session_mode ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , session_mode . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebXRInterface { } unsafe impl GodotObject for WebXRInterface { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebXRInterface" } } impl std :: ops :: Deref for WebXRInterface { type Target = crate :: generated :: arvr_interface :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebXRInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: arvr_interface :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: arvr_interface :: ARVRInterface > for WebXRInterface { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for WebXRInterface { } unsafe impl SubClass < crate :: generated :: object :: Object > for WebXRInterface { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebXRInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bounds_geometry : * mut sys :: godot_method_bind , pub get_controller : * mut sys :: godot_method_bind , pub get_optional_features : * mut sys :: godot_method_bind , pub get_reference_space_type : * mut sys :: godot_method_bind , pub get_requested_reference_space_types : * mut sys :: godot_method_bind , pub get_required_features : * mut sys :: godot_method_bind , pub get_session_mode : * mut sys :: godot_method_bind , pub get_visibility_state : * mut sys :: godot_method_bind , pub is_session_supported : * mut sys :: godot_method_bind , pub set_optional_features : * mut sys :: godot_method_bind , pub set_requested_reference_space_types : * mut sys :: godot_method_bind , pub set_required_features : * mut sys :: godot_method_bind , pub set_session_mode : * mut sys :: godot_method_bind } impl WebXRInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebXRInterfaceMethodTable = WebXRInterfaceMethodTable { class_constructor : None , get_bounds_geometry : 0 as * mut sys :: godot_method_bind , get_controller : 0 as * mut sys :: godot_method_bind , get_optional_features : 0 as * mut sys :: godot_method_bind , get_reference_space_type : 0 as * mut sys :: godot_method_bind , get_requested_reference_space_types : 0 as * mut sys :: godot_method_bind , get_required_features : 0 as * mut sys :: godot_method_bind , get_session_mode : 0 as * mut sys :: godot_method_bind , get_visibility_state : 0 as * mut sys :: godot_method_bind , is_session_supported : 0 as * mut sys :: godot_method_bind , set_optional_features : 0 as * mut sys :: godot_method_bind , set_requested_reference_space_types : 0 as * mut sys :: godot_method_bind , set_required_features : 0 as * mut sys :: godot_method_bind , set_session_mode : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { WebXRInterfaceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebXRInterface\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounds_geometry = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds_geometry\0" . as_ptr () as * const c_char) ; table . get_controller = (gd_api . godot_method_bind_get_method) (class_name , "get_controller\0" . as_ptr () as * const c_char) ; table . get_optional_features = (gd_api . godot_method_bind_get_method) (class_name , "get_optional_features\0" . as_ptr () as * const c_char) ; table . get_reference_space_type = (gd_api . godot_method_bind_get_method) (class_name , "get_reference_space_type\0" . as_ptr () as * const c_char) ; table . get_requested_reference_space_types = (gd_api . godot_method_bind_get_method) (class_name , "get_requested_reference_space_types\0" . as_ptr () as * const c_char) ; table . get_required_features = (gd_api . godot_method_bind_get_method) (class_name , "get_required_features\0" . as_ptr () as * const c_char) ; table . get_session_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_session_mode\0" . as_ptr () as * const c_char) ; table . get_visibility_state = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_state\0" . as_ptr () as * const c_char) ; table . is_session_supported = (gd_api . godot_method_bind_get_method) (class_name , "is_session_supported\0" . as_ptr () as * const c_char) ; table . set_optional_features = (gd_api . godot_method_bind_get_method) (class_name , "set_optional_features\0" . as_ptr () as * const c_char) ; table . set_requested_reference_space_types = (gd_api . godot_method_bind_get_method) (class_name , "set_requested_reference_space_types\0" . as_ptr () as * const c_char) ; table . set_required_features = (gd_api . godot_method_bind_get_method) (class_name , "set_required_features\0" . as_ptr () as * const c_char) ; table . set_session_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_session_mode\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:856:8754 [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 RandomNumberGenerator` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_randomnumbergenerator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRandomNumberGenerator inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RandomNumberGenerator { this : RawObject < Self > , } impl RandomNumberGenerator { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RandomNumberGeneratorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers.\n**Note:** The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally."] # [doc = ""] # [inline] pub fn seed (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . get_seed ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn state (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . get_state ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Generates a pseudo-random float between `0.0` and `1.0` (inclusive)."] # [doc = ""] # [inline] pub fn randf (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randf ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Generates a pseudo-random float between `from` and `to` (inclusive)."] # [doc = ""] # [inline] pub fn randf_range (& self , from : f64 , to : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randf_range ; let ret = crate :: icalls :: icallptr_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , from , to) ; ret as _ } } # [doc = "Generates a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified `mean` and a standard `deviation`. This is also called Gaussian distribution.\n# Default Arguments\n* `mean` - `0.0`\n* `deviation` - `1.0`"] # [doc = ""] # [inline] pub fn randfn (& self , mean : f64 , deviation : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randfn ; let ret = crate :: icalls :: icallptr_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , mean , deviation) ; ret as _ } } # [doc = "Generates a pseudo-random 32-bit unsigned integer between `0` and `4294967295` (inclusive)."] # [doc = ""] # [inline] pub fn randi (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randi ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Generates a pseudo-random 32-bit signed integer between `from` and `to` (inclusive)."] # [doc = ""] # [inline] pub fn randi_range (& self , from : i64 , to : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randi_range ; let ret = crate :: icalls :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , from , to) ; ret as _ } } # [doc = "Setups a time-based seed to generator."] # [doc = ""] # [inline] pub fn randomize (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randomize ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers.\n**Note:** The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally."] # [doc = ""] # [inline] pub fn set_seed (& self , seed : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . set_seed ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , seed) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_state (& self , state : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . set_state ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , state) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RandomNumberGenerator { } unsafe impl GodotObject for RandomNumberGenerator { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RandomNumberGenerator" } } impl std :: ops :: Deref for RandomNumberGenerator { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RandomNumberGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for RandomNumberGenerator { } unsafe impl SubClass < crate :: generated :: object :: Object > for RandomNumberGenerator { } impl Instanciable for RandomNumberGenerator { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { RandomNumberGenerator :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RandomNumberGeneratorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_seed : * mut sys :: godot_method_bind , pub get_state : * mut sys :: godot_method_bind , pub randf : * mut sys :: godot_method_bind , pub randf_range : * mut sys :: godot_method_bind , pub randfn : * mut sys :: godot_method_bind , pub randi : * mut sys :: godot_method_bind , pub randi_range : * mut sys :: godot_method_bind , pub randomize : * mut sys :: godot_method_bind , pub set_seed : * mut sys :: godot_method_bind , pub set_state : * mut sys :: godot_method_bind } impl RandomNumberGeneratorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RandomNumberGeneratorMethodTable = RandomNumberGeneratorMethodTable { class_constructor : None , get_seed : 0 as * mut sys :: godot_method_bind , get_state : 0 as * mut sys :: godot_method_bind , randf : 0 as * mut sys :: godot_method_bind , randf_range : 0 as * mut sys :: godot_method_bind , randfn : 0 as * mut sys :: godot_method_bind , randi : 0 as * mut sys :: godot_method_bind , randi_range : 0 as * mut sys :: godot_method_bind , randomize : 0 as * mut sys :: godot_method_bind , set_seed : 0 as * mut sys :: godot_method_bind , set_state : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { RandomNumberGeneratorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RandomNumberGenerator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_seed = (gd_api . godot_method_bind_get_method) (class_name , "get_seed\0" . as_ptr () as * const c_char) ; table . get_state = (gd_api . godot_method_bind_get_method) (class_name , "get_state\0" . as_ptr () as * const c_char) ; table . randf = (gd_api . godot_method_bind_get_method) (class_name , "randf\0" . as_ptr () as * const c_char) ; table . randf_range = (gd_api . godot_method_bind_get_method) (class_name , "randf_range\0" . as_ptr () as * const c_char) ; table . randfn = (gd_api . godot_method_bind_get_method) (class_name , "randfn\0" . as_ptr () as * const c_char) ; table . randi = (gd_api . godot_method_bind_get_method) (class_name , "randi\0" . as_ptr () as * const c_char) ; table . randi_range = (gd_api . godot_method_bind_get_method) (class_name , "randi_range\0" . as_ptr () as * const c_char) ; table . randomize = (gd_api . godot_method_bind_get_method) (class_name , "randomize\0" . as_ptr () as * const c_char) ; table . set_seed = (gd_api . godot_method_bind_get_method) (class_name , "set_seed\0" . as_ptr () as * const c_char) ; table . set_state = (gd_api . godot_method_bind_get_method) (class_name , "set_state\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:862:74530 [INFO] [stdout] | [INFO] [stdout] 862 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 862 | # [doc = "`core singleton class Physics2DServer` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_physics2dserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysics2DServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DServer { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaBodyStatus (pub i64) ; impl AreaBodyStatus { pub const ADDED : AreaBodyStatus = AreaBodyStatus (0i64) ; pub const REMOVED : AreaBodyStatus = AreaBodyStatus (1i64) ; } impl From < i64 > for AreaBodyStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaBodyStatus > for i64 { # [inline] fn from (v : AreaBodyStatus) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaParameter (pub i64) ; impl AreaParameter { pub const GRAVITY : AreaParameter = AreaParameter (0i64) ; pub const GRAVITY_VECTOR : AreaParameter = AreaParameter (1i64) ; pub const GRAVITY_IS_POINT : AreaParameter = AreaParameter (2i64) ; pub const GRAVITY_DISTANCE_SCALE : AreaParameter = AreaParameter (3i64) ; pub const GRAVITY_POINT_ATTENUATION : AreaParameter = AreaParameter (4i64) ; pub const LINEAR_DAMP : AreaParameter = AreaParameter (5i64) ; pub const ANGULAR_DAMP : AreaParameter = AreaParameter (6i64) ; pub const PRIORITY : AreaParameter = AreaParameter (7i64) ; } impl From < i64 > for AreaParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaParameter > for i64 { # [inline] fn from (v : AreaParameter) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaSpaceOverrideMode (pub i64) ; impl AreaSpaceOverrideMode { pub const DISABLED : AreaSpaceOverrideMode = AreaSpaceOverrideMode (0i64) ; pub const COMBINE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (1i64) ; pub const COMBINE_REPLACE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (2i64) ; pub const REPLACE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (3i64) ; pub const REPLACE_COMBINE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (4i64) ; } impl From < i64 > for AreaSpaceOverrideMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaSpaceOverrideMode > for i64 { # [inline] fn from (v : AreaSpaceOverrideMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyMode (pub i64) ; impl BodyMode { pub const STATIC : BodyMode = BodyMode (0i64) ; pub const KINEMATIC : BodyMode = BodyMode (1i64) ; pub const RIGID : BodyMode = BodyMode (2i64) ; pub const CHARACTER : BodyMode = BodyMode (3i64) ; } impl From < i64 > for BodyMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyMode > for i64 { # [inline] fn from (v : BodyMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyParameter (pub i64) ; impl BodyParameter { pub const BOUNCE : BodyParameter = BodyParameter (0i64) ; pub const FRICTION : BodyParameter = BodyParameter (1i64) ; pub const MASS : BodyParameter = BodyParameter (2i64) ; pub const INERTIA : BodyParameter = BodyParameter (3i64) ; pub const GRAVITY_SCALE : BodyParameter = BodyParameter (4i64) ; pub const LINEAR_DAMP : BodyParameter = BodyParameter (5i64) ; pub const ANGULAR_DAMP : BodyParameter = BodyParameter (6i64) ; pub const MAX : BodyParameter = BodyParameter (7i64) ; } impl From < i64 > for BodyParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyParameter > for i64 { # [inline] fn from (v : BodyParameter) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyState (pub i64) ; impl BodyState { pub const TRANSFORM : BodyState = BodyState (0i64) ; pub const LINEAR_VELOCITY : BodyState = BodyState (1i64) ; pub const ANGULAR_VELOCITY : BodyState = BodyState (2i64) ; pub const SLEEPING : BodyState = BodyState (3i64) ; pub const CAN_SLEEP : BodyState = BodyState (4i64) ; } impl From < i64 > for BodyState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyState > for i64 { # [inline] fn from (v : BodyState) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CcdMode (pub i64) ; impl CcdMode { pub const DISABLED : CcdMode = CcdMode (0i64) ; pub const CAST_RAY : CcdMode = CcdMode (1i64) ; pub const CAST_SHAPE : CcdMode = CcdMode (2i64) ; } impl From < i64 > for CcdMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CcdMode > for i64 { # [inline] fn from (v : CcdMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DampedStringParam (pub i64) ; impl DampedStringParam { pub const REST_LENGTH : DampedStringParam = DampedStringParam (0i64) ; pub const STIFFNESS : DampedStringParam = DampedStringParam (1i64) ; pub const DAMPING : DampedStringParam = DampedStringParam (2i64) ; } impl From < i64 > for DampedStringParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DampedStringParam > for i64 { # [inline] fn from (v : DampedStringParam) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct JointParam (pub i64) ; impl JointParam { pub const BIAS : JointParam = JointParam (0i64) ; pub const MAX_BIAS : JointParam = JointParam (1i64) ; pub const MAX_FORCE : JointParam = JointParam (2i64) ; } impl From < i64 > for JointParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < JointParam > for i64 { # [inline] fn from (v : JointParam) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct JointType (pub i64) ; impl JointType { pub const PIN : JointType = JointType (0i64) ; pub const GROOVE : JointType = JointType (1i64) ; pub const DAMPED_SPRING : JointType = JointType (2i64) ; } impl From < i64 > for JointType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < JointType > for i64 { # [inline] fn from (v : JointType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ProcessInfo (pub i64) ; impl ProcessInfo { pub const ACTIVE_OBJECTS : ProcessInfo = ProcessInfo (0i64) ; pub const COLLISION_PAIRS : ProcessInfo = ProcessInfo (1i64) ; pub const ISLAND_COUNT : ProcessInfo = ProcessInfo (2i64) ; } impl From < i64 > for ProcessInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ProcessInfo > for i64 { # [inline] fn from (v : ProcessInfo) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShapeType (pub i64) ; impl ShapeType { pub const LINE : ShapeType = ShapeType (0i64) ; pub const RAY : ShapeType = ShapeType (1i64) ; pub const SEGMENT : ShapeType = ShapeType (2i64) ; pub const CIRCLE : ShapeType = ShapeType (3i64) ; pub const RECTANGLE : ShapeType = ShapeType (4i64) ; pub const CAPSULE : ShapeType = ShapeType (5i64) ; pub const CONVEX_POLYGON : ShapeType = ShapeType (6i64) ; pub const CONCAVE_POLYGON : ShapeType = ShapeType (7i64) ; pub const CUSTOM : ShapeType = ShapeType (8i64) ; } impl From < i64 > for ShapeType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShapeType > for i64 { # [inline] fn from (v : ShapeType) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpaceParameter (pub i64) ; impl SpaceParameter { pub const CONTACT_RECYCLE_RADIUS : SpaceParameter = SpaceParameter (0i64) ; pub const CONTACT_MAX_SEPARATION : SpaceParameter = SpaceParameter (1i64) ; pub const BODY_MAX_ALLOWED_PENETRATION : SpaceParameter = SpaceParameter (2i64) ; pub const BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : SpaceParameter = SpaceParameter (3i64) ; pub const BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : SpaceParameter = SpaceParameter (4i64) ; pub const BODY_TIME_TO_SLEEP : SpaceParameter = SpaceParameter (5i64) ; pub const CONSTRAINT_DEFAULT_BIAS : SpaceParameter = SpaceParameter (6i64) ; pub const TEST_MOTION_MIN_CONTACT_DEPTH : SpaceParameter = SpaceParameter (7i64) ; } impl From < i64 > for SpaceParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpaceParameter > for i64 { # [inline] fn from (v : SpaceParameter) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Physics2DServer { pub const AREA_BODY_ADDED : i64 = 0i64 ; pub const AREA_BODY_REMOVED : i64 = 1i64 ; pub const AREA_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const AREA_PARAM_GRAVITY : i64 = 0i64 ; pub const AREA_PARAM_GRAVITY_DISTANCE_SCALE : i64 = 3i64 ; pub const AREA_PARAM_GRAVITY_IS_POINT : i64 = 2i64 ; pub const AREA_PARAM_GRAVITY_POINT_ATTENUATION : i64 = 4i64 ; pub const AREA_PARAM_GRAVITY_VECTOR : i64 = 1i64 ; pub const AREA_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const AREA_PARAM_PRIORITY : i64 = 7i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const AREA_SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; pub const BODY_MODE_CHARACTER : i64 = 3i64 ; pub const BODY_MODE_KINEMATIC : i64 = 1i64 ; pub const BODY_MODE_RIGID : i64 = 2i64 ; pub const BODY_MODE_STATIC : i64 = 0i64 ; pub const BODY_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const BODY_PARAM_BOUNCE : i64 = 0i64 ; pub const BODY_PARAM_FRICTION : i64 = 1i64 ; pub const BODY_PARAM_GRAVITY_SCALE : i64 = 4i64 ; pub const BODY_PARAM_INERTIA : i64 = 3i64 ; pub const BODY_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const BODY_PARAM_MASS : i64 = 2i64 ; pub const BODY_PARAM_MAX : i64 = 7i64 ; pub const BODY_STATE_ANGULAR_VELOCITY : i64 = 2i64 ; pub const BODY_STATE_CAN_SLEEP : i64 = 4i64 ; pub const BODY_STATE_LINEAR_VELOCITY : i64 = 1i64 ; pub const BODY_STATE_SLEEPING : i64 = 3i64 ; pub const BODY_STATE_TRANSFORM : i64 = 0i64 ; pub const CCD_MODE_CAST_RAY : i64 = 1i64 ; pub const CCD_MODE_CAST_SHAPE : i64 = 2i64 ; pub const CCD_MODE_DISABLED : i64 = 0i64 ; pub const DAMPED_STRING_DAMPING : i64 = 2i64 ; pub const DAMPED_STRING_REST_LENGTH : i64 = 0i64 ; pub const DAMPED_STRING_STIFFNESS : i64 = 1i64 ; pub const INFO_ACTIVE_OBJECTS : i64 = 0i64 ; pub const INFO_COLLISION_PAIRS : i64 = 1i64 ; pub const INFO_ISLAND_COUNT : i64 = 2i64 ; pub const JOINT_DAMPED_SPRING : i64 = 2i64 ; pub const JOINT_GROOVE : i64 = 1i64 ; pub const JOINT_PARAM_BIAS : i64 = 0i64 ; pub const JOINT_PARAM_MAX_BIAS : i64 = 1i64 ; pub const JOINT_PARAM_MAX_FORCE : i64 = 2i64 ; pub const JOINT_PIN : i64 = 0i64 ; pub const SHAPE_CAPSULE : i64 = 5i64 ; pub const SHAPE_CIRCLE : i64 = 3i64 ; pub const SHAPE_CONCAVE_POLYGON : i64 = 7i64 ; pub const SHAPE_CONVEX_POLYGON : i64 = 6i64 ; pub const SHAPE_CUSTOM : i64 = 8i64 ; pub const SHAPE_LINE : i64 = 0i64 ; pub const SHAPE_RAY : i64 = 1i64 ; pub const SHAPE_RECTANGLE : i64 = 4i64 ; pub const SHAPE_SEGMENT : i64 = 2i64 ; pub const SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : i64 = 4i64 ; pub const SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : i64 = 3i64 ; pub const SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION : i64 = 2i64 ; pub const SPACE_PARAM_BODY_TIME_TO_SLEEP : i64 = 5i64 ; pub const SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS : i64 = 6i64 ; pub const SPACE_PARAM_CONTACT_MAX_SEPARATION : i64 = 1i64 ; pub const SPACE_PARAM_CONTACT_RECYCLE_RADIUS : i64 = 0i64 ; pub const SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH : i64 = 7i64 ; } impl Physics2DServer { # [doc = "Returns a reference to the singleton instance.\n\n# Safety\n\nThis singleton server is only safe to access from outside the main thread if thread-safe\noperations are enabled in the project settings. See the official\n[thread-safety guidelines][thread-safety] for more information.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [inline] pub unsafe fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Physics2DServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.\n# Default Arguments\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `disabled` - `false`"] # [doc = ""] # [inline] pub fn area_add_shape (& self , area : Rid , shape : Rid , transform : Transform2D , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_add_shape ; let ret = crate :: icalls :: icallptr_void_rid_rid_trans2D_bool (method_bind , self . this . sys () . as_ptr () , area , shape , transform , disabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn area_attach_canvas_instance_id (& self , area : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_attach_canvas_instance_id ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id) ; } } # [doc = "Assigns the area to a descendant of [Object], so it can exist in the node tree."] # [doc = ""] # [inline] pub fn area_attach_object_instance_id (& self , area : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_attach_object_instance_id ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id) ; } } # [doc = "Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later."] # [doc = ""] # [inline] pub fn area_clear_shapes (& self , area : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_clear_shapes ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , area) ; } } # [doc = "Creates an [Area2D]."] # [doc = ""] # [inline] pub fn area_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn area_get_canvas_instance_id (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_canvas_instance_id ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = ""] # [inline] pub fn area_get_object_instance_id (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_object_instance_id ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Returns an area parameter value. See [enum AreaParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn area_get_param (& self , area : Rid , param : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_param ; let ret = crate :: icalls :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , param) ; Variant :: from_sys (ret) } } # [doc = "Returns the [RID] of the nth shape of an area."] # [doc = ""] # [inline] pub fn area_get_shape (& self , area : Rid , shape_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_shape ; let ret = crate :: icalls :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of shapes assigned to an area."] # [doc = ""] # [inline] pub fn area_get_shape_count (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_shape_count ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; ret as _ } } # [doc = "Returns the transform matrix of a shape within an area."] # [doc = ""] # [inline] pub fn area_get_shape_transform (& self , area : Rid , shape_idx : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_shape_transform ; let ret = crate :: icalls :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; mem :: transmute (ret) } } # [doc = "Returns the space assigned to the area."] # [doc = ""] # [inline] pub fn area_get_space (& self , area : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_space ; let ret = crate :: icalls :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , area) ; Rid :: from_sys (ret) } } # [doc = "Returns the space override mode for the area."] # [doc = ""] # [inline] pub fn area_get_space_override_mode (& self , area : Rid) -> crate :: generated :: physics_2d_server :: AreaSpaceOverrideMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_space_override_mode ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , area) ; crate :: generated :: physics_2d_server :: AreaSpaceOverrideMode (ret) } } # [doc = "Returns the transform matrix for an area."] # [doc = ""] # [inline] pub fn area_get_transform (& self , area : Rid) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_transform ; let ret = crate :: icalls :: icallptr_trans2D_rid (method_bind , self . this . sys () . as_ptr () , area) ; mem :: transmute (ret) } } # [doc = "Removes a shape from an area. It does not delete the shape, so it can be reassigned later."] # [doc = ""] # [inline] pub fn area_remove_shape (& self , area : Rid , shape_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_remove_shape ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn area_set_area_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_area_monitor_callback ; let ret = crate :: icalls :: icallptr_void_rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = "Assigns the area to one or many physics layers."] # [doc = ""] # [inline] pub fn area_set_collision_layer (& self , area : Rid , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_collision_layer ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , layer) ; } } # [doc = "Sets which physics layers the area will monitor."] # [doc = ""] # [inline] pub fn area_set_collision_mask (& self , area : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_collision_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mask) ; } } # [doc = "Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:\n1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area.\n2: [RID] of the object that entered/exited the area.\n3: Instance ID of the object that entered/exited the area.\n4: The shape index of the object that entered/exited the area.\n5: The shape index of the area where the object entered/exited."] # [doc = ""] # [inline] pub fn area_set_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_monitor_callback ; let ret = crate :: icalls :: icallptr_void_rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn area_set_monitorable (& self , area : Rid , monitorable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_monitorable ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , area , monitorable) ; } } # [doc = "Sets the value for an area parameter. See [enum AreaParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn area_set_param (& self , area : Rid , param : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , area , param , value . owned_to_variant ()) ; } } # [doc = "Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]."] # [doc = ""] # [inline] pub fn area_set_shape (& self , area : Rid , shape_idx : i64 , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_shape ; let ret = crate :: icalls :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , area , shape_idx , shape) ; } } # [doc = "Disables a given shape in an area."] # [doc = ""] # [inline] pub fn area_set_shape_disabled (& self , area : Rid , shape_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_shape_disabled ; let ret = crate :: icalls :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , area , shape_idx , disabled) ; } } # [doc = "Sets the transform matrix for an area shape."] # [doc = ""] # [inline] pub fn area_set_shape_transform (& self , area : Rid , shape_idx : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_shape_transform ; let ret = crate :: icalls :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , area , shape_idx , transform) ; } } # [doc = "Assigns a space to the area."] # [doc = ""] # [inline] pub fn area_set_space (& self , area : Rid , space : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_space ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , area , space) ; } } # [doc = "Sets the space override mode for the area. See [enum AreaSpaceOverrideMode] for a list of available modes."] # [doc = ""] # [inline] pub fn area_set_space_override_mode (& self , area : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_space_override_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mode) ; } } # [doc = "Sets the transform matrix for an area."] # [doc = ""] # [inline] pub fn area_set_transform (& self , area : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_transform ; let ret = crate :: icalls :: icallptr_void_rid_trans2D (method_bind , self . this . sys () . as_ptr () , area , transform) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_add_central_force (& self , body : Rid , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_central_force ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , force) ; } } # [doc = "Adds a body to the list of bodies exempt from collisions."] # [doc = ""] # [inline] pub fn body_add_collision_exception (& self , body : Rid , excepted_body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_collision_exception ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , body , excepted_body) ; } } # [doc = "Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied."] # [doc = ""] # [inline] pub fn body_add_force (& self , body : Rid , offset : Vector2 , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_force ; let ret = crate :: icalls :: icallptr_void_rid_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , body , offset , force) ; } } # [doc = "Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.\n# Default Arguments\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `disabled` - `false`"] # [doc = ""] # [inline] pub fn body_add_shape (& self , body : Rid , shape : Rid , transform : Transform2D , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_shape ; let ret = crate :: icalls :: icallptr_void_rid_rid_trans2D_bool (method_bind , self . this . sys () . as_ptr () , body , shape , transform , disabled) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_add_torque (& self , body : Rid , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_torque ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , body , torque) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_apply_central_impulse (& self , body : Rid , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_apply_central_impulse ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , impulse) ; } } # [doc = "Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates."] # [doc = ""] # [inline] pub fn body_apply_impulse (& self , body : Rid , position : Vector2 , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_apply_impulse ; let ret = crate :: icalls :: icallptr_void_rid_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , body , position , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_apply_torque_impulse (& self , body : Rid , impulse : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_apply_torque_impulse ; let ret = crate :: icalls :: icallptr_void_rid_f64 (method_bind , self . this . sys () . as_ptr () , body , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_attach_canvas_instance_id (& self , body : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_attach_canvas_instance_id ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id) ; } } # [doc = "Assigns the area to a descendant of [Object], so it can exist in the node tree."] # [doc = ""] # [inline] pub fn body_attach_object_instance_id (& self , body : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_attach_object_instance_id ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id) ; } } # [doc = "Removes all shapes from a body."] # [doc = ""] # [inline] pub fn body_clear_shapes (& self , body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_clear_shapes ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , body) ; } } # [doc = "Creates a physics body."] # [doc = ""] # [inline] pub fn body_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn body_get_canvas_instance_id (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_canvas_instance_id ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the physics layer or layers a body belongs to."] # [doc = ""] # [inline] pub fn body_get_collision_layer (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_collision_layer ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the physics layer or layers a body can collide with."] # [doc = ""] # [inline] pub fn body_get_collision_mask (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_collision_mask ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the continuous collision detection mode."] # [doc = ""] # [inline] pub fn body_get_continuous_collision_detection_mode (& self , body : Rid) -> crate :: generated :: physics_2d_server :: CcdMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; crate :: generated :: physics_2d_server :: CcdMode (ret) } } # [doc = "Returns the [Physics2DDirectBodyState] of the body."] # [doc = ""] # [inline] pub fn body_get_direct_state (& self , body : Rid) -> Option < Ref < crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_direct_state ; let ret = crate :: icalls :: icallptr_obj_rid (method_bind , self . this . sys () . as_ptr () , body) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_2d_direct_body_state :: Physics2DDirectBodyState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]."] # [doc = ""] # [inline] pub fn body_get_max_contacts_reported (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_max_contacts_reported ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the body mode."] # [doc = ""] # [inline] pub fn body_get_mode (& self , body : Rid) -> crate :: generated :: physics_2d_server :: BodyMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_mode ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; crate :: generated :: physics_2d_server :: BodyMode (ret) } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = ""] # [inline] pub fn body_get_object_instance_id (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_object_instance_id ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the value of a body parameter. See [enum BodyParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn body_get_param (& self , body : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_param ; let ret = crate :: icalls :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , param) ; ret as _ } } # [doc = "Returns the [RID] of the nth shape of a body."] # [doc = ""] # [inline] pub fn body_get_shape (& self , body : Rid , shape_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape ; let ret = crate :: icalls :: icallptr_rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; Rid :: from_sys (ret) } } # [doc = "Returns the number of shapes assigned to a body."] # [doc = ""] # [inline] pub fn body_get_shape_count (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape_count ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Returns the metadata of a shape of a body."] # [doc = ""] # [inline] pub fn body_get_shape_metadata (& self , body : Rid , shape_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape_metadata ; let ret = crate :: icalls :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; Variant :: from_sys (ret) } } # [doc = "Returns the transform matrix of a body shape."] # [doc = ""] # [inline] pub fn body_get_shape_transform (& self , body : Rid , shape_idx : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape_transform ; let ret = crate :: icalls :: icallptr_trans2D_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; mem :: transmute (ret) } } # [doc = "Returns the [RID] of the space assigned to a body."] # [doc = ""] # [inline] pub fn body_get_space (& self , body : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_space ; let ret = crate :: icalls :: icallptr_rid_rid (method_bind , self . this . sys () . as_ptr () , body) ; Rid :: from_sys (ret) } } # [doc = "Returns a body state."] # [doc = ""] # [inline] pub fn body_get_state (& self , body : Rid , state : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_state ; let ret = crate :: icalls :: icallptr_var_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , state) ; Variant :: from_sys (ret) } } # [doc = "Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback])."] # [doc = ""] # [inline] pub fn body_is_omitting_force_integration (& self , body : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_is_omitting_force_integration ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , body) ; ret as _ } } # [doc = "Removes a body from the list of bodies exempt from collisions."] # [doc = ""] # [inline] pub fn body_remove_collision_exception (& self , body : Rid , excepted_body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_remove_collision_exception ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , body , excepted_body) ; } } # [doc = "Removes a shape from a body. The shape is not deleted, so it can be reused afterwards."] # [doc = ""] # [inline] pub fn body_remove_shape (& self , body : Rid , shape_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_remove_shape ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx) ; } } # [doc = "Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior."] # [doc = ""] # [inline] pub fn body_set_axis_velocity (& self , body : Rid , axis_velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_axis_velocity ; let ret = crate :: icalls :: icallptr_void_rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , axis_velocity) ; } } # [doc = "Sets the physics layer or layers a body belongs to."] # [doc = ""] # [inline] pub fn body_set_collision_layer (& self , body : Rid , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_collision_layer ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , layer) ; } } # [doc = "Sets the physics layer or layers a body can collide with."] # [doc = ""] # [inline] pub fn body_set_collision_mask (& self , body : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_collision_mask ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mask) ; } } # [doc = "Sets the continuous collision detection mode using one of the [enum CCDMode] constants.\nContinuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided."] # [doc = ""] # [inline] pub fn body_set_continuous_collision_detection_mode (& self , body : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode) ; } } # [doc = "Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).\n# Default Arguments\n* `userdata` - `null`"] # [doc = ""] # [inline] pub fn body_set_force_integration_callback (& self , body : Rid , receiver : impl AsArg < crate :: generated :: object :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_force_integration_callback ; let ret = crate :: icalls :: icallptr_void_rid_obj_str_var (method_bind , self . this . sys () . as_ptr () , body , receiver . as_arg_ptr () , method . into () , userdata . owned_to_variant ()) ; } } # [doc = "Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0."] # [doc = ""] # [inline] pub fn body_set_max_contacts_reported (& self , body : Rid , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_max_contacts_reported ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , amount) ; } } # [doc = "Sets the body mode using one of the [enum BodyMode] constants."] # [doc = ""] # [inline] pub fn body_set_mode (& self , body : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_mode ; let ret = crate :: icalls :: icallptr_void_rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode) ; } } # [doc = "Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback])."] # [doc = ""] # [inline] pub fn body_set_omit_force_integration (& self , body : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_omit_force_integration ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable) ; } } # [doc = "Sets a body parameter. See [enum BodyParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn body_set_param (& self , body : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , body , param , value) ; } } # [doc = "Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]."] # [doc = ""] # [inline] pub fn body_set_shape (& self , body : Rid , shape_idx : i64 , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape ; let ret = crate :: icalls :: icallptr_void_rid_i64_rid (method_bind , self . this . sys () . as_ptr () , body , shape_idx , shape) ; } } # [doc = "Enables one way collision on body if `enable` is `true`."] # [doc = ""] # [inline] pub fn body_set_shape_as_one_way_collision (& self , body : Rid , shape_idx : i64 , enable : bool , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_as_one_way_collision ; let ret = crate :: icalls :: icallptr_void_rid_i64_bool_f64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx , enable , margin) ; } } # [doc = "Disables shape in body if `disable` is `true`."] # [doc = ""] # [inline] pub fn body_set_shape_disabled (& self , body : Rid , shape_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_disabled ; let ret = crate :: icalls :: icallptr_void_rid_i64_bool (method_bind , self . this . sys () . as_ptr () , body , shape_idx , disabled) ; } } # [doc = "Sets metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries."] # [doc = ""] # [inline] pub fn body_set_shape_metadata (& self , body : Rid , shape_idx : i64 , metadata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_metadata ; let ret = crate :: icalls :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , shape_idx , metadata . owned_to_variant ()) ; } } # [doc = "Sets the transform matrix for a body shape."] # [doc = ""] # [inline] pub fn body_set_shape_transform (& self , body : Rid , shape_idx : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_transform ; let ret = crate :: icalls :: icallptr_void_rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , body , shape_idx , transform) ; } } # [doc = "Assigns a space to the body (see [method space_create])."] # [doc = ""] # [inline] pub fn body_set_space (& self , body : Rid , space : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_space ; let ret = crate :: icalls :: icallptr_void_rid_rid (method_bind , self . this . sys () . as_ptr () , body , space) ; } } # [doc = "Sets a body state using one of the [enum BodyState] constants.\nNote that the method doesn't take effect immediately. The state will change on the next physics frame."] # [doc = ""] # [inline] pub fn body_set_state (& self , body : Rid , state : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_state ; let ret = crate :: icalls :: icallptr_void_rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , state , value . owned_to_variant ()) ; } } # [doc = "Returns `true` if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [Physics2DTestMotionResult] can be passed to return additional information in.\n# Default Arguments\n* `margin` - `0.08`\n* `result` - `null`"] # [doc = ""] # [inline] pub fn body_test_motion (& self , body : Rid , from : Transform2D , motion : Vector2 , infinite_inertia : bool , margin : f64 , result : impl AsArg < crate :: generated :: physics_2d_test_motion_result :: Physics2DTestMotionResult >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_test_motion ; let ret = crate :: icalls :: icallptr_bool_rid_trans2D_vec2_bool_f64_obj (method_bind , self . this . sys () . as_ptr () , body , from , motion , infinite_inertia , margin , result . as_arg_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn capsule_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . capsule_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn circle_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . circle_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn concave_polygon_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . concave_polygon_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn convex_polygon_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . convex_polygon_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself."] # [doc = ""] # [inline] pub fn damped_spring_joint_create (& self , anchor_a : Vector2 , anchor_b : Vector2 , body_a : Rid , body_b : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . damped_spring_joint_create ; let ret = crate :: icalls :: icallptr_rid_vec2_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , anchor_a , anchor_b , body_a , body_b) ; Rid :: from_sys (ret) } } # [doc = "Returns the value of a damped spring joint parameter."] # [doc = ""] # [inline] pub fn damped_string_joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . damped_string_joint_get_param ; let ret = crate :: icalls :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Sets a damped spring joint parameter. See [enum DampedStringParam] for a list of available parameters."] # [doc = ""] # [inline] pub fn damped_string_joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . damped_string_joint_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [doc = "Destroys any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console."] # [doc = ""] # [inline] pub fn free_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . free_rid ; let ret = crate :: icalls :: icallptr_void_rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states."] # [doc = ""] # [inline] pub fn get_process_info (& self , process_info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . get_process_info ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , process_info) ; ret as _ } } # [doc = "Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself."] # [doc = ""] # [inline] pub fn groove_joint_create (& self , groove1_a : Vector2 , groove2_a : Vector2 , anchor_b : Vector2 , body_a : Rid , body_b : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . groove_joint_create ; let ret = crate :: icalls :: icallptr_rid_vec2_vec2_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , groove1_a , groove2_a , anchor_b , body_a , body_b) ; Rid :: from_sys (ret) } } # [doc = "Returns the value of a joint parameter."] # [doc = ""] # [inline] pub fn joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . joint_get_param ; let ret = crate :: icalls :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param) ; ret as _ } } # [doc = "Returns a joint's type (see [enum JointType])."] # [doc = ""] # [inline] pub fn joint_get_type (& self , joint : Rid) -> crate :: generated :: physics_2d_server :: JointType { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . joint_get_type ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , joint) ; crate :: generated :: physics_2d_server :: JointType (ret) } } # [doc = "Sets a joint parameter. See [enum JointParam] for a list of available parameters."] # [doc = ""] # [inline] pub fn joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . joint_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param , value) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn line_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . line_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself."] # [doc = ""] # [inline] pub fn pin_joint_create (& self , anchor : Vector2 , body_a : Rid , body_b : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . pin_joint_create ; let ret = crate :: icalls :: icallptr_rid_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , anchor , body_a , body_b) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn ray_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . ray_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn rectangle_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . rectangle_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn segment_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . segment_shape_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Activates or deactivates the 2D physics engine."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , active) ; } } # [doc = "Returns the shape data."] # [doc = ""] # [inline] pub fn shape_get_data (& self , shape : Rid) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . shape_get_data ; let ret = crate :: icalls :: icallptr_var_rid (method_bind , self . this . sys () . as_ptr () , shape) ; Variant :: from_sys (ret) } } # [doc = "Returns a shape's type (see [enum ShapeType])."] # [doc = ""] # [inline] pub fn shape_get_type (& self , shape : Rid) -> crate :: generated :: physics_2d_server :: ShapeType { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . shape_get_type ; let ret = crate :: icalls :: icallptr_i64_rid (method_bind , self . this . sys () . as_ptr () , shape) ; crate :: generated :: physics_2d_server :: ShapeType (ret) } } # [doc = "Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]."] # [doc = ""] # [inline] pub fn shape_set_data (& self , shape : Rid , data : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . shape_set_data ; let ret = crate :: icalls :: icallptr_void_rid_var (method_bind , self . this . sys () . as_ptr () , shape , data . owned_to_variant ()) ; } } # [doc = "Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]."] # [doc = ""] # [inline] pub fn space_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_create ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries."] # [doc = ""] # [inline] pub fn space_get_direct_state (& self , space : Rid) -> Option < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_get_direct_state ; let ret = crate :: icalls :: icallptr_obj_rid (method_bind , self . this . sys () . as_ptr () , space) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: physics_2d_direct_space_state :: Physics2DDirectSpaceState , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the value of a space parameter."] # [doc = ""] # [inline] pub fn space_get_param (& self , space : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_get_param ; let ret = crate :: icalls :: icallptr_f64_rid_i64 (method_bind , self . this . sys () . as_ptr () , space , param) ; ret as _ } } # [doc = "Returns whether the space is active."] # [doc = ""] # [inline] pub fn space_is_active (& self , space : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_is_active ; let ret = crate :: icalls :: icallptr_bool_rid (method_bind , self . this . sys () . as_ptr () , space) ; ret as _ } } # [doc = "Marks a space as active. It will not have an effect, unless it is assigned to an area or body."] # [doc = ""] # [inline] pub fn space_set_active (& self , space : Rid , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_set_active ; let ret = crate :: icalls :: icallptr_void_rid_bool (method_bind , self . this . sys () . as_ptr () , space , active) ; } } # [doc = "Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters."] # [doc = ""] # [inline] pub fn space_set_param (& self , space : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_set_param ; let ret = crate :: icalls :: icallptr_void_rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , space , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DServer { } unsafe impl GodotObject for Physics2DServer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DServer" } } impl std :: ops :: Deref for Physics2DServer { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for Physics2DServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub area_add_shape : * mut sys :: godot_method_bind , pub area_attach_canvas_instance_id : * mut sys :: godot_method_bind , pub area_attach_object_instance_id : * mut sys :: godot_method_bind , pub area_clear_shapes : * mut sys :: godot_method_bind , pub area_create : * mut sys :: godot_method_bind , pub area_get_canvas_instance_id : * mut sys :: godot_method_bind , pub area_get_object_instance_id : * mut sys :: godot_method_bind , pub area_get_param : * mut sys :: godot_method_bind , pub area_get_shape : * mut sys :: godot_method_bind , pub area_get_shape_count : * mut sys :: godot_method_bind , pub area_get_shape_transform : * mut sys :: godot_method_bind , pub area_get_space : * mut sys :: godot_method_bind , pub area_get_space_override_mode : * mut sys :: godot_method_bind , pub area_get_transform : * mut sys :: godot_method_bind , pub area_remove_shape : * mut sys :: godot_method_bind , pub area_set_area_monitor_callback : * mut sys :: godot_method_bind , pub area_set_collision_layer : * mut sys :: godot_method_bind , pub area_set_collision_mask : * mut sys :: godot_method_bind , pub area_set_monitor_callback : * mut sys :: godot_method_bind , pub area_set_monitorable : * mut sys :: godot_method_bind , pub area_set_param : * mut sys :: godot_method_bind , pub area_set_shape : * mut sys :: godot_method_bind , pub area_set_shape_disabled : * mut sys :: godot_method_bind , pub area_set_shape_transform : * mut sys :: godot_method_bind , pub area_set_space : * mut sys :: godot_method_bind , pub area_set_space_override_mode : * mut sys :: godot_method_bind , pub area_set_transform : * mut sys :: godot_method_bind , pub body_add_central_force : * mut sys :: godot_method_bind , pub body_add_collision_exception : * mut sys :: godot_method_bind , pub body_add_force : * mut sys :: godot_method_bind , pub body_add_shape : * mut sys :: godot_method_bind , pub body_add_torque : * mut sys :: godot_method_bind , pub body_apply_central_impulse : * mut sys :: godot_method_bind , pub body_apply_impulse : * mut sys :: godot_method_bind , pub body_apply_torque_impulse : * mut sys :: godot_method_bind , pub body_attach_canvas_instance_id : * mut sys :: godot_method_bind , pub body_attach_object_instance_id : * mut sys :: godot_method_bind , pub body_clear_shapes : * mut sys :: godot_method_bind , pub body_create : * mut sys :: godot_method_bind , pub body_get_canvas_instance_id : * mut sys :: godot_method_bind , pub body_get_collision_layer : * mut sys :: godot_method_bind , pub body_get_collision_mask : * mut sys :: godot_method_bind , pub body_get_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub body_get_direct_state : * mut sys :: godot_method_bind , pub body_get_max_contacts_reported : * mut sys :: godot_method_bind , pub body_get_mode : * mut sys :: godot_method_bind , pub body_get_object_instance_id : * mut sys :: godot_method_bind , pub body_get_param : * mut sys :: godot_method_bind , pub body_get_shape : * mut sys :: godot_method_bind , pub body_get_shape_count : * mut sys :: godot_method_bind , pub body_get_shape_metadata : * mut sys :: godot_method_bind , pub body_get_shape_transform : * mut sys :: godot_method_bind , pub body_get_space : * mut sys :: godot_method_bind , pub body_get_state : * mut sys :: godot_method_bind , pub body_is_omitting_force_integration : * mut sys :: godot_method_bind , pub body_remove_collision_exception : * mut sys :: godot_method_bind , pub body_remove_shape : * mut sys :: godot_method_bind , pub body_set_axis_velocity : * mut sys :: godot_method_bind , pub body_set_collision_layer : * mut sys :: godot_method_bind , pub body_set_collision_mask : * mut sys :: godot_method_bind , pub body_set_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub body_set_force_integration_callback : * mut sys :: godot_method_bind , pub body_set_max_contacts_reported : * mut sys :: godot_method_bind , pub body_set_mode : * mut sys :: godot_method_bind , pub body_set_omit_force_integration : * mut sys :: godot_method_bind , pub body_set_param : * mut sys :: godot_method_bind , pub body_set_shape : * mut sys :: godot_method_bind , pub body_set_shape_as_one_way_collision : * mut sys :: godot_method_bind , pub body_set_shape_disabled : * mut sys :: godot_method_bind , pub body_set_shape_metadata : * mut sys :: godot_method_bind , pub body_set_shape_transform : * mut sys :: godot_method_bind , pub body_set_space : * mut sys :: godot_method_bind , pub body_set_state : * mut sys :: godot_method_bind , pub body_test_motion : * mut sys :: godot_method_bind , pub capsule_shape_create : * mut sys :: godot_method_bind , pub circle_shape_create : * mut sys :: godot_method_bind , pub concave_polygon_shape_create : * mut sys :: godot_method_bind , pub convex_polygon_shape_create : * mut sys :: godot_method_bind , pub damped_spring_joint_create : * mut sys :: godot_method_bind , pub damped_string_joint_get_param : * mut sys :: godot_method_bind , pub damped_string_joint_set_param : * mut sys :: godot_method_bind , pub free_rid : * mut sys :: godot_method_bind , pub get_process_info : * mut sys :: godot_method_bind , pub groove_joint_create : * mut sys :: godot_method_bind , pub joint_get_param : * mut sys :: godot_method_bind , pub joint_get_type : * mut sys :: godot_method_bind , pub joint_set_param : * mut sys :: godot_method_bind , pub line_shape_create : * mut sys :: godot_method_bind , pub pin_joint_create : * mut sys :: godot_method_bind , pub ray_shape_create : * mut sys :: godot_method_bind , pub rectangle_shape_create : * mut sys :: godot_method_bind , pub segment_shape_create : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub shape_get_data : * mut sys :: godot_method_bind , pub shape_get_type : * mut sys :: godot_method_bind , pub shape_set_data : * mut sys :: godot_method_bind , pub space_create : * mut sys :: godot_method_bind , pub space_get_direct_state : * mut sys :: godot_method_bind , pub space_get_param : * mut sys :: godot_method_bind , pub space_is_active : * mut sys :: godot_method_bind , pub space_set_active : * mut sys :: godot_method_bind , pub space_set_param : * mut sys :: godot_method_bind } impl Physics2DServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DServerMethodTable = Physics2DServerMethodTable { class_constructor : None , area_add_shape : 0 as * mut sys :: godot_method_bind , area_attach_canvas_instance_id : 0 as * mut sys :: godot_method_bind , area_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , area_clear_shapes : 0 as * mut sys :: godot_method_bind , area_create : 0 as * mut sys :: godot_method_bind , area_get_canvas_instance_id : 0 as * mut sys :: godot_method_bind , area_get_object_instance_id : 0 as * mut sys :: godot_method_bind , area_get_param : 0 as * mut sys :: godot_method_bind , area_get_shape : 0 as * mut sys :: godot_method_bind , area_get_shape_count : 0 as * mut sys :: godot_method_bind , area_get_shape_transform : 0 as * mut sys :: godot_method_bind , area_get_space : 0 as * mut sys :: godot_method_bind , area_get_space_override_mode : 0 as * mut sys :: godot_method_bind , area_get_transform : 0 as * mut sys :: godot_method_bind , area_remove_shape : 0 as * mut sys :: godot_method_bind , area_set_area_monitor_callback : 0 as * mut sys :: godot_method_bind , area_set_collision_layer : 0 as * mut sys :: godot_method_bind , area_set_collision_mask : 0 as * mut sys :: godot_method_bind , area_set_monitor_callback : 0 as * mut sys :: godot_method_bind , area_set_monitorable : 0 as * mut sys :: godot_method_bind , area_set_param : 0 as * mut sys :: godot_method_bind , area_set_shape : 0 as * mut sys :: godot_method_bind , area_set_shape_disabled : 0 as * mut sys :: godot_method_bind , area_set_shape_transform : 0 as * mut sys :: godot_method_bind , area_set_space : 0 as * mut sys :: godot_method_bind , area_set_space_override_mode : 0 as * mut sys :: godot_method_bind , area_set_transform : 0 as * mut sys :: godot_method_bind , body_add_central_force : 0 as * mut sys :: godot_method_bind , body_add_collision_exception : 0 as * mut sys :: godot_method_bind , body_add_force : 0 as * mut sys :: godot_method_bind , body_add_shape : 0 as * mut sys :: godot_method_bind , body_add_torque : 0 as * mut sys :: godot_method_bind , body_apply_central_impulse : 0 as * mut sys :: godot_method_bind , body_apply_impulse : 0 as * mut sys :: godot_method_bind , body_apply_torque_impulse : 0 as * mut sys :: godot_method_bind , body_attach_canvas_instance_id : 0 as * mut sys :: godot_method_bind , body_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , body_clear_shapes : 0 as * mut sys :: godot_method_bind , body_create : 0 as * mut sys :: godot_method_bind , body_get_canvas_instance_id : 0 as * mut sys :: godot_method_bind , body_get_collision_layer : 0 as * mut sys :: godot_method_bind , body_get_collision_mask : 0 as * mut sys :: godot_method_bind , body_get_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , body_get_direct_state : 0 as * mut sys :: godot_method_bind , body_get_max_contacts_reported : 0 as * mut sys :: godot_method_bind , body_get_mode : 0 as * mut sys :: godot_method_bind , body_get_object_instance_id : 0 as * mut sys :: godot_method_bind , body_get_param : 0 as * mut sys :: godot_method_bind , body_get_shape : 0 as * mut sys :: godot_method_bind , body_get_shape_count : 0 as * mut sys :: godot_method_bind , body_get_shape_metadata : 0 as * mut sys :: godot_method_bind , body_get_shape_transform : 0 as * mut sys :: godot_method_bind , body_get_space : 0 as * mut sys :: godot_method_bind , body_get_state : 0 as * mut sys :: godot_method_bind , body_is_omitting_force_integration : 0 as * mut sys :: godot_method_bind , body_remove_collision_exception : 0 as * mut sys :: godot_method_bind , body_remove_shape : 0 as * mut sys :: godot_method_bind , body_set_axis_velocity : 0 as * mut sys :: godot_method_bind , body_set_collision_layer : 0 as * mut sys :: godot_method_bind , body_set_collision_mask : 0 as * mut sys :: godot_method_bind , body_set_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , body_set_force_integration_callback : 0 as * mut sys :: godot_method_bind , body_set_max_contacts_reported : 0 as * mut sys :: godot_method_bind , body_set_mode : 0 as * mut sys :: godot_method_bind , body_set_omit_force_integration : 0 as * mut sys :: godot_method_bind , body_set_param : 0 as * mut sys :: godot_method_bind , body_set_shape : 0 as * mut sys :: godot_method_bind , body_set_shape_as_one_way_collision : 0 as * mut sys :: godot_method_bind , body_set_shape_disabled : 0 as * mut sys :: godot_method_bind , body_set_shape_metadata : 0 as * mut sys :: godot_method_bind , body_set_shape_transform : 0 as * mut sys :: godot_method_bind , body_set_space : 0 as * mut sys :: godot_method_bind , body_set_state : 0 as * mut sys :: godot_method_bind , body_test_motion : 0 as * mut sys :: godot_method_bind , capsule_shape_create : 0 as * mut sys :: godot_method_bind , circle_shape_create : 0 as * mut sys :: godot_method_bind , concave_polygon_shape_create : 0 as * mut sys :: godot_method_bind , convex_polygon_shape_create : 0 as * mut sys :: godot_method_bind , damped_spring_joint_create : 0 as * mut sys :: godot_method_bind , damped_string_joint_get_param : 0 as * mut sys :: godot_method_bind , damped_string_joint_set_param : 0 as * mut sys :: godot_method_bind , free_rid : 0 as * mut sys :: godot_method_bind , get_process_info : 0 as * mut sys :: godot_method_bind , groove_joint_create : 0 as * mut sys :: godot_method_bind , joint_get_param : 0 as * mut sys :: godot_method_bind , joint_get_type : 0 as * mut sys :: godot_method_bind , joint_set_param : 0 as * mut sys :: godot_method_bind , line_shape_create : 0 as * mut sys :: godot_method_bind , pin_joint_create : 0 as * mut sys :: godot_method_bind , ray_shape_create : 0 as * mut sys :: godot_method_bind , rectangle_shape_create : 0 as * mut sys :: godot_method_bind , segment_shape_create : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , shape_get_data : 0 as * mut sys :: godot_method_bind , shape_get_type : 0 as * mut sys :: godot_method_bind , shape_set_data : 0 as * mut sys :: godot_method_bind , space_create : 0 as * mut sys :: godot_method_bind , space_get_direct_state : 0 as * mut sys :: godot_method_bind , space_get_param : 0 as * mut sys :: godot_method_bind , space_is_active : 0 as * mut sys :: godot_method_bind , space_set_active : 0 as * mut sys :: godot_method_bind , space_set_param : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Physics2DServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . area_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_add_shape\0" . as_ptr () as * const c_char) ; table . area_attach_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_attach_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . area_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "area_clear_shapes\0" . as_ptr () as * const c_char) ; table . area_create = (gd_api . godot_method_bind_get_method) (class_name , "area_create\0" . as_ptr () as * const c_char) ; table . area_get_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_get_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . area_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_get_param = (gd_api . godot_method_bind_get_method) (class_name , "area_get_param\0" . as_ptr () as * const c_char) ; table . area_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape\0" . as_ptr () as * const c_char) ; table . area_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_count\0" . as_ptr () as * const c_char) ; table . area_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_transform\0" . as_ptr () as * const c_char) ; table . area_get_space = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space\0" . as_ptr () as * const c_char) ; table . area_get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_transform\0" . as_ptr () as * const c_char) ; table . area_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_remove_shape\0" . as_ptr () as * const c_char) ; table . area_set_area_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_area_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_layer\0" . as_ptr () as * const c_char) ; table . area_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_mask\0" . as_ptr () as * const c_char) ; table . area_set_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitorable\0" . as_ptr () as * const c_char) ; table . area_set_param = (gd_api . godot_method_bind_get_method) (class_name , "area_set_param\0" . as_ptr () as * const c_char) ; table . area_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape\0" . as_ptr () as * const c_char) ; table . area_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . area_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_transform\0" . as_ptr () as * const c_char) ; table . area_set_space = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space\0" . as_ptr () as * const c_char) ; table . area_set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_transform\0" . as_ptr () as * const c_char) ; table . body_add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_central_force\0" . as_ptr () as * const c_char) ; table . body_add_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_add_collision_exception\0" . as_ptr () as * const c_char) ; table . body_add_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_force\0" . as_ptr () as * const c_char) ; table . body_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_add_shape\0" . as_ptr () as * const c_char) ; table . body_add_torque = (gd_api . godot_method_bind_get_method) (class_name , "body_add_torque\0" . as_ptr () as * const c_char) ; table . body_apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_central_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . body_attach_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_attach_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . body_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "body_clear_shapes\0" . as_ptr () as * const c_char) ; table . body_create = (gd_api . godot_method_bind_get_method) (class_name , "body_create\0" . as_ptr () as * const c_char) ; table . body_get_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_get_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . body_get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_layer\0" . as_ptr () as * const c_char) ; table . body_get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_mask\0" . as_ptr () as * const c_char) ; table . body_get_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . body_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_direct_state\0" . as_ptr () as * const c_char) ; table . body_get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_get_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_mode\0" . as_ptr () as * const c_char) ; table . body_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_get_param = (gd_api . godot_method_bind_get_method) (class_name , "body_get_param\0" . as_ptr () as * const c_char) ; table . body_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape\0" . as_ptr () as * const c_char) ; table . body_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_count\0" . as_ptr () as * const c_char) ; table . body_get_shape_metadata = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_metadata\0" . as_ptr () as * const c_char) ; table . body_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_transform\0" . as_ptr () as * const c_char) ; table . body_get_space = (gd_api . godot_method_bind_get_method) (class_name , "body_get_space\0" . as_ptr () as * const c_char) ; table . body_get_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_state\0" . as_ptr () as * const c_char) ; table . body_is_omitting_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_is_omitting_force_integration\0" . as_ptr () as * const c_char) ; table . body_remove_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_collision_exception\0" . as_ptr () as * const c_char) ; table . body_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_shape\0" . as_ptr () as * const c_char) ; table . body_set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "body_set_axis_velocity\0" . as_ptr () as * const c_char) ; table . body_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_layer\0" . as_ptr () as * const c_char) ; table . body_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_mask\0" . as_ptr () as * const c_char) ; table . body_set_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . body_set_force_integration_callback = (gd_api . godot_method_bind_get_method) (class_name , "body_set_force_integration_callback\0" . as_ptr () as * const c_char) ; table . body_set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_set_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_mode\0" . as_ptr () as * const c_char) ; table . body_set_omit_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_set_omit_force_integration\0" . as_ptr () as * const c_char) ; table . body_set_param = (gd_api . godot_method_bind_get_method) (class_name , "body_set_param\0" . as_ptr () as * const c_char) ; table . body_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape\0" . as_ptr () as * const c_char) ; table . body_set_shape_as_one_way_collision = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_as_one_way_collision\0" . as_ptr () as * const c_char) ; table . body_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . body_set_shape_metadata = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_metadata\0" . as_ptr () as * const c_char) ; table . body_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_transform\0" . as_ptr () as * const c_char) ; table . body_set_space = (gd_api . godot_method_bind_get_method) (class_name , "body_set_space\0" . as_ptr () as * const c_char) ; table . body_set_state = (gd_api . godot_method_bind_get_method) (class_name , "body_set_state\0" . as_ptr () as * const c_char) ; table . body_test_motion = (gd_api . godot_method_bind_get_method) (class_name , "body_test_motion\0" . as_ptr () as * const c_char) ; table . capsule_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "capsule_shape_create\0" . as_ptr () as * const c_char) ; table . circle_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "circle_shape_create\0" . as_ptr () as * const c_char) ; table . concave_polygon_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "concave_polygon_shape_create\0" . as_ptr () as * const c_char) ; table . convex_polygon_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "convex_polygon_shape_create\0" . as_ptr () as * const c_char) ; table . damped_spring_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "damped_spring_joint_create\0" . as_ptr () as * const c_char) ; table . damped_string_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "damped_string_joint_get_param\0" . as_ptr () as * const c_char) ; table . damped_string_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "damped_string_joint_set_param\0" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\0" . as_ptr () as * const c_char) ; table . get_process_info = (gd_api . godot_method_bind_get_method) (class_name , "get_process_info\0" . as_ptr () as * const c_char) ; table . groove_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "groove_joint_create\0" . as_ptr () as * const c_char) ; table . joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_param\0" . as_ptr () as * const c_char) ; table . joint_get_type = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_type\0" . as_ptr () as * const c_char) ; table . joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "joint_set_param\0" . as_ptr () as * const c_char) ; table . line_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "line_shape_create\0" . as_ptr () as * const c_char) ; table . pin_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_create\0" . as_ptr () as * const c_char) ; table . ray_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "ray_shape_create\0" . as_ptr () as * const c_char) ; table . rectangle_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "rectangle_shape_create\0" . as_ptr () as * const c_char) ; table . segment_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "segment_shape_create\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . shape_get_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_data\0" . as_ptr () as * const c_char) ; table . shape_get_type = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_type\0" . as_ptr () as * const c_char) ; table . shape_set_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_set_data\0" . as_ptr () as * const c_char) ; table . space_create = (gd_api . godot_method_bind_get_method) (class_name , "space_create\0" . as_ptr () as * const c_char) ; table . space_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "space_get_direct_state\0" . as_ptr () as * const c_char) ; table . space_get_param = (gd_api . godot_method_bind_get_method) (class_name , "space_get_param\0" . as_ptr () as * const c_char) ; table . space_is_active = (gd_api . godot_method_bind_get_method) (class_name , "space_is_active\0" . as_ptr () as * const c_char) ; table . space_set_active = (gd_api . godot_method_bind_get_method) (class_name , "space_set_active\0" . as_ptr () as * const c_char) ; table . space_set_param = (gd_api . godot_method_bind_get_method) (class_name , "space_set_param\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:868:5861 [INFO] [stdout] | [INFO] [stdout] 868 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 868 | # [doc = "`core class PinJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_pinjoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`PinJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPinJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PinJoint { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const BIAS : Param = Param (0i64) ; pub const DAMPING : Param = Param (1i64) ; pub const IMPULSE_CLAMP : Param = Param (2i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PinJoint { pub const PARAM_BIAS : i64 = 0i64 ; pub const PARAM_DAMPING : i64 = 1i64 ; pub const PARAM_IMPULSE_CLAMP : i64 = 2i64 ; } impl PinJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PinJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If above 0, this value is the maximum value for an impulse that this Joint produces."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PinJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "If above 0, this value is the maximum value for an impulse that this Joint produces."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PinJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PinJoint { } unsafe impl GodotObject for PinJoint { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PinJoint" } } impl QueueFree for PinJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for PinJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PinJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for PinJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for PinJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for PinJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for PinJoint { } impl Instanciable for PinJoint { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PinJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PinJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_param : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind } impl PinJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PinJointMethodTable = PinJointMethodTable { class_constructor : None , get_param : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PinJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PinJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:874:7282 [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 CubeMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_cubemesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCubeMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CubeMesh { this : RawObject < Self > , } impl CubeMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CubeMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Size of the cuboid mesh."] # [doc = ""] # [inline] pub fn size (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Number of extra edge loops inserted along the Z axis."] # [doc = ""] # [inline] pub fn subdivide_depth (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . get_subdivide_depth ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of extra edge loops inserted along the Y axis."] # [doc = ""] # [inline] pub fn subdivide_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . get_subdivide_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of extra edge loops inserted along the X axis."] # [doc = ""] # [inline] pub fn subdivide_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . get_subdivide_width ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Size of the cuboid mesh."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Number of extra edge loops inserted along the Z axis."] # [doc = ""] # [inline] pub fn set_subdivide_depth (& self , divisions : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . set_subdivide_depth ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , divisions) ; } } # [doc = "Number of extra edge loops inserted along the Y axis."] # [doc = ""] # [inline] pub fn set_subdivide_height (& self , divisions : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . set_subdivide_height ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , divisions) ; } } # [doc = "Number of extra edge loops inserted along the X axis."] # [doc = ""] # [inline] pub fn set_subdivide_width (& self , subdivide : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . set_subdivide_width ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , subdivide) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CubeMesh { } unsafe impl GodotObject for CubeMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CubeMesh" } } impl std :: ops :: Deref for CubeMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CubeMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for CubeMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for CubeMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CubeMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CubeMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for CubeMesh { } impl Instanciable for CubeMesh { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CubeMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CubeMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_size : * mut sys :: godot_method_bind , pub get_subdivide_depth : * mut sys :: godot_method_bind , pub get_subdivide_height : * mut sys :: godot_method_bind , pub get_subdivide_width : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_subdivide_depth : * mut sys :: godot_method_bind , pub set_subdivide_height : * mut sys :: godot_method_bind , pub set_subdivide_width : * mut sys :: godot_method_bind } impl CubeMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CubeMeshMethodTable = CubeMeshMethodTable { class_constructor : None , get_size : 0 as * mut sys :: godot_method_bind , get_subdivide_depth : 0 as * mut sys :: godot_method_bind , get_subdivide_height : 0 as * mut sys :: godot_method_bind , get_subdivide_width : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_subdivide_depth : 0 as * mut sys :: godot_method_bind , set_subdivide_height : 0 as * mut sys :: godot_method_bind , set_subdivide_width : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CubeMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CubeMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_depth\0" . as_ptr () as * const c_char) ; table . get_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_height\0" . as_ptr () as * const c_char) ; table . get_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_width\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_depth\0" . as_ptr () as * const c_char) ; table . set_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_height\0" . as_ptr () as * const c_char) ; table . set_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_width\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:880:7950 [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 InputEventMouseButton` inherits `InputEventMouse` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventmousebutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventMouseButton inherits methods from:\n - [InputEventMouse](struct.InputEventMouse.html)\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventMouseButton { this : RawObject < Self > , } impl InputEventMouseButton { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventMouseButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The mouse button identifier, one of the [enum ButtonList] button or button wheel constants."] # [doc = ""] # [inline] pub fn button_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . get_button_index ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported."] # [doc = ""] # [inline] pub fn factor (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . get_factor ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the mouse button's state is a double-click."] # [doc = ""] # [inline] pub fn is_doubleclick (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . is_doubleclick ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The mouse button identifier, one of the [enum ButtonList] button or button wheel constants."] # [doc = ""] # [inline] pub fn set_button_index (& self , button_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_button_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , button_index) ; } } # [doc = "If `true`, the mouse button's state is a double-click."] # [doc = ""] # [inline] pub fn set_doubleclick (& self , doubleclick : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_doubleclick ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , doubleclick) ; } } # [doc = "The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported."] # [doc = ""] # [inline] pub fn set_factor (& self , factor : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_factor ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , factor) ; } } # [doc = "If `true`, the mouse button's state is pressed. If `false`, the mouse button's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , pressed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouseButton { } unsafe impl GodotObject for InputEventMouseButton { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouseButton" } } impl std :: ops :: Deref for InputEventMouseButton { type Target = crate :: generated :: input_event_mouse :: InputEventMouse ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouseButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_mouse :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_mouse :: InputEventMouse > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventMouseButton { } impl Instanciable for InputEventMouseButton { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { InputEventMouseButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMouseButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_button_index : * mut sys :: godot_method_bind , pub get_factor : * mut sys :: godot_method_bind , pub is_doubleclick : * mut sys :: godot_method_bind , pub set_button_index : * mut sys :: godot_method_bind , pub set_doubleclick : * mut sys :: godot_method_bind , pub set_factor : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind } impl InputEventMouseButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMouseButtonMethodTable = InputEventMouseButtonMethodTable { class_constructor : None , get_button_index : 0 as * mut sys :: godot_method_bind , get_factor : 0 as * mut sys :: godot_method_bind , is_doubleclick : 0 as * mut sys :: godot_method_bind , set_button_index : 0 as * mut sys :: godot_method_bind , set_doubleclick : 0 as * mut sys :: godot_method_bind , set_factor : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { InputEventMouseButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventMouseButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_button_index = (gd_api . godot_method_bind_get_method) (class_name , "get_button_index\0" . as_ptr () as * const c_char) ; table . get_factor = (gd_api . godot_method_bind_get_method) (class_name , "get_factor\0" . as_ptr () as * const c_char) ; table . is_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "is_doubleclick\0" . as_ptr () as * const c_char) ; table . set_button_index = (gd_api . godot_method_bind_get_method) (class_name , "set_button_index\0" . as_ptr () as * const c_char) ; table . set_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "set_doubleclick\0" . as_ptr () as * const c_char) ; table . set_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_factor\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:886:11953 [INFO] [stdout] | [INFO] [stdout] 886 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 886 | # [doc = "`core class Sprite3D` inherits `SpriteBase3D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_sprite3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Sprite3D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSprite3D inherits methods from:\n - [SpriteBase3D](struct.SpriteBase3D.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Sprite3D { this : RawObject < Self > , } impl Sprite3D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Sprite3DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1."] # [doc = ""] # [inline] pub fn frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] must be greater than 1."] # [doc = ""] # [inline] pub fn frame_coords (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_frame_coords ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The number of columns in the sprite sheet."] # [doc = ""] # [inline] pub fn hframes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_hframes ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The region of the atlas texture to display. [member region_enabled] must be `true`."] # [doc = ""] # [inline] pub fn region_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_region_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "[Texture] object to draw. If [member GeometryInstance.material_override] is used, this will be overridden."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "The number of rows in the sprite sheet."] # [doc = ""] # [inline] pub fn vframes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_vframes ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, texture will be cut from a larger atlas texture. See [member region_rect]."] # [doc = ""] # [inline] pub fn is_region (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . is_region ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1."] # [doc = ""] # [inline] pub fn set_frame (& self , frame : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , frame) ; } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [member frame] property. [member vframes] or [member hframes] must be greater than 1."] # [doc = ""] # [inline] pub fn set_frame_coords (& self , coords : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_frame_coords ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , coords) ; } } # [doc = "The number of columns in the sprite sheet."] # [doc = ""] # [inline] pub fn set_hframes (& self , hframes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_hframes ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , hframes) ; } } # [doc = "If `true`, texture will be cut from a larger atlas texture. See [member region_rect]."] # [doc = ""] # [inline] pub fn set_region (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_region ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The region of the atlas texture to display. [member region_enabled] must be `true`."] # [doc = ""] # [inline] pub fn set_region_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_region_rect ; let ret = crate :: icalls :: icallptr_void_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "[Texture] object to draw. If [member GeometryInstance.material_override] is used, this will be overridden."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The number of rows in the sprite sheet."] # [doc = ""] # [inline] pub fn set_vframes (& self , vframes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_vframes ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , vframes) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Sprite3D { } unsafe impl GodotObject for Sprite3D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Sprite3D" } } impl QueueFree for Sprite3D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Sprite3D { type Target = crate :: generated :: sprite_base_3d :: SpriteBase3D ; # [inline] fn deref (& self) -> & crate :: generated :: sprite_base_3d :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Sprite3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: sprite_base_3d :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: sprite_base_3d :: SpriteBase3D > for Sprite3D { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for Sprite3D { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for Sprite3D { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Sprite3D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Sprite3D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Sprite3D { } impl Instanciable for Sprite3D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Sprite3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Sprite3DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_frame : * mut sys :: godot_method_bind , pub get_frame_coords : * mut sys :: godot_method_bind , pub get_hframes : * mut sys :: godot_method_bind , pub get_region_rect : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_vframes : * mut sys :: godot_method_bind , pub is_region : * mut sys :: godot_method_bind , pub set_frame : * mut sys :: godot_method_bind , pub set_frame_coords : * mut sys :: godot_method_bind , pub set_hframes : * mut sys :: godot_method_bind , pub set_region : * mut sys :: godot_method_bind , pub set_region_rect : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_vframes : * mut sys :: godot_method_bind } impl Sprite3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Sprite3DMethodTable = Sprite3DMethodTable { class_constructor : None , get_frame : 0 as * mut sys :: godot_method_bind , get_frame_coords : 0 as * mut sys :: godot_method_bind , get_hframes : 0 as * mut sys :: godot_method_bind , get_region_rect : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_vframes : 0 as * mut sys :: godot_method_bind , is_region : 0 as * mut sys :: godot_method_bind , set_frame : 0 as * mut sys :: godot_method_bind , set_frame_coords : 0 as * mut sys :: godot_method_bind , set_hframes : 0 as * mut sys :: godot_method_bind , set_region : 0 as * mut sys :: godot_method_bind , set_region_rect : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_vframes : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Sprite3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Sprite3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_coords\0" . as_ptr () as * const c_char) ; table . get_hframes = (gd_api . godot_method_bind_get_method) (class_name , "get_hframes\0" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_vframes = (gd_api . godot_method_bind_get_method) (class_name , "get_vframes\0" . as_ptr () as * const c_char) ; table . is_region = (gd_api . godot_method_bind_get_method) (class_name , "is_region\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; table . set_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_coords\0" . as_ptr () as * const c_char) ; table . set_hframes = (gd_api . godot_method_bind_get_method) (class_name , "set_hframes\0" . as_ptr () as * const c_char) ; table . set_region = (gd_api . godot_method_bind_get_method) (class_name , "set_region\0" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_vframes = (gd_api . godot_method_bind_get_method) (class_name , "set_vframes\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:892:3167 [INFO] [stdout] | [INFO] [stdout] 892 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 892 | # [doc = "`core class TextFile` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_textfile.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTextFile inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextFile { this : RawObject < Self > , } impl TextFile { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextFileMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for TextFile { } unsafe impl GodotObject for TextFile { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TextFile" } } impl std :: ops :: Deref for TextFile { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextFile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for TextFile { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for TextFile { } unsafe impl SubClass < crate :: generated :: object :: Object > for TextFile { } impl Instanciable for TextFile { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { TextFile :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextFileMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl TextFileMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextFileMethodTable = TextFileMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { TextFileMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextFile\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:898:8263 [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 SphereMesh` inherits `PrimitiveMesh` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_spheremesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSphereMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SphereMesh { this : RawObject < Self > , } impl SphereMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SphereMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Full height of the sphere."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, a hemisphere is created rather than a full sphere.\n**Note:** To get a regular hemisphere, the height and radius of the sphere must be equal."] # [doc = ""] # [inline] pub fn is_hemisphere (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_is_hemisphere ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of radial segments on the sphere."] # [doc = ""] # [inline] pub fn radial_segments (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_radial_segments ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Radius of sphere."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Number of segments along the height of the sphere."] # [doc = ""] # [inline] pub fn rings (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_rings ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Full height of the sphere."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , height) ; } } # [doc = "If `true`, a hemisphere is created rather than a full sphere.\n**Note:** To get a regular hemisphere, the height and radius of the sphere must be equal."] # [doc = ""] # [inline] pub fn set_is_hemisphere (& self , is_hemisphere : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_is_hemisphere ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , is_hemisphere) ; } } # [doc = "Number of radial segments on the sphere."] # [doc = ""] # [inline] pub fn set_radial_segments (& self , radial_segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_radial_segments ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , radial_segments) ; } } # [doc = "Radius of sphere."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = "Number of segments along the height of the sphere."] # [doc = ""] # [inline] pub fn set_rings (& self , rings : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_rings ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , rings) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SphereMesh { } unsafe impl GodotObject for SphereMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SphereMesh" } } impl std :: ops :: Deref for SphereMesh { type Target = crate :: generated :: primitive_mesh :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SphereMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: primitive_mesh :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: primitive_mesh :: PrimitiveMesh > for SphereMesh { } unsafe impl SubClass < crate :: generated :: mesh :: Mesh > for SphereMesh { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for SphereMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for SphereMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for SphereMesh { } impl Instanciable for SphereMesh { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { SphereMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SphereMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_is_hemisphere : * mut sys :: godot_method_bind , pub get_radial_segments : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rings : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_is_hemisphere : * mut sys :: godot_method_bind , pub set_radial_segments : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_rings : * mut sys :: godot_method_bind } impl SphereMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SphereMeshMethodTable = SphereMeshMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_is_hemisphere : 0 as * mut sys :: godot_method_bind , get_radial_segments : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rings : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_is_hemisphere : 0 as * mut sys :: godot_method_bind , set_radial_segments : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_rings : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { SphereMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SphereMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_is_hemisphere = (gd_api . godot_method_bind_get_method) (class_name , "get_is_hemisphere\0" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_is_hemisphere = (gd_api . godot_method_bind_get_method) (class_name , "set_is_hemisphere\0" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:904:12102 [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 class UPNPDevice` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_upnpdevice.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nUPNPDevice inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UPNPDevice { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct IgdStatus (pub i64) ; impl IgdStatus { pub const OK : IgdStatus = IgdStatus (0i64) ; pub const HTTP_ERROR : IgdStatus = IgdStatus (1i64) ; pub const HTTP_EMPTY : IgdStatus = IgdStatus (2i64) ; pub const NO_URLS : IgdStatus = IgdStatus (3i64) ; pub const NO_IGD : IgdStatus = IgdStatus (4i64) ; pub const DISCONNECTED : IgdStatus = IgdStatus (5i64) ; pub const UNKNOWN_DEVICE : IgdStatus = IgdStatus (6i64) ; pub const INVALID_CONTROL : IgdStatus = IgdStatus (7i64) ; pub const MALLOC_ERROR : IgdStatus = IgdStatus (8i64) ; pub const UNKNOWN_ERROR : IgdStatus = IgdStatus (9i64) ; } impl From < i64 > for IgdStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < IgdStatus > for i64 { # [inline] fn from (v : IgdStatus) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UPNPDevice { pub const IGD_STATUS_DISCONNECTED : i64 = 5i64 ; pub const IGD_STATUS_HTTP_EMPTY : i64 = 2i64 ; pub const IGD_STATUS_HTTP_ERROR : i64 = 1i64 ; pub const IGD_STATUS_INVALID_CONTROL : i64 = 7i64 ; pub const IGD_STATUS_MALLOC_ERROR : i64 = 8i64 ; pub const IGD_STATUS_NO_IGD : i64 = 4i64 ; pub const IGD_STATUS_NO_URLS : i64 = 3i64 ; pub const IGD_STATUS_OK : i64 = 0i64 ; pub const IGD_STATUS_UNKNOWN_DEVICE : i64 = 6i64 ; pub const IGD_STATUS_UNKNOWN_ERROR : i64 = 9i64 ; } impl UPNPDevice { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UPNPDeviceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_port_mapping (& self , port : i64 , port_internal : i64 , desc : impl Into < GodotString > , proto : impl Into < GodotString > , duration : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . add_port_mapping ; let ret = crate :: icalls :: icallptr_i64_i64_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , port , port_internal , desc . into () , proto . into () , duration) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn delete_port_mapping (& self , port : i64 , proto : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . delete_port_mapping ; let ret = crate :: icalls :: icallptr_i64_i64_str (method_bind , self . this . sys () . as_ptr () , port , proto . into ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn description_url (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_description_url ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_control_url (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_control_url ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_our_addr (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_our_addr ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_service_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_service_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_status (& self) -> crate :: generated :: upnp_device :: IgdStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_status ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: upnp_device :: IgdStatus (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn service_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_service_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_valid_gateway (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . is_valid_gateway ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn query_external_address (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . query_external_address ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_description_url (& self , url : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_description_url ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , url . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_control_url (& self , url : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_control_url ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , url . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_our_addr (& self , addr : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_our_addr ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , addr . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_service_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_service_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_status (& self , status : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_status ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , status) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_service_type (& self , _type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_service_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , _type . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for UPNPDevice { } unsafe impl GodotObject for UPNPDevice { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UPNPDevice" } } impl std :: ops :: Deref for UPNPDevice { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UPNPDevice { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for UPNPDevice { } unsafe impl SubClass < crate :: generated :: object :: Object > for UPNPDevice { } impl Instanciable for UPNPDevice { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { UPNPDevice :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UPNPDeviceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_port_mapping : * mut sys :: godot_method_bind , pub delete_port_mapping : * mut sys :: godot_method_bind , pub get_description_url : * mut sys :: godot_method_bind , pub get_igd_control_url : * mut sys :: godot_method_bind , pub get_igd_our_addr : * mut sys :: godot_method_bind , pub get_igd_service_type : * mut sys :: godot_method_bind , pub get_igd_status : * mut sys :: godot_method_bind , pub get_service_type : * mut sys :: godot_method_bind , pub is_valid_gateway : * mut sys :: godot_method_bind , pub query_external_address : * mut sys :: godot_method_bind , pub set_description_url : * mut sys :: godot_method_bind , pub set_igd_control_url : * mut sys :: godot_method_bind , pub set_igd_our_addr : * mut sys :: godot_method_bind , pub set_igd_service_type : * mut sys :: godot_method_bind , pub set_igd_status : * mut sys :: godot_method_bind , pub set_service_type : * mut sys :: godot_method_bind } impl UPNPDeviceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UPNPDeviceMethodTable = UPNPDeviceMethodTable { class_constructor : None , add_port_mapping : 0 as * mut sys :: godot_method_bind , delete_port_mapping : 0 as * mut sys :: godot_method_bind , get_description_url : 0 as * mut sys :: godot_method_bind , get_igd_control_url : 0 as * mut sys :: godot_method_bind , get_igd_our_addr : 0 as * mut sys :: godot_method_bind , get_igd_service_type : 0 as * mut sys :: godot_method_bind , get_igd_status : 0 as * mut sys :: godot_method_bind , get_service_type : 0 as * mut sys :: godot_method_bind , is_valid_gateway : 0 as * mut sys :: godot_method_bind , query_external_address : 0 as * mut sys :: godot_method_bind , set_description_url : 0 as * mut sys :: godot_method_bind , set_igd_control_url : 0 as * mut sys :: godot_method_bind , set_igd_our_addr : 0 as * mut sys :: godot_method_bind , set_igd_service_type : 0 as * mut sys :: godot_method_bind , set_igd_status : 0 as * mut sys :: godot_method_bind , set_service_type : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { UPNPDeviceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UPNPDevice\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_port_mapping\0" . as_ptr () as * const c_char) ; table . delete_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "delete_port_mapping\0" . as_ptr () as * const c_char) ; table . get_description_url = (gd_api . godot_method_bind_get_method) (class_name , "get_description_url\0" . as_ptr () as * const c_char) ; table . get_igd_control_url = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_control_url\0" . as_ptr () as * const c_char) ; table . get_igd_our_addr = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_our_addr\0" . as_ptr () as * const c_char) ; table . get_igd_service_type = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_service_type\0" . as_ptr () as * const c_char) ; table . get_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_status\0" . as_ptr () as * const c_char) ; table . get_service_type = (gd_api . godot_method_bind_get_method) (class_name , "get_service_type\0" . as_ptr () as * const c_char) ; table . is_valid_gateway = (gd_api . godot_method_bind_get_method) (class_name , "is_valid_gateway\0" . as_ptr () as * const c_char) ; table . query_external_address = (gd_api . godot_method_bind_get_method) (class_name , "query_external_address\0" . as_ptr () as * const c_char) ; table . set_description_url = (gd_api . godot_method_bind_get_method) (class_name , "set_description_url\0" . as_ptr () as * const c_char) ; table . set_igd_control_url = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_control_url\0" . as_ptr () as * const c_char) ; table . set_igd_our_addr = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_our_addr\0" . as_ptr () as * const c_char) ; table . set_igd_service_type = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_service_type\0" . as_ptr () as * const c_char) ; table . set_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_status\0" . as_ptr () as * const c_char) ; table . set_service_type = (gd_api . godot_method_bind_get_method) (class_name , "set_service_type\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:916:6978 [INFO] [stdout] | [INFO] [stdout] 916 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 916 | # [doc = "`core class VisibilityEnabler2D` inherits `VisibilityNotifier2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visibilityenabler2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VisibilityEnabler2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVisibilityEnabler2D inherits methods from:\n - [VisibilityNotifier2D](struct.VisibilityNotifier2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisibilityEnabler2D { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Enabler (pub i64) ; impl Enabler { pub const PAUSE_ANIMATIONS : Enabler = Enabler (0i64) ; pub const FREEZE_BODIES : Enabler = Enabler (1i64) ; pub const PAUSE_PARTICLES : Enabler = Enabler (2i64) ; pub const PARENT_PROCESS : Enabler = Enabler (3i64) ; pub const PARENT_PHYSICS_PROCESS : Enabler = Enabler (4i64) ; pub const PAUSE_ANIMATED_SPRITES : Enabler = Enabler (5i64) ; pub const MAX : Enabler = Enabler (6i64) ; } impl From < i64 > for Enabler { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Enabler > for i64 { # [inline] fn from (v : Enabler) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisibilityEnabler2D { pub const ENABLER_FREEZE_BODIES : i64 = 1i64 ; pub const ENABLER_MAX : i64 = 6i64 ; pub const ENABLER_PARENT_PHYSICS_PROCESS : i64 = 4i64 ; pub const ENABLER_PARENT_PROCESS : i64 = 3i64 ; pub const ENABLER_PAUSE_ANIMATED_SPRITES : i64 = 5i64 ; pub const ENABLER_PAUSE_ANIMATIONS : i64 = 0i64 ; pub const ENABLER_PAUSE_PARTICLES : i64 = 2i64 ; } impl VisibilityEnabler2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisibilityEnabler2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, the parent's [method Node._process] will be stopped."] # [doc = ""] # [inline] pub fn is_enabler_enabled (& self , enabler : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , enabler) ; ret as _ } } # [doc = "If `true`, the parent's [method Node._process] will be stopped."] # [doc = ""] # [inline] pub fn set_enabler (& self , enabler : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , enabler , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityEnabler2D { } unsafe impl GodotObject for VisibilityEnabler2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisibilityEnabler2D" } } impl QueueFree for VisibilityEnabler2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VisibilityEnabler2D { type Target = crate :: generated :: visibility_notifier_2d :: VisibilityNotifier2D ; # [inline] fn deref (& self) -> & crate :: generated :: visibility_notifier_2d :: VisibilityNotifier2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityEnabler2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visibility_notifier_2d :: VisibilityNotifier2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visibility_notifier_2d :: VisibilityNotifier2D > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisibilityEnabler2D { } impl Instanciable for VisibilityEnabler2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisibilityEnabler2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisibilityEnabler2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_enabler_enabled : * mut sys :: godot_method_bind , pub set_enabler : * mut sys :: godot_method_bind } impl VisibilityEnabler2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisibilityEnabler2DMethodTable = VisibilityEnabler2DMethodTable { class_constructor : None , is_enabler_enabled : 0 as * mut sys :: godot_method_bind , set_enabler : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisibilityEnabler2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisibilityEnabler2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_enabler_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabler_enabled\0" . as_ptr () as * const c_char) ; table . set_enabler = (gd_api . godot_method_bind_get_method) (class_name , "set_enabler\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:922:5412 [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 VisualScriptLocalVar` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptlocalvar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptLocalVar inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptLocalVar { this : RawObject < Self > , } impl VisualScriptLocalVar { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptLocalVarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . get_var_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . get_var_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . set_var_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_type (& self , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . set_var_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLocalVar { } unsafe impl GodotObject for VisualScriptLocalVar { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLocalVar" } } impl std :: ops :: Deref for VisualScriptLocalVar { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLocalVar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptLocalVar { } impl Instanciable for VisualScriptLocalVar { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptLocalVar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptLocalVarMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_var_name : * mut sys :: godot_method_bind , pub get_var_type : * mut sys :: godot_method_bind , pub set_var_name : * mut sys :: godot_method_bind , pub set_var_type : * mut sys :: godot_method_bind } impl VisualScriptLocalVarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptLocalVarMethodTable = VisualScriptLocalVarMethodTable { class_constructor : None , get_var_name : 0 as * mut sys :: godot_method_bind , get_var_type : 0 as * mut sys :: godot_method_bind , set_var_name : 0 as * mut sys :: godot_method_bind , set_var_type : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptLocalVarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptLocalVar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_var_name = (gd_api . godot_method_bind_get_method) (class_name , "get_var_name\0" . as_ptr () as * const c_char) ; table . get_var_type = (gd_api . godot_method_bind_get_method) (class_name , "get_var_type\0" . as_ptr () as * const c_char) ; table . set_var_name = (gd_api . godot_method_bind_get_method) (class_name , "set_var_name\0" . as_ptr () as * const c_char) ; table . set_var_type = (gd_api . godot_method_bind_get_method) (class_name , "set_var_type\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:928:3616 [INFO] [stdout] | [INFO] [stdout] 928 | ...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] 928 | # [doc = "`core class VisualScriptSubCall` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptsubcall.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSubCall inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSubCall { this : RawObject < Self > , } impl VisualScriptSubCall { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSubCallMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSubCall { } unsafe impl GodotObject for VisualScriptSubCall { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSubCall" } } impl std :: ops :: Deref for VisualScriptSubCall { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSubCall { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSubCall { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSubCall { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSubCall { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSubCall { } impl Instanciable for VisualScriptSubCall { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptSubCall :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSubCallMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptSubCallMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSubCallMethodTable = VisualScriptSubCallMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptSubCallMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSubCall\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:934:7570 [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 AudioEffectLimiter` inherits `AudioEffect` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectlimiter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectLimiter inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectLimiter { this : RawObject < Self > , } impl AudioEffectLimiter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectLimiterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1."] # [doc = ""] # [inline] pub fn ceiling_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . get_ceiling_db ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Applies a gain to the limited waves, in decibels. Value can range from 0 to 6."] # [doc = ""] # [inline] pub fn soft_clip_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . get_soft_clip_db ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn soft_clip_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . get_soft_clip_ratio ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0."] # [doc = ""] # [inline] pub fn threshold_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . get_threshold_db ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1."] # [doc = ""] # [inline] pub fn set_ceiling_db (& self , ceiling : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . set_ceiling_db ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , ceiling) ; } } # [doc = "Applies a gain to the limited waves, in decibels. Value can range from 0 to 6."] # [doc = ""] # [inline] pub fn set_soft_clip_db (& self , soft_clip : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . set_soft_clip_db ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , soft_clip) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_soft_clip_ratio (& self , soft_clip : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . set_soft_clip_ratio ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , soft_clip) ; } } # [doc = "Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0."] # [doc = ""] # [inline] pub fn set_threshold_db (& self , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . set_threshold_db ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , threshold) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectLimiter { } unsafe impl GodotObject for AudioEffectLimiter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectLimiter" } } impl std :: ops :: Deref for AudioEffectLimiter { type Target = crate :: generated :: audio_effect :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectLimiter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectLimiter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectLimiter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectLimiter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectLimiter { } impl Instanciable for AudioEffectLimiter { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectLimiter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectLimiterMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_ceiling_db : * mut sys :: godot_method_bind , pub get_soft_clip_db : * mut sys :: godot_method_bind , pub get_soft_clip_ratio : * mut sys :: godot_method_bind , pub get_threshold_db : * mut sys :: godot_method_bind , pub set_ceiling_db : * mut sys :: godot_method_bind , pub set_soft_clip_db : * mut sys :: godot_method_bind , pub set_soft_clip_ratio : * mut sys :: godot_method_bind , pub set_threshold_db : * mut sys :: godot_method_bind } impl AudioEffectLimiterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectLimiterMethodTable = AudioEffectLimiterMethodTable { class_constructor : None , get_ceiling_db : 0 as * mut sys :: godot_method_bind , get_soft_clip_db : 0 as * mut sys :: godot_method_bind , get_soft_clip_ratio : 0 as * mut sys :: godot_method_bind , get_threshold_db : 0 as * mut sys :: godot_method_bind , set_ceiling_db : 0 as * mut sys :: godot_method_bind , set_soft_clip_db : 0 as * mut sys :: godot_method_bind , set_soft_clip_ratio : 0 as * mut sys :: godot_method_bind , set_threshold_db : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectLimiterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectLimiter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_ceiling_db = (gd_api . godot_method_bind_get_method) (class_name , "get_ceiling_db\0" . as_ptr () as * const c_char) ; table . get_soft_clip_db = (gd_api . godot_method_bind_get_method) (class_name , "get_soft_clip_db\0" . as_ptr () as * const c_char) ; table . get_soft_clip_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_soft_clip_ratio\0" . as_ptr () as * const c_char) ; table . get_threshold_db = (gd_api . godot_method_bind_get_method) (class_name , "get_threshold_db\0" . as_ptr () as * const c_char) ; table . set_ceiling_db = (gd_api . godot_method_bind_get_method) (class_name , "set_ceiling_db\0" . as_ptr () as * const c_char) ; table . set_soft_clip_db = (gd_api . godot_method_bind_get_method) (class_name , "set_soft_clip_db\0" . as_ptr () as * const c_char) ; table . set_soft_clip_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_soft_clip_ratio\0" . as_ptr () as * const c_char) ; table . set_threshold_db = (gd_api . godot_method_bind_get_method) (class_name , "set_threshold_db\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:940:14005 [INFO] [stdout] | [INFO] [stdout] 940 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 940 | # [doc = "`core class CharFXTransform` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_charfxtransform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCharFXTransform inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CharFXTransform { this : RawObject < Self > , } impl CharFXTransform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CharFXTransformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The index of the current character (starting from 0). Setting this property won't affect drawing."] # [doc = ""] # [inline] pub fn absolute_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_absolute_index ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:\n```gdscript\n# `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.\n# See the RichTextEffect documentation for details.\nchar_fx.character = ord(\"*\")\n```"] # [doc = ""] # [inline] pub fn character (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_character ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The color the character will be drawn with."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].\n**Note:** Time still passes while the [RichTextLabel] is hidden."] # [doc = ""] # [inline] pub fn elapsed_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_elapsed_time ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nContains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form `#rrggbb` or `#rgb` will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.\nFor example, the opening BBCode tag `[example foo=hello bar=true baz=42 color=#ffffff]` will map to the following [Dictionary]:\n```gdscript\n{\"foo\": \"hello\", \"bar\": true, \"baz\": 42, \"color\": Color(1, 1, 1, 1)}\n```"] # [doc = ""] # [inline] pub fn environment (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallptr_dict (method_bind , self . this . sys () . as_ptr ()) ; Dictionary :: from_sys (ret) } } # [doc = "The position offset the character will be drawn with (in pixels)."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The index of the current character (starting from 0). Setting this property won't affect drawing."] # [doc = ""] # [inline] pub fn relative_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_relative_index ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the character will be drawn. If `false`, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to `Color(1, 1, 1, 0)` instead."] # [doc = ""] # [inline] pub fn is_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . is_visible ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The index of the current character (starting from 0). Setting this property won't affect drawing."] # [doc = ""] # [inline] pub fn set_absolute_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_absolute_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:\n```gdscript\n# `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.\n# See the RichTextEffect documentation for details.\nchar_fx.character = ord(\"*\")\n```"] # [doc = ""] # [inline] pub fn set_character (& self , character : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_character ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , character) ; } } # [doc = "The color the character will be drawn with."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].\n**Note:** Time still passes while the [RichTextLabel] is hidden."] # [doc = ""] # [inline] pub fn set_elapsed_time (& self , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_elapsed_time ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , time) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nContains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form `#rrggbb` or `#rgb` will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.\nFor example, the opening BBCode tag `[example foo=hello bar=true baz=42 color=#ffffff]` will map to the following [Dictionary]:\n```gdscript\n{\"foo\": \"hello\", \"bar\": true, \"baz\": 42, \"color\": Color(1, 1, 1, 1)}\n```"] # [doc = ""] # [inline] pub fn set_environment (& self , environment : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallptr_void_dict (method_bind , self . this . sys () . as_ptr () , environment) ; } } # [doc = "The position offset the character will be drawn with (in pixels)."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The index of the current character (starting from 0). Setting this property won't affect drawing."] # [doc = ""] # [inline] pub fn set_relative_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_relative_index ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } # [doc = "If `true`, the character will be drawn. If `false`, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to `Color(1, 1, 1, 0)` instead."] # [doc = ""] # [inline] pub fn set_visibility (& self , visibility : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_visibility ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visibility) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CharFXTransform { } unsafe impl GodotObject for CharFXTransform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CharFXTransform" } } impl std :: ops :: Deref for CharFXTransform { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CharFXTransform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CharFXTransform { } unsafe impl SubClass < crate :: generated :: object :: Object > for CharFXTransform { } impl Instanciable for CharFXTransform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CharFXTransform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CharFXTransformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_absolute_index : * mut sys :: godot_method_bind , pub get_character : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_elapsed_time : * mut sys :: godot_method_bind , pub get_environment : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_relative_index : * mut sys :: godot_method_bind , pub is_visible : * mut sys :: godot_method_bind , pub set_absolute_index : * mut sys :: godot_method_bind , pub set_character : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_elapsed_time : * mut sys :: godot_method_bind , pub set_environment : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_relative_index : * mut sys :: godot_method_bind , pub set_visibility : * mut sys :: godot_method_bind } impl CharFXTransformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CharFXTransformMethodTable = CharFXTransformMethodTable { class_constructor : None , get_absolute_index : 0 as * mut sys :: godot_method_bind , get_character : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_elapsed_time : 0 as * mut sys :: godot_method_bind , get_environment : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_relative_index : 0 as * mut sys :: godot_method_bind , is_visible : 0 as * mut sys :: godot_method_bind , set_absolute_index : 0 as * mut sys :: godot_method_bind , set_character : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_elapsed_time : 0 as * mut sys :: godot_method_bind , set_environment : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_relative_index : 0 as * mut sys :: godot_method_bind , set_visibility : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CharFXTransformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CharFXTransform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_absolute_index = (gd_api . godot_method_bind_get_method) (class_name , "get_absolute_index\0" . as_ptr () as * const c_char) ; table . get_character = (gd_api . godot_method_bind_get_method) (class_name , "get_character\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_elapsed_time = (gd_api . godot_method_bind_get_method) (class_name , "get_elapsed_time\0" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_relative_index = (gd_api . godot_method_bind_get_method) (class_name , "get_relative_index\0" . as_ptr () as * const c_char) ; table . is_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_visible\0" . as_ptr () as * const c_char) ; table . set_absolute_index = (gd_api . godot_method_bind_get_method) (class_name , "set_absolute_index\0" . as_ptr () as * const c_char) ; table . set_character = (gd_api . godot_method_bind_get_method) (class_name , "set_character\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_elapsed_time = (gd_api . godot_method_bind_get_method) (class_name , "set_elapsed_time\0" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_relative_index = (gd_api . godot_method_bind_get_method) (class_name , "set_relative_index\0" . as_ptr () as * const c_char) ; table . set_visibility = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:946:11603 [INFO] [stdout] | [INFO] [stdout] 946 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 946 | # [doc = "`core class BakedLightmapData` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_bakedlightmapdata.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nBakedLightmapData inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BakedLightmapData { this : RawObject < Self > , } impl BakedLightmapData { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BakedLightmapDataMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_user (& self , path : impl Into < NodePath > , lightmap : impl AsArg < crate :: generated :: resource :: Resource > , lightmap_slice : i64 , lightmap_uv_rect : Rect2 , instance : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . add_user ; let ret = crate :: icalls :: icallptr_void_nodepath_obj_i64_rect2_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , lightmap . as_arg_ptr () , lightmap_slice , lightmap_uv_rect , instance) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_data (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . clear_data ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_users (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . clear_users ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn bounds (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_bounds ; let ret = crate :: icalls :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_space_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_cell_space_transform ; let ret = crate :: icalls :: icallptr_trans (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_subdiv (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_cell_subdiv ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_energy ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn octree (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_octree ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_user_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_user_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_user_lightmap (& self , user_idx : i64) -> Option < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_user_lightmap ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , user_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: resource :: Resource , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_user_path (& self , user_idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_user_path ; let ret = crate :: icalls :: icallptr_nodepath_i64 (method_bind , self . this . sys () . as_ptr () , user_idx) ; NodePath :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_interior (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . is_interior ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bounds (& self , bounds : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_bounds ; let ret = crate :: icalls :: icallptr_void_aabb (method_bind , self . this . sys () . as_ptr () , bounds) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_space_transform (& self , xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_cell_space_transform ; let ret = crate :: icalls :: icallptr_void_trans (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_subdiv (& self , cell_subdiv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_cell_subdiv ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , cell_subdiv) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_energy ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , energy) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_interior (& self , interior : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_interior ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , interior) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_octree (& self , octree : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_octree ; let ret = crate :: icalls :: icallptr_void_bytearr (method_bind , self . this . sys () . as_ptr () , octree) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BakedLightmapData { } unsafe impl GodotObject for BakedLightmapData { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BakedLightmapData" } } impl std :: ops :: Deref for BakedLightmapData { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BakedLightmapData { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for BakedLightmapData { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for BakedLightmapData { } unsafe impl SubClass < crate :: generated :: object :: Object > for BakedLightmapData { } impl Instanciable for BakedLightmapData { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { BakedLightmapData :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BakedLightmapDataMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_user : * mut sys :: godot_method_bind , pub clear_data : * mut sys :: godot_method_bind , pub clear_users : * mut sys :: godot_method_bind , pub get_bounds : * mut sys :: godot_method_bind , pub get_cell_space_transform : * mut sys :: godot_method_bind , pub get_cell_subdiv : * mut sys :: godot_method_bind , pub get_energy : * mut sys :: godot_method_bind , pub get_octree : * mut sys :: godot_method_bind , pub get_user_count : * mut sys :: godot_method_bind , pub get_user_lightmap : * mut sys :: godot_method_bind , pub get_user_path : * mut sys :: godot_method_bind , pub is_interior : * mut sys :: godot_method_bind , pub set_bounds : * mut sys :: godot_method_bind , pub set_cell_space_transform : * mut sys :: godot_method_bind , pub set_cell_subdiv : * mut sys :: godot_method_bind , pub set_energy : * mut sys :: godot_method_bind , pub set_interior : * mut sys :: godot_method_bind , pub set_octree : * mut sys :: godot_method_bind } impl BakedLightmapDataMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BakedLightmapDataMethodTable = BakedLightmapDataMethodTable { class_constructor : None , add_user : 0 as * mut sys :: godot_method_bind , clear_data : 0 as * mut sys :: godot_method_bind , clear_users : 0 as * mut sys :: godot_method_bind , get_bounds : 0 as * mut sys :: godot_method_bind , get_cell_space_transform : 0 as * mut sys :: godot_method_bind , get_cell_subdiv : 0 as * mut sys :: godot_method_bind , get_energy : 0 as * mut sys :: godot_method_bind , get_octree : 0 as * mut sys :: godot_method_bind , get_user_count : 0 as * mut sys :: godot_method_bind , get_user_lightmap : 0 as * mut sys :: godot_method_bind , get_user_path : 0 as * mut sys :: godot_method_bind , is_interior : 0 as * mut sys :: godot_method_bind , set_bounds : 0 as * mut sys :: godot_method_bind , set_cell_space_transform : 0 as * mut sys :: godot_method_bind , set_cell_subdiv : 0 as * mut sys :: godot_method_bind , set_energy : 0 as * mut sys :: godot_method_bind , set_interior : 0 as * mut sys :: godot_method_bind , set_octree : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { BakedLightmapDataMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BakedLightmapData\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_user = (gd_api . godot_method_bind_get_method) (class_name , "add_user\0" . as_ptr () as * const c_char) ; table . clear_data = (gd_api . godot_method_bind_get_method) (class_name , "clear_data\0" . as_ptr () as * const c_char) ; table . clear_users = (gd_api . godot_method_bind_get_method) (class_name , "clear_users\0" . as_ptr () as * const c_char) ; table . get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds\0" . as_ptr () as * const c_char) ; table . get_cell_space_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_space_transform\0" . as_ptr () as * const c_char) ; table . get_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_subdiv\0" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\0" . as_ptr () as * const c_char) ; table . get_octree = (gd_api . godot_method_bind_get_method) (class_name , "get_octree\0" . as_ptr () as * const c_char) ; table . get_user_count = (gd_api . godot_method_bind_get_method) (class_name , "get_user_count\0" . as_ptr () as * const c_char) ; table . get_user_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "get_user_lightmap\0" . as_ptr () as * const c_char) ; table . get_user_path = (gd_api . godot_method_bind_get_method) (class_name , "get_user_path\0" . as_ptr () as * const c_char) ; table . is_interior = (gd_api . godot_method_bind_get_method) (class_name , "is_interior\0" . as_ptr () as * const c_char) ; table . set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "set_bounds\0" . as_ptr () as * const c_char) ; table . set_cell_space_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_space_transform\0" . as_ptr () as * const c_char) ; table . set_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_subdiv\0" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\0" . as_ptr () as * const c_char) ; table . set_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_interior\0" . as_ptr () as * const c_char) ; table . set_octree = (gd_api . godot_method_bind_get_method) (class_name , "set_octree\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:952:16432 [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 = "`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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:958:14782 [INFO] [stdout] | [INFO] [stdout] 958 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 958 | # [doc = "`core class Generic6DOFJoint` inherits `Joint` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_generic6dofjoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Generic6DOFJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGeneric6DOFJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Generic6DOFJoint { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flag (pub i64) ; impl Flag { pub const ENABLE_LINEAR_LIMIT : Flag = Flag (0i64) ; pub const ENABLE_ANGULAR_LIMIT : Flag = Flag (1i64) ; pub const ENABLE_ANGULAR_SPRING : Flag = Flag (2i64) ; pub const ENABLE_LINEAR_SPRING : Flag = Flag (3i64) ; pub const ENABLE_MOTOR : Flag = Flag (4i64) ; pub const ENABLE_LINEAR_MOTOR : Flag = Flag (5i64) ; pub const MAX : Flag = Flag (6i64) ; } impl From < i64 > for Flag { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flag > for i64 { # [inline] fn from (v : Flag) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const LINEAR_LOWER_LIMIT : Param = Param (0i64) ; pub const LINEAR_UPPER_LIMIT : Param = Param (1i64) ; pub const LINEAR_LIMIT_SOFTNESS : Param = Param (2i64) ; pub const LINEAR_RESTITUTION : Param = Param (3i64) ; pub const LINEAR_DAMPING : Param = Param (4i64) ; pub const LINEAR_MOTOR_TARGET_VELOCITY : Param = Param (5i64) ; pub const LINEAR_MOTOR_FORCE_LIMIT : Param = Param (6i64) ; pub const LINEAR_SPRING_STIFFNESS : Param = Param (7i64) ; pub const LINEAR_SPRING_DAMPING : Param = Param (8i64) ; pub const LINEAR_SPRING_EQUILIBRIUM_POINT : Param = Param (9i64) ; pub const ANGULAR_LOWER_LIMIT : Param = Param (10i64) ; pub const ANGULAR_UPPER_LIMIT : Param = Param (11i64) ; pub const ANGULAR_LIMIT_SOFTNESS : Param = Param (12i64) ; pub const ANGULAR_DAMPING : Param = Param (13i64) ; pub const ANGULAR_RESTITUTION : Param = Param (14i64) ; pub const ANGULAR_FORCE_LIMIT : Param = Param (15i64) ; pub const ANGULAR_ERP : Param = Param (16i64) ; pub const ANGULAR_MOTOR_TARGET_VELOCITY : Param = Param (17i64) ; pub const ANGULAR_MOTOR_FORCE_LIMIT : Param = Param (18i64) ; pub const ANGULAR_SPRING_STIFFNESS : Param = Param (19i64) ; pub const ANGULAR_SPRING_DAMPING : Param = Param (20i64) ; pub const ANGULAR_SPRING_EQUILIBRIUM_POINT : Param = Param (21i64) ; pub const MAX : Param = Param (22i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Generic6DOFJoint { pub const FLAG_ENABLE_ANGULAR_LIMIT : i64 = 1i64 ; pub const FLAG_ENABLE_ANGULAR_SPRING : i64 = 2i64 ; pub const FLAG_ENABLE_LINEAR_LIMIT : i64 = 0i64 ; pub const FLAG_ENABLE_LINEAR_MOTOR : i64 = 5i64 ; pub const FLAG_ENABLE_LINEAR_SPRING : i64 = 3i64 ; pub const FLAG_ENABLE_MOTOR : i64 = 4i64 ; pub const FLAG_MAX : i64 = 6i64 ; pub const PARAM_ANGULAR_DAMPING : i64 = 13i64 ; pub const PARAM_ANGULAR_ERP : i64 = 16i64 ; pub const PARAM_ANGULAR_FORCE_LIMIT : i64 = 15i64 ; pub const PARAM_ANGULAR_LIMIT_SOFTNESS : i64 = 12i64 ; pub const PARAM_ANGULAR_LOWER_LIMIT : i64 = 10i64 ; pub const PARAM_ANGULAR_MOTOR_FORCE_LIMIT : i64 = 18i64 ; pub const PARAM_ANGULAR_MOTOR_TARGET_VELOCITY : i64 = 17i64 ; pub const PARAM_ANGULAR_RESTITUTION : i64 = 14i64 ; pub const PARAM_ANGULAR_SPRING_DAMPING : i64 = 20i64 ; pub const PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT : i64 = 21i64 ; pub const PARAM_ANGULAR_SPRING_STIFFNESS : i64 = 19i64 ; pub const PARAM_ANGULAR_UPPER_LIMIT : i64 = 11i64 ; pub const PARAM_LINEAR_DAMPING : i64 = 4i64 ; pub const PARAM_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const PARAM_LINEAR_LOWER_LIMIT : i64 = 0i64 ; pub const PARAM_LINEAR_MOTOR_FORCE_LIMIT : i64 = 6i64 ; pub const PARAM_LINEAR_MOTOR_TARGET_VELOCITY : i64 = 5i64 ; pub const PARAM_LINEAR_RESTITUTION : i64 = 3i64 ; pub const PARAM_LINEAR_SPRING_DAMPING : i64 = 8i64 ; pub const PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT : i64 = 9i64 ; pub const PARAM_LINEAR_SPRING_STIFFNESS : i64 = 7i64 ; pub const PARAM_LINEAR_UPPER_LIMIT : i64 = 1i64 ; pub const PARAM_MAX : i64 = 22i64 ; } impl Generic6DOFJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Generic6DOFJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn flag_x (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_flag_x ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = "If `true`, then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn flag_y (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_flag_y ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = "If `true`, then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn flag_z (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_flag_z ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , flag) ; ret as _ } } # [doc = "The speed that the linear motor will attempt to reach on the X axis."] # [doc = ""] # [inline] pub fn param_x (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_param_x ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "The speed that the linear motor will attempt to reach on the Y axis."] # [doc = ""] # [inline] pub fn param_y (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_param_y ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "The speed that the linear motor will attempt to reach on the Z axis."] # [doc = ""] # [inline] pub fn param_z (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_param_z ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , param) ; ret as _ } } # [doc = "If `true`, then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn set_flag_x (& self , flag : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_flag_x ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , value) ; } } # [doc = "If `true`, then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn set_flag_y (& self , flag : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_flag_y ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , value) ; } } # [doc = "If `true`, then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn set_flag_z (& self , flag : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_flag_z ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , flag , value) ; } } # [doc = "The speed that the linear motor will attempt to reach on the X axis."] # [doc = ""] # [inline] pub fn set_param_x (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_param_x ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [doc = "The speed that the linear motor will attempt to reach on the Y axis."] # [doc = ""] # [inline] pub fn set_param_y (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_param_y ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } # [doc = "The speed that the linear motor will attempt to reach on the Z axis."] # [doc = ""] # [inline] pub fn set_param_z (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_param_z ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , param , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Generic6DOFJoint { } unsafe impl GodotObject for Generic6DOFJoint { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Generic6DOFJoint" } } impl QueueFree for Generic6DOFJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Generic6DOFJoint { type Target = crate :: generated :: joint :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Generic6DOFJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: joint :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: joint :: Joint > for Generic6DOFJoint { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for Generic6DOFJoint { } unsafe impl SubClass < crate :: generated :: node :: Node > for Generic6DOFJoint { } unsafe impl SubClass < crate :: generated :: object :: Object > for Generic6DOFJoint { } impl Instanciable for Generic6DOFJoint { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Generic6DOFJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Generic6DOFJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_flag_x : * mut sys :: godot_method_bind , pub get_flag_y : * mut sys :: godot_method_bind , pub get_flag_z : * mut sys :: godot_method_bind , pub get_param_x : * mut sys :: godot_method_bind , pub get_param_y : * mut sys :: godot_method_bind , pub get_param_z : * mut sys :: godot_method_bind , pub set_flag_x : * mut sys :: godot_method_bind , pub set_flag_y : * mut sys :: godot_method_bind , pub set_flag_z : * mut sys :: godot_method_bind , pub set_param_x : * mut sys :: godot_method_bind , pub set_param_y : * mut sys :: godot_method_bind , pub set_param_z : * mut sys :: godot_method_bind } impl Generic6DOFJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Generic6DOFJointMethodTable = Generic6DOFJointMethodTable { class_constructor : None , get_flag_x : 0 as * mut sys :: godot_method_bind , get_flag_y : 0 as * mut sys :: godot_method_bind , get_flag_z : 0 as * mut sys :: godot_method_bind , get_param_x : 0 as * mut sys :: godot_method_bind , get_param_y : 0 as * mut sys :: godot_method_bind , get_param_z : 0 as * mut sys :: godot_method_bind , set_flag_x : 0 as * mut sys :: godot_method_bind , set_flag_y : 0 as * mut sys :: godot_method_bind , set_flag_z : 0 as * mut sys :: godot_method_bind , set_param_x : 0 as * mut sys :: godot_method_bind , set_param_y : 0 as * mut sys :: godot_method_bind , set_param_z : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Generic6DOFJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Generic6DOFJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_flag_x = (gd_api . godot_method_bind_get_method) (class_name , "get_flag_x\0" . as_ptr () as * const c_char) ; table . get_flag_y = (gd_api . godot_method_bind_get_method) (class_name , "get_flag_y\0" . as_ptr () as * const c_char) ; table . get_flag_z = (gd_api . godot_method_bind_get_method) (class_name , "get_flag_z\0" . as_ptr () as * const c_char) ; table . get_param_x = (gd_api . godot_method_bind_get_method) (class_name , "get_param_x\0" . as_ptr () as * const c_char) ; table . get_param_y = (gd_api . godot_method_bind_get_method) (class_name , "get_param_y\0" . as_ptr () as * const c_char) ; table . get_param_z = (gd_api . godot_method_bind_get_method) (class_name , "get_param_z\0" . as_ptr () as * const c_char) ; table . set_flag_x = (gd_api . godot_method_bind_get_method) (class_name , "set_flag_x\0" . as_ptr () as * const c_char) ; table . set_flag_y = (gd_api . godot_method_bind_get_method) (class_name , "set_flag_y\0" . as_ptr () as * const c_char) ; table . set_flag_z = (gd_api . godot_method_bind_get_method) (class_name , "set_flag_z\0" . as_ptr () as * const c_char) ; table . set_param_x = (gd_api . godot_method_bind_get_method) (class_name , "set_param_x\0" . as_ptr () as * const c_char) ; table . set_param_y = (gd_api . godot_method_bind_get_method) (class_name , "set_param_y\0" . as_ptr () as * const c_char) ; table . set_param_z = (gd_api . godot_method_bind_get_method) (class_name , "set_param_z\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:964:4580 [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 HScrollBar` inherits `ScrollBar` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_hscrollbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`HScrollBar` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHScrollBar inherits methods from:\n - [ScrollBar](struct.ScrollBar.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HScrollBar { this : RawObject < Self > , } impl HScrollBar { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HScrollBarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for HScrollBar { } unsafe impl GodotObject for HScrollBar { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HScrollBar" } } impl QueueFree for HScrollBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HScrollBar { type Target = crate :: generated :: scroll_bar :: ScrollBar ; # [inline] fn deref (& self) -> & crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: scroll_bar :: ScrollBar > for HScrollBar { } unsafe impl SubClass < crate :: generated :: range :: Range > for HScrollBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for HScrollBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for HScrollBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for HScrollBar { } unsafe impl SubClass < crate :: generated :: object :: Object > for HScrollBar { } impl Instanciable for HScrollBar { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { HScrollBar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HScrollBarMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl HScrollBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HScrollBarMethodTable = HScrollBarMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { HScrollBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HScrollBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:970:4372 [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 Mutex` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_mutex.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMutex inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Mutex { this : RawObject < Self > , } impl Mutex { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MutexMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Locks this [Mutex], blocks until it is unlocked by the current owner."] # [doc = ""] # [inline] pub fn lock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MutexMethodTable :: get (get_api ()) . lock ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Tries locking this [Mutex], but does not block. Returns [constant OK] on success, [constant ERR_BUSY] otherwise."] # [doc = ""] # [inline] pub fn try_lock (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MutexMethodTable :: get (get_api ()) . try_lock ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Unlocks this [Mutex], leaving it to other threads."] # [doc = ""] # [inline] pub fn unlock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MutexMethodTable :: get (get_api ()) . unlock ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Mutex { } unsafe impl GodotObject for Mutex { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Mutex" } } impl std :: ops :: Deref for Mutex { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Mutex { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Mutex { } unsafe impl SubClass < crate :: generated :: object :: Object > for Mutex { } impl Instanciable for Mutex { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Mutex :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MutexMethodTable { pub class_constructor : sys :: godot_class_constructor , pub lock : * mut sys :: godot_method_bind , pub try_lock : * mut sys :: godot_method_bind , pub unlock : * mut sys :: godot_method_bind } impl MutexMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MutexMethodTable = MutexMethodTable { class_constructor : None , lock : 0 as * mut sys :: godot_method_bind , try_lock : 0 as * mut sys :: godot_method_bind , unlock : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MutexMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Mutex\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . lock = (gd_api . godot_method_bind_get_method) (class_name , "lock\0" . as_ptr () as * const c_char) ; table . try_lock = (gd_api . godot_method_bind_get_method) (class_name , "try_lock\0" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:976:9052 [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 StreamPeerSSL` inherits `StreamPeer` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_streampeerssl.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamPeerSSL inherits methods from:\n - [StreamPeer](struct.StreamPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamPeerSSL { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Status (pub i64) ; impl Status { pub const DISCONNECTED : Status = Status (0i64) ; pub const HANDSHAKING : Status = Status (1i64) ; pub const CONNECTED : Status = Status (2i64) ; pub const ERROR : Status = Status (3i64) ; pub const ERROR_HOSTNAME_MISMATCH : Status = Status (4i64) ; } impl From < i64 > for Status { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Status > for i64 { # [inline] fn from (v : Status) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl StreamPeerSSL { pub const STATUS_CONNECTED : i64 = 2i64 ; pub const STATUS_DISCONNECTED : i64 = 0i64 ; pub const STATUS_ERROR : i64 = 3i64 ; pub const STATUS_ERROR_HOSTNAME_MISMATCH : i64 = 4i64 ; pub const STATUS_HANDSHAKING : i64 = 1i64 ; } impl StreamPeerSSL { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StreamPeerSSLMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Accepts a peer connection as a server using the given `private_key` and providing the given `certificate` to the client. You can pass the optional `chain` parameter to provide additional CA chain information along with the certificate.\n# Default Arguments\n* `chain` - `null`"] # [doc = ""] # [inline] pub fn accept_stream (& self , stream : impl AsArg < crate :: generated :: stream_peer :: StreamPeer > , private_key : impl AsArg < crate :: generated :: crypto_key :: CryptoKey > , certificate : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate > , chain : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . accept_stream ; let ret = crate :: icalls :: icallptr_i64_obj_obj_obj_obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr () , private_key . as_arg_ptr () , certificate . as_arg_ptr () , chain . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Connects to a peer using an underlying [StreamPeer] `stream`. If `validate_certs` is `true`, [StreamPeerSSL] will validate that the certificate presented by the peer matches the `for_hostname`.\n**Note:** Specifying a custom `valid_certificate` is not supported in HTML5 exports due to browsers restrictions.\n# Default Arguments\n* `validate_certs` - `false`\n* `for_hostname` - `\"\"`\n* `valid_certificate` - `null`"] # [doc = ""] # [inline] pub fn connect_to_stream (& self , stream : impl AsArg < crate :: generated :: stream_peer :: StreamPeer > , validate_certs : bool , for_hostname : impl Into < GodotString > , valid_certificate : impl AsArg < crate :: generated :: x509_certificate :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . connect_to_stream ; let ret = crate :: icalls :: icallptr_i64_obj_bool_str_obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr () , validate_certs , for_hostname . into () , valid_certificate . as_arg_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Disconnects from host."] # [doc = ""] # [inline] pub fn disconnect_from_stream (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . disconnect_from_stream ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the status of the connection. See [enum Status] for values."] # [doc = ""] # [inline] pub fn get_status (& self) -> crate :: generated :: stream_peer_ssl :: Status { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . get_status ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: stream_peer_ssl :: Status (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_blocking_handshake_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . is_blocking_handshake_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Poll the connection to check for incoming bytes. Call this right before [method StreamPeer.get_available_bytes] for it to work properly."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_blocking_handshake_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . set_blocking_handshake_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerSSL { } unsafe impl GodotObject for StreamPeerSSL { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerSSL" } } impl std :: ops :: Deref for StreamPeerSSL { type Target = crate :: generated :: stream_peer :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerSSL { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: stream_peer :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: stream_peer :: StreamPeer > for StreamPeerSSL { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for StreamPeerSSL { } unsafe impl SubClass < crate :: generated :: object :: Object > for StreamPeerSSL { } impl Instanciable for StreamPeerSSL { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { StreamPeerSSL :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamPeerSSLMethodTable { pub class_constructor : sys :: godot_class_constructor , pub accept_stream : * mut sys :: godot_method_bind , pub connect_to_stream : * mut sys :: godot_method_bind , pub disconnect_from_stream : * mut sys :: godot_method_bind , pub get_status : * mut sys :: godot_method_bind , pub is_blocking_handshake_enabled : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub set_blocking_handshake_enabled : * mut sys :: godot_method_bind } impl StreamPeerSSLMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamPeerSSLMethodTable = StreamPeerSSLMethodTable { class_constructor : None , accept_stream : 0 as * mut sys :: godot_method_bind , connect_to_stream : 0 as * mut sys :: godot_method_bind , disconnect_from_stream : 0 as * mut sys :: godot_method_bind , get_status : 0 as * mut sys :: godot_method_bind , is_blocking_handshake_enabled : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , set_blocking_handshake_enabled : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { StreamPeerSSLMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamPeerSSL\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . accept_stream = (gd_api . godot_method_bind_get_method) (class_name , "accept_stream\0" . as_ptr () as * const c_char) ; table . connect_to_stream = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_stream\0" . as_ptr () as * const c_char) ; table . disconnect_from_stream = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_stream\0" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\0" . as_ptr () as * const c_char) ; table . is_blocking_handshake_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_blocking_handshake_enabled\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_blocking_handshake_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_blocking_handshake_enabled\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:982: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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:988:6738 [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 MeshTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_meshtexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMeshTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MeshTexture { this : RawObject < Self > , } impl MeshTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MeshTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets the base texture that the Mesh will use to draw."] # [doc = ""] # [inline] pub fn base_texture (& self) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . get_base_texture ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Sets the size of the image, needed for reference."] # [doc = ""] # [inline] pub fn image_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . get_image_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Sets the mesh used to draw. It must be a mesh using 2D vertices."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Sets the base texture that the Mesh will use to draw."] # [doc = ""] # [inline] pub fn set_base_texture (& self , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . set_base_texture ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Sets the size of the image, needed for reference."] # [doc = ""] # [inline] pub fn set_image_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . set_image_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the mesh used to draw. It must be a mesh using 2D vertices."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshTexture { } unsafe impl GodotObject for MeshTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MeshTexture" } } impl std :: ops :: Deref for MeshTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for MeshTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for MeshTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MeshTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for MeshTexture { } impl Instanciable for MeshTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MeshTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base_texture : * mut sys :: godot_method_bind , pub get_image_size : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub set_base_texture : * mut sys :: godot_method_bind , pub set_image_size : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind } impl MeshTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshTextureMethodTable = MeshTextureMethodTable { class_constructor : None , get_base_texture : 0 as * mut sys :: godot_method_bind , get_image_size : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , set_base_texture : 0 as * mut sys :: godot_method_bind , set_image_size : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MeshTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MeshTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_base_texture\0" . as_ptr () as * const c_char) ; table . get_image_size = (gd_api . godot_method_bind_get_method) (class_name , "get_image_size\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . set_base_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_base_texture\0" . as_ptr () as * const c_char) ; table . set_image_size = (gd_api . godot_method_bind_get_method) (class_name , "set_image_size\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:994:4680 [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 AnimationNodeAdd3` inherits `AnimationNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeadd3.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeAdd3 inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeAdd3 { this : RawObject < Self > , } impl AnimationNodeAdd3 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeAdd3MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAdd3MethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, sets the `optimization` to `false` when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAdd3MethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeAdd3 { } unsafe impl GodotObject for AnimationNodeAdd3 { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeAdd3" } } impl std :: ops :: Deref for AnimationNodeAdd3 { type Target = crate :: generated :: animation_node :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeAdd3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_node :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeAdd3 { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeAdd3 { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeAdd3 { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeAdd3 { } impl Instanciable for AnimationNodeAdd3 { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeAdd3 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeAdd3MethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_sync : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeAdd3MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeAdd3MethodTable = AnimationNodeAdd3MethodTable { class_constructor : None , is_using_sync : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeAdd3MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeAdd3\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_using_sync = (gd_api . godot_method_bind_get_method) (class_name , "is_using_sync\0" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1000:9934 [INFO] [stdout] | [INFO] [stdout] 1000 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1000 | # [doc = "`core class NativeScript` inherits `Script` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_nativescript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNativeScript inherits methods from:\n - [Script](struct.Script.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NativeScript { this : RawObject < Self > , } impl NativeScript { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NativeScriptMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_class_documentation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_class_documentation ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn class_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_class_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn library (& self) -> Option < Ref < crate :: generated :: gdnative_library :: GDNativeLibrary , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_library ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: gdnative_library :: GDNativeLibrary , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_method_documentation (& self , method : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_method_documentation ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , method . into ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_property_documentation (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_property_documentation ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn script_class_icon_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_script_class_icon_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn script_class_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_script_class_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_signal_documentation (& self , signal_name : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_signal_documentation ; let ret = crate :: icalls :: icallptr_str_str (method_bind , self . this . sys () . as_ptr () , signal_name . into ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn _new (& self , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . _new ; let ret = crate :: icalls :: icallvarargs_ (method_bind , self . this . sys () . as_ptr () , varargs) ; ret } } # [doc = ""] # [doc = ""] # [inline] pub fn set_class_name (& self , class_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . set_class_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , class_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_library (& self , library : impl AsArg < crate :: generated :: gdnative_library :: GDNativeLibrary >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . set_library ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , library . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_script_class_icon_path (& self , icon_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . set_script_class_icon_path ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , icon_path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_script_class_name (& self , class_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . set_script_class_name ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , class_name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NativeScript { } unsafe impl GodotObject for NativeScript { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NativeScript" } } impl std :: ops :: Deref for NativeScript { type Target = crate :: generated :: script :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NativeScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: script :: Script > for NativeScript { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for NativeScript { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for NativeScript { } unsafe impl SubClass < crate :: generated :: object :: Object > for NativeScript { } impl Instanciable for NativeScript { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { NativeScript :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NativeScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_class_documentation : * mut sys :: godot_method_bind , pub get_class_name : * mut sys :: godot_method_bind , pub get_library : * mut sys :: godot_method_bind , pub get_method_documentation : * mut sys :: godot_method_bind , pub get_property_documentation : * mut sys :: godot_method_bind , pub get_script_class_icon_path : * mut sys :: godot_method_bind , pub get_script_class_name : * mut sys :: godot_method_bind , pub get_signal_documentation : * mut sys :: godot_method_bind , pub _new : * mut sys :: godot_method_bind , pub set_class_name : * mut sys :: godot_method_bind , pub set_library : * mut sys :: godot_method_bind , pub set_script_class_icon_path : * mut sys :: godot_method_bind , pub set_script_class_name : * mut sys :: godot_method_bind } impl NativeScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NativeScriptMethodTable = NativeScriptMethodTable { class_constructor : None , get_class_documentation : 0 as * mut sys :: godot_method_bind , get_class_name : 0 as * mut sys :: godot_method_bind , get_library : 0 as * mut sys :: godot_method_bind , get_method_documentation : 0 as * mut sys :: godot_method_bind , get_property_documentation : 0 as * mut sys :: godot_method_bind , get_script_class_icon_path : 0 as * mut sys :: godot_method_bind , get_script_class_name : 0 as * mut sys :: godot_method_bind , get_signal_documentation : 0 as * mut sys :: godot_method_bind , _new : 0 as * mut sys :: godot_method_bind , set_class_name : 0 as * mut sys :: godot_method_bind , set_library : 0 as * mut sys :: godot_method_bind , set_script_class_icon_path : 0 as * mut sys :: godot_method_bind , set_script_class_name : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { NativeScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NativeScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_class_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_class_documentation\0" . as_ptr () as * const c_char) ; table . get_class_name = (gd_api . godot_method_bind_get_method) (class_name , "get_class_name\0" . as_ptr () as * const c_char) ; table . get_library = (gd_api . godot_method_bind_get_method) (class_name , "get_library\0" . as_ptr () as * const c_char) ; table . get_method_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_method_documentation\0" . as_ptr () as * const c_char) ; table . get_property_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_property_documentation\0" . as_ptr () as * const c_char) ; table . get_script_class_icon_path = (gd_api . godot_method_bind_get_method) (class_name , "get_script_class_icon_path\0" . as_ptr () as * const c_char) ; table . get_script_class_name = (gd_api . godot_method_bind_get_method) (class_name , "get_script_class_name\0" . as_ptr () as * const c_char) ; table . get_signal_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_signal_documentation\0" . as_ptr () as * const c_char) ; table . _new = (gd_api . godot_method_bind_get_method) (class_name , "new\0" . as_ptr () as * const c_char) ; table . set_class_name = (gd_api . godot_method_bind_get_method) (class_name , "set_class_name\0" . as_ptr () as * const c_char) ; table . set_library = (gd_api . godot_method_bind_get_method) (class_name , "set_library\0" . as_ptr () as * const c_char) ; table . set_script_class_icon_path = (gd_api . godot_method_bind_get_method) (class_name , "set_script_class_icon_path\0" . as_ptr () as * const c_char) ; table . set_script_class_name = (gd_api . godot_method_bind_get_method) (class_name , "set_script_class_name\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1006:10661 [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 = "`tools class EditorFileSystemDirectory` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_editorfilesystemdirectory.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorFileSystemDirectory inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorFileSystemDirectory { this : RawObject < Self > , } impl EditorFileSystemDirectory { # [doc = "Returns the index of the directory with name `name` or `-1` if not found."] # [doc = ""] # [inline] pub fn find_dir_index (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . find_dir_index ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the index of the file with name `name` or `-1` if not found."] # [doc = ""] # [inline] pub fn find_file_index (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . find_file_index ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the name of the file at index `idx`."] # [doc = ""] # [inline] pub fn get_file (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the number of files in this directory."] # [doc = ""] # [inline] pub fn get_file_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the file at index `idx` imported properly."] # [doc = ""] # [inline] pub fn get_file_import_is_valid (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_import_is_valid ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns the path to the file at index `idx`."] # [doc = ""] # [inline] pub fn get_file_path (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_path ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the base class of the script class defined in the file at index `idx`. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string."] # [doc = ""] # [inline] pub fn get_file_script_class_extends (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_script_class_extends ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of the script class defined in the file at index `idx`. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string."] # [doc = ""] # [inline] pub fn get_file_script_class_name (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_script_class_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the file extension of the file at index `idx`."] # [doc = ""] # [inline] pub fn get_file_type (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_type ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the name of this directory."] # [doc = ""] # [inline] pub fn get_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the parent directory for this directory or `null` if called on a directory at `res://` or `user://`."] # [doc = ""] # [inline] pub fn get_parent (& self) -> Option < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_parent ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the path to this directory."] # [doc = ""] # [inline] pub fn get_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Returns the subdirectory at index `idx`."] # [doc = ""] # [inline] pub fn get_subdir (& self , idx : i64) -> Option < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_subdir ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: editor_file_system_directory :: EditorFileSystemDirectory , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of subdirectories in this directory."] # [doc = ""] # [inline] pub fn get_subdir_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_subdir_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFileSystemDirectory { } unsafe impl GodotObject for EditorFileSystemDirectory { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorFileSystemDirectory" } } impl std :: ops :: Deref for EditorFileSystemDirectory { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFileSystemDirectory { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for EditorFileSystemDirectory { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorFileSystemDirectoryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub find_dir_index : * mut sys :: godot_method_bind , pub find_file_index : * mut sys :: godot_method_bind , pub get_file : * mut sys :: godot_method_bind , pub get_file_count : * mut sys :: godot_method_bind , pub get_file_import_is_valid : * mut sys :: godot_method_bind , pub get_file_path : * mut sys :: godot_method_bind , pub get_file_script_class_extends : * mut sys :: godot_method_bind , pub get_file_script_class_name : * mut sys :: godot_method_bind , pub get_file_type : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_parent : * mut sys :: godot_method_bind , pub get_path : * mut sys :: godot_method_bind , pub get_subdir : * mut sys :: godot_method_bind , pub get_subdir_count : * mut sys :: godot_method_bind } impl EditorFileSystemDirectoryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorFileSystemDirectoryMethodTable = EditorFileSystemDirectoryMethodTable { class_constructor : None , find_dir_index : 0 as * mut sys :: godot_method_bind , find_file_index : 0 as * mut sys :: godot_method_bind , get_file : 0 as * mut sys :: godot_method_bind , get_file_count : 0 as * mut sys :: godot_method_bind , get_file_import_is_valid : 0 as * mut sys :: godot_method_bind , get_file_path : 0 as * mut sys :: godot_method_bind , get_file_script_class_extends : 0 as * mut sys :: godot_method_bind , get_file_script_class_name : 0 as * mut sys :: godot_method_bind , get_file_type : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_parent : 0 as * mut sys :: godot_method_bind , get_path : 0 as * mut sys :: godot_method_bind , get_subdir : 0 as * mut sys :: godot_method_bind , get_subdir_count : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { EditorFileSystemDirectoryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorFileSystemDirectory\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . find_dir_index = (gd_api . godot_method_bind_get_method) (class_name , "find_dir_index\0" . as_ptr () as * const c_char) ; table . find_file_index = (gd_api . godot_method_bind_get_method) (class_name , "find_file_index\0" . as_ptr () as * const c_char) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\0" . as_ptr () as * const c_char) ; table . get_file_count = (gd_api . godot_method_bind_get_method) (class_name , "get_file_count\0" . as_ptr () as * const c_char) ; table . get_file_import_is_valid = (gd_api . godot_method_bind_get_method) (class_name , "get_file_import_is_valid\0" . as_ptr () as * const c_char) ; table . get_file_path = (gd_api . godot_method_bind_get_method) (class_name , "get_file_path\0" . as_ptr () as * const c_char) ; table . get_file_script_class_extends = (gd_api . godot_method_bind_get_method) (class_name , "get_file_script_class_extends\0" . as_ptr () as * const c_char) ; table . get_file_script_class_name = (gd_api . godot_method_bind_get_method) (class_name , "get_file_script_class_name\0" . as_ptr () as * const c_char) ; table . get_file_type = (gd_api . godot_method_bind_get_method) (class_name , "get_file_type\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_parent\0" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\0" . as_ptr () as * const c_char) ; table . get_subdir = (gd_api . godot_method_bind_get_method) (class_name , "get_subdir\0" . as_ptr () as * const c_char) ; table . get_subdir_count = (gd_api . godot_method_bind_get_method) (class_name , "get_subdir_count\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1012:40845 [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 Image` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_image.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nImage inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Image { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AlphaMode (pub i64) ; impl AlphaMode { pub const NONE : AlphaMode = AlphaMode (0i64) ; pub const BIT : AlphaMode = AlphaMode (1i64) ; pub const BLEND : AlphaMode = AlphaMode (2i64) ; } impl From < i64 > for AlphaMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AlphaMode > for i64 { # [inline] fn from (v : AlphaMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CompressMode (pub i64) ; impl CompressMode { pub const S3TC : CompressMode = CompressMode (0i64) ; pub const PVRTC2 : CompressMode = CompressMode (1i64) ; pub const PVRTC4 : CompressMode = CompressMode (2i64) ; pub const ETC : CompressMode = CompressMode (3i64) ; pub const ETC2 : CompressMode = CompressMode (4i64) ; } impl From < i64 > for CompressMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CompressMode > for i64 { # [inline] fn from (v : CompressMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CompressSource (pub i64) ; impl CompressSource { pub const GENERIC : CompressSource = CompressSource (0i64) ; pub const SRGB : CompressSource = CompressSource (1i64) ; pub const NORMAL : CompressSource = CompressSource (2i64) ; } impl From < i64 > for CompressSource { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CompressSource > for i64 { # [inline] fn from (v : CompressSource) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Format (pub i64) ; impl Format { pub const L8 : Format = Format (0i64) ; pub const LA8 : Format = Format (1i64) ; pub const R8 : Format = Format (2i64) ; pub const RG8 : Format = Format (3i64) ; pub const RGB8 : Format = Format (4i64) ; pub const RGBA8 : Format = Format (5i64) ; pub const RGBA4444 : Format = Format (6i64) ; pub const RGBA5551 : Format = Format (7i64) ; pub const RF : Format = Format (8i64) ; pub const RGF : Format = Format (9i64) ; pub const RGBF : Format = Format (10i64) ; pub const RGBAF : Format = Format (11i64) ; pub const RH : Format = Format (12i64) ; pub const RGH : Format = Format (13i64) ; pub const RGBH : Format = Format (14i64) ; pub const RGBAH : Format = Format (15i64) ; pub const RGBE9995 : Format = Format (16i64) ; pub const DXT1 : Format = Format (17i64) ; pub const DXT3 : Format = Format (18i64) ; pub const DXT5 : Format = Format (19i64) ; pub const RGTC_R : Format = Format (20i64) ; pub const RGTC_RG : Format = Format (21i64) ; pub const BPTC_RGBA : Format = Format (22i64) ; pub const BPTC_RGBF : Format = Format (23i64) ; pub const BPTC_RGBFU : Format = Format (24i64) ; pub const PVRTC2 : Format = Format (25i64) ; pub const PVRTC2A : Format = Format (26i64) ; pub const PVRTC4 : Format = Format (27i64) ; pub const PVRTC4A : Format = Format (28i64) ; pub const ETC : Format = Format (29i64) ; pub const ETC2_R11 : Format = Format (30i64) ; pub const ETC2_R11S : Format = Format (31i64) ; pub const ETC2_RG11 : Format = Format (32i64) ; pub const ETC2_RG11S : Format = Format (33i64) ; pub const ETC2_RGB8 : Format = Format (34i64) ; pub const ETC2_RGBA8 : Format = Format (35i64) ; pub const ETC2_RGB8A1 : Format = Format (36i64) ; pub const MAX : Format = Format (37i64) ; } impl From < i64 > for Format { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Format > for i64 { # [inline] fn from (v : Format) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Interpolation (pub i64) ; impl Interpolation { pub const NEAREST : Interpolation = Interpolation (0i64) ; pub const BILINEAR : Interpolation = Interpolation (1i64) ; pub const CUBIC : Interpolation = Interpolation (2i64) ; pub const TRILINEAR : Interpolation = Interpolation (3i64) ; pub const LANCZOS : Interpolation = Interpolation (4i64) ; } impl From < i64 > for Interpolation { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Interpolation > for i64 { # [inline] fn from (v : Interpolation) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Image { pub const ALPHA_BIT : i64 = 1i64 ; pub const ALPHA_BLEND : i64 = 2i64 ; pub const ALPHA_NONE : i64 = 0i64 ; pub const COMPRESS_ETC : i64 = 3i64 ; pub const COMPRESS_ETC2 : i64 = 4i64 ; pub const COMPRESS_PVRTC2 : i64 = 1i64 ; pub const COMPRESS_PVRTC4 : i64 = 2i64 ; pub const COMPRESS_S3TC : i64 = 0i64 ; pub const COMPRESS_SOURCE_GENERIC : i64 = 0i64 ; pub const COMPRESS_SOURCE_NORMAL : i64 = 2i64 ; pub const COMPRESS_SOURCE_SRGB : i64 = 1i64 ; pub const FORMAT_BPTC_RGBA : i64 = 22i64 ; pub const FORMAT_BPTC_RGBF : i64 = 23i64 ; pub const FORMAT_BPTC_RGBFU : i64 = 24i64 ; pub const FORMAT_DXT1 : i64 = 17i64 ; pub const FORMAT_DXT3 : i64 = 18i64 ; pub const FORMAT_DXT5 : i64 = 19i64 ; pub const FORMAT_ETC : i64 = 29i64 ; pub const FORMAT_ETC2_R11 : i64 = 30i64 ; pub const FORMAT_ETC2_R11S : i64 = 31i64 ; pub const FORMAT_ETC2_RG11 : i64 = 32i64 ; pub const FORMAT_ETC2_RG11S : i64 = 33i64 ; pub const FORMAT_ETC2_RGB8 : i64 = 34i64 ; pub const FORMAT_ETC2_RGB8A1 : i64 = 36i64 ; pub const FORMAT_ETC2_RGBA8 : i64 = 35i64 ; pub const FORMAT_L8 : i64 = 0i64 ; pub const FORMAT_LA8 : i64 = 1i64 ; pub const FORMAT_MAX : i64 = 37i64 ; pub const FORMAT_PVRTC2 : i64 = 25i64 ; pub const FORMAT_PVRTC2A : i64 = 26i64 ; pub const FORMAT_PVRTC4 : i64 = 27i64 ; pub const FORMAT_PVRTC4A : i64 = 28i64 ; pub const FORMAT_R8 : i64 = 2i64 ; pub const FORMAT_RF : i64 = 8i64 ; pub const FORMAT_RG8 : i64 = 3i64 ; pub const FORMAT_RGB8 : i64 = 4i64 ; pub const FORMAT_RGBA4444 : i64 = 6i64 ; pub const FORMAT_RGBA5551 : i64 = 7i64 ; pub const FORMAT_RGBA8 : i64 = 5i64 ; pub const FORMAT_RGBAF : i64 = 11i64 ; pub const FORMAT_RGBAH : i64 = 15i64 ; pub const FORMAT_RGBE9995 : i64 = 16i64 ; pub const FORMAT_RGBF : i64 = 10i64 ; pub const FORMAT_RGBH : i64 = 14i64 ; pub const FORMAT_RGF : i64 = 9i64 ; pub const FORMAT_RGH : i64 = 13i64 ; pub const FORMAT_RGTC_R : i64 = 20i64 ; pub const FORMAT_RGTC_RG : i64 = 21i64 ; pub const FORMAT_RH : i64 = 12i64 ; pub const INTERPOLATE_BILINEAR : i64 = 1i64 ; pub const INTERPOLATE_CUBIC : i64 = 2i64 ; pub const INTERPOLATE_LANCZOS : i64 = 4i64 ; pub const INTERPOLATE_NEAREST : i64 = 0i64 ; pub const INTERPOLATE_TRILINEAR : i64 = 3i64 ; pub const MAX_HEIGHT : i64 = 16384i64 ; pub const MAX_WIDTH : i64 = 16384i64 ; } impl Image { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ImageMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Alpha-blends `src_rect` from `src` image to this image at coordinates `dest`."] # [doc = ""] # [inline] pub fn blend_rect (& self , src : impl AsArg < crate :: generated :: image :: Image > , src_rect : Rect2 , dst : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . blend_rect ; let ret = crate :: icalls :: icallptr_void_obj_rect2_vec2 (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr () , src_rect , dst) ; } } # [doc = "Alpha-blends `src_rect` from `src` image to this image using `mask` image at coordinates `dst`. Alpha channels are required for both `src` and `mask`. `dst` pixels and `src` pixels will blend if the corresponding mask pixel's alpha value is not 0. `src` image and `mask` image **must** have the same size (width and height) but they can have different formats."] # [doc = ""] # [inline] pub fn blend_rect_mask (& self , src : impl AsArg < crate :: generated :: image :: Image > , mask : impl AsArg < crate :: generated :: image :: Image > , src_rect : Rect2 , dst : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . blend_rect_mask ; let ret = crate :: icalls :: icallptr_void_obj_obj_rect2_vec2 (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr () , mask . as_arg_ptr () , src_rect , dst) ; } } # [doc = "Copies `src_rect` from `src` image to this image at coordinates `dst`."] # [doc = ""] # [inline] pub fn blit_rect (& self , src : impl AsArg < crate :: generated :: image :: Image > , src_rect : Rect2 , dst : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . blit_rect ; let ret = crate :: icalls :: icallptr_void_obj_rect2_vec2 (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr () , src_rect , dst) ; } } # [doc = "Blits `src_rect` area from `src` image to this image at the coordinates given by `dst`. `src` pixel is copied onto `dst` if the corresponding `mask` pixel's alpha value is not 0. `src` image and `mask` image **must** have the same size (width and height) but they can have different formats."] # [doc = ""] # [inline] pub fn blit_rect_mask (& self , src : impl AsArg < crate :: generated :: image :: Image > , mask : impl AsArg < crate :: generated :: image :: Image > , src_rect : Rect2 , dst : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . blit_rect_mask ; let ret = crate :: icalls :: icallptr_void_obj_obj_rect2_vec2 (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr () , mask . as_arg_ptr () , src_rect , dst) ; } } # [doc = "Converts a bumpmap to a normalmap. A bumpmap provides a height offset per-pixel, while a normalmap provides a normal direction per pixel.\n# Default Arguments\n* `bump_scale` - `1.0`"] # [doc = ""] # [inline] pub fn bumpmap_to_normalmap (& self , bump_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . bumpmap_to_normalmap ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , bump_scale) ; } } # [doc = "Removes the image's mipmaps."] # [doc = ""] # [inline] pub fn clear_mipmaps (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . clear_mipmaps ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants."] # [doc = ""] # [inline] pub fn compress (& self , mode : i64 , source : i64 , lossy_quality : f64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . compress ; let ret = crate :: icalls :: icallptr_i64_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , mode , source , lossy_quality) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Converts the image's format. See [enum Format] constants."] # [doc = ""] # [inline] pub fn convert (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . convert ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [doc = "Copies `src` image to this image."] # [doc = ""] # [inline] pub fn copy_from (& self , src : impl AsArg < crate :: generated :: image :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . copy_from ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr ()) ; } } # [doc = "Creates an empty image of given size and format. See [enum Format] constants. If `use_mipmaps` is `true` then generate mipmaps for this image. See the [method generate_mipmaps]."] # [doc = ""] # [inline] pub fn create (& self , width : i64 , height : i64 , use_mipmaps : bool , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallptr_void_i64_i64_bool_i64 (method_bind , self . this . sys () . as_ptr () , width , height , use_mipmaps , format) ; } } # [doc = "Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If `use_mipmaps` is `true` then loads mipmaps for this image from `data`. See [method generate_mipmaps]."] # [doc = ""] # [inline] pub fn create_from_data (& self , width : i64 , height : i64 , use_mipmaps : bool , format : i64 , data : ByteArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . create_from_data ; let ret = crate :: icalls :: icallptr_void_i64_i64_bool_i64_bytearr (method_bind , self . this . sys () . as_ptr () , width , height , use_mipmaps , format , data) ; } } # [doc = "Crops the image to the given `width` and `height`. If the specified size is larger than the current size, the extra area is filled with black pixels."] # [doc = ""] # [inline] pub fn crop (& self , width : i64 , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . crop ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , width , height) ; } } # [doc = "Decompresses the image if it is compressed. Returns an error if decompress function is not available."] # [doc = ""] # [inline] pub fn decompress (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . decompress ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found."] # [doc = ""] # [inline] pub fn detect_alpha (& self) -> crate :: generated :: image :: AlphaMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . detect_alpha ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image :: AlphaMode (ret) } } # [doc = "Stretches the image and enlarges it by a factor of 2. No interpolation is done."] # [doc = ""] # [inline] pub fn expand_x2_hq2x (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . expand_x2_hq2x ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Fills the image with a given [Color]."] # [doc = ""] # [inline] pub fn fill (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . fill ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Blends low-alpha pixels with nearby pixels."] # [doc = ""] # [inline] pub fn fix_alpha_edges (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . fix_alpha_edges ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Flips the image horizontally."] # [doc = ""] # [inline] pub fn flip_x (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . flip_x ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Flips the image vertically."] # [doc = ""] # [inline] pub fn flip_y (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . flip_y ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Generates mipmaps for the image. Mipmaps are pre-calculated and lower resolution copies of the image. Mipmaps are automatically used if the image needs to be scaled down when rendered. This improves image quality and the performance of the rendering. Returns an error if the image is compressed, in a custom format or if the image's width/height is 0.\n# Default Arguments\n* `renormalize` - `false`"] # [doc = ""] # [inline] pub fn generate_mipmaps (& self , renormalize : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . generate_mipmaps ; let ret = crate :: icalls :: icallptr_i64_bool (method_bind , self . this . sys () . as_ptr () , renormalize) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Returns a copy of the image's raw data."] # [doc = ""] # [inline] pub fn get_data (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "Returns the image's format. See [enum Format] constants."] # [doc = ""] # [inline] pub fn get_format (& self) -> crate :: generated :: image :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: image :: Format (ret) } } # [doc = "Returns the image's height."] # [doc = ""] # [inline] pub fn get_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the offset where the image's mipmap with index `mipmap` is stored in the `data` dictionary."] # [doc = ""] # [inline] pub fn get_mipmap_offset (& self , mipmap : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_mipmap_offset ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , mipmap) ; ret as _ } } # [doc = "Returns the color of the pixel at `(x, y)` if the image is locked. If the image is unlocked, it always returns a [Color] with the value `(0, 0, 0, 1.0)`. This is the same as [method get_pixelv], but two integer arguments instead of a Vector2 argument."] # [doc = ""] # [inline] pub fn get_pixel (& self , x : i64 , y : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_pixel ; let ret = crate :: icalls :: icallptr_color_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y) ; mem :: transmute (ret) } } # [doc = "Returns the color of the pixel at `src` if the image is locked. If the image is unlocked, it always returns a [Color] with the value `(0, 0, 0, 1.0)`. This is the same as [method get_pixel], but with a Vector2 argument instead of two integer arguments."] # [doc = ""] # [inline] pub fn get_pixelv (& self , src : Vector2) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_pixelv ; let ret = crate :: icalls :: icallptr_color_vec2 (method_bind , self . this . sys () . as_ptr () , src) ; mem :: transmute (ret) } } # [doc = "Returns a new image that is a copy of the image's area specified with `rect`."] # [doc = ""] # [inline] pub fn get_rect (& self , rect : Rect2) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_rect ; let ret = crate :: icalls :: icallptr_obj_rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the image's size (width and height)."] # [doc = ""] # [inline] pub fn get_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns a [Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible."] # [doc = ""] # [inline] pub fn get_used_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_used_rect ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the image's width."] # [doc = ""] # [inline] pub fn get_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the image has generated mipmaps."] # [doc = ""] # [inline] pub fn has_mipmaps (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . has_mipmaps ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the image is compressed."] # [doc = ""] # [inline] pub fn is_compressed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . is_compressed ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the image has no data."] # [doc = ""] # [inline] pub fn is_empty (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . is_empty ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if all the image's pixels have an alpha value of 0. Returns `false` if any pixel has an alpha value higher than 0."] # [doc = ""] # [inline] pub fn is_invisible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . is_invisible ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Loads an image from file `path`. See [url=https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn load_bmp_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_bmp_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads an image from the binary contents of a JPEG file."] # [doc = ""] # [inline] pub fn load_jpg_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_jpg_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads an image from the binary contents of a PNG file."] # [doc = ""] # [inline] pub fn load_png_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_png_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads an image from the binary contents of a TGA file."] # [doc = ""] # [inline] pub fn load_tga_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_tga_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Loads an image from the binary contents of a WebP file."] # [doc = ""] # [inline] pub fn load_webp_from_buffer (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_webp_from_buffer ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Locks the data for reading and writing access. Sends an error to the console if the image is not locked when reading or writing a pixel."] # [doc = ""] # [inline] pub fn lock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . lock ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normalmap. A normalmap can add lots of detail to a 3D surface without increasing the polygon count."] # [doc = ""] # [inline] pub fn normalmap_to_xy (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . normalmap_to_xy ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Multiplies color values with alpha values. Resulting color values for a pixel are `(color * alpha)/256`."] # [doc = ""] # [inline] pub fn premultiply_alpha (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . premultiply_alpha ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Resizes the image to the given `width` and `height`. New pixels are calculated using `interpolation`. See `interpolation` constants.\n# Default Arguments\n* `interpolation` - `1`"] # [doc = ""] # [inline] pub fn resize (& self , width : i64 , height : i64 , interpolation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . resize ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width , height , interpolation) ; } } # [doc = "Resizes the image to the nearest power of 2 for the width and height. If `square` is `true` then set width and height to be the same.\n# Default Arguments\n* `square` - `false`"] # [doc = ""] # [inline] pub fn resize_to_po2 (& self , square : bool , interpolation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . resize_to_po2 ; let ret = crate :: icalls :: icallptr_void_bool_i64 (method_bind , self . this . sys () . as_ptr () , square , interpolation) ; } } # [doc = "Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image."] # [doc = ""] # [inline] pub fn rgbe_to_srgb (& self) -> Option < Ref < crate :: generated :: image :: Image , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . rgbe_to_srgb ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: image :: Image , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Saves the image as an EXR file to `path`. If `grayscale` is `true` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module.\n# Default Arguments\n* `grayscale` - `false`"] # [doc = ""] # [inline] pub fn save_exr (& self , path : impl Into < GodotString > , grayscale : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . save_exr ; let ret = crate :: icalls :: icallptr_i64_str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , grayscale) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves the image as a PNG file to `path`."] # [doc = ""] # [inline] pub fn save_png (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . save_png ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn save_png_to_buffer (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . save_png_to_buffer ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the [Color] of the pixel at `(x, y)` if the image is locked. Example:\n```gdscript\nvar img = Image.new()\nimg.create(img_width, img_height, false, Image.FORMAT_RGBA8)\nimg.lock()\nimg.set_pixel(x, y, color) # Works\nimg.unlock()\nimg.set_pixel(x, y, color) # Does not have an effect\n```"] # [doc = ""] # [inline] pub fn set_pixel (& self , x : i64 , y : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . set_pixel ; let ret = crate :: icalls :: icallptr_void_i64_i64_color (method_bind , self . this . sys () . as_ptr () , x , y , color) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the [Color] of the pixel at `(dst.x, dst.y)` if the image is locked. Note that the `dst` values must be integers. Example:\n```gdscript\nvar img = Image.new()\nimg.create(img_width, img_height, false, Image.FORMAT_RGBA8)\nimg.lock()\nimg.set_pixelv(Vector2(x, y), color) # Works\nimg.unlock()\nimg.set_pixelv(Vector2(x, y), color) # Does not have an effect\n```"] # [doc = ""] # [inline] pub fn set_pixelv (& self , dst : Vector2 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . set_pixelv ; let ret = crate :: icalls :: icallptr_void_vec2_color (method_bind , self . this . sys () . as_ptr () , dst , color) ; } } # [doc = "Shrinks the image by a factor of 2."] # [doc = ""] # [inline] pub fn shrink_x2 (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . shrink_x2 ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Converts the raw data from the sRGB colorspace to a linear scale."] # [doc = ""] # [inline] pub fn srgb_to_linear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . srgb_to_linear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Unlocks the data and prevents changes."] # [doc = ""] # [inline] pub fn unlock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . unlock ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Image { } unsafe impl GodotObject for Image { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Image" } } impl std :: ops :: Deref for Image { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Image { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for Image { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for Image { } unsafe impl SubClass < crate :: generated :: object :: Object > for Image { } impl Instanciable for Image { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Image :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ImageMethodTable { pub class_constructor : sys :: godot_class_constructor , pub blend_rect : * mut sys :: godot_method_bind , pub blend_rect_mask : * mut sys :: godot_method_bind , pub blit_rect : * mut sys :: godot_method_bind , pub blit_rect_mask : * mut sys :: godot_method_bind , pub bumpmap_to_normalmap : * mut sys :: godot_method_bind , pub clear_mipmaps : * mut sys :: godot_method_bind , pub compress : * mut sys :: godot_method_bind , pub convert : * mut sys :: godot_method_bind , pub copy_from : * mut sys :: godot_method_bind , pub create : * mut sys :: godot_method_bind , pub create_from_data : * mut sys :: godot_method_bind , pub crop : * mut sys :: godot_method_bind , pub decompress : * mut sys :: godot_method_bind , pub detect_alpha : * mut sys :: godot_method_bind , pub expand_x2_hq2x : * mut sys :: godot_method_bind , pub fill : * mut sys :: godot_method_bind , pub fix_alpha_edges : * mut sys :: godot_method_bind , pub flip_x : * mut sys :: godot_method_bind , pub flip_y : * mut sys :: godot_method_bind , pub generate_mipmaps : * mut sys :: godot_method_bind , pub get_data : * mut sys :: godot_method_bind , pub get_format : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_mipmap_offset : * mut sys :: godot_method_bind , pub get_pixel : * mut sys :: godot_method_bind , pub get_pixelv : * mut sys :: godot_method_bind , pub get_rect : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_used_rect : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub has_mipmaps : * mut sys :: godot_method_bind , pub is_compressed : * mut sys :: godot_method_bind , pub is_empty : * mut sys :: godot_method_bind , pub is_invisible : * mut sys :: godot_method_bind , pub load : * mut sys :: godot_method_bind , pub load_bmp_from_buffer : * mut sys :: godot_method_bind , pub load_jpg_from_buffer : * mut sys :: godot_method_bind , pub load_png_from_buffer : * mut sys :: godot_method_bind , pub load_tga_from_buffer : * mut sys :: godot_method_bind , pub load_webp_from_buffer : * mut sys :: godot_method_bind , pub lock : * mut sys :: godot_method_bind , pub normalmap_to_xy : * mut sys :: godot_method_bind , pub premultiply_alpha : * mut sys :: godot_method_bind , pub resize : * mut sys :: godot_method_bind , pub resize_to_po2 : * mut sys :: godot_method_bind , pub rgbe_to_srgb : * mut sys :: godot_method_bind , pub save_exr : * mut sys :: godot_method_bind , pub save_png : * mut sys :: godot_method_bind , pub save_png_to_buffer : * mut sys :: godot_method_bind , pub set_pixel : * mut sys :: godot_method_bind , pub set_pixelv : * mut sys :: godot_method_bind , pub shrink_x2 : * mut sys :: godot_method_bind , pub srgb_to_linear : * mut sys :: godot_method_bind , pub unlock : * mut sys :: godot_method_bind } impl ImageMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ImageMethodTable = ImageMethodTable { class_constructor : None , blend_rect : 0 as * mut sys :: godot_method_bind , blend_rect_mask : 0 as * mut sys :: godot_method_bind , blit_rect : 0 as * mut sys :: godot_method_bind , blit_rect_mask : 0 as * mut sys :: godot_method_bind , bumpmap_to_normalmap : 0 as * mut sys :: godot_method_bind , clear_mipmaps : 0 as * mut sys :: godot_method_bind , compress : 0 as * mut sys :: godot_method_bind , convert : 0 as * mut sys :: godot_method_bind , copy_from : 0 as * mut sys :: godot_method_bind , create : 0 as * mut sys :: godot_method_bind , create_from_data : 0 as * mut sys :: godot_method_bind , crop : 0 as * mut sys :: godot_method_bind , decompress : 0 as * mut sys :: godot_method_bind , detect_alpha : 0 as * mut sys :: godot_method_bind , expand_x2_hq2x : 0 as * mut sys :: godot_method_bind , fill : 0 as * mut sys :: godot_method_bind , fix_alpha_edges : 0 as * mut sys :: godot_method_bind , flip_x : 0 as * mut sys :: godot_method_bind , flip_y : 0 as * mut sys :: godot_method_bind , generate_mipmaps : 0 as * mut sys :: godot_method_bind , get_data : 0 as * mut sys :: godot_method_bind , get_format : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_mipmap_offset : 0 as * mut sys :: godot_method_bind , get_pixel : 0 as * mut sys :: godot_method_bind , get_pixelv : 0 as * mut sys :: godot_method_bind , get_rect : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_used_rect : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , has_mipmaps : 0 as * mut sys :: godot_method_bind , is_compressed : 0 as * mut sys :: godot_method_bind , is_empty : 0 as * mut sys :: godot_method_bind , is_invisible : 0 as * mut sys :: godot_method_bind , load : 0 as * mut sys :: godot_method_bind , load_bmp_from_buffer : 0 as * mut sys :: godot_method_bind , load_jpg_from_buffer : 0 as * mut sys :: godot_method_bind , load_png_from_buffer : 0 as * mut sys :: godot_method_bind , load_tga_from_buffer : 0 as * mut sys :: godot_method_bind , load_webp_from_buffer : 0 as * mut sys :: godot_method_bind , lock : 0 as * mut sys :: godot_method_bind , normalmap_to_xy : 0 as * mut sys :: godot_method_bind , premultiply_alpha : 0 as * mut sys :: godot_method_bind , resize : 0 as * mut sys :: godot_method_bind , resize_to_po2 : 0 as * mut sys :: godot_method_bind , rgbe_to_srgb : 0 as * mut sys :: godot_method_bind , save_exr : 0 as * mut sys :: godot_method_bind , save_png : 0 as * mut sys :: godot_method_bind , save_png_to_buffer : 0 as * mut sys :: godot_method_bind , set_pixel : 0 as * mut sys :: godot_method_bind , set_pixelv : 0 as * mut sys :: godot_method_bind , shrink_x2 : 0 as * mut sys :: godot_method_bind , srgb_to_linear : 0 as * mut sys :: godot_method_bind , unlock : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ImageMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Image\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . blend_rect = (gd_api . godot_method_bind_get_method) (class_name , "blend_rect\0" . as_ptr () as * const c_char) ; table . blend_rect_mask = (gd_api . godot_method_bind_get_method) (class_name , "blend_rect_mask\0" . as_ptr () as * const c_char) ; table . blit_rect = (gd_api . godot_method_bind_get_method) (class_name , "blit_rect\0" . as_ptr () as * const c_char) ; table . blit_rect_mask = (gd_api . godot_method_bind_get_method) (class_name , "blit_rect_mask\0" . as_ptr () as * const c_char) ; table . bumpmap_to_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "bumpmap_to_normalmap\0" . as_ptr () as * const c_char) ; table . clear_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "clear_mipmaps\0" . as_ptr () as * const c_char) ; table . compress = (gd_api . godot_method_bind_get_method) (class_name , "compress\0" . as_ptr () as * const c_char) ; table . convert = (gd_api . godot_method_bind_get_method) (class_name , "convert\0" . as_ptr () as * const c_char) ; table . copy_from = (gd_api . godot_method_bind_get_method) (class_name , "copy_from\0" . as_ptr () as * const c_char) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\0" . as_ptr () as * const c_char) ; table . create_from_data = (gd_api . godot_method_bind_get_method) (class_name , "create_from_data\0" . as_ptr () as * const c_char) ; table . crop = (gd_api . godot_method_bind_get_method) (class_name , "crop\0" . as_ptr () as * const c_char) ; table . decompress = (gd_api . godot_method_bind_get_method) (class_name , "decompress\0" . as_ptr () as * const c_char) ; table . detect_alpha = (gd_api . godot_method_bind_get_method) (class_name , "detect_alpha\0" . as_ptr () as * const c_char) ; table . expand_x2_hq2x = (gd_api . godot_method_bind_get_method) (class_name , "expand_x2_hq2x\0" . as_ptr () as * const c_char) ; table . fill = (gd_api . godot_method_bind_get_method) (class_name , "fill\0" . as_ptr () as * const c_char) ; table . fix_alpha_edges = (gd_api . godot_method_bind_get_method) (class_name , "fix_alpha_edges\0" . as_ptr () as * const c_char) ; table . flip_x = (gd_api . godot_method_bind_get_method) (class_name , "flip_x\0" . as_ptr () as * const c_char) ; table . flip_y = (gd_api . godot_method_bind_get_method) (class_name , "flip_y\0" . as_ptr () as * const c_char) ; table . generate_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "generate_mipmaps\0" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_mipmap_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_mipmap_offset\0" . as_ptr () as * const c_char) ; table . get_pixel = (gd_api . godot_method_bind_get_method) (class_name , "get_pixel\0" . as_ptr () as * const c_char) ; table . get_pixelv = (gd_api . godot_method_bind_get_method) (class_name , "get_pixelv\0" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_used_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_used_rect\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . has_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "has_mipmaps\0" . as_ptr () as * const c_char) ; table . is_compressed = (gd_api . godot_method_bind_get_method) (class_name , "is_compressed\0" . as_ptr () as * const c_char) ; table . is_empty = (gd_api . godot_method_bind_get_method) (class_name , "is_empty\0" . as_ptr () as * const c_char) ; table . is_invisible = (gd_api . godot_method_bind_get_method) (class_name , "is_invisible\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . load_bmp_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_bmp_from_buffer\0" . as_ptr () as * const c_char) ; table . load_jpg_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_jpg_from_buffer\0" . as_ptr () as * const c_char) ; table . load_png_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_png_from_buffer\0" . as_ptr () as * const c_char) ; table . load_tga_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_tga_from_buffer\0" . as_ptr () as * const c_char) ; table . load_webp_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_webp_from_buffer\0" . as_ptr () as * const c_char) ; table . lock = (gd_api . godot_method_bind_get_method) (class_name , "lock\0" . as_ptr () as * const c_char) ; table . normalmap_to_xy = (gd_api . godot_method_bind_get_method) (class_name , "normalmap_to_xy\0" . as_ptr () as * const c_char) ; table . premultiply_alpha = (gd_api . godot_method_bind_get_method) (class_name , "premultiply_alpha\0" . as_ptr () as * const c_char) ; table . resize = (gd_api . godot_method_bind_get_method) (class_name , "resize\0" . as_ptr () as * const c_char) ; table . resize_to_po2 = (gd_api . godot_method_bind_get_method) (class_name , "resize_to_po2\0" . as_ptr () as * const c_char) ; table . rgbe_to_srgb = (gd_api . godot_method_bind_get_method) (class_name , "rgbe_to_srgb\0" . as_ptr () as * const c_char) ; table . save_exr = (gd_api . godot_method_bind_get_method) (class_name , "save_exr\0" . as_ptr () as * const c_char) ; table . save_png = (gd_api . godot_method_bind_get_method) (class_name , "save_png\0" . as_ptr () as * const c_char) ; table . save_png_to_buffer = (gd_api . godot_method_bind_get_method) (class_name , "save_png_to_buffer\0" . as_ptr () as * const c_char) ; table . set_pixel = (gd_api . godot_method_bind_get_method) (class_name , "set_pixel\0" . as_ptr () as * const c_char) ; table . set_pixelv = (gd_api . godot_method_bind_get_method) (class_name , "set_pixelv\0" . as_ptr () as * const c_char) ; table . shrink_x2 = (gd_api . godot_method_bind_get_method) (class_name , "shrink_x2\0" . as_ptr () as * const c_char) ; table . srgb_to_linear = (gd_api . godot_method_bind_get_method) (class_name , "srgb_to_linear\0" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1018:4221 [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 CryptoKey` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_cryptokey.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCryptoKey inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CryptoKey { this : RawObject < Self > , } impl CryptoKey { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CryptoKeyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Loads a key from `path` (\"*.key\" file)."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoKeyMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Saves a key to the given `path` (should be a \"*.key\" file)."] # [doc = ""] # [inline] pub fn save (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoKeyMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (ret as _) } } } impl gdnative_core :: private :: godot_object :: Sealed for CryptoKey { } unsafe impl GodotObject for CryptoKey { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CryptoKey" } } impl std :: ops :: Deref for CryptoKey { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CryptoKey { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for CryptoKey { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for CryptoKey { } unsafe impl SubClass < crate :: generated :: object :: Object > for CryptoKey { } impl Instanciable for CryptoKey { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CryptoKey :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CryptoKeyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub load : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind } impl CryptoKeyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CryptoKeyMethodTable = CryptoKeyMethodTable { class_constructor : None , load : 0 as * mut sys :: godot_method_bind , save : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CryptoKeyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CryptoKey\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1024:3568 [INFO] [stdout] | [INFO] [stdout] 1024 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1024 | # [doc = "`core class 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1030:10866 [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 = "`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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1036:4106 [INFO] [stdout] | [INFO] [stdout] 1036 | ...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] 1036 | # [doc = "`core class VisualShaderNodeBooleanUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodebooleanuniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeBooleanUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeBooleanUniform { this : RawObject < Self > , } impl VisualShaderNodeBooleanUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeBooleanUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeBooleanUniform { } unsafe impl GodotObject for VisualShaderNodeBooleanUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeBooleanUniform" } } impl std :: ops :: Deref for VisualShaderNodeBooleanUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeBooleanUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeBooleanUniform { } impl Instanciable for VisualShaderNodeBooleanUniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeBooleanUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeBooleanUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeBooleanUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeBooleanUniformMethodTable = VisualShaderNodeBooleanUniformMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeBooleanUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeBooleanUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1042:7531 [INFO] [stdout] | [INFO] [stdout] 1042 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1042 | # [doc = "`core class MainLoop` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_mainloop.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`MainLoop` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMainLoop inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MainLoop { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MainLoop { pub const NOTIFICATION_APP_PAUSED : i64 = 1015i64 ; pub const NOTIFICATION_APP_RESUMED : i64 = 1014i64 ; pub const NOTIFICATION_CRASH : i64 = 1012i64 ; pub const NOTIFICATION_OS_IME_UPDATE : i64 = 1013i64 ; pub const NOTIFICATION_OS_MEMORY_WARNING : i64 = 1009i64 ; pub const NOTIFICATION_TRANSLATION_CHANGED : i64 = 1010i64 ; pub const NOTIFICATION_WM_ABOUT : i64 = 1011i64 ; pub const NOTIFICATION_WM_FOCUS_IN : i64 = 1004i64 ; pub const NOTIFICATION_WM_FOCUS_OUT : i64 = 1005i64 ; pub const NOTIFICATION_WM_GO_BACK_REQUEST : i64 = 1007i64 ; pub const NOTIFICATION_WM_MOUSE_ENTER : i64 = 1002i64 ; pub const NOTIFICATION_WM_MOUSE_EXIT : i64 = 1003i64 ; pub const NOTIFICATION_WM_QUIT_REQUEST : i64 = 1006i64 ; pub const NOTIFICATION_WM_UNFOCUS_REQUEST : i64 = 1008i64 ; } impl MainLoop { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MainLoopMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Should not be called manually, override [method _finalize] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn finish (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . finish ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Should not be called manually, override [method _idle] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn idle (& self , delta : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . idle ; let ret = crate :: icalls :: icallptr_bool_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; ret as _ } } # [doc = "Should not be called manually, override [method _initialize] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn init (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . init ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Should not be called manually, override [method _input_event] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn input_event (& self , event : impl AsArg < crate :: generated :: input_event :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . input_event ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; } } # [doc = "Should not be called manually, override [method _input_text] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn input_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . input_text ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Should not be called manually, override [method _iteration] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn iteration (& self , delta : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . iteration ; let ret = crate :: icalls :: icallptr_bool_f64 (method_bind , self . this . sys () . as_ptr () , delta) ; ret as _ } } } impl gdnative_core :: private :: godot_object :: Sealed for MainLoop { } unsafe impl GodotObject for MainLoop { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MainLoop" } } impl std :: ops :: Deref for MainLoop { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MainLoop { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for MainLoop { } impl Instanciable for MainLoop { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MainLoop :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MainLoopMethodTable { pub class_constructor : sys :: godot_class_constructor , pub finish : * mut sys :: godot_method_bind , pub idle : * mut sys :: godot_method_bind , pub init : * mut sys :: godot_method_bind , pub input_event : * mut sys :: godot_method_bind , pub input_text : * mut sys :: godot_method_bind , pub iteration : * mut sys :: godot_method_bind } impl MainLoopMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MainLoopMethodTable = MainLoopMethodTable { class_constructor : None , finish : 0 as * mut sys :: godot_method_bind , idle : 0 as * mut sys :: godot_method_bind , init : 0 as * mut sys :: godot_method_bind , input_event : 0 as * mut sys :: godot_method_bind , input_text : 0 as * mut sys :: godot_method_bind , iteration : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MainLoopMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MainLoop\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . finish = (gd_api . godot_method_bind_get_method) (class_name , "finish\0" . as_ptr () as * const c_char) ; table . idle = (gd_api . godot_method_bind_get_method) (class_name , "idle\0" . as_ptr () as * const c_char) ; table . init = (gd_api . godot_method_bind_get_method) (class_name , "init\0" . as_ptr () as * const c_char) ; table . input_event = (gd_api . godot_method_bind_get_method) (class_name , "input_event\0" . as_ptr () as * const c_char) ; table . input_text = (gd_api . godot_method_bind_get_method) (class_name , "input_text\0" . as_ptr () as * const c_char) ; table . iteration = (gd_api . godot_method_bind_get_method) (class_name , "iteration\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1048:7343 [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 ReferenceRect` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_referencerect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ReferenceRect` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nReferenceRect inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ReferenceRect { this : RawObject < Self > , } impl ReferenceRect { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ReferenceRectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets the border [Color] of the [ReferenceRect]."] # [doc = ""] # [inline] pub fn border_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . get_border_color ; let ret = crate :: icalls :: icallptr_color (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn border_width (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . get_border_width ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If set to `true`, the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in game."] # [doc = ""] # [inline] pub fn editor_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . get_editor_only ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets the border [Color] of the [ReferenceRect]."] # [doc = ""] # [inline] pub fn set_border_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . set_border_color ; let ret = crate :: icalls :: icallptr_void_color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_border_width (& self , width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . set_border_width ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , width) ; } } # [doc = "If set to `true`, the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in game."] # [doc = ""] # [inline] pub fn set_editor_only (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . set_editor_only ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ReferenceRect { } unsafe impl GodotObject for ReferenceRect { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ReferenceRect" } } impl QueueFree for ReferenceRect { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ReferenceRect { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ReferenceRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for ReferenceRect { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ReferenceRect { } unsafe impl SubClass < crate :: generated :: node :: Node > for ReferenceRect { } unsafe impl SubClass < crate :: generated :: object :: Object > for ReferenceRect { } impl Instanciable for ReferenceRect { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ReferenceRect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ReferenceRectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_border_color : * mut sys :: godot_method_bind , pub get_border_width : * mut sys :: godot_method_bind , pub get_editor_only : * mut sys :: godot_method_bind , pub set_border_color : * mut sys :: godot_method_bind , pub set_border_width : * mut sys :: godot_method_bind , pub set_editor_only : * mut sys :: godot_method_bind } impl ReferenceRectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ReferenceRectMethodTable = ReferenceRectMethodTable { class_constructor : None , get_border_color : 0 as * mut sys :: godot_method_bind , get_border_width : 0 as * mut sys :: godot_method_bind , get_editor_only : 0 as * mut sys :: godot_method_bind , set_border_color : 0 as * mut sys :: godot_method_bind , set_border_width : 0 as * mut sys :: godot_method_bind , set_editor_only : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ReferenceRectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ReferenceRect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_border_color = (gd_api . godot_method_bind_get_method) (class_name , "get_border_color\0" . as_ptr () as * const c_char) ; table . get_border_width = (gd_api . godot_method_bind_get_method) (class_name , "get_border_width\0" . as_ptr () as * const c_char) ; table . get_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_only\0" . as_ptr () as * const c_char) ; table . set_border_color = (gd_api . godot_method_bind_get_method) (class_name , "set_border_color\0" . as_ptr () as * const c_char) ; table . set_border_width = (gd_api . godot_method_bind_get_method) (class_name , "set_border_width\0" . as_ptr () as * const c_char) ; table . set_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_only\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1054:4429 [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 ConcavePolygonShape` inherits `Shape` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_concavepolygonshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nConcavePolygonShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConcavePolygonShape { this : RawObject < Self > , } impl ConcavePolygonShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConcavePolygonShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the faces (an array of triangles)."] # [doc = ""] # [inline] pub fn faces (& self) -> Vector3Array { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShapeMethodTable :: get (get_api ()) . get_faces ; let ret = crate :: icalls :: icallptr_vec3arr (method_bind , self . this . sys () . as_ptr ()) ; Vector3Array :: from_sys (ret) } } # [doc = "Sets the faces (an array of triangles)."] # [doc = ""] # [inline] pub fn set_faces (& self , faces : Vector3Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShapeMethodTable :: get (get_api ()) . set_faces ; let ret = crate :: icalls :: icallptr_void_vec3arr (method_bind , self . this . sys () . as_ptr () , faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConcavePolygonShape { } unsafe impl GodotObject for ConcavePolygonShape { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConcavePolygonShape" } } impl std :: ops :: Deref for ConcavePolygonShape { type Target = crate :: generated :: shape :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConcavePolygonShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: shape :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: shape :: Shape > for ConcavePolygonShape { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ConcavePolygonShape { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ConcavePolygonShape { } unsafe impl SubClass < crate :: generated :: object :: Object > for ConcavePolygonShape { } impl Instanciable for ConcavePolygonShape { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ConcavePolygonShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConcavePolygonShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_faces : * mut sys :: godot_method_bind , pub set_faces : * mut sys :: godot_method_bind } impl ConcavePolygonShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConcavePolygonShapeMethodTable = ConcavePolygonShapeMethodTable { class_constructor : None , get_faces : 0 as * mut sys :: godot_method_bind , set_faces : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ConcavePolygonShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConcavePolygonShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_faces\0" . as_ptr () as * const c_char) ; table . set_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_faces\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1060:5633 [INFO] [stdout] | [INFO] [stdout] 1060 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created 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 InstancePlaceholder` inherits `Node` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_instanceplaceholder.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nInstancePlaceholder inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InstancePlaceholder { this : RawObject < Self > , } impl InstancePlaceholder { # [doc = "\n# Default Arguments\n* `replace` - `false`\n* `custom_scene` - `null`"] # [doc = ""] # [inline] pub fn create_instance (& self , replace : bool , custom_scene : impl AsArg < crate :: generated :: packed_scene :: PackedScene >) -> Option < Ref < crate :: generated :: node :: Node , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . create_instance ; let ret = crate :: icalls :: icallptr_obj_bool_obj (method_bind , self . this . sys () . as_ptr () , replace , custom_scene . as_arg_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: node :: Node , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Gets the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance]."] # [doc = ""] # [inline] pub fn get_instance_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . get_instance_path ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "\n# Default Arguments\n* `with_order` - `false`"] # [doc = ""] # [inline] pub fn get_stored_values (& self , with_order : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . get_stored_values ; let ret = crate :: icalls :: icallptr_dict_bool (method_bind , self . this . sys () . as_ptr () , with_order) ; Dictionary :: from_sys (ret) } } # [doc = "Replaces this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided.\n# Default Arguments\n* `custom_scene` - `null`"] # [doc = ""] # [inline] pub fn replace_by_instance (& self , custom_scene : impl AsArg < crate :: generated :: packed_scene :: PackedScene >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . replace_by_instance ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , custom_scene . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InstancePlaceholder { } unsafe impl GodotObject for InstancePlaceholder { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "InstancePlaceholder" } } impl QueueFree for InstancePlaceholder { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for InstancePlaceholder { type Target = crate :: generated :: node :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InstancePlaceholder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node :: Node > for InstancePlaceholder { } unsafe impl SubClass < crate :: generated :: object :: Object > for InstancePlaceholder { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InstancePlaceholderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create_instance : * mut sys :: godot_method_bind , pub get_instance_path : * mut sys :: godot_method_bind , pub get_stored_values : * mut sys :: godot_method_bind , pub replace_by_instance : * mut sys :: godot_method_bind } impl InstancePlaceholderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InstancePlaceholderMethodTable = InstancePlaceholderMethodTable { class_constructor : None , create_instance : 0 as * mut sys :: godot_method_bind , get_instance_path : 0 as * mut sys :: godot_method_bind , get_stored_values : 0 as * mut sys :: godot_method_bind , replace_by_instance : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { InstancePlaceholderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InstancePlaceholder\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_instance = (gd_api . godot_method_bind_get_method) (class_name , "create_instance\0" . as_ptr () as * const c_char) ; table . get_instance_path = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_path\0" . as_ptr () as * const c_char) ; table . get_stored_values = (gd_api . godot_method_bind_get_method) (class_name , "get_stored_values\0" . as_ptr () as * const c_char) ; table . replace_by_instance = (gd_api . godot_method_bind_get_method) (class_name , "replace_by_instance\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1066:9260 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1072:7201 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1078:21076 [INFO] [stdout] | [INFO] [stdout] 1078 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created 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 Tabs` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_tabs.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Tabs` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTabs inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Tabs { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CloseButtonDisplayPolicy (pub i64) ; impl CloseButtonDisplayPolicy { pub const SHOW_NEVER : CloseButtonDisplayPolicy = CloseButtonDisplayPolicy (0i64) ; pub const SHOW_ACTIVE_ONLY : CloseButtonDisplayPolicy = CloseButtonDisplayPolicy (1i64) ; pub const SHOW_ALWAYS : CloseButtonDisplayPolicy = CloseButtonDisplayPolicy (2i64) ; pub const MAX : CloseButtonDisplayPolicy = CloseButtonDisplayPolicy (3i64) ; } impl From < i64 > for CloseButtonDisplayPolicy { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CloseButtonDisplayPolicy > for i64 { # [inline] fn from (v : CloseButtonDisplayPolicy) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TabAlign (pub i64) ; impl TabAlign { pub const LEFT : TabAlign = TabAlign (0i64) ; pub const CENTER : TabAlign = TabAlign (1i64) ; pub const RIGHT : TabAlign = TabAlign (2i64) ; pub const MAX : TabAlign = TabAlign (3i64) ; } impl From < i64 > for TabAlign { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TabAlign > for i64 { # [inline] fn from (v : TabAlign) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Tabs { pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_MAX : i64 = 3i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const CLOSE_BUTTON_MAX : i64 = 3i64 ; pub const CLOSE_BUTTON_SHOW_ACTIVE_ONLY : i64 = 1i64 ; pub const CLOSE_BUTTON_SHOW_ALWAYS : i64 = 2i64 ; pub const CLOSE_BUTTON_SHOW_NEVER : i64 = 0i64 ; } impl Tabs { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TabsMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new tab.\n# Default Arguments\n* `title` - `\"\"`\n* `icon` - `null`"] # [doc = ""] # [inline] pub fn add_tab (& self , title : impl Into < GodotString > , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . add_tab ; let ret = crate :: icalls :: icallptr_void_str_obj (method_bind , self . this . sys () . as_ptr () , title . into () , icon . as_arg_ptr ()) ; } } # [doc = "Moves the scroll view to make the tab visible."] # [doc = ""] # [inline] pub fn ensure_tab_visible (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . ensure_tab_visible ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "Select tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn current_tab (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_current_tab ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, tabs can be rearranged with mouse drag."] # [doc = ""] # [inline] pub fn drag_to_rearrange_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_drag_to_rearrange_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible."] # [doc = ""] # [inline] pub fn get_offset_buttons_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_offset_buttons_visible ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_previous_tab (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_previous_tab ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "if `true`, the mouse's scroll wheel cab be used to navigate the scroll view."] # [doc = ""] # [inline] pub fn scrolling_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_scrolling_enabled ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if select with right mouse button is enabled."] # [doc = ""] # [inline] pub fn get_select_with_rmb (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_select_with_rmb ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The alignment of all tabs. See [enum TabAlign] for details."] # [doc = ""] # [inline] pub fn tab_align (& self) -> crate :: generated :: tabs :: TabAlign { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_align ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tabs :: TabAlign (ret) } } # [doc = "Sets when the close button will appear on the tabs. See [enum CloseButtonDisplayPolicy] for details."] # [doc = ""] # [inline] pub fn tab_close_display_policy (& self) -> crate :: generated :: tabs :: CloseButtonDisplayPolicy { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_close_display_policy ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: tabs :: CloseButtonDisplayPolicy (ret) } } # [doc = "Returns the number of tabs."] # [doc = ""] # [inline] pub fn get_tab_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the tab at index `tab_idx` is disabled."] # [doc = ""] # [inline] pub fn get_tab_disabled (& self , tab_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_disabled ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; ret as _ } } # [doc = "Returns the [Texture] for the tab at index `tab_idx` or `null` if the tab has no [Texture]."] # [doc = ""] # [inline] pub fn get_tab_icon (& self , tab_idx : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_icon ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of hidden tabs offsetted to the left."] # [doc = ""] # [inline] pub fn get_tab_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_offset ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns tab [Rect2] with local position and size."] # [doc = ""] # [inline] pub fn get_tab_rect (& self , tab_idx : i64) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_rect ; let ret = crate :: icalls :: icallptr_rect2_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; mem :: transmute (ret) } } # [doc = "Returns the title of the tab at index `tab_idx`. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title]."] # [doc = ""] # [inline] pub fn get_tab_title (& self , tab_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_title ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the [Tabs]' rearrange group ID."] # [doc = ""] # [inline] pub fn get_tabs_rearrange_group (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tabs_rearrange_group ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Moves a tab from `from` to `to`."] # [doc = ""] # [inline] pub fn move_tab (& self , from : i64 , to : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . move_tab ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from , to) ; } } # [doc = "Removes the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn remove_tab (& self , tab_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . remove_tab ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; } } # [doc = "Select tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn set_current_tab (& self , tab_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_current_tab ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , tab_idx) ; } } # [doc = "If `true`, tabs can be rearranged with mouse drag."] # [doc = ""] # [inline] pub fn set_drag_to_rearrange_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_drag_to_rearrange_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "if `true`, the mouse's scroll wheel cab be used to navigate the scroll view."] # [doc = ""] # [inline] pub fn set_scrolling_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_scrolling_enabled ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "If `true`, enables selecting a tab with the right mouse button."] # [doc = ""] # [inline] pub fn set_select_with_rmb (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_select_with_rmb ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enabled) ; } } # [doc = "The alignment of all tabs. See [enum TabAlign] for details."] # [doc = ""] # [inline] pub fn set_tab_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_align ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , align) ; } } # [doc = "Sets when the close button will appear on the tabs. See [enum CloseButtonDisplayPolicy] for details."] # [doc = ""] # [inline] pub fn set_tab_close_display_policy (& self , policy : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_close_display_policy ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , policy) ; } } # [doc = "If `disabled` is `false`, hides the tab at index `tab_idx`.\n**Note:** Its title text will remain unless it is also removed with [method set_tab_title]."] # [doc = ""] # [inline] pub fn set_tab_disabled (& self , tab_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_disabled ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , tab_idx , disabled) ; } } # [doc = "Sets an `icon` for the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn set_tab_icon (& self , tab_idx : i64 , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_icon ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , tab_idx , icon . as_arg_ptr ()) ; } } # [doc = "Sets a `title` for the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn set_tab_title (& self , tab_idx : i64 , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_title ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , tab_idx , title . into ()) ; } } # [doc = "Defines the rearrange group ID. Choose for each [Tabs] the same value to dragging tabs between [Tabs]. Enable drag with `set_drag_to_rearrange_enabled(true)`."] # [doc = ""] # [inline] pub fn set_tabs_rearrange_group (& self , group_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tabs_rearrange_group ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , group_id) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Tabs { } unsafe impl GodotObject for Tabs { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Tabs" } } impl QueueFree for Tabs { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Tabs { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Tabs { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for Tabs { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Tabs { } unsafe impl SubClass < crate :: generated :: node :: Node > for Tabs { } unsafe impl SubClass < crate :: generated :: object :: Object > for Tabs { } impl Instanciable for Tabs { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Tabs :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TabsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_tab : * mut sys :: godot_method_bind , pub ensure_tab_visible : * mut sys :: godot_method_bind , pub get_current_tab : * mut sys :: godot_method_bind , pub get_drag_to_rearrange_enabled : * mut sys :: godot_method_bind , pub get_offset_buttons_visible : * mut sys :: godot_method_bind , pub get_previous_tab : * mut sys :: godot_method_bind , pub get_scrolling_enabled : * mut sys :: godot_method_bind , pub get_select_with_rmb : * mut sys :: godot_method_bind , pub get_tab_align : * mut sys :: godot_method_bind , pub get_tab_close_display_policy : * mut sys :: godot_method_bind , pub get_tab_count : * mut sys :: godot_method_bind , pub get_tab_disabled : * mut sys :: godot_method_bind , pub get_tab_icon : * mut sys :: godot_method_bind , pub get_tab_offset : * mut sys :: godot_method_bind , pub get_tab_rect : * mut sys :: godot_method_bind , pub get_tab_title : * mut sys :: godot_method_bind , pub get_tabs_rearrange_group : * mut sys :: godot_method_bind , pub move_tab : * mut sys :: godot_method_bind , pub remove_tab : * mut sys :: godot_method_bind , pub set_current_tab : * mut sys :: godot_method_bind , pub set_drag_to_rearrange_enabled : * mut sys :: godot_method_bind , pub set_scrolling_enabled : * mut sys :: godot_method_bind , pub set_select_with_rmb : * mut sys :: godot_method_bind , pub set_tab_align : * mut sys :: godot_method_bind , pub set_tab_close_display_policy : * mut sys :: godot_method_bind , pub set_tab_disabled : * mut sys :: godot_method_bind , pub set_tab_icon : * mut sys :: godot_method_bind , pub set_tab_title : * mut sys :: godot_method_bind , pub set_tabs_rearrange_group : * mut sys :: godot_method_bind } impl TabsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TabsMethodTable = TabsMethodTable { class_constructor : None , add_tab : 0 as * mut sys :: godot_method_bind , ensure_tab_visible : 0 as * mut sys :: godot_method_bind , get_current_tab : 0 as * mut sys :: godot_method_bind , get_drag_to_rearrange_enabled : 0 as * mut sys :: godot_method_bind , get_offset_buttons_visible : 0 as * mut sys :: godot_method_bind , get_previous_tab : 0 as * mut sys :: godot_method_bind , get_scrolling_enabled : 0 as * mut sys :: godot_method_bind , get_select_with_rmb : 0 as * mut sys :: godot_method_bind , get_tab_align : 0 as * mut sys :: godot_method_bind , get_tab_close_display_policy : 0 as * mut sys :: godot_method_bind , get_tab_count : 0 as * mut sys :: godot_method_bind , get_tab_disabled : 0 as * mut sys :: godot_method_bind , get_tab_icon : 0 as * mut sys :: godot_method_bind , get_tab_offset : 0 as * mut sys :: godot_method_bind , get_tab_rect : 0 as * mut sys :: godot_method_bind , get_tab_title : 0 as * mut sys :: godot_method_bind , get_tabs_rearrange_group : 0 as * mut sys :: godot_method_bind , move_tab : 0 as * mut sys :: godot_method_bind , remove_tab : 0 as * mut sys :: godot_method_bind , set_current_tab : 0 as * mut sys :: godot_method_bind , set_drag_to_rearrange_enabled : 0 as * mut sys :: godot_method_bind , set_scrolling_enabled : 0 as * mut sys :: godot_method_bind , set_select_with_rmb : 0 as * mut sys :: godot_method_bind , set_tab_align : 0 as * mut sys :: godot_method_bind , set_tab_close_display_policy : 0 as * mut sys :: godot_method_bind , set_tab_disabled : 0 as * mut sys :: godot_method_bind , set_tab_icon : 0 as * mut sys :: godot_method_bind , set_tab_title : 0 as * mut sys :: godot_method_bind , set_tabs_rearrange_group : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { TabsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Tabs\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_tab = (gd_api . godot_method_bind_get_method) (class_name , "add_tab\0" . as_ptr () as * const c_char) ; table . ensure_tab_visible = (gd_api . godot_method_bind_get_method) (class_name , "ensure_tab_visible\0" . as_ptr () as * const c_char) ; table . get_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_current_tab\0" . as_ptr () as * const c_char) ; table . get_drag_to_rearrange_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_to_rearrange_enabled\0" . as_ptr () as * const c_char) ; table . get_offset_buttons_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_offset_buttons_visible\0" . as_ptr () as * const c_char) ; table . get_previous_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_previous_tab\0" . as_ptr () as * const c_char) ; table . get_scrolling_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_scrolling_enabled\0" . as_ptr () as * const c_char) ; table . get_select_with_rmb = (gd_api . godot_method_bind_get_method) (class_name , "get_select_with_rmb\0" . as_ptr () as * const c_char) ; table . get_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_align\0" . as_ptr () as * const c_char) ; table . get_tab_close_display_policy = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_close_display_policy\0" . as_ptr () as * const c_char) ; table . get_tab_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_count\0" . as_ptr () as * const c_char) ; table . get_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_disabled\0" . as_ptr () as * const c_char) ; table . get_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_icon\0" . as_ptr () as * const c_char) ; table . get_tab_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_offset\0" . as_ptr () as * const c_char) ; table . get_tab_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_rect\0" . as_ptr () as * const c_char) ; table . get_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_title\0" . as_ptr () as * const c_char) ; table . get_tabs_rearrange_group = (gd_api . godot_method_bind_get_method) (class_name , "get_tabs_rearrange_group\0" . as_ptr () as * const c_char) ; table . move_tab = (gd_api . godot_method_bind_get_method) (class_name , "move_tab\0" . as_ptr () as * const c_char) ; table . remove_tab = (gd_api . godot_method_bind_get_method) (class_name , "remove_tab\0" . as_ptr () as * const c_char) ; table . set_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "set_current_tab\0" . as_ptr () as * const c_char) ; table . set_drag_to_rearrange_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_to_rearrange_enabled\0" . as_ptr () as * const c_char) ; table . set_scrolling_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_scrolling_enabled\0" . as_ptr () as * const c_char) ; table . set_select_with_rmb = (gd_api . godot_method_bind_get_method) (class_name , "set_select_with_rmb\0" . as_ptr () as * const c_char) ; table . set_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_align\0" . as_ptr () as * const c_char) ; table . set_tab_close_display_policy = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_close_display_policy\0" . as_ptr () as * const c_char) ; table . set_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_disabled\0" . as_ptr () as * const c_char) ; table . set_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_icon\0" . as_ptr () as * const c_char) ; table . set_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_title\0" . as_ptr () as * const c_char) ; table . set_tabs_rearrange_group = (gd_api . godot_method_bind_get_method) (class_name , "set_tabs_rearrange_group\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1084:6157 [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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1090:4670 [INFO] [stdout] | [INFO] [stdout] 1090 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1090 | # [doc = "`core class VisualScriptGlobalConstant` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptglobalconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptGlobalConstant inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptGlobalConstant { this : RawObject < Self > , } impl VisualScriptGlobalConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptGlobalConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn global_constant (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptGlobalConstantMethodTable :: get (get_api ()) . get_global_constant ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_global_constant (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptGlobalConstantMethodTable :: get (get_api ()) . set_global_constant ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , index) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptGlobalConstant { } unsafe impl GodotObject for VisualScriptGlobalConstant { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptGlobalConstant" } } impl std :: ops :: Deref for VisualScriptGlobalConstant { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptGlobalConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptGlobalConstant { } impl Instanciable for VisualScriptGlobalConstant { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptGlobalConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptGlobalConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_global_constant : * mut sys :: godot_method_bind , pub set_global_constant : * mut sys :: godot_method_bind } impl VisualScriptGlobalConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptGlobalConstantMethodTable = VisualScriptGlobalConstantMethodTable { class_constructor : None , get_global_constant : 0 as * mut sys :: godot_method_bind , set_global_constant : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptGlobalConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptGlobalConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_global_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_global_constant\0" . as_ptr () as * const c_char) ; table . set_global_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_global_constant\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1096:4589 [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 MarginContainer` inherits `Container` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_margincontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`MarginContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMarginContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MarginContainer { this : RawObject < Self > , } impl MarginContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MarginContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for MarginContainer { } unsafe impl GodotObject for MarginContainer { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MarginContainer" } } impl QueueFree for MarginContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for MarginContainer { type Target = crate :: generated :: container :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MarginContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: container :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: container :: Container > for MarginContainer { } unsafe impl SubClass < crate :: generated :: control :: Control > for MarginContainer { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for MarginContainer { } unsafe impl SubClass < crate :: generated :: node :: Node > for MarginContainer { } unsafe impl SubClass < crate :: generated :: object :: Object > for MarginContainer { } impl Instanciable for MarginContainer { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MarginContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MarginContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl MarginContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MarginContainerMethodTable = MarginContainerMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MarginContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MarginContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1102:13632 [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 MeshLibrary` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_meshlibrary.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMeshLibrary inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MeshLibrary { this : RawObject < Self > , } impl MeshLibrary { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MeshLibraryMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears the library."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates a new item in the library with the given ID.\nYou can get an unused ID from [method get_last_unused_item_id]."] # [doc = ""] # [inline] pub fn create_item (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . create_item ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Returns the first item with the given name."] # [doc = ""] # [inline] pub fn find_item_by_name (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . find_item_by_name ; let ret = crate :: icalls :: icallptr_i64_str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; ret as _ } } # [doc = "Returns the list of item IDs in use."] # [doc = ""] # [inline] pub fn get_item_list (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_list ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the item's mesh."] # [doc = ""] # [inline] pub fn get_item_mesh (& self , id : i64) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_mesh ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the item's name."] # [doc = ""] # [inline] pub fn get_item_name (& self , id : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_name ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , id) ; GodotString :: from_sys (ret) } } # [doc = "Returns the item's navigation mesh."] # [doc = ""] # [inline] pub fn get_item_navmesh (& self , id : i64) -> Option < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_navmesh ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: navigation_mesh :: NavigationMesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the transform applied to the item's navigation mesh."] # [doc = ""] # [inline] pub fn get_item_navmesh_transform (& self , id : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_navmesh_transform ; let ret = crate :: icalls :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , id) ; mem :: transmute (ret) } } # [doc = "When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture] if no preview was manually set in a running project."] # [doc = ""] # [inline] pub fn get_item_preview (& self , id : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_preview ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns an item's collision shapes.\nThe array consists of each [Shape] followed by its [Transform]."] # [doc = ""] # [inline] pub fn get_item_shapes (& self , id : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_shapes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets an unused ID for a new item."] # [doc = ""] # [inline] pub fn get_last_unused_item_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_last_unused_item_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Removes the item."] # [doc = ""] # [inline] pub fn remove_item (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . remove_item ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , id) ; } } # [doc = "Sets the item's mesh."] # [doc = ""] # [inline] pub fn set_item_mesh (& self , id : i64 , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_mesh ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , mesh . as_arg_ptr ()) ; } } # [doc = "Sets the item's name.\nThis name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name]."] # [doc = ""] # [inline] pub fn set_item_name (& self , id : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_name ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , id , name . into ()) ; } } # [doc = "Sets the item's navigation mesh."] # [doc = ""] # [inline] pub fn set_item_navmesh (& self , id : i64 , navmesh : impl AsArg < crate :: generated :: navigation_mesh :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_navmesh ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , navmesh . as_arg_ptr ()) ; } } # [doc = "Sets the transform to apply to the item's navigation mesh."] # [doc = ""] # [inline] pub fn set_item_navmesh_transform (& self , id : i64 , navmesh : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_navmesh_transform ; let ret = crate :: icalls :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , id , navmesh) ; } } # [doc = "Sets a texture to use as the item's preview icon in the editor."] # [doc = ""] # [inline] pub fn set_item_preview (& self , id : i64 , texture : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_preview ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , id , texture . as_arg_ptr ()) ; } } # [doc = "Sets an item's collision shapes.\nThe array should consist of [Shape] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY]."] # [doc = ""] # [inline] pub fn set_item_shapes (& self , id : i64 , shapes : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_shapes ; let ret = crate :: icalls :: icallptr_void_i64_arr (method_bind , self . this . sys () . as_ptr () , id , shapes) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshLibrary { } unsafe impl GodotObject for MeshLibrary { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MeshLibrary" } } impl std :: ops :: Deref for MeshLibrary { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshLibrary { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for MeshLibrary { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MeshLibrary { } unsafe impl SubClass < crate :: generated :: object :: Object > for MeshLibrary { } impl Instanciable for MeshLibrary { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MeshLibrary :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshLibraryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub create_item : * mut sys :: godot_method_bind , pub find_item_by_name : * mut sys :: godot_method_bind , pub get_item_list : * mut sys :: godot_method_bind , pub get_item_mesh : * mut sys :: godot_method_bind , pub get_item_name : * mut sys :: godot_method_bind , pub get_item_navmesh : * mut sys :: godot_method_bind , pub get_item_navmesh_transform : * mut sys :: godot_method_bind , pub get_item_preview : * mut sys :: godot_method_bind , pub get_item_shapes : * mut sys :: godot_method_bind , pub get_last_unused_item_id : * mut sys :: godot_method_bind , pub remove_item : * mut sys :: godot_method_bind , pub set_item_mesh : * mut sys :: godot_method_bind , pub set_item_name : * mut sys :: godot_method_bind , pub set_item_navmesh : * mut sys :: godot_method_bind , pub set_item_navmesh_transform : * mut sys :: godot_method_bind , pub set_item_preview : * mut sys :: godot_method_bind , pub set_item_shapes : * mut sys :: godot_method_bind } impl MeshLibraryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshLibraryMethodTable = MeshLibraryMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , create_item : 0 as * mut sys :: godot_method_bind , find_item_by_name : 0 as * mut sys :: godot_method_bind , get_item_list : 0 as * mut sys :: godot_method_bind , get_item_mesh : 0 as * mut sys :: godot_method_bind , get_item_name : 0 as * mut sys :: godot_method_bind , get_item_navmesh : 0 as * mut sys :: godot_method_bind , get_item_navmesh_transform : 0 as * mut sys :: godot_method_bind , get_item_preview : 0 as * mut sys :: godot_method_bind , get_item_shapes : 0 as * mut sys :: godot_method_bind , get_last_unused_item_id : 0 as * mut sys :: godot_method_bind , remove_item : 0 as * mut sys :: godot_method_bind , set_item_mesh : 0 as * mut sys :: godot_method_bind , set_item_name : 0 as * mut sys :: godot_method_bind , set_item_navmesh : 0 as * mut sys :: godot_method_bind , set_item_navmesh_transform : 0 as * mut sys :: godot_method_bind , set_item_preview : 0 as * mut sys :: godot_method_bind , set_item_shapes : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MeshLibraryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MeshLibrary\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . create_item = (gd_api . godot_method_bind_get_method) (class_name , "create_item\0" . as_ptr () as * const c_char) ; table . find_item_by_name = (gd_api . godot_method_bind_get_method) (class_name , "find_item_by_name\0" . as_ptr () as * const c_char) ; table . get_item_list = (gd_api . godot_method_bind_get_method) (class_name , "get_item_list\0" . as_ptr () as * const c_char) ; table . get_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_mesh\0" . as_ptr () as * const c_char) ; table . get_item_name = (gd_api . godot_method_bind_get_method) (class_name , "get_item_name\0" . as_ptr () as * const c_char) ; table . get_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_navmesh\0" . as_ptr () as * const c_char) ; table . get_item_navmesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_item_navmesh_transform\0" . as_ptr () as * const c_char) ; table . get_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "get_item_preview\0" . as_ptr () as * const c_char) ; table . get_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "get_item_shapes\0" . as_ptr () as * const c_char) ; table . get_last_unused_item_id = (gd_api . godot_method_bind_get_method) (class_name , "get_last_unused_item_id\0" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\0" . as_ptr () as * const c_char) ; table . set_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_mesh\0" . as_ptr () as * const c_char) ; table . set_item_name = (gd_api . godot_method_bind_get_method) (class_name , "set_item_name\0" . as_ptr () as * const c_char) ; table . set_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_navmesh\0" . as_ptr () as * const c_char) ; table . set_item_navmesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_item_navmesh_transform\0" . as_ptr () as * const c_char) ; table . set_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_item_preview\0" . as_ptr () as * const c_char) ; table . set_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shapes\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1108:4483 [INFO] [stdout] | [INFO] [stdout] 1108 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1108 | # [doc = "`core class 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1114:4580 [INFO] [stdout] | [INFO] [stdout] 1114 | ...thodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1114 | # [doc = "`core class VScrollBar` inherits `ScrollBar` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_vscrollbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VScrollBar` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVScrollBar inherits methods from:\n - [ScrollBar](struct.ScrollBar.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VScrollBar { this : RawObject < Self > , } impl VScrollBar { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VScrollBarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VScrollBar { } unsafe impl GodotObject for VScrollBar { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VScrollBar" } } impl QueueFree for VScrollBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VScrollBar { type Target = crate :: generated :: scroll_bar :: ScrollBar ; # [inline] fn deref (& self) -> & crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: scroll_bar :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: scroll_bar :: ScrollBar > for VScrollBar { } unsafe impl SubClass < crate :: generated :: range :: Range > for VScrollBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for VScrollBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VScrollBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for VScrollBar { } unsafe impl SubClass < crate :: generated :: object :: Object > for VScrollBar { } impl Instanciable for VScrollBar { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VScrollBar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VScrollBarMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VScrollBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VScrollBarMethodTable = VScrollBarMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VScrollBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VScrollBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1120:4084 [INFO] [stdout] | [INFO] [stdout] 1120 | ...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] 1120 | # [doc = "`core class VisualShaderNodeScalarUniform` inherits `VisualShaderNodeUniform` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodescalaruniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarUniform { this : RawObject < Self > , } impl VisualShaderNodeScalarUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarUniform { } unsafe impl GodotObject for VisualShaderNodeScalarUniform { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarUniform" } } impl std :: ops :: Deref for VisualShaderNodeScalarUniform { type Target = crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node_uniform :: VisualShaderNodeUniform > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeScalarUniform { } impl Instanciable for VisualShaderNodeScalarUniform { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeScalarUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarUniformMethodTable = VisualShaderNodeScalarUniformMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1126:4464 [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 VSeparator` inherits `Separator` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_vseparator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`VSeparator` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVSeparator inherits methods from:\n - [Separator](struct.Separator.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VSeparator { this : RawObject < Self > , } impl VSeparator { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VSeparatorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VSeparator { } unsafe impl GodotObject for VSeparator { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VSeparator" } } impl QueueFree for VSeparator { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for VSeparator { type Target = crate :: generated :: separator :: Separator ; # [inline] fn deref (& self) -> & crate :: generated :: separator :: Separator { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VSeparator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: separator :: Separator { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: separator :: Separator > for VSeparator { } unsafe impl SubClass < crate :: generated :: control :: Control > for VSeparator { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for VSeparator { } unsafe impl SubClass < crate :: generated :: node :: Node > for VSeparator { } unsafe impl SubClass < crate :: generated :: object :: Object > for VSeparator { } impl Instanciable for VSeparator { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VSeparator :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VSeparatorMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VSeparatorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VSeparatorMethodTable = VSeparatorMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VSeparatorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VSeparator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1132:4465 [INFO] [stdout] | [INFO] [stdout] 1132 | ...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] 1132 | # [doc = "`core class HSlider` inherits `Slider` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_hslider.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`HSlider` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHSlider inherits methods from:\n - [Slider](struct.Slider.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HSlider { this : RawObject < Self > , } impl HSlider { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HSliderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for HSlider { } unsafe impl GodotObject for HSlider { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HSlider" } } impl QueueFree for HSlider { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for HSlider { type Target = crate :: generated :: slider :: Slider ; # [inline] fn deref (& self) -> & crate :: generated :: slider :: Slider { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HSlider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: slider :: Slider { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: slider :: Slider > for HSlider { } unsafe impl SubClass < crate :: generated :: range :: Range > for HSlider { } unsafe impl SubClass < crate :: generated :: control :: Control > for HSlider { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for HSlider { } unsafe impl SubClass < crate :: generated :: node :: Node > for HSlider { } unsafe impl SubClass < crate :: generated :: object :: Object > for HSlider { } impl Instanciable for HSlider { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { HSlider :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HSliderMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl HSliderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HSliderMethodTable = HSliderMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { HSliderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HSlider\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1138:3658 [INFO] [stdout] | [INFO] [stdout] 1138 | ...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] 1138 | # [doc = "`core class VisualScriptCondition` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptcondition.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptCondition inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptCondition { this : RawObject < Self > , } impl VisualScriptCondition { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptConditionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptCondition { } unsafe impl GodotObject for VisualScriptCondition { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptCondition" } } impl std :: ops :: Deref for VisualScriptCondition { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptCondition { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptCondition { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptCondition { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptCondition { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptCondition { } impl Instanciable for VisualScriptCondition { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptCondition :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptConditionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptConditionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptConditionMethodTable = VisualScriptConditionMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptConditionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptCondition\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1144:14333 [INFO] [stdout] | [INFO] [stdout] 1144 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1144 | # [doc = "`core class CollisionObject` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_collisionobject.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCollisionObject inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionObject { this : RawObject < Self > , } impl CollisionObject { # [doc = "Creates a new shape owner for the given object. Returns `owner_id` of the new owner for future reference."] # [doc = ""] # [inline] pub fn create_shape_owner (& self , owner : impl AsArg < crate :: generated :: object :: Object >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . create_shape_owner ; let ret = crate :: icalls :: icallptr_i64_obj (method_bind , self . this . sys () . as_ptr () , owner . as_arg_ptr ()) ; ret as _ } } # [doc = "If `true`, the [CollisionObject] will continue to receive input events as the mouse is dragged across its shapes."] # [doc = ""] # [inline] pub fn capture_input_on_drag (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_capture_input_on_drag ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the object's [RID]."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallptr_rid (method_bind , self . this . sys () . as_ptr ()) ; Rid :: from_sys (ret) } } # [doc = "Returns an [Array] of `owner_id` identifiers. You can use these ids in other methods that take `owner_id` as an argument."] # [doc = ""] # [inline] pub fn get_shape_owners (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_shape_owners ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the [CollisionObject]'s shapes will respond to [RayCast]s."] # [doc = ""] # [inline] pub fn is_ray_pickable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . is_ray_pickable ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the shape owner and its shapes are disabled."] # [doc = ""] # [inline] pub fn is_shape_owner_disabled (& self , owner_id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . is_shape_owner_disabled ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ret as _ } } # [doc = "Removes the given shape owner."] # [doc = ""] # [inline] pub fn remove_shape_owner (& self , owner_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . remove_shape_owner ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; } } # [doc = "If `true`, the [CollisionObject] will continue to receive input events as the mouse is dragged across its shapes."] # [doc = ""] # [inline] pub fn set_capture_input_on_drag (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . set_capture_input_on_drag ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "If `true`, the [CollisionObject]'s shapes will respond to [RayCast]s."] # [doc = ""] # [inline] pub fn set_ray_pickable (& self , ray_pickable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . set_ray_pickable ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , ray_pickable) ; } } # [doc = "Returns the `owner_id` of the given shape."] # [doc = ""] # [inline] pub fn shape_find_owner (& self , shape_index : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_find_owner ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , shape_index) ; ret as _ } } # [doc = "Adds a [Shape] to the shape owner."] # [doc = ""] # [inline] pub fn shape_owner_add_shape (& self , owner_id : i64 , shape : impl AsArg < crate :: generated :: shape :: Shape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_add_shape ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , owner_id , shape . as_arg_ptr ()) ; } } # [doc = "Removes all shapes from the shape owner."] # [doc = ""] # [inline] pub fn shape_owner_clear_shapes (& self , owner_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_clear_shapes ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; } } # [doc = "Returns the parent object of the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_get_owner (& self , owner_id : i64) -> Option < Ref < crate :: generated :: object :: Object , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_owner ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: object :: Object , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the [Shape] with the given id from the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_get_shape (& self , owner_id : i64 , shape_id : i64) -> Option < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_shape ; let ret = crate :: icalls :: icallptr_obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id , shape_id) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: shape :: Shape , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the number of shapes the given shape owner contains."] # [doc = ""] # [inline] pub fn shape_owner_get_shape_count (& self , owner_id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_shape_count ; let ret = crate :: icalls :: icallptr_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; ret as _ } } # [doc = "Returns the child index of the [Shape] with the given id from the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_get_shape_index (& self , owner_id : i64 , shape_id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_shape_index ; let ret = crate :: icalls :: icallptr_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id , shape_id) ; ret as _ } } # [doc = "Returns the shape owner's [Transform]."] # [doc = ""] # [inline] pub fn shape_owner_get_transform (& self , owner_id : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_transform ; let ret = crate :: icalls :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , owner_id) ; mem :: transmute (ret) } } # [doc = "Removes a shape from the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_remove_shape (& self , owner_id : i64 , shape_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_remove_shape ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id , shape_id) ; } } # [doc = "If `true`, disables the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_set_disabled (& self , owner_id : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_set_disabled ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , owner_id , disabled) ; } } # [doc = "Sets the [Transform] of the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_set_transform (& self , owner_id : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_set_transform ; let ret = crate :: icalls :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , owner_id , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionObject { } unsafe impl GodotObject for CollisionObject { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionObject" } } impl QueueFree for CollisionObject { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CollisionObject { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionObject { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CollisionObject { } unsafe impl SubClass < crate :: generated :: node :: Node > for CollisionObject { } unsafe impl SubClass < crate :: generated :: object :: Object > for CollisionObject { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionObjectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create_shape_owner : * mut sys :: godot_method_bind , pub get_capture_input_on_drag : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub get_shape_owners : * mut sys :: godot_method_bind , pub is_ray_pickable : * mut sys :: godot_method_bind , pub is_shape_owner_disabled : * mut sys :: godot_method_bind , pub remove_shape_owner : * mut sys :: godot_method_bind , pub set_capture_input_on_drag : * mut sys :: godot_method_bind , pub set_ray_pickable : * mut sys :: godot_method_bind , pub shape_find_owner : * mut sys :: godot_method_bind , pub shape_owner_add_shape : * mut sys :: godot_method_bind , pub shape_owner_clear_shapes : * mut sys :: godot_method_bind , pub shape_owner_get_owner : * mut sys :: godot_method_bind , pub shape_owner_get_shape : * mut sys :: godot_method_bind , pub shape_owner_get_shape_count : * mut sys :: godot_method_bind , pub shape_owner_get_shape_index : * mut sys :: godot_method_bind , pub shape_owner_get_transform : * mut sys :: godot_method_bind , pub shape_owner_remove_shape : * mut sys :: godot_method_bind , pub shape_owner_set_disabled : * mut sys :: godot_method_bind , pub shape_owner_set_transform : * mut sys :: godot_method_bind } impl CollisionObjectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionObjectMethodTable = CollisionObjectMethodTable { class_constructor : None , create_shape_owner : 0 as * mut sys :: godot_method_bind , get_capture_input_on_drag : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , get_shape_owners : 0 as * mut sys :: godot_method_bind , is_ray_pickable : 0 as * mut sys :: godot_method_bind , is_shape_owner_disabled : 0 as * mut sys :: godot_method_bind , remove_shape_owner : 0 as * mut sys :: godot_method_bind , set_capture_input_on_drag : 0 as * mut sys :: godot_method_bind , set_ray_pickable : 0 as * mut sys :: godot_method_bind , shape_find_owner : 0 as * mut sys :: godot_method_bind , shape_owner_add_shape : 0 as * mut sys :: godot_method_bind , shape_owner_clear_shapes : 0 as * mut sys :: godot_method_bind , shape_owner_get_owner : 0 as * mut sys :: godot_method_bind , shape_owner_get_shape : 0 as * mut sys :: godot_method_bind , shape_owner_get_shape_count : 0 as * mut sys :: godot_method_bind , shape_owner_get_shape_index : 0 as * mut sys :: godot_method_bind , shape_owner_get_transform : 0 as * mut sys :: godot_method_bind , shape_owner_remove_shape : 0 as * mut sys :: godot_method_bind , shape_owner_set_disabled : 0 as * mut sys :: godot_method_bind , shape_owner_set_transform : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CollisionObjectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionObject\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "create_shape_owner\0" . as_ptr () as * const c_char) ; table . get_capture_input_on_drag = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_input_on_drag\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . get_shape_owners = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_owners\0" . as_ptr () as * const c_char) ; table . is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "is_ray_pickable\0" . as_ptr () as * const c_char) ; table . is_shape_owner_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_owner_disabled\0" . as_ptr () as * const c_char) ; table . remove_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "remove_shape_owner\0" . as_ptr () as * const c_char) ; table . set_capture_input_on_drag = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_input_on_drag\0" . as_ptr () as * const c_char) ; table . set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "set_ray_pickable\0" . as_ptr () as * const c_char) ; table . shape_find_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_find_owner\0" . as_ptr () as * const c_char) ; table . shape_owner_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_add_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_clear_shapes\0" . as_ptr () as * const c_char) ; table . shape_owner_get_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_owner\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape_count\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape_index = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape_index\0" . as_ptr () as * const c_char) ; table . shape_owner_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_transform\0" . as_ptr () as * const c_char) ; table . shape_owner_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_remove_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_disabled\0" . as_ptr () as * const c_char) ; table . shape_owner_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_transform\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1150:4656 [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 CSGCombiner` inherits `CSGShape` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_csgcombiner.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CSGCombiner` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGCombiner inherits methods from:\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGCombiner { this : RawObject < Self > , } impl CSGCombiner { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGCombinerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGCombiner { } unsafe impl GodotObject for CSGCombiner { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGCombiner" } } impl QueueFree for CSGCombiner { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGCombiner { type Target = crate :: generated :: csg_shape :: CSGShape ; # [inline] fn deref (& self) -> & crate :: generated :: csg_shape :: CSGShape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGCombiner { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_shape :: CSGShape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGCombiner { } impl Instanciable for CSGCombiner { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CSGCombiner :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGCombinerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl CSGCombinerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGCombinerMethodTable = CSGCombinerMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CSGCombinerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGCombiner\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1156:13975 [INFO] [stdout] | [INFO] [stdout] 1156 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created 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 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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1162:3658 [INFO] [stdout] | [INFO] [stdout] 1162 | ...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] 1162 | # [doc = "`core class VisualScriptSceneTree` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptscenetree.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSceneTree inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSceneTree { this : RawObject < Self > , } impl VisualScriptSceneTree { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSceneTreeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSceneTree { } unsafe impl GodotObject for VisualScriptSceneTree { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSceneTree" } } impl std :: ops :: Deref for VisualScriptSceneTree { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSceneTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSceneTree { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSceneTree { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSceneTree { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSceneTree { } impl Instanciable for VisualScriptSceneTree { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptSceneTree :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSceneTreeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptSceneTreeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSceneTreeMethodTable = VisualScriptSceneTreeMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptSceneTreeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSceneTree\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1168:9007 [INFO] [stdout] | [INFO] [stdout] 1168 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1168 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1174:3756 [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 PluginScript` inherits `Script` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_pluginscript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPluginScript inherits methods from:\n - [Script](struct.Script.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PluginScript { this : RawObject < Self > , } impl PluginScript { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PluginScriptMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn _new (& self , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = PluginScriptMethodTable :: get (get_api ()) . _new ; let ret = crate :: icalls :: icallvarargs_ (method_bind , self . this . sys () . as_ptr () , varargs) ; ret } } } impl gdnative_core :: private :: godot_object :: Sealed for PluginScript { } unsafe impl GodotObject for PluginScript { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PluginScript" } } impl std :: ops :: Deref for PluginScript { type Target = crate :: generated :: script :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PluginScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: script :: Script > for PluginScript { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PluginScript { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PluginScript { } unsafe impl SubClass < crate :: generated :: object :: Object > for PluginScript { } impl Instanciable for PluginScript { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PluginScript :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PluginScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub _new : * mut sys :: godot_method_bind } impl PluginScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PluginScriptMethodTable = PluginScriptMethodTable { class_constructor : None , _new : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PluginScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PluginScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . _new = (gd_api . godot_method_bind_get_method) (class_name , "new\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1180:7107 [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 PolygonPathFinder` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_polygonpathfinder.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPolygonPathFinder inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PolygonPathFinder { this : RawObject < Self > , } impl PolygonPathFinder { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PolygonPathFinderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn find_path (& self , from : Vector2 , to : Vector2) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . find_path ; let ret = crate :: icalls :: icallptr_vec2arr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from , to) ; Vector2Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bounds (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . get_bounds ; let ret = crate :: icalls :: icallptr_rect2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_closest_point (& self , point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallptr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , point) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_intersections (& self , from : Vector2 , to : Vector2) -> Vector2Array { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . get_intersections ; let ret = crate :: icalls :: icallptr_vec2arr_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from , to) ; Vector2Array :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_point_penalty (& self , idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . get_point_penalty ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn is_point_inside (& self , point : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . is_point_inside ; let ret = crate :: icalls :: icallptr_bool_vec2 (method_bind , self . this . sys () . as_ptr () , point) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn set_point_penalty (& self , idx : i64 , penalty : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . set_point_penalty ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , idx , penalty) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn setup (& self , points : Vector2Array , connections : Int32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . setup ; let ret = crate :: icalls :: icallptr_void_vec2arr_i32arr (method_bind , self . this . sys () . as_ptr () , points , connections) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PolygonPathFinder { } unsafe impl GodotObject for PolygonPathFinder { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PolygonPathFinder" } } impl std :: ops :: Deref for PolygonPathFinder { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PolygonPathFinder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for PolygonPathFinder { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PolygonPathFinder { } unsafe impl SubClass < crate :: generated :: object :: Object > for PolygonPathFinder { } impl Instanciable for PolygonPathFinder { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { PolygonPathFinder :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PolygonPathFinderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub find_path : * mut sys :: godot_method_bind , pub get_bounds : * mut sys :: godot_method_bind , pub get_closest_point : * mut sys :: godot_method_bind , pub get_intersections : * mut sys :: godot_method_bind , pub get_point_penalty : * mut sys :: godot_method_bind , pub is_point_inside : * mut sys :: godot_method_bind , pub set_point_penalty : * mut sys :: godot_method_bind , pub setup : * mut sys :: godot_method_bind } impl PolygonPathFinderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PolygonPathFinderMethodTable = PolygonPathFinderMethodTable { class_constructor : None , find_path : 0 as * mut sys :: godot_method_bind , get_bounds : 0 as * mut sys :: godot_method_bind , get_closest_point : 0 as * mut sys :: godot_method_bind , get_intersections : 0 as * mut sys :: godot_method_bind , get_point_penalty : 0 as * mut sys :: godot_method_bind , is_point_inside : 0 as * mut sys :: godot_method_bind , set_point_penalty : 0 as * mut sys :: godot_method_bind , setup : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PolygonPathFinderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PolygonPathFinder\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . find_path = (gd_api . godot_method_bind_get_method) (class_name , "find_path\0" . as_ptr () as * const c_char) ; table . get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_intersections = (gd_api . godot_method_bind_get_method) (class_name , "get_intersections\0" . as_ptr () as * const c_char) ; table . get_point_penalty = (gd_api . godot_method_bind_get_method) (class_name , "get_point_penalty\0" . as_ptr () as * const c_char) ; table . is_point_inside = (gd_api . godot_method_bind_get_method) (class_name , "is_point_inside\0" . as_ptr () as * const c_char) ; table . set_point_penalty = (gd_api . godot_method_bind_get_method) (class_name , "set_point_penalty\0" . as_ptr () as * const c_char) ; table . setup = (gd_api . godot_method_bind_get_method) (class_name , "setup\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1186:4114 [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 = "`tools singleton class VisualScriptEditor` inherits `Object` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscripteditor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nVisualScriptEditor inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptEditor { this : RawObject < Self > , } impl VisualScriptEditor { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("VisualScriptEditor\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_custom_node (& self , name : impl Into < GodotString > , category : impl Into < GodotString > , script : impl AsArg < crate :: generated :: script :: Script >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEditorMethodTable :: get (get_api ()) . add_custom_node ; let ret = crate :: icalls :: icallptr_void_str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , category . into () , script . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_custom_node (& self , name : impl Into < GodotString > , category : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEditorMethodTable :: get (get_api ()) . remove_custom_node ; let ret = crate :: icalls :: icallptr_void_str_str (method_bind , self . this . sys () . as_ptr () , name . into () , category . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptEditor { } unsafe impl GodotObject for VisualScriptEditor { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisualScriptEditor" } } impl std :: ops :: Deref for VisualScriptEditor { type Target = crate :: generated :: object :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEditor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: object :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptEditor { } unsafe impl Send for VisualScriptEditor { } unsafe impl Sync for VisualScriptEditor { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptEditorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_custom_node : * mut sys :: godot_method_bind , pub remove_custom_node : * mut sys :: godot_method_bind } impl VisualScriptEditorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptEditorMethodTable = VisualScriptEditorMethodTable { class_constructor : None , add_custom_node : 0 as * mut sys :: godot_method_bind , remove_custom_node : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptEditorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_VisualScriptEditor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_custom_node = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_node\0" . as_ptr () as * const c_char) ; table . remove_custom_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_node\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1192:4806 [INFO] [stdout] | [INFO] [stdout] 1192 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1192 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1198:18084 [INFO] [stdout] | [INFO] [stdout] 1198 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1198 | # [doc = "`core class MultiMesh` inherits `Resource` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_multimesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMultiMesh inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiMesh { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ColorFormat (pub i64) ; impl ColorFormat { pub const NONE : ColorFormat = ColorFormat (0i64) ; pub const _8BIT : ColorFormat = ColorFormat (1i64) ; pub const FLOAT : ColorFormat = ColorFormat (2i64) ; } impl From < i64 > for ColorFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ColorFormat > for i64 { # [inline] fn from (v : ColorFormat) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CustomDataFormat (pub i64) ; impl CustomDataFormat { pub const NONE : CustomDataFormat = CustomDataFormat (0i64) ; pub const _8BIT : CustomDataFormat = CustomDataFormat (1i64) ; pub const FLOAT : CustomDataFormat = CustomDataFormat (2i64) ; } impl From < i64 > for CustomDataFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CustomDataFormat > for i64 { # [inline] fn from (v : CustomDataFormat) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TransformFormat (pub i64) ; impl TransformFormat { pub const _2D : TransformFormat = TransformFormat (0i64) ; pub const _3D : TransformFormat = TransformFormat (1i64) ; } impl From < i64 > for TransformFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TransformFormat > for i64 { # [inline] fn from (v : TransformFormat) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MultiMesh { pub const COLOR_8BIT : i64 = 1i64 ; pub const COLOR_FLOAT : i64 = 2i64 ; pub const COLOR_NONE : i64 = 0i64 ; pub const CUSTOM_DATA_8BIT : i64 = 1i64 ; pub const CUSTOM_DATA_FLOAT : i64 = 2i64 ; pub const CUSTOM_DATA_NONE : i64 = 0i64 ; pub const TRANSFORM_2D : i64 = 0i64 ; pub const TRANSFORM_3D : i64 = 1i64 ; } impl MultiMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the visibility axis-aligned bounding box in local space. See also [method VisualInstance.get_transformed_aabb]."] # [doc = ""] # [inline] pub fn get_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_aabb ; let ret = crate :: icalls :: icallptr_aabb (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Format of colors in color array that gets passed to shader."] # [doc = ""] # [inline] pub fn color_format (& self) -> crate :: generated :: multi_mesh :: ColorFormat { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_color_format ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: multi_mesh :: ColorFormat (ret) } } # [doc = "Format of custom data in custom data array that gets passed to shader."] # [doc = ""] # [inline] pub fn custom_data_format (& self) -> crate :: generated :: multi_mesh :: CustomDataFormat { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_custom_data_format ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: multi_mesh :: CustomDataFormat (ret) } } # [doc = "Gets a specific instance's color."] # [doc = ""] # [inline] pub fn get_instance_color (& self , instance : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_color ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , instance) ; mem :: transmute (ret) } } # [doc = "Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count]."] # [doc = ""] # [inline] pub fn instance_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the custom data that has been set for a specific instance."] # [doc = ""] # [inline] pub fn get_instance_custom_data (& self , instance : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_custom_data ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , instance) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform] of a specific instance."] # [doc = ""] # [inline] pub fn get_instance_transform (& self , instance : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_transform ; let ret = crate :: icalls :: icallptr_trans_i64 (method_bind , self . this . sys () . as_ptr () , instance) ; mem :: transmute (ret) } } # [doc = "Returns the [Transform2D] of a specific instance."] # [doc = ""] # [inline] pub fn get_instance_transform_2d (& self , instance : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_transform_2d ; let ret = crate :: icalls :: icallptr_trans2D_i64 (method_bind , self . this . sys () . as_ptr () , instance) ; mem :: transmute (ret) } } # [doc = "Mesh to be drawn."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Format of transform used to transform mesh, either 2D or 3D."] # [doc = ""] # [inline] pub fn transform_format (& self) -> crate :: generated :: multi_mesh :: TransformFormat { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_transform_format ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: multi_mesh :: TransformFormat (ret) } } # [doc = "Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers."] # [doc = ""] # [inline] pub fn visible_instance_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_visible_instance_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative.\nAll data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc...\n[Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, `COLOR_8BIT` / `CUSTOM_DATA_8BIT` is stored as 1 float (4 bytes as is) and `COLOR_FLOAT` / `CUSTOM_DATA_FLOAT` is stored as 4 floats."] # [doc = ""] # [inline] pub fn set_as_bulk_array (& self , array : Float32Array) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_as_bulk_array ; let ret = crate :: icalls :: icallptr_void_f32arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Format of colors in color array that gets passed to shader."] # [doc = ""] # [inline] pub fn set_color_format (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_color_format ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [doc = "Format of custom data in custom data array that gets passed to shader."] # [doc = ""] # [inline] pub fn set_custom_data_format (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_custom_data_format ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [doc = "Sets the color of a specific instance.\nFor the color to take effect, ensure that [member color_format] is non-`null` on the [MultiMesh] and [member SpatialMaterial.vertex_color_use_as_albedo] is `true` on the material."] # [doc = ""] # [inline] pub fn set_instance_color (& self , instance : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_color ; let ret = crate :: icalls :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , instance , color) ; } } # [doc = "Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count]."] # [doc = ""] # [inline] pub fn set_instance_count (& self , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_count ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , count) ; } } # [doc = "Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers. The format of the number can change depending on the [enum CustomDataFormat] used."] # [doc = ""] # [inline] pub fn set_instance_custom_data (& self , instance : i64 , custom_data : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_custom_data ; let ret = crate :: icalls :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , instance , custom_data) ; } } # [doc = "Sets the [Transform] for a specific instance."] # [doc = ""] # [inline] pub fn set_instance_transform (& self , instance : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_transform ; let ret = crate :: icalls :: icallptr_void_i64_trans (method_bind , self . this . sys () . as_ptr () , instance , transform) ; } } # [doc = "Sets the [Transform2D] for a specific instance."] # [doc = ""] # [inline] pub fn set_instance_transform_2d (& self , instance : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_transform_2d ; let ret = crate :: icalls :: icallptr_void_i64_trans2D (method_bind , self . this . sys () . as_ptr () , instance , transform) ; } } # [doc = "Mesh to be drawn."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = "Format of transform used to transform mesh, either 2D or 3D."] # [doc = ""] # [inline] pub fn set_transform_format (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_transform_format ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , format) ; } } # [doc = "Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers."] # [doc = ""] # [inline] pub fn set_visible_instance_count (& self , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_visible_instance_count ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , count) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiMesh { } unsafe impl GodotObject for MultiMesh { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiMesh" } } impl std :: ops :: Deref for MultiMesh { type Target = crate :: generated :: resource :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: resource :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: resource :: Resource > for MultiMesh { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for MultiMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for MultiMesh { } impl Instanciable for MultiMesh { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { MultiMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_aabb : * mut sys :: godot_method_bind , pub get_color_format : * mut sys :: godot_method_bind , pub get_custom_data_format : * mut sys :: godot_method_bind , pub get_instance_color : * mut sys :: godot_method_bind , pub get_instance_count : * mut sys :: godot_method_bind , pub get_instance_custom_data : * mut sys :: godot_method_bind , pub get_instance_transform : * mut sys :: godot_method_bind , pub get_instance_transform_2d : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_transform_format : * mut sys :: godot_method_bind , pub get_visible_instance_count : * mut sys :: godot_method_bind , pub set_as_bulk_array : * mut sys :: godot_method_bind , pub set_color_format : * mut sys :: godot_method_bind , pub set_custom_data_format : * mut sys :: godot_method_bind , pub set_instance_color : * mut sys :: godot_method_bind , pub set_instance_count : * mut sys :: godot_method_bind , pub set_instance_custom_data : * mut sys :: godot_method_bind , pub set_instance_transform : * mut sys :: godot_method_bind , pub set_instance_transform_2d : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind , pub set_transform_format : * mut sys :: godot_method_bind , pub set_visible_instance_count : * mut sys :: godot_method_bind } impl MultiMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiMeshMethodTable = MultiMeshMethodTable { class_constructor : None , get_aabb : 0 as * mut sys :: godot_method_bind , get_color_format : 0 as * mut sys :: godot_method_bind , get_custom_data_format : 0 as * mut sys :: godot_method_bind , get_instance_color : 0 as * mut sys :: godot_method_bind , get_instance_count : 0 as * mut sys :: godot_method_bind , get_instance_custom_data : 0 as * mut sys :: godot_method_bind , get_instance_transform : 0 as * mut sys :: godot_method_bind , get_instance_transform_2d : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_transform_format : 0 as * mut sys :: godot_method_bind , get_visible_instance_count : 0 as * mut sys :: godot_method_bind , set_as_bulk_array : 0 as * mut sys :: godot_method_bind , set_color_format : 0 as * mut sys :: godot_method_bind , set_custom_data_format : 0 as * mut sys :: godot_method_bind , set_instance_color : 0 as * mut sys :: godot_method_bind , set_instance_count : 0 as * mut sys :: godot_method_bind , set_instance_custom_data : 0 as * mut sys :: godot_method_bind , set_instance_transform : 0 as * mut sys :: godot_method_bind , set_instance_transform_2d : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind , set_transform_format : 0 as * mut sys :: godot_method_bind , set_visible_instance_count : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { MultiMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\0" . as_ptr () as * const c_char) ; table . get_color_format = (gd_api . godot_method_bind_get_method) (class_name , "get_color_format\0" . as_ptr () as * const c_char) ; table . get_custom_data_format = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_data_format\0" . as_ptr () as * const c_char) ; table . get_instance_color = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_color\0" . as_ptr () as * const c_char) ; table . get_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_count\0" . as_ptr () as * const c_char) ; table . get_instance_custom_data = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_custom_data\0" . as_ptr () as * const c_char) ; table . get_instance_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_transform\0" . as_ptr () as * const c_char) ; table . get_instance_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_transform_2d\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_transform_format = (gd_api . godot_method_bind_get_method) (class_name , "get_transform_format\0" . as_ptr () as * const c_char) ; table . get_visible_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_instance_count\0" . as_ptr () as * const c_char) ; table . set_as_bulk_array = (gd_api . godot_method_bind_get_method) (class_name , "set_as_bulk_array\0" . as_ptr () as * const c_char) ; table . set_color_format = (gd_api . godot_method_bind_get_method) (class_name , "set_color_format\0" . as_ptr () as * const c_char) ; table . set_custom_data_format = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_data_format\0" . as_ptr () as * const c_char) ; table . set_instance_color = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_color\0" . as_ptr () as * const c_char) ; table . set_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_count\0" . as_ptr () as * const c_char) ; table . set_instance_custom_data = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_custom_data\0" . as_ptr () as * const c_char) ; table . set_instance_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_transform\0" . as_ptr () as * const c_char) ; table . set_instance_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_transform_2d\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_transform_format = (gd_api . godot_method_bind_get_method) (class_name , "set_transform_format\0" . as_ptr () as * const c_char) ; table . set_visible_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "set_visible_instance_count\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1204:4445 [INFO] [stdout] | [INFO] [stdout] 1204 | ...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] 1204 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1210:5249 [INFO] [stdout] | [INFO] [stdout] 1210 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1210 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1216:40395 [INFO] [stdout] | [INFO] [stdout] 1216 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1216 | # [doc = "`core class ItemList` inherits `Control` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_itemlist.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ItemList` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nItemList inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ItemList { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct IconMode (pub i64) ; impl IconMode { pub const TOP : IconMode = IconMode (0i64) ; pub const LEFT : IconMode = IconMode (1i64) ; } impl From < i64 > for IconMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < IconMode > for i64 { # [inline] fn from (v : IconMode) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SelectMode (pub i64) ; impl SelectMode { pub const SINGLE : SelectMode = SelectMode (0i64) ; pub const MULTI : SelectMode = SelectMode (1i64) ; } impl From < i64 > for SelectMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SelectMode > for i64 { # [inline] fn from (v : SelectMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ItemList { pub const ICON_MODE_LEFT : i64 = 1i64 ; pub const ICON_MODE_TOP : i64 = 0i64 ; pub const SELECT_MULTI : i64 = 1i64 ; pub const SELECT_SINGLE : i64 = 0i64 ; } impl ItemList { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ItemListMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an item to the item list with no text, only an icon.\n# Default Arguments\n* `selectable` - `true`"] # [doc = ""] # [inline] pub fn add_icon_item (& self , icon : impl AsArg < crate :: generated :: texture :: Texture > , selectable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . add_icon_item ; let ret = crate :: icalls :: icallptr_void_obj_bool (method_bind , self . this . sys () . as_ptr () , icon . as_arg_ptr () , selectable) ; } } # [doc = "Adds an item to the item list with specified text. Specify an `icon`, or use `null` as the `icon` for a list item with no icon.\nIf selectable is `true`, the list item will be selectable.\n# Default Arguments\n* `icon` - `null`\n* `selectable` - `true`"] # [doc = ""] # [inline] pub fn add_item (& self , text : impl Into < GodotString > , icon : impl AsArg < crate :: generated :: texture :: Texture > , selectable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . add_item ; let ret = crate :: icalls :: icallptr_void_str_obj_bool (method_bind , self . this . sys () . as_ptr () , text . into () , icon . as_arg_ptr () , selectable) ; } } # [doc = "Removes all items from the list."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Ensure current selection is visible, adjusting the scroll position as necessary."] # [doc = ""] # [inline] pub fn ensure_current_is_visible (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . ensure_current_is_visible ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the currently selected item can be selected again."] # [doc = ""] # [inline] pub fn allow_reselect (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_allow_reselect ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, right mouse button click can select items."] # [doc = ""] # [inline] pub fn allow_rmb_select (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_allow_rmb_select ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The width all columns will be adjusted to.\nA value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width."] # [doc = ""] # [inline] pub fn fixed_column_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_fixed_column_width ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The size all icons will be adjusted to.\nIf either X or Y component is not greater than zero, icon size won't be affected."] # [doc = ""] # [inline] pub fn fixed_icon_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_fixed_icon_size ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The icon position, whether above or to the left of the text. See the [enum IconMode] constants."] # [doc = ""] # [inline] pub fn icon_mode (& self) -> crate :: generated :: item_list :: IconMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_icon_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: item_list :: IconMode (ret) } } # [doc = "The scale of icon applied after [member fixed_icon_size] and transposing takes effect."] # [doc = ""] # [inline] pub fn icon_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_icon_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the item index at the given `position`.\nWhen there is no item at that point, -1 will be returned if `exact` is `true`, and the closest item index will be returned otherwise.\n# Default Arguments\n* `exact` - `false`"] # [doc = ""] # [inline] pub fn get_item_at_position (& self , position : Vector2 , exact : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_at_position ; let ret = crate :: icalls :: icallptr_i64_vec2_bool (method_bind , self . this . sys () . as_ptr () , position , exact) ; ret as _ } } # [doc = "Returns the number of items currently in the list."] # [doc = ""] # [inline] pub fn get_item_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the custom background color of the item specified by `idx` index."] # [doc = ""] # [inline] pub fn get_item_custom_bg_color (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_custom_bg_color ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the custom foreground color of the item specified by `idx` index."] # [doc = ""] # [inline] pub fn get_item_custom_fg_color (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_custom_fg_color ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the icon associated with the specified index."] # [doc = ""] # [inline] pub fn get_item_icon (& self , idx : i64) -> Option < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_icon ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: texture :: Texture , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns a [Color] modulating item's icon at the specified index."] # [doc = ""] # [inline] pub fn get_item_icon_modulate (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_icon_modulate ; let ret = crate :: icalls :: icallptr_color_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the region of item's icon used. The whole icon will be used if the region has no area."] # [doc = ""] # [inline] pub fn get_item_icon_region (& self , idx : i64) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_icon_region ; let ret = crate :: icalls :: icallptr_rect2_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; mem :: transmute (ret) } } # [doc = "Returns the metadata value of the specified index."] # [doc = ""] # [inline] pub fn get_item_metadata (& self , idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_metadata ; let ret = crate :: icalls :: icallptr_var_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Variant :: from_sys (ret) } } # [doc = "Returns the text associated with the specified index."] # [doc = ""] # [inline] pub fn get_item_text (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_text ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Returns the tooltip hint associated with the specified index."] # [doc = ""] # [inline] pub fn get_item_tooltip (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_tooltip ; let ret = crate :: icalls :: icallptr_str_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; GodotString :: from_sys (ret) } } # [doc = "Maximum columns the list will have.\nIf greater than zero, the content will be split among the specified columns.\nA value of zero means unlimited columns, i.e. all items will be put in the same row."] # [doc = ""] # [inline] pub fn max_columns (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_max_columns ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display.\n**Note:** This property takes effect only when [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member fixed_column_width] should be greater than zero."] # [doc = ""] # [inline] pub fn max_text_lines (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_max_text_lines ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Allows single or multiple item selection. See the [enum SelectMode] constants."] # [doc = ""] # [inline] pub fn select_mode (& self) -> crate :: generated :: item_list :: SelectMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_select_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: item_list :: SelectMode (ret) } } # [doc = "Returns an array with the indexes of the selected items."] # [doc = ""] # [inline] pub fn get_selected_items (& self) -> Int32Array { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_selected_items ; let ret = crate :: icalls :: icallptr_i32arr (method_bind , self . this . sys () . as_ptr ()) ; Int32Array :: from_sys (ret) } } # [doc = "Returns the [Object] ID associated with the list."] # [doc = ""] # [inline] pub fn get_v_scroll (& self) -> Option < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_v_scroll ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: vscroll_bar :: VScrollBar , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "If `true`, the control will automatically resize the height to fit its content."] # [doc = ""] # [inline] pub fn has_auto_height (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . has_auto_height ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if one or more items are selected."] # [doc = ""] # [inline] pub fn is_anything_selected (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_anything_selected ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the item at the specified index is disabled."] # [doc = ""] # [inline] pub fn is_item_disabled (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_item_disabled ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns `true` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped."] # [doc = ""] # [inline] pub fn is_item_icon_transposed (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_item_icon_transposed ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns `true` if the item at the specified index is selectable."] # [doc = ""] # [inline] pub fn is_item_selectable (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_item_selectable ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Returns `true` if the tooltip is enabled for specified item index."] # [doc = ""] # [inline] pub fn is_item_tooltip_enabled (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_item_tooltip_enabled ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Whether all columns will have the same width.\nIf `true`, the width is equal to the largest column width of all columns."] # [doc = ""] # [inline] pub fn is_same_column_width (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_same_column_width ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns `true` if the item at the specified index is currently selected."] # [doc = ""] # [inline] pub fn is_selected (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_selected ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; ret as _ } } # [doc = "Moves item from index `from_idx` to `to_idx`."] # [doc = ""] # [inline] pub fn move_item (& self , from_idx : i64 , to_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . move_item ; let ret = crate :: icalls :: icallptr_void_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_idx , to_idx) ; } } # [doc = "Removes the item specified by `idx` index from the list."] # [doc = ""] # [inline] pub fn remove_item (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . remove_item ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "Select the item at the specified index.\n**Note:** This method does not trigger the item selection signal.\n# Default Arguments\n* `single` - `true`"] # [doc = ""] # [inline] pub fn select (& self , idx : i64 , single : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . select ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , single) ; } } # [doc = "If `true`, the currently selected item can be selected again."] # [doc = ""] # [inline] pub fn set_allow_reselect (& self , allow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_allow_reselect ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , allow) ; } } # [doc = "If `true`, right mouse button click can select items."] # [doc = ""] # [inline] pub fn set_allow_rmb_select (& self , allow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_allow_rmb_select ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , allow) ; } } # [doc = "If `true`, the control will automatically resize the height to fit its content."] # [doc = ""] # [inline] pub fn set_auto_height (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_auto_height ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "The width all columns will be adjusted to.\nA value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width."] # [doc = ""] # [inline] pub fn set_fixed_column_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_fixed_column_width ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , width) ; } } # [doc = "The size all icons will be adjusted to.\nIf either X or Y component is not greater than zero, icon size won't be affected."] # [doc = ""] # [inline] pub fn set_fixed_icon_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_fixed_icon_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The icon position, whether above or to the left of the text. See the [enum IconMode] constants."] # [doc = ""] # [inline] pub fn set_icon_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_icon_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "The scale of icon applied after [member fixed_icon_size] and transposing takes effect."] # [doc = ""] # [inline] pub fn set_icon_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_icon_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the background color of the item specified by `idx` index to the specified [Color].\n```gdscript\nvar some_string = \"Some text\"\nsome_string.set_item_custom_bg_color(0,Color(1, 0, 0, 1) # This will set the background color of the first item of the control to red.\n```"] # [doc = ""] # [inline] pub fn set_item_custom_bg_color (& self , idx : i64 , custom_bg_color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_custom_bg_color ; let ret = crate :: icalls :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , idx , custom_bg_color) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the foreground color of the item specified by `idx` index to the specified [Color].\n```gdscript\nvar some_string = \"Some text\"\nsome_string.set_item_custom_fg_color(0,Color(1, 0, 0, 1) # This will set the foreground color of the first item of the control to red.\n```"] # [doc = ""] # [inline] pub fn set_item_custom_fg_color (& self , idx : i64 , custom_fg_color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_custom_fg_color ; let ret = crate :: icalls :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , idx , custom_fg_color) ; } } # [doc = "Disables (or enables) the item at the specified index.\nDisabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing Enter)."] # [doc = ""] # [inline] pub fn set_item_disabled (& self , idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_disabled ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , disabled) ; } } # [doc = "Sets (or replaces) the icon's [Texture] associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_icon (& self , idx : i64 , icon : impl AsArg < crate :: generated :: texture :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_icon ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , idx , icon . as_arg_ptr ()) ; } } # [doc = "Sets a modulating [Color] of the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_icon_modulate (& self , idx : i64 , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_icon_modulate ; let ret = crate :: icalls :: icallptr_void_i64_color (method_bind , self . this . sys () . as_ptr () , idx , modulate) ; } } # [doc = "Sets the region of item's icon used. The whole icon will be used if the region has no area."] # [doc = ""] # [inline] pub fn set_item_icon_region (& self , idx : i64 , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_icon_region ; let ret = crate :: icalls :: icallptr_void_i64_rect2 (method_bind , self . this . sys () . as_ptr () , idx , rect) ; } } # [doc = "Sets whether the item icon will be drawn transposed."] # [doc = ""] # [inline] pub fn set_item_icon_transposed (& self , idx : i64 , transposed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_icon_transposed ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , transposed) ; } } # [doc = "Sets a value (of any type) to be stored with the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_metadata (& self , idx : i64 , metadata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_metadata ; let ret = crate :: icalls :: icallptr_void_i64_var (method_bind , self . this . sys () . as_ptr () , idx , metadata . owned_to_variant ()) ; } } # [doc = "Allows or disallows selection of the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_selectable (& self , idx : i64 , selectable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_selectable ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , selectable) ; } } # [doc = "Sets text of the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_text (& self , idx : i64 , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_text ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , idx , text . into ()) ; } } # [doc = "Sets the tooltip hint for the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_tooltip (& self , idx : i64 , tooltip : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_tooltip ; let ret = crate :: icalls :: icallptr_void_i64_str (method_bind , self . this . sys () . as_ptr () , idx , tooltip . into ()) ; } } # [doc = "Sets whether the tooltip hint is enabled for specified item index."] # [doc = ""] # [inline] pub fn set_item_tooltip_enabled (& self , idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_tooltip_enabled ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , idx , enable) ; } } # [doc = "Maximum columns the list will have.\nIf greater than zero, the content will be split among the specified columns.\nA value of zero means unlimited columns, i.e. all items will be put in the same row."] # [doc = ""] # [inline] pub fn set_max_columns (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_max_columns ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , amount) ; } } # [doc = "Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display.\n**Note:** This property takes effect only when [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member fixed_column_width] should be greater than zero."] # [doc = ""] # [inline] pub fn set_max_text_lines (& self , lines : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_max_text_lines ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , lines) ; } } # [doc = "Whether all columns will have the same width.\nIf `true`, the width is equal to the largest column width of all columns."] # [doc = ""] # [inline] pub fn set_same_column_width (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_same_column_width ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Allows single or multiple item selection. See the [enum SelectMode] constants."] # [doc = ""] # [inline] pub fn set_select_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_select_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Sorts items in the list by their text."] # [doc = ""] # [inline] pub fn sort_items_by_text (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . sort_items_by_text ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Ensures the item associated with the specified index is not selected."] # [doc = ""] # [inline] pub fn unselect (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . unselect ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; } } # [doc = "Ensures there are no items selected."] # [doc = ""] # [inline] pub fn unselect_all (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . unselect_all ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ItemList { } unsafe impl GodotObject for ItemList { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ItemList" } } impl QueueFree for ItemList { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ItemList { type Target = crate :: generated :: control :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ItemList { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: control :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: control :: Control > for ItemList { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ItemList { } unsafe impl SubClass < crate :: generated :: node :: Node > for ItemList { } unsafe impl SubClass < crate :: generated :: object :: Object > for ItemList { } impl Instanciable for ItemList { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ItemList :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ItemListMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_icon_item : * mut sys :: godot_method_bind , pub add_item : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub ensure_current_is_visible : * mut sys :: godot_method_bind , pub get_allow_reselect : * mut sys :: godot_method_bind , pub get_allow_rmb_select : * mut sys :: godot_method_bind , pub get_fixed_column_width : * mut sys :: godot_method_bind , pub get_fixed_icon_size : * mut sys :: godot_method_bind , pub get_icon_mode : * mut sys :: godot_method_bind , pub get_icon_scale : * mut sys :: godot_method_bind , pub get_item_at_position : * mut sys :: godot_method_bind , pub get_item_count : * mut sys :: godot_method_bind , pub get_item_custom_bg_color : * mut sys :: godot_method_bind , pub get_item_custom_fg_color : * mut sys :: godot_method_bind , pub get_item_icon : * mut sys :: godot_method_bind , pub get_item_icon_modulate : * mut sys :: godot_method_bind , pub get_item_icon_region : * mut sys :: godot_method_bind , pub get_item_metadata : * mut sys :: godot_method_bind , pub get_item_text : * mut sys :: godot_method_bind , pub get_item_tooltip : * mut sys :: godot_method_bind , pub get_max_columns : * mut sys :: godot_method_bind , pub get_max_text_lines : * mut sys :: godot_method_bind , pub get_select_mode : * mut sys :: godot_method_bind , pub get_selected_items : * mut sys :: godot_method_bind , pub get_v_scroll : * mut sys :: godot_method_bind , pub has_auto_height : * mut sys :: godot_method_bind , pub is_anything_selected : * mut sys :: godot_method_bind , pub is_item_disabled : * mut sys :: godot_method_bind , pub is_item_icon_transposed : * mut sys :: godot_method_bind , pub is_item_selectable : * mut sys :: godot_method_bind , pub is_item_tooltip_enabled : * mut sys :: godot_method_bind , pub is_same_column_width : * mut sys :: godot_method_bind , pub is_selected : * mut sys :: godot_method_bind , pub move_item : * mut sys :: godot_method_bind , pub remove_item : * mut sys :: godot_method_bind , pub select : * mut sys :: godot_method_bind , pub set_allow_reselect : * mut sys :: godot_method_bind , pub set_allow_rmb_select : * mut sys :: godot_method_bind , pub set_auto_height : * mut sys :: godot_method_bind , pub set_fixed_column_width : * mut sys :: godot_method_bind , pub set_fixed_icon_size : * mut sys :: godot_method_bind , pub set_icon_mode : * mut sys :: godot_method_bind , pub set_icon_scale : * mut sys :: godot_method_bind , pub set_item_custom_bg_color : * mut sys :: godot_method_bind , pub set_item_custom_fg_color : * mut sys :: godot_method_bind , pub set_item_disabled : * mut sys :: godot_method_bind , pub set_item_icon : * mut sys :: godot_method_bind , pub set_item_icon_modulate : * mut sys :: godot_method_bind , pub set_item_icon_region : * mut sys :: godot_method_bind , pub set_item_icon_transposed : * mut sys :: godot_method_bind , pub set_item_metadata : * mut sys :: godot_method_bind , pub set_item_selectable : * mut sys :: godot_method_bind , pub set_item_text : * mut sys :: godot_method_bind , pub set_item_tooltip : * mut sys :: godot_method_bind , pub set_item_tooltip_enabled : * mut sys :: godot_method_bind , pub set_max_columns : * mut sys :: godot_method_bind , pub set_max_text_lines : * mut sys :: godot_method_bind , pub set_same_column_width : * mut sys :: godot_method_bind , pub set_select_mode : * mut sys :: godot_method_bind , pub sort_items_by_text : * mut sys :: godot_method_bind , pub unselect : * mut sys :: godot_method_bind , pub unselect_all : * mut sys :: godot_method_bind } impl ItemListMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ItemListMethodTable = ItemListMethodTable { class_constructor : None , add_icon_item : 0 as * mut sys :: godot_method_bind , add_item : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , ensure_current_is_visible : 0 as * mut sys :: godot_method_bind , get_allow_reselect : 0 as * mut sys :: godot_method_bind , get_allow_rmb_select : 0 as * mut sys :: godot_method_bind , get_fixed_column_width : 0 as * mut sys :: godot_method_bind , get_fixed_icon_size : 0 as * mut sys :: godot_method_bind , get_icon_mode : 0 as * mut sys :: godot_method_bind , get_icon_scale : 0 as * mut sys :: godot_method_bind , get_item_at_position : 0 as * mut sys :: godot_method_bind , get_item_count : 0 as * mut sys :: godot_method_bind , get_item_custom_bg_color : 0 as * mut sys :: godot_method_bind , get_item_custom_fg_color : 0 as * mut sys :: godot_method_bind , get_item_icon : 0 as * mut sys :: godot_method_bind , get_item_icon_modulate : 0 as * mut sys :: godot_method_bind , get_item_icon_region : 0 as * mut sys :: godot_method_bind , get_item_metadata : 0 as * mut sys :: godot_method_bind , get_item_text : 0 as * mut sys :: godot_method_bind , get_item_tooltip : 0 as * mut sys :: godot_method_bind , get_max_columns : 0 as * mut sys :: godot_method_bind , get_max_text_lines : 0 as * mut sys :: godot_method_bind , get_select_mode : 0 as * mut sys :: godot_method_bind , get_selected_items : 0 as * mut sys :: godot_method_bind , get_v_scroll : 0 as * mut sys :: godot_method_bind , has_auto_height : 0 as * mut sys :: godot_method_bind , is_anything_selected : 0 as * mut sys :: godot_method_bind , is_item_disabled : 0 as * mut sys :: godot_method_bind , is_item_icon_transposed : 0 as * mut sys :: godot_method_bind , is_item_selectable : 0 as * mut sys :: godot_method_bind , is_item_tooltip_enabled : 0 as * mut sys :: godot_method_bind , is_same_column_width : 0 as * mut sys :: godot_method_bind , is_selected : 0 as * mut sys :: godot_method_bind , move_item : 0 as * mut sys :: godot_method_bind , remove_item : 0 as * mut sys :: godot_method_bind , select : 0 as * mut sys :: godot_method_bind , set_allow_reselect : 0 as * mut sys :: godot_method_bind , set_allow_rmb_select : 0 as * mut sys :: godot_method_bind , set_auto_height : 0 as * mut sys :: godot_method_bind , set_fixed_column_width : 0 as * mut sys :: godot_method_bind , set_fixed_icon_size : 0 as * mut sys :: godot_method_bind , set_icon_mode : 0 as * mut sys :: godot_method_bind , set_icon_scale : 0 as * mut sys :: godot_method_bind , set_item_custom_bg_color : 0 as * mut sys :: godot_method_bind , set_item_custom_fg_color : 0 as * mut sys :: godot_method_bind , set_item_disabled : 0 as * mut sys :: godot_method_bind , set_item_icon : 0 as * mut sys :: godot_method_bind , set_item_icon_modulate : 0 as * mut sys :: godot_method_bind , set_item_icon_region : 0 as * mut sys :: godot_method_bind , set_item_icon_transposed : 0 as * mut sys :: godot_method_bind , set_item_metadata : 0 as * mut sys :: godot_method_bind , set_item_selectable : 0 as * mut sys :: godot_method_bind , set_item_text : 0 as * mut sys :: godot_method_bind , set_item_tooltip : 0 as * mut sys :: godot_method_bind , set_item_tooltip_enabled : 0 as * mut sys :: godot_method_bind , set_max_columns : 0 as * mut sys :: godot_method_bind , set_max_text_lines : 0 as * mut sys :: godot_method_bind , set_same_column_width : 0 as * mut sys :: godot_method_bind , set_select_mode : 0 as * mut sys :: godot_method_bind , sort_items_by_text : 0 as * mut sys :: godot_method_bind , unselect : 0 as * mut sys :: godot_method_bind , unselect_all : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ItemListMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ItemList\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_icon_item = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_item\0" . as_ptr () as * const c_char) ; table . add_item = (gd_api . godot_method_bind_get_method) (class_name , "add_item\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . ensure_current_is_visible = (gd_api . godot_method_bind_get_method) (class_name , "ensure_current_is_visible\0" . as_ptr () as * const c_char) ; table . get_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_reselect\0" . as_ptr () as * const c_char) ; table . get_allow_rmb_select = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_rmb_select\0" . as_ptr () as * const c_char) ; table . get_fixed_column_width = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_column_width\0" . as_ptr () as * const c_char) ; table . get_fixed_icon_size = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_icon_size\0" . as_ptr () as * const c_char) ; table . get_icon_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_mode\0" . as_ptr () as * const c_char) ; table . get_icon_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_scale\0" . as_ptr () as * const c_char) ; table . get_item_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_item_at_position\0" . as_ptr () as * const c_char) ; table . get_item_count = (gd_api . godot_method_bind_get_method) (class_name , "get_item_count\0" . as_ptr () as * const c_char) ; table . get_item_custom_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_item_custom_bg_color\0" . as_ptr () as * const c_char) ; table . get_item_custom_fg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_item_custom_fg_color\0" . as_ptr () as * const c_char) ; table . get_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon\0" . as_ptr () as * const c_char) ; table . get_item_icon_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon_modulate\0" . as_ptr () as * const c_char) ; table . get_item_icon_region = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon_region\0" . as_ptr () as * const c_char) ; table . get_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_item_metadata\0" . as_ptr () as * const c_char) ; table . get_item_text = (gd_api . godot_method_bind_get_method) (class_name , "get_item_text\0" . as_ptr () as * const c_char) ; table . get_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_item_tooltip\0" . as_ptr () as * const c_char) ; table . get_max_columns = (gd_api . godot_method_bind_get_method) (class_name , "get_max_columns\0" . as_ptr () as * const c_char) ; table . get_max_text_lines = (gd_api . godot_method_bind_get_method) (class_name , "get_max_text_lines\0" . as_ptr () as * const c_char) ; table . get_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_select_mode\0" . as_ptr () as * const c_char) ; table . get_selected_items = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_items\0" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\0" . as_ptr () as * const c_char) ; table . has_auto_height = (gd_api . godot_method_bind_get_method) (class_name , "has_auto_height\0" . as_ptr () as * const c_char) ; table . is_anything_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_anything_selected\0" . as_ptr () as * const c_char) ; table . is_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_disabled\0" . as_ptr () as * const c_char) ; table . is_item_icon_transposed = (gd_api . godot_method_bind_get_method) (class_name , "is_item_icon_transposed\0" . as_ptr () as * const c_char) ; table . is_item_selectable = (gd_api . godot_method_bind_get_method) (class_name , "is_item_selectable\0" . as_ptr () as * const c_char) ; table . is_item_tooltip_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_tooltip_enabled\0" . as_ptr () as * const c_char) ; table . is_same_column_width = (gd_api . godot_method_bind_get_method) (class_name , "is_same_column_width\0" . as_ptr () as * const c_char) ; table . is_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_selected\0" . as_ptr () as * const c_char) ; table . move_item = (gd_api . godot_method_bind_get_method) (class_name , "move_item\0" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\0" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\0" . as_ptr () as * const c_char) ; table . set_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_reselect\0" . as_ptr () as * const c_char) ; table . set_allow_rmb_select = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_rmb_select\0" . as_ptr () as * const c_char) ; table . set_auto_height = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_height\0" . as_ptr () as * const c_char) ; table . set_fixed_column_width = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_column_width\0" . as_ptr () as * const c_char) ; table . set_fixed_icon_size = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_icon_size\0" . as_ptr () as * const c_char) ; table . set_icon_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_mode\0" . as_ptr () as * const c_char) ; table . set_icon_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_scale\0" . as_ptr () as * const c_char) ; table . set_item_custom_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_item_custom_bg_color\0" . as_ptr () as * const c_char) ; table . set_item_custom_fg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_item_custom_fg_color\0" . as_ptr () as * const c_char) ; table . set_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_disabled\0" . as_ptr () as * const c_char) ; table . set_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon\0" . as_ptr () as * const c_char) ; table . set_item_icon_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon_modulate\0" . as_ptr () as * const c_char) ; table . set_item_icon_region = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon_region\0" . as_ptr () as * const c_char) ; table . set_item_icon_transposed = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon_transposed\0" . as_ptr () as * const c_char) ; table . set_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_item_metadata\0" . as_ptr () as * const c_char) ; table . set_item_selectable = (gd_api . godot_method_bind_get_method) (class_name , "set_item_selectable\0" . as_ptr () as * const c_char) ; table . set_item_text = (gd_api . godot_method_bind_get_method) (class_name , "set_item_text\0" . as_ptr () as * const c_char) ; table . set_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_item_tooltip\0" . as_ptr () as * const c_char) ; table . set_item_tooltip_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_tooltip_enabled\0" . as_ptr () as * const c_char) ; table . set_max_columns = (gd_api . godot_method_bind_get_method) (class_name , "set_max_columns\0" . as_ptr () as * const c_char) ; table . set_max_text_lines = (gd_api . godot_method_bind_get_method) (class_name , "set_max_text_lines\0" . as_ptr () as * const c_char) ; table . set_same_column_width = (gd_api . godot_method_bind_get_method) (class_name , "set_same_column_width\0" . as_ptr () as * const c_char) ; table . set_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_select_mode\0" . as_ptr () as * const c_char) ; table . sort_items_by_text = (gd_api . godot_method_bind_get_method) (class_name , "sort_items_by_text\0" . as_ptr () as * const c_char) ; table . unselect = (gd_api . godot_method_bind_get_method) (class_name , "unselect\0" . as_ptr () as * const c_char) ; table . unselect_all = (gd_api . godot_method_bind_get_method) (class_name , "unselect_all\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1222:3927 [INFO] [stdout] | [INFO] [stdout] 1222 | ...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] 1222 | # [doc = "`core class AudioEffectBandLimitFilter` inherits `AudioEffectFilter` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_audioeffectbandlimitfilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectBandLimitFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectBandLimitFilter { this : RawObject < Self > , } impl AudioEffectBandLimitFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectBandLimitFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectBandLimitFilter { } unsafe impl GodotObject for AudioEffectBandLimitFilter { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectBandLimitFilter" } } impl std :: ops :: Deref for AudioEffectBandLimitFilter { type Target = crate :: generated :: audio_effect_filter :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectBandLimitFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: audio_effect_filter :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: audio_effect_filter :: AudioEffectFilter > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: audio_effect :: AudioEffect > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: object :: Object > for AudioEffectBandLimitFilter { } impl Instanciable for AudioEffectBandLimitFilter { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AudioEffectBandLimitFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectBandLimitFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectBandLimitFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectBandLimitFilterMethodTable = AudioEffectBandLimitFilterMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AudioEffectBandLimitFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectBandLimitFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1228:7789 [INFO] [stdout] | [INFO] [stdout] 1228 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1228 | # [doc = "`core class Bone2D` inherits `Node2D` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_bone2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`Bone2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nBone2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Bone2D { this : RawObject < Self > , } impl Bone2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Bone2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Stores the node's current transforms in [member rest]."] # [doc = ""] # [inline] pub fn apply_rest (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . apply_rest ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Length of the bone's representation drawn in the editor's viewport in pixels."] # [doc = ""] # [inline] pub fn default_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . get_default_length ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the node's index as part of the entire skeleton. See [Skeleton2D]."] # [doc = ""] # [inline] pub fn get_index_in_skeleton (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . get_index_in_skeleton ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest]."] # [doc = ""] # [inline] pub fn rest (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . get_rest ; let ret = crate :: icalls :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Returns the node's [member rest] `Transform2D` if it doesn't have a parent, or its rest pose relative to its parent."] # [doc = ""] # [inline] pub fn get_skeleton_rest (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . get_skeleton_rest ; let ret = crate :: icalls :: icallptr_trans2D (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "Length of the bone's representation drawn in the editor's viewport in pixels."] # [doc = ""] # [inline] pub fn set_default_length (& self , default_length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . set_default_length ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , default_length) ; } } # [doc = "Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest]."] # [doc = ""] # [inline] pub fn set_rest (& self , rest : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . set_rest ; let ret = crate :: icalls :: icallptr_void_trans2D (method_bind , self . this . sys () . as_ptr () , rest) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Bone2D { } unsafe impl GodotObject for Bone2D { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Bone2D" } } impl QueueFree for Bone2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for Bone2D { type Target = crate :: generated :: node_2d :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Bone2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: node_2d :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: node_2d :: Node2D > for Bone2D { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for Bone2D { } unsafe impl SubClass < crate :: generated :: node :: Node > for Bone2D { } unsafe impl SubClass < crate :: generated :: object :: Object > for Bone2D { } impl Instanciable for Bone2D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { Bone2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Bone2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub apply_rest : * mut sys :: godot_method_bind , pub get_default_length : * mut sys :: godot_method_bind , pub get_index_in_skeleton : * mut sys :: godot_method_bind , pub get_rest : * mut sys :: godot_method_bind , pub get_skeleton_rest : * mut sys :: godot_method_bind , pub set_default_length : * mut sys :: godot_method_bind , pub set_rest : * mut sys :: godot_method_bind } impl Bone2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Bone2DMethodTable = Bone2DMethodTable { class_constructor : None , apply_rest : 0 as * mut sys :: godot_method_bind , get_default_length : 0 as * mut sys :: godot_method_bind , get_index_in_skeleton : 0 as * mut sys :: godot_method_bind , get_rest : 0 as * mut sys :: godot_method_bind , get_skeleton_rest : 0 as * mut sys :: godot_method_bind , set_default_length : 0 as * mut sys :: godot_method_bind , set_rest : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { Bone2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Bone2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . apply_rest = (gd_api . godot_method_bind_get_method) (class_name , "apply_rest\0" . as_ptr () as * const c_char) ; table . get_default_length = (gd_api . godot_method_bind_get_method) (class_name , "get_default_length\0" . as_ptr () as * const c_char) ; table . get_index_in_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_index_in_skeleton\0" . as_ptr () as * const c_char) ; table . get_rest = (gd_api . godot_method_bind_get_method) (class_name , "get_rest\0" . as_ptr () as * const c_char) ; table . get_skeleton_rest = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton_rest\0" . as_ptr () as * const c_char) ; table . set_default_length = (gd_api . godot_method_bind_get_method) (class_name , "set_default_length\0" . as_ptr () as * const c_char) ; table . set_rest = (gd_api . godot_method_bind_get_method) (class_name , "set_rest\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1234:6880 [INFO] [stdout] | [INFO] [stdout] 1234 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1234 | # [doc = "`core class CSGMesh` inherits `CSGPrimitive` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_csgmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`CSGMesh` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGMesh inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGMesh { this : RawObject < Self > , } impl CSGMesh { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: material :: Material , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: material :: Material , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh :: Mesh , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: material :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: mesh :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGMesh { } unsafe impl GodotObject for CSGMesh { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGMesh" } } impl QueueFree for CSGMesh { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for CSGMesh { type Target = crate :: generated :: csg_primitive :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: csg_primitive :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: csg_primitive :: CSGPrimitive > for CSGMesh { } unsafe impl SubClass < crate :: generated :: csg_shape :: CSGShape > for CSGMesh { } unsafe impl SubClass < crate :: generated :: geometry_instance :: GeometryInstance > for CSGMesh { } unsafe impl SubClass < crate :: generated :: visual_instance :: VisualInstance > for CSGMesh { } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for CSGMesh { } unsafe impl SubClass < crate :: generated :: node :: Node > for CSGMesh { } unsafe impl SubClass < crate :: generated :: object :: Object > for CSGMesh { } impl Instanciable for CSGMesh { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { CSGMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_material : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind } impl CSGMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGMeshMethodTable = CSGMeshMethodTable { class_constructor : None , get_material : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { CSGMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1240:7366 [INFO] [stdout] | [INFO] [stdout] 1240 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1240 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1246:21601 [INFO] [stdout] | [INFO] [stdout] 1246 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1246 | # [doc = "`core class GridMap` inherits `Spatial` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_gridmap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`GridMap` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGridMap inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GridMap { this : RawObject < Self > , } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GridMap { pub const INVALID_CELL_ITEM : i64 = - 1i64 ; } impl GridMap { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GridMapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_baked_meshes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . clear_baked_meshes ; let ret = crate :: icalls :: icallptr_void (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bake_mesh_instance (& self , idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_bake_mesh_instance ; let ret = crate :: icalls :: icallptr_rid_i64 (method_bind , self . this . sys () . as_ptr () , idx) ; Rid :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bake_meshes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_bake_meshes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_cell_item (& self , x : i64 , y : i64 , z : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_cell_item ; let ret = crate :: icalls :: icallptr_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_cell_item_orientation (& self , x : i64 , y : i64 , z : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_cell_item_orientation ; let ret = crate :: icalls :: icallptr_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_cell_scale ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_size (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_cell_size ; let ret = crate :: icalls :: icallptr_vec3 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn center_x (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_center_x ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn center_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_center_y ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn center_z (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_center_z ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallptr_bool_i64 (method_bind , self . this . sys () . as_ptr () , bit) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn mesh_library (& self) -> Option < Ref < crate :: generated :: mesh_library :: MeshLibrary , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_mesh_library ; let ret = crate :: icalls :: icallptr_obj (method_bind , self . this . sys () . as_ptr ()) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: mesh_library :: MeshLibrary , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_meshes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_meshes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn octant_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_octant_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn use_in_baked_light (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_use_in_baked_light ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = ""] # [doc = ""] # [inline] pub fn get_used_cells (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_used_cells ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn make_baked_meshes (& self , gen_lightmap_uv : bool , lightmap_uv_texel_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . make_baked_meshes ; let ret = crate :: icalls :: icallptr_void_bool_f64 (method_bind , self . this . sys () . as_ptr () , gen_lightmap_uv , lightmap_uv_texel_size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn map_to_world (& self , x : i64 , y : i64 , z : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . map_to_world ; let ret = crate :: icalls :: icallptr_vec3_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z) ; mem :: transmute (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn resource_changed (& self , resource : impl AsArg < crate :: generated :: resource :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . resource_changed ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_item (& self , x : i64 , y : i64 , z : i64 , item : i64 , orientation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_cell_item ; let ret = crate :: icalls :: icallptr_void_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x , y , z , item , orientation) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_cell_scale ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_size (& self , size : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_cell_size ; let ret = crate :: icalls :: icallptr_void_vec3 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_center_x (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_center_x ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_center_y (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_center_y ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_center_z (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_center_z ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_clip (& self , enabled : bool , clipabove : bool , floor : i64 , axis : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_clip ; let ret = crate :: icalls :: icallptr_void_bool_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , enabled , clipabove , floor , axis) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , layer) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mask) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallptr_void_i64_bool (method_bind , self . this . sys () . as_ptr () , bit , value) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mesh_library (& self , mesh_library : impl AsArg < crate :: generated :: mesh_library :: MeshLibrary >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_mesh_library ; let ret = crate :: icalls :: icallptr_void_obj (method_bind , self . this . sys () . as_ptr () , mesh_library . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_octant_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_octant_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_in_baked_light (& self , use_in_baked_light : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_use_in_baked_light ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , use_in_baked_light) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn world_to_map (& self , pos : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . world_to_map ; let ret = crate :: icalls :: icallptr_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , pos) ; mem :: transmute (ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for GridMap { } unsafe impl GodotObject for GridMap { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GridMap" } } impl QueueFree for GridMap { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for GridMap { type Target = crate :: generated :: spatial :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GridMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: spatial :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: spatial :: Spatial > for GridMap { } unsafe impl SubClass < crate :: generated :: node :: Node > for GridMap { } unsafe impl SubClass < crate :: generated :: object :: Object > for GridMap { } impl Instanciable for GridMap { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { GridMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GridMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub clear_baked_meshes : * mut sys :: godot_method_bind , pub get_bake_mesh_instance : * mut sys :: godot_method_bind , pub get_bake_meshes : * mut sys :: godot_method_bind , pub get_cell_item : * mut sys :: godot_method_bind , pub get_cell_item_orientation : * mut sys :: godot_method_bind , pub get_cell_scale : * mut sys :: godot_method_bind , pub get_cell_size : * mut sys :: godot_method_bind , pub get_center_x : * mut sys :: godot_method_bind , pub get_center_y : * mut sys :: godot_method_bind , pub get_center_z : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_mesh_library : * mut sys :: godot_method_bind , pub get_meshes : * mut sys :: godot_method_bind , pub get_octant_size : * mut sys :: godot_method_bind , pub get_use_in_baked_light : * mut sys :: godot_method_bind , pub get_used_cells : * mut sys :: godot_method_bind , pub make_baked_meshes : * mut sys :: godot_method_bind , pub map_to_world : * mut sys :: godot_method_bind , pub resource_changed : * mut sys :: godot_method_bind , pub set_cell_item : * mut sys :: godot_method_bind , pub set_cell_scale : * mut sys :: godot_method_bind , pub set_cell_size : * mut sys :: godot_method_bind , pub set_center_x : * mut sys :: godot_method_bind , pub set_center_y : * mut sys :: godot_method_bind , pub set_center_z : * mut sys :: godot_method_bind , pub set_clip : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_mesh_library : * mut sys :: godot_method_bind , pub set_octant_size : * mut sys :: godot_method_bind , pub set_use_in_baked_light : * mut sys :: godot_method_bind , pub world_to_map : * mut sys :: godot_method_bind } impl GridMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GridMapMethodTable = GridMapMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , clear_baked_meshes : 0 as * mut sys :: godot_method_bind , get_bake_mesh_instance : 0 as * mut sys :: godot_method_bind , get_bake_meshes : 0 as * mut sys :: godot_method_bind , get_cell_item : 0 as * mut sys :: godot_method_bind , get_cell_item_orientation : 0 as * mut sys :: godot_method_bind , get_cell_scale : 0 as * mut sys :: godot_method_bind , get_cell_size : 0 as * mut sys :: godot_method_bind , get_center_x : 0 as * mut sys :: godot_method_bind , get_center_y : 0 as * mut sys :: godot_method_bind , get_center_z : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_mesh_library : 0 as * mut sys :: godot_method_bind , get_meshes : 0 as * mut sys :: godot_method_bind , get_octant_size : 0 as * mut sys :: godot_method_bind , get_use_in_baked_light : 0 as * mut sys :: godot_method_bind , get_used_cells : 0 as * mut sys :: godot_method_bind , make_baked_meshes : 0 as * mut sys :: godot_method_bind , map_to_world : 0 as * mut sys :: godot_method_bind , resource_changed : 0 as * mut sys :: godot_method_bind , set_cell_item : 0 as * mut sys :: godot_method_bind , set_cell_scale : 0 as * mut sys :: godot_method_bind , set_cell_size : 0 as * mut sys :: godot_method_bind , set_center_x : 0 as * mut sys :: godot_method_bind , set_center_y : 0 as * mut sys :: godot_method_bind , set_center_z : 0 as * mut sys :: godot_method_bind , set_clip : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_mesh_library : 0 as * mut sys :: godot_method_bind , set_octant_size : 0 as * mut sys :: godot_method_bind , set_use_in_baked_light : 0 as * mut sys :: godot_method_bind , world_to_map : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { GridMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GridMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . clear_baked_meshes = (gd_api . godot_method_bind_get_method) (class_name , "clear_baked_meshes\0" . as_ptr () as * const c_char) ; table . get_bake_mesh_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_mesh_instance\0" . as_ptr () as * const c_char) ; table . get_bake_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_meshes\0" . as_ptr () as * const c_char) ; table . get_cell_item = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_item\0" . as_ptr () as * const c_char) ; table . get_cell_item_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_item_orientation\0" . as_ptr () as * const c_char) ; table . get_cell_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_scale\0" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\0" . as_ptr () as * const c_char) ; table . get_center_x = (gd_api . godot_method_bind_get_method) (class_name , "get_center_x\0" . as_ptr () as * const c_char) ; table . get_center_y = (gd_api . godot_method_bind_get_method) (class_name , "get_center_y\0" . as_ptr () as * const c_char) ; table . get_center_z = (gd_api . godot_method_bind_get_method) (class_name , "get_center_z\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_mesh_library = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh_library\0" . as_ptr () as * const c_char) ; table . get_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_meshes\0" . as_ptr () as * const c_char) ; table . get_octant_size = (gd_api . godot_method_bind_get_method) (class_name , "get_octant_size\0" . as_ptr () as * const c_char) ; table . get_use_in_baked_light = (gd_api . godot_method_bind_get_method) (class_name , "get_use_in_baked_light\0" . as_ptr () as * const c_char) ; table . get_used_cells = (gd_api . godot_method_bind_get_method) (class_name , "get_used_cells\0" . as_ptr () as * const c_char) ; table . make_baked_meshes = (gd_api . godot_method_bind_get_method) (class_name , "make_baked_meshes\0" . as_ptr () as * const c_char) ; table . map_to_world = (gd_api . godot_method_bind_get_method) (class_name , "map_to_world\0" . as_ptr () as * const c_char) ; table . resource_changed = (gd_api . godot_method_bind_get_method) (class_name , "resource_changed\0" . as_ptr () as * const c_char) ; table . set_cell_item = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_item\0" . as_ptr () as * const c_char) ; table . set_cell_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_scale\0" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\0" . as_ptr () as * const c_char) ; table . set_center_x = (gd_api . godot_method_bind_get_method) (class_name , "set_center_x\0" . as_ptr () as * const c_char) ; table . set_center_y = (gd_api . godot_method_bind_get_method) (class_name , "set_center_y\0" . as_ptr () as * const c_char) ; table . set_center_z = (gd_api . godot_method_bind_get_method) (class_name , "set_center_z\0" . as_ptr () as * const c_char) ; table . set_clip = (gd_api . godot_method_bind_get_method) (class_name , "set_clip\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_mesh_library = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh_library\0" . as_ptr () as * const c_char) ; table . set_octant_size = (gd_api . godot_method_bind_get_method) (class_name , "set_octant_size\0" . as_ptr () as * const c_char) ; table . set_use_in_baked_light = (gd_api . godot_method_bind_get_method) (class_name , "set_use_in_baked_light\0" . as_ptr () as * const c_char) ; table . world_to_map = (gd_api . godot_method_bind_get_method) (class_name , "world_to_map\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1252:3261 [INFO] [stdout] | [INFO] [stdout] 1252 | ...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] 1252 | # [doc = "`core class ResourceFormatSaver` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_resourceformatsaver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nResourceFormatSaver inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ResourceFormatSaver { this : RawObject < Self > , } impl ResourceFormatSaver { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ResourceFormatSaverMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceFormatSaver { } unsafe impl GodotObject for ResourceFormatSaver { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ResourceFormatSaver" } } impl std :: ops :: Deref for ResourceFormatSaver { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceFormatSaver { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ResourceFormatSaver { } unsafe impl SubClass < crate :: generated :: object :: Object > for ResourceFormatSaver { } impl Instanciable for ResourceFormatSaver { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ResourceFormatSaver :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourceFormatSaverMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ResourceFormatSaverMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourceFormatSaverMethodTable = ResourceFormatSaverMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ResourceFormatSaverMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ResourceFormatSaver\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1258:4345 [INFO] [stdout] | [INFO] [stdout] 1258 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1258 | # [doc = "`core class ExternalTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_externaltexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nExternalTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ExternalTexture { this : RawObject < Self > , } impl ExternalTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ExternalTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the external texture name."] # [doc = ""] # [inline] pub fn get_external_texture_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ExternalTextureMethodTable :: get (get_api ()) . get_external_texture_id ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "External texture size."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ExternalTextureMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ExternalTexture { } unsafe impl GodotObject for ExternalTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ExternalTexture" } } impl std :: ops :: Deref for ExternalTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ExternalTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for ExternalTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ExternalTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ExternalTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for ExternalTexture { } impl Instanciable for ExternalTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ExternalTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ExternalTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_external_texture_id : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind } impl ExternalTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ExternalTextureMethodTable = ExternalTextureMethodTable { class_constructor : None , get_external_texture_id : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ExternalTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ExternalTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_external_texture_id = (gd_api . godot_method_bind_get_method) (class_name , "get_external_texture_id\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1264:4116 [INFO] [stdout] | [INFO] [stdout] 1264 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1264 | # [doc = "`core class GDScript` inherits `Script` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_gdscript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGDScript inherits methods from:\n - [Script](struct.Script.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GDScript { this : RawObject < Self > , } impl GDScript { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GDScriptMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_as_byte_code (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GDScriptMethodTable :: get (get_api ()) . get_as_byte_code ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn _new (& self , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GDScriptMethodTable :: get (get_api ()) . _new ; let ret = crate :: icalls :: icallvarargs_ (method_bind , self . this . sys () . as_ptr () , varargs) ; ret } } } impl gdnative_core :: private :: godot_object :: Sealed for GDScript { } unsafe impl GodotObject for GDScript { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDScript" } } impl std :: ops :: Deref for GDScript { type Target = crate :: generated :: script :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: script :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: script :: Script > for GDScript { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for GDScript { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for GDScript { } unsafe impl SubClass < crate :: generated :: object :: Object > for GDScript { } impl Instanciable for GDScript { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { GDScript :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GDScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_as_byte_code : * mut sys :: godot_method_bind , pub _new : * mut sys :: godot_method_bind } impl GDScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GDScriptMethodTable = GDScriptMethodTable { class_constructor : None , get_as_byte_code : 0 as * mut sys :: godot_method_bind , _new : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { GDScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GDScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_as_byte_code = (gd_api . godot_method_bind_get_method) (class_name , "get_as_byte_code\0" . as_ptr () as * const c_char) ; table . _new = (gd_api . godot_method_bind_get_method) (class_name , "new\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1270:3805 [INFO] [stdout] | [INFO] [stdout] 1270 | ...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] 1270 | # [doc = "`core class VisualShaderNodeVectorInterp` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodevectorinterp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorInterp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorInterp { this : RawObject < Self > , } impl VisualShaderNodeVectorInterp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorInterpMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorInterp { } unsafe impl GodotObject for VisualShaderNodeVectorInterp { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorInterp" } } impl std :: ops :: Deref for VisualShaderNodeVectorInterp { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorInterp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeVectorInterp { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeVectorInterp { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeVectorInterp { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeVectorInterp { } impl Instanciable for VisualShaderNodeVectorInterp { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeVectorInterp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorInterpMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorInterpMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorInterpMethodTable = VisualShaderNodeVectorInterpMethodTable { class_constructor : None , } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorInterpMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorInterp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1276:3889 [INFO] [stdout] | [INFO] [stdout] 1276 | ...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] 1276 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1282:12479 [INFO] [stdout] | [INFO] [stdout] 1282 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1282 | # [doc = "`core class AnimationNodeBlendSpace1D` inherits `AnimationRootNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_animationnodeblendspace1d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlendSpace1D inherits methods from:\n - [AnimationRootNode](struct.AnimationRootNode.html)\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlendSpace1D { this : RawObject < Self > , } impl AnimationNodeBlendSpace1D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlendSpace1DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new point that represents a `node` on the virtual axis at a given position set by `pos`. You can insert it at a specific index using the `at_index` argument. If you use the default value for `at_index`, the point is inserted at the end of the blend points array.\n# Default Arguments\n* `at_index` - `-1`"] # [doc = ""] # [inline] pub fn add_blend_point (& self , node : impl AsArg < crate :: generated :: animation_root_node :: AnimationRootNode > , pos : f64 , at_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . add_blend_point ; let ret = crate :: icalls :: icallptr_void_obj_f64_i64 (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , pos , at_index) ; } } # [doc = "Returns the number of points on the blend axis."] # [doc = ""] # [inline] pub fn get_blend_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_blend_point_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Returns the [AnimationNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_node (& self , point : i64) -> Option < Ref < crate :: generated :: animation_root_node :: AnimationRootNode , thread_access :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_blend_point_node ; let ret = crate :: icalls :: icallptr_obj_i64 (method_bind , self . this . sys () . as_ptr () , point) ; ptr :: NonNull :: new (ret) . map (| sys | < Ref < crate :: generated :: animation_root_node :: AnimationRootNode , thread_access :: Shared >> :: move_from_sys (sys)) } } # [doc = "Returns the position of the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_position (& self , point : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_blend_point_position ; let ret = crate :: icalls :: icallptr_f64_i64 (method_bind , self . this . sys () . as_ptr () , point) ; ret as _ } } # [doc = "The blend space's axis's upper limit for the points' position. See [method add_blend_point]."] # [doc = ""] # [inline] pub fn max_space (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_max_space ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The blend space's axis's lower limit for the points' position. See [method add_blend_point]."] # [doc = ""] # [inline] pub fn min_space (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_min_space ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Position increment to snap to when moving a point on the axis."] # [doc = ""] # [inline] pub fn snap (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_snap ; let ret = crate :: icalls :: icallptr_f64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Label of the virtual axis of the blend space."] # [doc = ""] # [inline] pub fn value_label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_value_label ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = "Removes the point at index `point` from the blend axis."] # [doc = ""] # [inline] pub fn remove_blend_point (& self , point : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . remove_blend_point ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , point) ; } } # [doc = "Changes the [AnimationNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn set_blend_point_node (& self , point : i64 , node : impl AsArg < crate :: generated :: animation_root_node :: AnimationRootNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_blend_point_node ; let ret = crate :: icalls :: icallptr_void_i64_obj (method_bind , self . this . sys () . as_ptr () , point , node . as_arg_ptr ()) ; } } # [doc = "Updates the position of the point at index `point` on the blend axis."] # [doc = ""] # [inline] pub fn set_blend_point_position (& self , point : i64 , pos : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_blend_point_position ; let ret = crate :: icalls :: icallptr_void_i64_f64 (method_bind , self . this . sys () . as_ptr () , point , pos) ; } } # [doc = "The blend space's axis's upper limit for the points' position. See [method add_blend_point]."] # [doc = ""] # [inline] pub fn set_max_space (& self , max_space : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_max_space ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , max_space) ; } } # [doc = "The blend space's axis's lower limit for the points' position. See [method add_blend_point]."] # [doc = ""] # [inline] pub fn set_min_space (& self , min_space : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_min_space ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , min_space) ; } } # [doc = "Position increment to snap to when moving a point on the axis."] # [doc = ""] # [inline] pub fn set_snap (& self , snap : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_snap ; let ret = crate :: icalls :: icallptr_void_f64 (method_bind , self . this . sys () . as_ptr () , snap) ; } } # [doc = "Label of the virtual axis of the blend space."] # [doc = ""] # [inline] pub fn set_value_label (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_value_label ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlendSpace1D { } unsafe impl GodotObject for AnimationNodeBlendSpace1D { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlendSpace1D" } } impl std :: ops :: Deref for AnimationNodeBlendSpace1D { type Target = crate :: generated :: animation_root_node :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlendSpace1D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: animation_root_node :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: animation_root_node :: AnimationRootNode > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: animation_node :: AnimationNode > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: object :: Object > for AnimationNodeBlendSpace1D { } impl Instanciable for AnimationNodeBlendSpace1D { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { AnimationNodeBlendSpace1D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlendSpace1DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_blend_point : * mut sys :: godot_method_bind , pub get_blend_point_count : * mut sys :: godot_method_bind , pub get_blend_point_node : * mut sys :: godot_method_bind , pub get_blend_point_position : * mut sys :: godot_method_bind , pub get_max_space : * mut sys :: godot_method_bind , pub get_min_space : * mut sys :: godot_method_bind , pub get_snap : * mut sys :: godot_method_bind , pub get_value_label : * mut sys :: godot_method_bind , pub remove_blend_point : * mut sys :: godot_method_bind , pub set_blend_point_node : * mut sys :: godot_method_bind , pub set_blend_point_position : * mut sys :: godot_method_bind , pub set_max_space : * mut sys :: godot_method_bind , pub set_min_space : * mut sys :: godot_method_bind , pub set_snap : * mut sys :: godot_method_bind , pub set_value_label : * mut sys :: godot_method_bind } impl AnimationNodeBlendSpace1DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlendSpace1DMethodTable = AnimationNodeBlendSpace1DMethodTable { class_constructor : None , add_blend_point : 0 as * mut sys :: godot_method_bind , get_blend_point_count : 0 as * mut sys :: godot_method_bind , get_blend_point_node : 0 as * mut sys :: godot_method_bind , get_blend_point_position : 0 as * mut sys :: godot_method_bind , get_max_space : 0 as * mut sys :: godot_method_bind , get_min_space : 0 as * mut sys :: godot_method_bind , get_snap : 0 as * mut sys :: godot_method_bind , get_value_label : 0 as * mut sys :: godot_method_bind , remove_blend_point : 0 as * mut sys :: godot_method_bind , set_blend_point_node : 0 as * mut sys :: godot_method_bind , set_blend_point_position : 0 as * mut sys :: godot_method_bind , set_max_space : 0 as * mut sys :: godot_method_bind , set_min_space : 0 as * mut sys :: godot_method_bind , set_snap : 0 as * mut sys :: godot_method_bind , set_value_label : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { AnimationNodeBlendSpace1DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlendSpace1D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "add_blend_point\0" . as_ptr () as * const c_char) ; table . get_blend_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_count\0" . as_ptr () as * const c_char) ; table . get_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_node\0" . as_ptr () as * const c_char) ; table . get_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_position\0" . as_ptr () as * const c_char) ; table . get_max_space = (gd_api . godot_method_bind_get_method) (class_name , "get_max_space\0" . as_ptr () as * const c_char) ; table . get_min_space = (gd_api . godot_method_bind_get_method) (class_name , "get_min_space\0" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\0" . as_ptr () as * const c_char) ; table . get_value_label = (gd_api . godot_method_bind_get_method) (class_name , "get_value_label\0" . as_ptr () as * const c_char) ; table . remove_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_blend_point\0" . as_ptr () as * const c_char) ; table . set_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_node\0" . as_ptr () as * const c_char) ; table . set_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_position\0" . as_ptr () as * const c_char) ; table . set_max_space = (gd_api . godot_method_bind_get_method) (class_name , "set_max_space\0" . as_ptr () as * const c_char) ; table . set_min_space = (gd_api . godot_method_bind_get_method) (class_name , "set_min_space\0" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\0" . as_ptr () as * const c_char) ; table . set_value_label = (gd_api . godot_method_bind_get_method) (class_name , "set_value_label\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1288:9557 [INFO] [stdout] | [INFO] [stdout] 1288 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1288 | # [doc = "`core class PacketPeer` inherits `Reference` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_packetpeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeer { this : RawObject < Self > , } impl PacketPeer { # [doc = "Returns the number of packets currently available in the ring-buffer."] # [doc = ""] # [inline] pub fn get_available_packet_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_available_packet_count ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations.\nThe [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than `encode_buffer_max_size`, the method will error out with [constant ERR_OUT_OF_MEMORY]."] # [doc = ""] # [inline] pub fn encode_buffer_max_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_encode_buffer_max_size ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Gets a raw packet."] # [doc = ""] # [inline] pub fn get_packet (& self) -> ByteArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_packet ; let ret = crate :: icalls :: icallptr_bytearr (method_bind , self . this . sys () . as_ptr ()) ; ByteArray :: from_sys (ret) } } # [doc = "Returns the error state of the last packet received (via [method get_packet] and [method get_var])."] # [doc = ""] # [inline] pub fn get_packet_error (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_packet_error ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Gets a Variant. If `allow_objects` (or [member allow_object_decoding]) is `true`, decoding objects is allowed.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.\n# Default Arguments\n* `allow_objects` - `false`"] # [doc = ""] # [inline] pub fn get_var (& self , allow_objects : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_var ; let ret = crate :: icalls :: icallptr_var_bool (method_bind , self . this . sys () . as_ptr () , allow_objects) ; Variant :: from_sys (ret) } } # [doc = "[i]Deprecated.[/i] Use `get_var` and `put_var` parameters instead.\nIf `true`, the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var].\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn is_object_decoding_allowed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . is_object_decoding_allowed ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "Sends a raw packet."] # [doc = ""] # [inline] pub fn put_packet (& self , buffer : ByteArray) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . put_packet ; let ret = crate :: icalls :: icallptr_i64_bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (ret as _) } } # [doc = "Sends a [Variant] as a packet. If `full_objects` (or [member allow_object_decoding]) is `true`, encoding objects is allowed (and can potentially include code).\n# Default Arguments\n* `full_objects` - `false`"] # [doc = ""] # [inline] pub fn put_var (& self , var : impl OwnedToVariant , full_objects : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . put_var ; let ret = crate :: icalls :: icallptr_i64_var_bool (method_bind , self . this . sys () . as_ptr () , var . owned_to_variant () , full_objects) ; GodotError :: result_from_sys (ret as _) } } # [doc = "[i]Deprecated.[/i] Use `get_var` and `put_var` parameters instead.\nIf `true`, the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var].\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn set_allow_object_decoding (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . set_allow_object_decoding ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , enable) ; } } # [doc = "Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations.\nThe [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than `encode_buffer_max_size`, the method will error out with [constant ERR_OUT_OF_MEMORY]."] # [doc = ""] # [inline] pub fn set_encode_buffer_max_size (& self , max_size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . set_encode_buffer_max_size ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , max_size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeer { } unsafe impl GodotObject for PacketPeer { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeer" } } impl std :: ops :: Deref for PacketPeer { type Target = crate :: generated :: reference :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: reference :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: reference :: Reference > for PacketPeer { } unsafe impl SubClass < crate :: generated :: object :: Object > for PacketPeer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_available_packet_count : * mut sys :: godot_method_bind , pub get_encode_buffer_max_size : * mut sys :: godot_method_bind , pub get_packet : * mut sys :: godot_method_bind , pub get_packet_error : * mut sys :: godot_method_bind , pub get_var : * mut sys :: godot_method_bind , pub is_object_decoding_allowed : * mut sys :: godot_method_bind , pub put_packet : * mut sys :: godot_method_bind , pub put_var : * mut sys :: godot_method_bind , pub set_allow_object_decoding : * mut sys :: godot_method_bind , pub set_encode_buffer_max_size : * mut sys :: godot_method_bind } impl PacketPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerMethodTable = PacketPeerMethodTable { class_constructor : None , get_available_packet_count : 0 as * mut sys :: godot_method_bind , get_encode_buffer_max_size : 0 as * mut sys :: godot_method_bind , get_packet : 0 as * mut sys :: godot_method_bind , get_packet_error : 0 as * mut sys :: godot_method_bind , get_var : 0 as * mut sys :: godot_method_bind , is_object_decoding_allowed : 0 as * mut sys :: godot_method_bind , put_packet : 0 as * mut sys :: godot_method_bind , put_var : 0 as * mut sys :: godot_method_bind , set_allow_object_decoding : 0 as * mut sys :: godot_method_bind , set_encode_buffer_max_size : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { PacketPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_available_packet_count = (gd_api . godot_method_bind_get_method) (class_name , "get_available_packet_count\0" . as_ptr () as * const c_char) ; table . get_encode_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "get_encode_buffer_max_size\0" . as_ptr () as * const c_char) ; table . get_packet = (gd_api . godot_method_bind_get_method) (class_name , "get_packet\0" . as_ptr () as * const c_char) ; table . get_packet_error = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_error\0" . as_ptr () as * const c_char) ; table . get_var = (gd_api . godot_method_bind_get_method) (class_name , "get_var\0" . as_ptr () as * const c_char) ; table . is_object_decoding_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_object_decoding_allowed\0" . as_ptr () as * const c_char) ; table . put_packet = (gd_api . godot_method_bind_get_method) (class_name , "put_packet\0" . as_ptr () as * const c_char) ; table . put_var = (gd_api . godot_method_bind_get_method) (class_name , "put_var\0" . as_ptr () as * const c_char) ; table . set_allow_object_decoding = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_object_decoding\0" . as_ptr () as * const c_char) ; table . set_encode_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "set_encode_buffer_max_size\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1294:5505 [INFO] [stdout] | [INFO] [stdout] 1294 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1294 | # [doc = "`core class VisualShaderNodeTransformFunc` inherits `VisualShaderNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualshadernodetransformfunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformFunc inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformFunc { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const INVERSE : Function = Function (0i64) ; pub const TRANSPOSE : Function = Function (1i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTransformFunc { pub const FUNC_INVERSE : i64 = 0i64 ; pub const FUNC_TRANSPOSE : i64 = 1i64 ; } impl VisualShaderNodeTransformFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The function to be computed. See [enum Function] for options."] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_transform_func :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformFuncMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_shader_node_transform_func :: Function (ret) } } # [doc = "The function to be computed. See [enum Function] for options."] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformFuncMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , func) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformFunc { } unsafe impl GodotObject for VisualShaderNodeTransformFunc { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformFunc" } } impl std :: ops :: Deref for VisualShaderNodeTransformFunc { type Target = crate :: generated :: visual_shader_node :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_shader_node :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_shader_node :: VisualShaderNode > for VisualShaderNodeTransformFunc { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualShaderNodeTransformFunc { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualShaderNodeTransformFunc { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualShaderNodeTransformFunc { } impl Instanciable for VisualShaderNodeTransformFunc { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualShaderNodeTransformFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeTransformFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformFuncMethodTable = VisualShaderNodeTransformFuncMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1300:6602 [INFO] [stdout] | [INFO] [stdout] 1300 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1300 | # [doc = "`core class InputEventMouse` inherits `InputEventWithModifiers` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_inputeventmouse.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventMouse inherits methods from:\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventMouse { this : RawObject < Self > , } impl InputEventMouse { # [doc = "The mouse button mask identifier, one of or a bitwise combination of the [enum ButtonList] button masks."] # [doc = ""] # [inline] pub fn button_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . get_button_mask ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0."] # [doc = ""] # [inline] pub fn global_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . get_global_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallptr_vec2 (method_bind , self . this . sys () . as_ptr ()) ; mem :: transmute (ret) } } # [doc = "The mouse button mask identifier, one of or a bitwise combination of the [enum ButtonList] button masks."] # [doc = ""] # [inline] pub fn set_button_mask (& self , button_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . set_button_mask ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , button_mask) ; } } # [doc = "The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0."] # [doc = ""] # [inline] pub fn set_global_position (& self , global_position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . set_global_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , global_position) ; } } # [doc = "The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse."] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallptr_void_vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouse { } unsafe impl GodotObject for InputEventMouse { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouse" } } impl std :: ops :: Deref for InputEventMouse { type Target = crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouse { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: input_event_with_modifiers :: InputEventWithModifiers > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: input_event :: InputEvent > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: object :: Object > for InputEventMouse { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMouseMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_button_mask : * mut sys :: godot_method_bind , pub get_global_position : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub set_button_mask : * mut sys :: godot_method_bind , pub set_global_position : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind } impl InputEventMouseMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMouseMethodTable = InputEventMouseMethodTable { class_constructor : None , get_button_mask : 0 as * mut sys :: godot_method_bind , get_global_position : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , set_button_mask : 0 as * mut sys :: godot_method_bind , set_global_position : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { InputEventMouseMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventMouse\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_button_mask\0" . as_ptr () as * const c_char) ; table . get_global_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_position\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . set_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_button_mask\0" . as_ptr () as * const c_char) ; table . set_global_position = (gd_api . godot_method_bind_get_method) (class_name , "set_global_position\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1312:14674 [INFO] [stdout] | [INFO] [stdout] 1312 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1312 | # [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/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1318:4567 [INFO] [stdout] | [INFO] [stdout] 1318 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1318 | # [doc = "`core class VisualScriptSceneNode` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptscenenode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSceneNode inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSceneNode { this : RawObject < Self > , } impl VisualScriptSceneNode { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSceneNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn node_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSceneNodeMethodTable :: get (get_api ()) . get_node_path ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_node_path (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSceneNodeMethodTable :: get (get_api ()) . set_node_path ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSceneNode { } unsafe impl GodotObject for VisualScriptSceneNode { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSceneNode" } } impl std :: ops :: Deref for VisualScriptSceneNode { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSceneNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptSceneNode { } impl Instanciable for VisualScriptSceneNode { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptSceneNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSceneNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_node_path : * mut sys :: godot_method_bind , pub set_node_path : * mut sys :: godot_method_bind } impl VisualScriptSceneNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSceneNodeMethodTable = VisualScriptSceneNodeMethodTable { class_constructor : None , get_node_path : 0 as * mut sys :: godot_method_bind , set_node_path : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptSceneNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSceneNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_node_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_path\0" . as_ptr () as * const c_char) ; table . set_node_path = (gd_api . godot_method_bind_get_method) (class_name , "set_node_path\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1324:5440 [INFO] [stdout] | [INFO] [stdout] 1324 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1324 | # [doc = "`core class ProgressBar` inherits `Range` (unsafe)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_progressbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon reference counted objects such as the ones of this type are usually owned by the engine.\n\n`ProgressBar` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nProgressBar inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ProgressBar { this : RawObject < Self > , } impl ProgressBar { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ProgressBarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, the fill percentage is displayed on the bar."] # [doc = ""] # [inline] pub fn is_percent_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ProgressBarMethodTable :: get (get_api ()) . is_percent_visible ; let ret = crate :: icalls :: icallptr_bool (method_bind , self . this . sys () . as_ptr ()) ; ret as _ } } # [doc = "If `true`, the fill percentage is displayed on the bar."] # [doc = ""] # [inline] pub fn set_percent_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProgressBarMethodTable :: get (get_api ()) . set_percent_visible ; let ret = crate :: icalls :: icallptr_void_bool (method_bind , self . this . sys () . as_ptr () , visible) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProgressBar { } unsafe impl GodotObject for ProgressBar { type RefKind = ref_kind :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ProgressBar" } } impl QueueFree for ProgressBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallptr_void (method_bind , obj) } } impl std :: ops :: Deref for ProgressBar { type Target = crate :: generated :: range :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProgressBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: range :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: range :: Range > for ProgressBar { } unsafe impl SubClass < crate :: generated :: control :: Control > for ProgressBar { } unsafe impl SubClass < crate :: generated :: canvas_item :: CanvasItem > for ProgressBar { } unsafe impl SubClass < crate :: generated :: node :: Node > for ProgressBar { } unsafe impl SubClass < crate :: generated :: object :: Object > for ProgressBar { } impl Instanciable for ProgressBar { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ProgressBar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ProgressBarMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_percent_visible : * mut sys :: godot_method_bind , pub set_percent_visible : * mut sys :: godot_method_bind } impl ProgressBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ProgressBarMethodTable = ProgressBarMethodTable { class_constructor : None , is_percent_visible : 0 as * mut sys :: godot_method_bind , set_percent_visible : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ProgressBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ProgressBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_percent_visible\0" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1330:4664 [INFO] [stdout] | [INFO] [stdout] 1330 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1330 | # [doc = "`core class ViewportTexture` inherits `Texture` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_viewporttexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nViewportTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ViewportTexture { this : RawObject < Self > , } impl ViewportTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ViewportTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The path to the [Viewport] node to display. This is relative to the scene root, not to the node which uses the texture."] # [doc = ""] # [inline] pub fn viewport_path_in_scene (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportTextureMethodTable :: get (get_api ()) . get_viewport_path_in_scene ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = "The path to the [Viewport] node to display. This is relative to the scene root, not to the node which uses the texture."] # [doc = ""] # [inline] pub fn set_viewport_path_in_scene (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportTextureMethodTable :: get (get_api ()) . set_viewport_path_in_scene ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ViewportTexture { } unsafe impl GodotObject for ViewportTexture { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ViewportTexture" } } impl std :: ops :: Deref for ViewportTexture { type Target = crate :: generated :: texture :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ViewportTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: texture :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: texture :: Texture > for ViewportTexture { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for ViewportTexture { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for ViewportTexture { } unsafe impl SubClass < crate :: generated :: object :: Object > for ViewportTexture { } impl Instanciable for ViewportTexture { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { ViewportTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ViewportTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_viewport_path_in_scene : * mut sys :: godot_method_bind , pub set_viewport_path_in_scene : * mut sys :: godot_method_bind } impl ViewportTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ViewportTextureMethodTable = ViewportTextureMethodTable { class_constructor : None , get_viewport_path_in_scene : 0 as * mut sys :: godot_method_bind , set_viewport_path_in_scene : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { ViewportTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ViewportTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_viewport_path_in_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_path_in_scene\0" . as_ptr () as * const c_char) ; table . set_viewport_path_in_scene = (gd_api . godot_method_bind_get_method) (class_name , "set_viewport_path_in_scene\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1342:4643 [INFO] [stdout] | [INFO] [stdout] 1342 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1342 | # [doc = "`core class VisualScriptDeconstruct` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptdeconstruct.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptDeconstruct inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptDeconstruct { this : RawObject < Self > , } impl VisualScriptDeconstruct { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptDeconstructMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn deconstruct_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptDeconstructMethodTable :: get (get_api ()) . get_deconstruct_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_deconstruct_type (& self , _type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptDeconstructMethodTable :: get (get_api ()) . set_deconstruct_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , _type) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptDeconstruct { } unsafe impl GodotObject for VisualScriptDeconstruct { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptDeconstruct" } } impl std :: ops :: Deref for VisualScriptDeconstruct { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptDeconstruct { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptDeconstruct { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptDeconstruct { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptDeconstruct { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptDeconstruct { } impl Instanciable for VisualScriptDeconstruct { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptDeconstruct :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptDeconstructMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_deconstruct_type : * mut sys :: godot_method_bind , pub set_deconstruct_type : * mut sys :: godot_method_bind } impl VisualScriptDeconstructMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptDeconstructMethodTable = VisualScriptDeconstructMethodTable { class_constructor : None , get_deconstruct_type : 0 as * mut sys :: godot_method_bind , set_deconstruct_type : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptDeconstructMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptDeconstruct\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_deconstruct_type = (gd_api . godot_method_bind_get_method) (class_name , "get_deconstruct_type\0" . as_ptr () as * const c_char) ; table . set_deconstruct_type = (gd_api . godot_method_bind_get_method) (class_name , "set_deconstruct_type\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1348:13198 [INFO] [stdout] | [INFO] [stdout] 1348 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1348 | # [doc = "`core class VisualScriptPropertySet` inherits `VisualScriptNode` (reference counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/latest/classes/class_visualscriptpropertyset.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptPropertySet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have \"interior mutability\" in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Access` in these types tracks whether the\naccess is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptPropertySet { this : RawObject < Self > , } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AssignOp (pub i64) ; impl AssignOp { pub const NONE : AssignOp = AssignOp (0i64) ; pub const ADD : AssignOp = AssignOp (1i64) ; pub const SUB : AssignOp = AssignOp (2i64) ; pub const MUL : AssignOp = AssignOp (3i64) ; pub const DIV : AssignOp = AssignOp (4i64) ; pub const MOD : AssignOp = AssignOp (5i64) ; pub const SHIFT_LEFT : AssignOp = AssignOp (6i64) ; pub const SHIFT_RIGHT : AssignOp = AssignOp (7i64) ; pub const BIT_AND : AssignOp = AssignOp (8i64) ; pub const BIT_OR : AssignOp = AssignOp (9i64) ; pub const BIT_XOR : AssignOp = AssignOp (10i64) ; } impl From < i64 > for AssignOp { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AssignOp > for i64 { # [inline] fn from (v : AssignOp) -> Self { v . 0 } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CallMode (pub i64) ; impl CallMode { pub const SELF : CallMode = CallMode (0i64) ; pub const NODE_PATH : CallMode = CallMode (1i64) ; pub const INSTANCE : CallMode = CallMode (2i64) ; pub const BASIC_TYPE : CallMode = CallMode (3i64) ; } impl From < i64 > for CallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CallMode > for i64 { # [inline] fn from (v : CallMode) -> Self { v . 0 } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptPropertySet { pub const ASSIGN_OP_ADD : i64 = 1i64 ; pub const ASSIGN_OP_BIT_AND : i64 = 8i64 ; pub const ASSIGN_OP_BIT_OR : i64 = 9i64 ; pub const ASSIGN_OP_BIT_XOR : i64 = 10i64 ; pub const ASSIGN_OP_DIV : i64 = 4i64 ; pub const ASSIGN_OP_MOD : i64 = 5i64 ; pub const ASSIGN_OP_MUL : i64 = 3i64 ; pub const ASSIGN_OP_NONE : i64 = 0i64 ; pub const ASSIGN_OP_SHIFT_LEFT : i64 = 6i64 ; pub const ASSIGN_OP_SHIFT_RIGHT : i64 = 7i64 ; pub const ASSIGN_OP_SUB : i64 = 2i64 ; pub const CALL_MODE_BASIC_TYPE : i64 = 3i64 ; pub const CALL_MODE_INSTANCE : i64 = 2i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const CALL_MODE_SELF : i64 = 0i64 ; } impl VisualScriptPropertySet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , thread_access :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptPropertySetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn assign_op (& self) -> crate :: generated :: visual_script_property_set :: AssignOp { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_assign_op ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_property_set :: AssignOp (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_base_path ; let ret = crate :: icalls :: icallptr_nodepath (method_bind , self . this . sys () . as_ptr ()) ; NodePath :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_script (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_base_script ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn basic_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_basic_type ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (ret as _) } } # [doc = ""] # [doc = ""] # [inline] pub fn call_mode (& self) -> crate :: generated :: visual_script_property_set :: CallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_call_mode ; let ret = crate :: icalls :: icallptr_i64 (method_bind , self . this . sys () . as_ptr ()) ; crate :: generated :: visual_script_property_set :: CallMode (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn index (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_index ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn property (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_property ; let ret = crate :: icalls :: icallptr_str (method_bind , self . this . sys () . as_ptr ()) ; GodotString :: from_sys (ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_assign_op (& self , assign_op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_assign_op ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , assign_op) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_path (& self , base_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_base_path ; let ret = crate :: icalls :: icallptr_void_nodepath (method_bind , self . this . sys () . as_ptr () , base_path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_script (& self , base_script : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_base_script ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , base_script . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_type (& self , base_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , base_type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_basic_type (& self , basic_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_basic_type ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , basic_type) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_call_mode ; let ret = crate :: icalls :: icallptr_void_i64 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_index (& self , index : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_index ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , index . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_property (& self , property : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_property ; let ret = crate :: icalls :: icallptr_void_str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptPropertySet { } unsafe impl GodotObject for VisualScriptPropertySet { type RefKind = ref_kind :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptPropertySet" } } impl std :: ops :: Deref for VisualScriptPropertySet { type Target = crate :: generated :: visual_script_node :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptPropertySet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: visual_script_node :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: visual_script_node :: VisualScriptNode > for VisualScriptPropertySet { } unsafe impl SubClass < crate :: generated :: resource :: Resource > for VisualScriptPropertySet { } unsafe impl SubClass < crate :: generated :: reference :: Reference > for VisualScriptPropertySet { } unsafe impl SubClass < crate :: generated :: object :: Object > for VisualScriptPropertySet { } impl Instanciable for VisualScriptPropertySet { # [inline] fn construct () -> Ref < Self , thread_access :: Unique > { VisualScriptPropertySet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptPropertySetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_assign_op : * mut sys :: godot_method_bind , pub get_base_path : * mut sys :: godot_method_bind , pub get_base_script : * mut sys :: godot_method_bind , pub get_base_type : * mut sys :: godot_method_bind , pub get_basic_type : * mut sys :: godot_method_bind , pub get_call_mode : * mut sys :: godot_method_bind , pub get_index : * mut sys :: godot_method_bind , pub get_property : * mut sys :: godot_method_bind , pub set_assign_op : * mut sys :: godot_method_bind , pub set_base_path : * mut sys :: godot_method_bind , pub set_base_script : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind , pub set_basic_type : * mut sys :: godot_method_bind , pub set_call_mode : * mut sys :: godot_method_bind , pub set_index : * mut sys :: godot_method_bind , pub set_property : * mut sys :: godot_method_bind } impl VisualScriptPropertySetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptPropertySetMethodTable = VisualScriptPropertySetMethodTable { class_constructor : None , get_assign_op : 0 as * mut sys :: godot_method_bind , get_base_path : 0 as * mut sys :: godot_method_bind , get_base_script : 0 as * mut sys :: godot_method_bind , get_base_type : 0 as * mut sys :: godot_method_bind , get_basic_type : 0 as * mut sys :: godot_method_bind , get_call_mode : 0 as * mut sys :: godot_method_bind , get_index : 0 as * mut sys :: godot_method_bind , get_property : 0 as * mut sys :: godot_method_bind , set_assign_op : 0 as * mut sys :: godot_method_bind , set_base_path : 0 as * mut sys :: godot_method_bind , set_base_script : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind , set_basic_type : 0 as * mut sys :: godot_method_bind , set_call_mode : 0 as * mut sys :: godot_method_bind , set_index : 0 as * mut sys :: godot_method_bind , set_property : 0 as * mut sys :: godot_method_bind } ; &raw mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : :: std :: sync :: Once = Once :: new () ; INIT . call_once (|| { VisualScriptPropertySetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptPropertySet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_assign_op = (gd_api . godot_method_bind_get_method) (class_name , "get_assign_op\0" . as_ptr () as * const c_char) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\0" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\0" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\0" . as_ptr () as * const c_char) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_property = (gd_api . godot_method_bind_get_method) (class_name , "get_property\0" . as_ptr () as * const c_char) ; table . set_assign_op = (gd_api . godot_method_bind_get_method) (class_name , "set_assign_op\0" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\0" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\0" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\0" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\0" . as_ptr () as * const c_char) ; table . set_property = (gd_api . godot_method_bind_get_method) (class_name , "set_property\0" . as_ptr () as * const c_char) ; } } } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> /opt/rustwide/target/debug/build/gdnative-bindings-lily-4b70c1ce0b297269/out/generated.rs:1354:15608 [INFO] [stdout] | [INFO] [stdout] 1354 | ... : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'stati... [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [WARN] too much data in the log, truncating it