added godot-rs scaffolding

This commit is contained in:
2025-07-16 18:29:50 +02:00
parent 56c4b7452a
commit 85b73ad963
1280 changed files with 434199 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
/home/nihil/Coding/Godot/Space Salvage Co/rust/target/debug/build/godot-bindings-8a577aaf2b4a430e/build_script_build-8a577aaf2b4a430e: /home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/godot-bindings-0.2.4/build.rs
/home/nihil/Coding/Godot/Space Salvage Co/rust/target/debug/build/godot-bindings-8a577aaf2b4a430e/build_script_build-8a577aaf2b4a430e.d: /home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/godot-bindings-0.2.4/build.rs
/home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/godot-bindings-0.2.4/build.rs:

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1 @@
/home/nihil/Coding/Godot/Space Salvage Co/rust/target/debug/build/godot-bindings-e92445293a1ce1c9/out

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1,23 @@
cargo:rustc-check-cfg=cfg(published_docs, values(none()))
cargo:rustc-check-cfg=cfg(since_api, values("4.1"))
cargo:rustc-check-cfg=cfg(before_api, values("4.1"))
cargo:rustc-check-cfg=cfg(since_api, values("4.2"))
cargo:rustc-check-cfg=cfg(before_api, values("4.2"))
cargo:rustc-check-cfg=cfg(since_api, values("4.3"))
cargo:rustc-check-cfg=cfg(before_api, values("4.3"))
cargo:rustc-check-cfg=cfg(since_api, values("4.4"))
cargo:rustc-check-cfg=cfg(before_api, values("4.4"))
cargo:rustc-cfg=since_api="4.1"
cargo:rustc-cfg=since_api="4.2"
cargo:rustc-cfg=since_api="4.3"
cargo:rustc-cfg=before_api="4.4"
cargo:rustc-cfg=before_patch_api="4.1.0"
cargo:rustc-cfg=before_patch_api="4.1.1"
cargo:rustc-cfg=before_patch_api="4.1.2"
cargo:rustc-cfg=before_patch_api="4.1.3"
cargo:rustc-cfg=before_patch_api="4.1.4"
cargo:rustc-cfg=before_patch_api="4.2.0"
cargo:rustc-cfg=before_patch_api="4.2.1"
cargo:rustc-cfg=before_patch_api="4.2.2"
cargo:rustc-cfg=since_patch_api="4.3.0"
cargo:rustc-cfg=since_patch_api="4.4.0"

View File

@@ -0,0 +1 @@
/home/nihil/Coding/Godot/Space Salvage Co/rust/target/debug/build/godot-codegen-5da53cf4d5947ea0/out

View File

@@ -0,0 +1,5 @@
/home/nihil/Coding/Godot/Space Salvage Co/rust/target/debug/build/godot-codegen-69ab218c83b1b6f5/build_script_build-69ab218c83b1b6f5: /home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/godot-codegen-0.2.4/build.rs
/home/nihil/Coding/Godot/Space Salvage Co/rust/target/debug/build/godot-codegen-69ab218c83b1b6f5/build_script_build-69ab218c83b1b6f5.d: /home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/godot-codegen-0.2.4/build.rs
/home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/godot-codegen-0.2.4/build.rs:

View File

@@ -0,0 +1,5 @@
/home/nihil/Coding/Godot/Space Salvage Co/rust/target/debug/build/godot-core-266e8b4c54477ed9/build_script_build-266e8b4c54477ed9: /home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/godot-core-0.2.4/build.rs
/home/nihil/Coding/Godot/Space Salvage Co/rust/target/debug/build/godot-core-266e8b4c54477ed9/build_script_build-266e8b4c54477ed9.d: /home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/godot-core-0.2.4/build.rs
/home/nihil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/godot-core-0.2.4/build.rs:

View File

@@ -0,0 +1 @@
This file has an mtime of when this was started.

View File

@@ -0,0 +1,223 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerAabb < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerAabb < 'a > {
pub fn from_outer(outer: &Aabb) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn abs(&self,) -> Aabb {
type CallSig = (Aabb,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(363usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "abs", self.sys_ptr, args)
}
}
pub fn get_center(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(364usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_center", self.sys_ptr, args)
}
}
pub fn get_volume(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(365usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_volume", self.sys_ptr, args)
}
}
pub fn has_volume(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(366usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "has_volume", self.sys_ptr, args)
}
}
pub fn has_surface(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(367usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "has_surface", self.sys_ptr, args)
}
}
pub fn has_point(&self, point: Vector3,) -> bool {
type CallSig = (bool, Vector3);
let args = (point,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(368usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "has_point", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, aabb: Aabb,) -> bool {
type CallSig = (bool, Aabb);
let args = (aabb,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(369usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(370usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "is_finite", self.sys_ptr, args)
}
}
pub fn intersects(&self, with: Aabb,) -> bool {
type CallSig = (bool, Aabb);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(371usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "intersects", self.sys_ptr, args)
}
}
pub fn encloses(&self, with: Aabb,) -> bool {
type CallSig = (bool, Aabb);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(372usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "encloses", self.sys_ptr, args)
}
}
pub fn intersects_plane(&self, plane: Plane,) -> bool {
type CallSig = (bool, Plane);
let args = (plane,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(373usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "intersects_plane", self.sys_ptr, args)
}
}
pub fn intersection(&self, with: Aabb,) -> Aabb {
type CallSig = (Aabb, Aabb);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(374usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "intersection", self.sys_ptr, args)
}
}
pub fn merge(&self, with: Aabb,) -> Aabb {
type CallSig = (Aabb, Aabb);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(375usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "merge", self.sys_ptr, args)
}
}
pub fn expand(&self, to_point: Vector3,) -> Aabb {
type CallSig = (Aabb, Vector3);
let args = (to_point,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(376usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "expand", self.sys_ptr, args)
}
}
pub fn grow(&self, by: f64,) -> Aabb {
type CallSig = (Aabb, f64);
let args = (by,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(377usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "grow", self.sys_ptr, args)
}
}
pub fn get_support(&self, dir: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (dir,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(378usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_support", self.sys_ptr, args)
}
}
pub fn get_longest_axis(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(379usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_longest_axis", self.sys_ptr, args)
}
}
pub fn get_longest_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(380usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_longest_axis_index", self.sys_ptr, args)
}
}
pub fn get_longest_axis_size(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(381usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_longest_axis_size", self.sys_ptr, args)
}
}
pub fn get_shortest_axis(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(382usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_shortest_axis", self.sys_ptr, args)
}
}
pub fn get_shortest_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(383usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_shortest_axis_index", self.sys_ptr, args)
}
}
pub fn get_shortest_axis_size(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(384usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_shortest_axis_size", self.sys_ptr, args)
}
}
pub fn get_endpoint(&self, idx: i64,) -> Vector3 {
type CallSig = (Vector3, i64);
let args = (idx,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(385usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "get_endpoint", self.sys_ptr, args)
}
}
pub fn intersects_segment(&self, from: Vector3, to: Vector3,) -> Variant {
type CallSig = (Variant, Vector3, Vector3);
let args = (from, to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(386usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "intersects_segment", self.sys_ptr, args)
}
}
pub fn intersects_ray(&self, from: Vector3, dir: Vector3,) -> Variant {
type CallSig = (Variant, Vector3, Vector3);
let args = (from, dir,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(387usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Aabb", "intersects_ray", self.sys_ptr, args)
}
}
}
impl Aabb {
}

View File

@@ -0,0 +1,408 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerArray < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerArray < 'a > {
pub fn from_outer(outer: &VariantArray) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn from_outer_typed < T > (outer: &Array < T >) -> Self where T: crate::meta::ArrayElement {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(632usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(633usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "is_empty", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(634usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "clear", self.sys_ptr, args)
}
}
pub fn hash(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(635usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "hash", self.sys_ptr, args)
}
}
pub fn assign(&mut self, array: &VariantArray,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, VariantArray >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(636usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "assign", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: &Variant,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, Variant >);
let args = (RefArg::new(value),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(637usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "push_back", self.sys_ptr, args)
}
}
pub fn push_front(&mut self, value: &Variant,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, Variant >);
let args = (RefArg::new(value),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(638usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "push_front", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: &Variant,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, Variant >);
let args = (RefArg::new(value),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(639usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &VariantArray,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, VariantArray >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(640usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "append_array", self.sys_ptr, args)
}
}
pub fn resize(&mut self, size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(641usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "resize", self.sys_ptr, args)
}
}
pub fn insert(&mut self, position: i64, value: &Variant,) -> i64 {
type CallSig < 'a0, > = (i64, i64, RefArg < 'a0, Variant >);
let args = (position, RefArg::new(value),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(642usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "insert", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, position: i64,) {
type CallSig = ((), i64);
let args = (position,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(643usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "remove_at", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: &Variant,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, Variant >);
let args = (RefArg::new(value),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(644usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "fill", self.sys_ptr, args)
}
}
pub fn erase(&mut self, value: &Variant,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, Variant >);
let args = (RefArg::new(value),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(645usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "erase", self.sys_ptr, args)
}
}
pub fn front(&self,) -> Variant {
type CallSig = (Variant,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(646usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "front", self.sys_ptr, args)
}
}
pub fn back(&self,) -> Variant {
type CallSig = (Variant,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(647usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "back", self.sys_ptr, args)
}
}
pub fn pick_random(&self,) -> Variant {
type CallSig = (Variant,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(648usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "pick_random", self.sys_ptr, args)
}
}
pub fn find(&self, what: &Variant, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, RefArg < 'a0, Variant >, i64);
let args = (RefArg::new(what), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(649usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, what: &Variant, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, RefArg < 'a0, Variant >, i64);
let args = (RefArg::new(what), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(650usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: &Variant,) -> i64 {
type CallSig < 'a0, > = (i64, RefArg < 'a0, Variant >);
let args = (RefArg::new(value),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(651usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "count", self.sys_ptr, args)
}
}
pub fn has(&self, value: &Variant,) -> bool {
type CallSig < 'a0, > = (bool, RefArg < 'a0, Variant >);
let args = (RefArg::new(value),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(652usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "has", self.sys_ptr, args)
}
}
pub fn pop_back(&mut self,) -> Variant {
type CallSig = (Variant,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(653usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "pop_back", self.sys_ptr, args)
}
}
pub fn pop_front(&mut self,) -> Variant {
type CallSig = (Variant,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(654usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "pop_front", self.sys_ptr, args)
}
}
pub fn pop_at(&mut self, position: i64,) -> Variant {
type CallSig = (Variant, i64);
let args = (position,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(655usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "pop_at", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(656usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "sort", self.sys_ptr, args)
}
}
pub fn sort_custom(&mut self, func: &Callable,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, Callable >);
let args = (RefArg::new(func),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(657usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "sort_custom", self.sys_ptr, args)
}
}
pub fn shuffle(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(658usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "shuffle", self.sys_ptr, args)
}
}
pub fn bsearch(&self, value: &Variant, before: bool,) -> i64 {
type CallSig < 'a0, > = (i64, RefArg < 'a0, Variant >, bool);
let args = (RefArg::new(value), before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(659usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "bsearch", self.sys_ptr, args)
}
}
pub fn bsearch_custom(&self, value: &Variant, func: &Callable, before: bool,) -> i64 {
type CallSig < 'a0, 'a1, > = (i64, RefArg < 'a0, Variant >, RefArg < 'a1, Callable >, bool);
let args = (RefArg::new(value), RefArg::new(func), before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(660usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "bsearch_custom", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(661usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "reverse", self.sys_ptr, args)
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" You must ensure that the returned array fulfils the safety invariants of [`Array`](crate::builtin::Array)."]
pub unsafe fn duplicate(&self, deep: bool,) -> VariantArray {
type CallSig = (VariantArray, bool);
let args = (deep,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(662usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "duplicate", self.sys_ptr, args)
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" You must ensure that the returned array fulfils the safety invariants of [`Array`](crate::builtin::Array)."]
pub unsafe fn slice(&self, begin: i64, end: i64, step: i64, deep: bool,) -> VariantArray {
type CallSig = (VariantArray, i64, i64, i64, bool);
let args = (begin, end, step, deep,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(663usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "slice", self.sys_ptr, args)
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" You must ensure that the returned array fulfils the safety invariants of [`Array`](crate::builtin::Array)."]
pub unsafe fn filter(&self, method: &Callable,) -> VariantArray {
type CallSig < 'a0, > = (VariantArray, RefArg < 'a0, Callable >);
let args = (RefArg::new(method),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(664usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "filter", self.sys_ptr, args)
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = r" You must ensure that the returned array fulfils the safety invariants of [`Array`](crate::builtin::Array)."]
pub unsafe fn map(&self, method: &Callable,) -> VariantArray {
type CallSig < 'a0, > = (VariantArray, RefArg < 'a0, Callable >);
let args = (RefArg::new(method),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(665usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "map", self.sys_ptr, args)
}
}
pub fn reduce(&self, method: &Callable, accum: &Variant,) -> Variant {
type CallSig < 'a0, 'a1, > = (Variant, RefArg < 'a0, Callable >, RefArg < 'a1, Variant >);
let args = (RefArg::new(method), RefArg::new(accum),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(666usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "reduce", self.sys_ptr, args)
}
}
pub fn any(&self, method: &Callable,) -> bool {
type CallSig < 'a0, > = (bool, RefArg < 'a0, Callable >);
let args = (RefArg::new(method),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(667usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "any", self.sys_ptr, args)
}
}
pub fn all(&self, method: &Callable,) -> bool {
type CallSig < 'a0, > = (bool, RefArg < 'a0, Callable >);
let args = (RefArg::new(method),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(668usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "all", self.sys_ptr, args)
}
}
pub fn max(&self,) -> Variant {
type CallSig = (Variant,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(669usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "max", self.sys_ptr, args)
}
}
pub fn min(&self,) -> Variant {
type CallSig = (Variant,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(670usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "min", self.sys_ptr, args)
}
}
pub fn is_typed(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(671usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "is_typed", self.sys_ptr, args)
}
}
pub fn is_same_typed(&self, array: &VariantArray,) -> bool {
type CallSig < 'a0, > = (bool, RefArg < 'a0, VariantArray >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(672usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "is_same_typed", self.sys_ptr, args)
}
}
pub fn get_typed_builtin(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(673usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "get_typed_builtin", self.sys_ptr, args)
}
}
pub fn get_typed_class_name(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(674usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "get_typed_class_name", self.sys_ptr, args)
}
}
pub fn get_typed_script(&self,) -> Variant {
type CallSig = (Variant,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(675usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "get_typed_script", self.sys_ptr, args)
}
}
pub fn make_read_only(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(676usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "make_read_only", self.sys_ptr, args)
}
}
pub fn is_read_only(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(677usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Array", "is_read_only", self.sys_ptr, args)
}
}
}
impl VariantArray {
}

View File

@@ -0,0 +1,175 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerBasis < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerBasis < 'a > {
pub fn from_outer(outer: &Basis) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn inverse(&self,) -> Basis {
type CallSig = (Basis,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(388usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "inverse", self.sys_ptr, args)
}
}
pub fn transposed(&self,) -> Basis {
type CallSig = (Basis,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(389usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "transposed", self.sys_ptr, args)
}
}
pub fn orthonormalized(&self,) -> Basis {
type CallSig = (Basis,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(390usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "orthonormalized", self.sys_ptr, args)
}
}
pub fn determinant(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(391usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "determinant", self.sys_ptr, args)
}
}
pub fn rotated(&self, axis: Vector3, angle: f64,) -> Basis {
type CallSig = (Basis, Vector3, f64);
let args = (axis, angle,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(392usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "rotated", self.sys_ptr, args)
}
}
pub fn scaled(&self, scale: Vector3,) -> Basis {
type CallSig = (Basis, Vector3);
let args = (scale,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(393usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "scaled", self.sys_ptr, args)
}
}
pub fn get_scale(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(394usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "get_scale", self.sys_ptr, args)
}
}
pub fn get_euler(&self, order: i64,) -> Vector3 {
type CallSig = (Vector3, i64);
let args = (order,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(395usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "get_euler", self.sys_ptr, args)
}
}
pub fn tdotx(&self, with: Vector3,) -> f64 {
type CallSig = (f64, Vector3);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(396usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "tdotx", self.sys_ptr, args)
}
}
pub fn tdoty(&self, with: Vector3,) -> f64 {
type CallSig = (f64, Vector3);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(397usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "tdoty", self.sys_ptr, args)
}
}
pub fn tdotz(&self, with: Vector3,) -> f64 {
type CallSig = (f64, Vector3);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(398usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "tdotz", self.sys_ptr, args)
}
}
pub fn slerp(&self, to: Basis, weight: f64,) -> Basis {
type CallSig = (Basis, Basis, f64);
let args = (to, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(399usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "slerp", self.sys_ptr, args)
}
}
pub fn is_conformal(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(400usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "is_conformal", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, b: Basis,) -> bool {
type CallSig = (bool, Basis);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(401usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(402usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "is_finite", self.sys_ptr, args)
}
}
pub fn get_rotation_quaternion(&self,) -> Quaternion {
type CallSig = (Quaternion,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(403usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "get_rotation_quaternion", self.sys_ptr, args)
}
}
pub fn looking_at(target: Vector3, up: Vector3, use_model_front: bool,) -> Basis {
type CallSig = (Basis, Vector3, Vector3, bool);
let args = (target, up, use_model_front,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(404usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "looking_at", std::ptr::null_mut(), args)
}
}
pub fn from_scale(scale: Vector3,) -> Basis {
type CallSig = (Basis, Vector3);
let args = (scale,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(405usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "from_scale", std::ptr::null_mut(), args)
}
}
pub fn from_euler(euler: Vector3, order: i64,) -> Basis {
type CallSig = (Basis, Vector3, i64);
let args = (euler, order,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(406usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Basis", "from_euler", std::ptr::null_mut(), args)
}
}
}
impl Basis {
}

View File

@@ -0,0 +1,182 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerCallable < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerCallable < 'a > {
pub fn from_outer(outer: &Callable) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn create(variant: &Variant, method: impl AsArg < StringName >,) -> Callable {
type CallSig < 'a0, 'a1, > = (Callable, RefArg < 'a0, Variant >, CowArg < 'a1, StringName >);
let args = (RefArg::new(variant), method.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(585usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "create", std::ptr::null_mut(), args)
}
}
pub fn callv(&self, arguments: &VariantArray,) -> Variant {
type CallSig < 'a0, > = (Variant, RefArg < 'a0, VariantArray >);
let args = (RefArg::new(arguments),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(586usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "callv", self.sys_ptr, args)
}
}
pub fn is_null(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(587usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "is_null", self.sys_ptr, args)
}
}
pub fn is_custom(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(588usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "is_custom", self.sys_ptr, args)
}
}
pub fn is_standard(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(589usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "is_standard", self.sys_ptr, args)
}
}
pub fn is_valid(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(590usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "is_valid", self.sys_ptr, args)
}
}
pub fn get_object(&self,) -> Option < Gd < crate::classes::Object > > {
type CallSig = (Option < Gd < crate::classes::Object > >,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(591usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "get_object", self.sys_ptr, args)
}
}
pub fn get_object_id(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(592usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "get_object_id", self.sys_ptr, args)
}
}
pub fn get_method(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(593usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "get_method", self.sys_ptr, args)
}
}
pub fn get_argument_count(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(594usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "get_argument_count", self.sys_ptr, args)
}
}
pub fn get_bound_arguments_count(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(595usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "get_bound_arguments_count", self.sys_ptr, args)
}
}
pub fn hash(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(597usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "hash", self.sys_ptr, args)
}
}
pub fn bindv(&mut self, arguments: &VariantArray,) -> Callable {
type CallSig < 'a0, > = (Callable, RefArg < 'a0, VariantArray >);
let args = (RefArg::new(arguments),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(598usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "bindv", self.sys_ptr, args)
}
}
pub fn unbind(&self, argcount: i64,) -> Callable {
type CallSig = (Callable, i64);
let args = (argcount,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(599usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "unbind", self.sys_ptr, args)
}
}
}
impl Callable {
pub fn get_bound_arguments(&self,) -> VariantArray {
type CallSig = (VariantArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(596usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Callable", "get_bound_arguments", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn call(&self, varargs: &[Variant]) -> Variant {
type CallSig = (Variant,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(600usize);
< CallSig as VarcallSignatureTuple > ::out_builtin_ptrcall_varargs(method_bind, "Callable", "call", sys::SysPtr::force_mut(self.sys()), args, varargs)
}
}
pub fn call_deferred(&self, varargs: &[Variant]) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(601usize);
< CallSig as VarcallSignatureTuple > ::out_builtin_ptrcall_varargs(method_bind, "Callable", "call_deferred", sys::SysPtr::force_mut(self.sys()), args, varargs)
}
}
pub fn rpc(&self, varargs: &[Variant]) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(602usize);
< CallSig as VarcallSignatureTuple > ::out_builtin_ptrcall_varargs(method_bind, "Callable", "rpc", sys::SysPtr::force_mut(self.sys()), args, varargs)
}
}
pub fn rpc_id(&self, peer_id: i64, varargs: &[Variant]) {
type CallSig = ((), i64);
let args = (peer_id,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(603usize);
< CallSig as VarcallSignatureTuple > ::out_builtin_ptrcall_varargs(method_bind, "Callable", "rpc_id", sys::SysPtr::force_mut(self.sys()), args, varargs)
}
}
pub fn bind(&self, varargs: &[Variant]) -> Callable {
type CallSig = (Callable,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(604usize);
< CallSig as VarcallSignatureTuple > ::out_builtin_ptrcall_varargs(method_bind, "Callable", "bind", sys::SysPtr::force_mut(self.sys()), args, varargs)
}
}
}

View File

@@ -0,0 +1,223 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerColor < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerColor < 'a > {
pub fn from_outer(outer: &Color) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn to_argb32(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(446usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "to_argb32", self.sys_ptr, args)
}
}
pub fn to_abgr32(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(447usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "to_abgr32", self.sys_ptr, args)
}
}
pub fn to_rgba32(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(448usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "to_rgba32", self.sys_ptr, args)
}
}
pub fn to_argb64(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(449usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "to_argb64", self.sys_ptr, args)
}
}
pub fn to_abgr64(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(450usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "to_abgr64", self.sys_ptr, args)
}
}
pub fn to_rgba64(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(451usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "to_rgba64", self.sys_ptr, args)
}
}
pub fn to_html(&self, with_alpha: bool,) -> GString {
type CallSig = (GString, bool);
let args = (with_alpha,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(452usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "to_html", self.sys_ptr, args)
}
}
pub fn clamp(&self, min: Color, max: Color,) -> Color {
type CallSig = (Color, Color, Color);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(453usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "clamp", self.sys_ptr, args)
}
}
pub fn inverted(&self,) -> Color {
type CallSig = (Color,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(454usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "inverted", self.sys_ptr, args)
}
}
pub fn lerp(&self, to: Color, weight: f64,) -> Color {
type CallSig = (Color, Color, f64);
let args = (to, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(455usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "lerp", self.sys_ptr, args)
}
}
pub fn lightened(&self, amount: f64,) -> Color {
type CallSig = (Color, f64);
let args = (amount,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(456usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "lightened", self.sys_ptr, args)
}
}
pub fn darkened(&self, amount: f64,) -> Color {
type CallSig = (Color, f64);
let args = (amount,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(457usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "darkened", self.sys_ptr, args)
}
}
pub fn blend(&self, over: Color,) -> Color {
type CallSig = (Color, Color);
let args = (over,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(458usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "blend", self.sys_ptr, args)
}
}
pub fn get_luminance(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(459usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "get_luminance", self.sys_ptr, args)
}
}
pub fn srgb_to_linear(&self,) -> Color {
type CallSig = (Color,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(460usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "srgb_to_linear", self.sys_ptr, args)
}
}
pub fn linear_to_srgb(&self,) -> Color {
type CallSig = (Color,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(461usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "linear_to_srgb", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, to: Color,) -> bool {
type CallSig = (bool, Color);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(462usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn hex(hex: i64,) -> Color {
type CallSig = (Color, i64);
let args = (hex,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(463usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "hex", std::ptr::null_mut(), args)
}
}
pub fn hex64(hex: i64,) -> Color {
type CallSig = (Color, i64);
let args = (hex,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(464usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "hex64", std::ptr::null_mut(), args)
}
}
pub fn html(rgba: impl AsArg < GString >,) -> Color {
type CallSig < 'a0, > = (Color, CowArg < 'a0, GString >);
let args = (rgba.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(465usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "html", std::ptr::null_mut(), args)
}
}
pub fn html_is_valid(color: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (color.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(466usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "html_is_valid", std::ptr::null_mut(), args)
}
}
pub fn from_string(str: impl AsArg < GString >, default: Color,) -> Color {
type CallSig < 'a0, > = (Color, CowArg < 'a0, GString >, Color);
let args = (str.into_arg(), default,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(467usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "from_string", std::ptr::null_mut(), args)
}
}
pub fn from_hsv(h: f64, s: f64, v: f64, alpha: f64,) -> Color {
type CallSig = (Color, f64, f64, f64, f64);
let args = (h, s, v, alpha,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(468usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "from_hsv", std::ptr::null_mut(), args)
}
}
pub fn from_ok_hsl(h: f64, s: f64, l: f64, alpha: f64,) -> Color {
type CallSig = (Color, f64, f64, f64, f64);
let args = (h, s, l, alpha,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(469usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "from_ok_hsl", std::ptr::null_mut(), args)
}
}
pub fn from_rgbe9995(rgbe: i64,) -> Color {
type CallSig = (Color, i64);
let args = (rgbe,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(470usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Color", "from_rgbe9995", std::ptr::null_mut(), args)
}
}
}
impl Color {
}

View File

@@ -0,0 +1,167 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerDictionary < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerDictionary < 'a > {
pub fn from_outer(outer: &Dictionary) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(614usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(615usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "is_empty", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(616usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "clear", self.sys_ptr, args)
}
}
pub fn merge(&mut self, dictionary: &Dictionary, overwrite: bool,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, Dictionary >, bool);
let args = (RefArg::new(dictionary), overwrite,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(617usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "merge", self.sys_ptr, args)
}
}
pub fn merged(&self, dictionary: &Dictionary, overwrite: bool,) -> Dictionary {
type CallSig < 'a0, > = (Dictionary, RefArg < 'a0, Dictionary >, bool);
let args = (RefArg::new(dictionary), overwrite,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(618usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "merged", self.sys_ptr, args)
}
}
pub fn has(&self, key: &Variant,) -> bool {
type CallSig < 'a0, > = (bool, RefArg < 'a0, Variant >);
let args = (RefArg::new(key),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(619usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "has", self.sys_ptr, args)
}
}
pub fn has_all(&self, keys: &VariantArray,) -> bool {
type CallSig < 'a0, > = (bool, RefArg < 'a0, VariantArray >);
let args = (RefArg::new(keys),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(620usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "has_all", self.sys_ptr, args)
}
}
pub fn find_key(&self, value: &Variant,) -> Variant {
type CallSig < 'a0, > = (Variant, RefArg < 'a0, Variant >);
let args = (RefArg::new(value),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(621usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "find_key", self.sys_ptr, args)
}
}
pub fn erase(&mut self, key: &Variant,) -> bool {
type CallSig < 'a0, > = (bool, RefArg < 'a0, Variant >);
let args = (RefArg::new(key),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(622usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "erase", self.sys_ptr, args)
}
}
pub fn hash(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(623usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "hash", self.sys_ptr, args)
}
}
pub fn keys(&self,) -> VariantArray {
type CallSig = (VariantArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(624usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "keys", self.sys_ptr, args)
}
}
pub fn values(&self,) -> VariantArray {
type CallSig = (VariantArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(625usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "values", self.sys_ptr, args)
}
}
pub fn duplicate(&self, deep: bool,) -> Dictionary {
type CallSig = (Dictionary, bool);
let args = (deep,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(626usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "duplicate", self.sys_ptr, args)
}
}
pub fn get(&self, key: &Variant, default: &Variant,) -> Variant {
type CallSig < 'a0, 'a1, > = (Variant, RefArg < 'a0, Variant >, RefArg < 'a1, Variant >);
let args = (RefArg::new(key), RefArg::new(default),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(627usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "get", self.sys_ptr, args)
}
}
pub fn get_or_add(&mut self, key: &Variant, default: &Variant,) -> Variant {
type CallSig < 'a0, 'a1, > = (Variant, RefArg < 'a0, Variant >, RefArg < 'a1, Variant >);
let args = (RefArg::new(key), RefArg::new(default),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(628usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "get_or_add", self.sys_ptr, args)
}
}
pub fn make_read_only(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(629usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "make_read_only", self.sys_ptr, args)
}
}
pub fn is_read_only(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(630usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "is_read_only", self.sys_ptr, args)
}
}
pub fn recursive_equal(&self, dictionary: &Dictionary, recursion_count: i64,) -> bool {
type CallSig < 'a0, > = (bool, RefArg < 'a0, Dictionary >, i64);
let args = (RefArg::new(dictionary), recursion_count,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(631usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Dictionary", "recursive_equal", self.sys_ptr, args)
}
}
}
impl Dictionary {
}

View File

@@ -0,0 +1,68 @@
mod string;
pub use string::InnerString;
mod vector2;
pub use vector2::InnerVector2;
mod vector2i;
pub use vector2i::InnerVector2i;
mod rect2;
pub use rect2::InnerRect2;
mod rect2i;
pub use rect2i::InnerRect2i;
mod vector3;
pub use vector3::InnerVector3;
mod vector3i;
pub use vector3i::InnerVector3i;
mod transform_2d;
pub use transform_2d::InnerTransform2D;
mod vector4;
pub use vector4::InnerVector4;
mod vector4i;
pub use vector4i::InnerVector4i;
mod plane;
pub use plane::InnerPlane;
mod quaternion;
pub use quaternion::InnerQuaternion;
mod aabb;
pub use aabb::InnerAabb;
mod basis;
pub use basis::InnerBasis;
mod transform_3d;
pub use transform_3d::InnerTransform3D;
mod projection;
pub use projection::InnerProjection;
mod color;
pub use color::InnerColor;
mod string_name;
pub use string_name::InnerStringName;
mod node_path;
pub use node_path::InnerNodePath;
mod rid;
pub use rid::InnerRid;
mod callable;
pub use callable::InnerCallable;
mod signal;
pub use signal::InnerSignal;
mod dictionary;
pub use dictionary::InnerDictionary;
mod array;
pub use array::InnerArray;
mod packed_byte_array;
pub use packed_byte_array::InnerPackedByteArray;
mod packed_int32_array;
pub use packed_int32_array::InnerPackedInt32Array;
mod packed_int64_array;
pub use packed_int64_array::InnerPackedInt64Array;
mod packed_float32_array;
pub use packed_float32_array::InnerPackedFloat32Array;
mod packed_float64_array;
pub use packed_float64_array::InnerPackedFloat64Array;
mod packed_string_array;
pub use packed_string_array::InnerPackedStringArray;
mod packed_vector2_array;
pub use packed_vector2_array::InnerPackedVector2Array;
mod packed_vector3_array;
pub use packed_vector3_array::InnerPackedVector3Array;
mod packed_color_array;
pub use packed_color_array::InnerPackedColorArray;
mod packed_vector4_array;
pub use packed_vector4_array::InnerPackedVector4Array;

View File

@@ -0,0 +1,110 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerNodePath < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerNodePath < 'a > {
pub fn from_outer(outer: &NodePath) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn get_name_count(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(573usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "get_name_count", self.sys_ptr, args)
}
}
pub fn get_name(&self, idx: i64,) -> StringName {
type CallSig = (StringName, i64);
let args = (idx,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(574usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "get_name", self.sys_ptr, args)
}
}
pub fn get_subname_count(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(575usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "get_subname_count", self.sys_ptr, args)
}
}
pub fn hash(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(576usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "hash", self.sys_ptr, args)
}
}
pub fn get_subname(&self, idx: i64,) -> StringName {
type CallSig = (StringName, i64);
let args = (idx,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(577usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "get_subname", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> NodePath {
type CallSig = (NodePath, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(580usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "slice", self.sys_ptr, args)
}
}
}
impl NodePath {
pub fn is_absolute(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(572usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "is_absolute", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_concatenated_names(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(578usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "get_concatenated_names", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_concatenated_subnames(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(579usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "get_concatenated_subnames", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_as_property_path(&self,) -> NodePath {
type CallSig = (NodePath,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(581usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "get_as_property_path", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(582usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "NodePath", "is_empty", sys::SysPtr::force_mut(self.sys()), args)
}
}
}

View File

@@ -0,0 +1,494 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedByteArray < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedByteArray < 'a > {
pub fn from_outer(outer: &PackedByteArray) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(678usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(679usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(680usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: i64,) -> bool {
type CallSig = (bool, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(681usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: i64,) -> bool {
type CallSig = (bool, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(682usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedByteArray,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedByteArray >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(683usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(684usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: i64,) -> i64 {
type CallSig = (i64, i64, i64);
let args = (at_index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(685usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: i64,) {
type CallSig = ((), i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(686usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(687usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(688usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: i64,) -> bool {
type CallSig = (bool, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(689usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(690usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedByteArray {
type CallSig = (PackedByteArray, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(691usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "slice", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(692usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: i64, before: bool,) -> i64 {
type CallSig = (i64, i64, bool);
let args = (value, before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(693usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(694usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: i64, from: i64,) -> i64 {
type CallSig = (i64, i64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(695usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: i64, from: i64,) -> i64 {
type CallSig = (i64, i64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(696usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(697usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "count", self.sys_ptr, args)
}
}
pub fn compress(&self, compression_mode: i64,) -> PackedByteArray {
type CallSig = (PackedByteArray, i64);
let args = (compression_mode,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(704usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "compress", self.sys_ptr, args)
}
}
pub fn decompress(&self, buffer_size: i64, compression_mode: i64,) -> PackedByteArray {
type CallSig = (PackedByteArray, i64, i64);
let args = (buffer_size, compression_mode,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(705usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decompress", self.sys_ptr, args)
}
}
pub fn decompress_dynamic(&self, max_output_size: i64, compression_mode: i64,) -> PackedByteArray {
type CallSig = (PackedByteArray, i64, i64);
let args = (max_output_size, compression_mode,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(706usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decompress_dynamic", self.sys_ptr, args)
}
}
pub fn decode_u8(&self, byte_offset: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(707usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_u8", self.sys_ptr, args)
}
}
pub fn decode_s8(&self, byte_offset: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(708usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_s8", self.sys_ptr, args)
}
}
pub fn decode_u16(&self, byte_offset: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(709usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_u16", self.sys_ptr, args)
}
}
pub fn decode_s16(&self, byte_offset: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(710usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_s16", self.sys_ptr, args)
}
}
pub fn decode_u32(&self, byte_offset: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(711usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_u32", self.sys_ptr, args)
}
}
pub fn decode_s32(&self, byte_offset: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(712usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_s32", self.sys_ptr, args)
}
}
pub fn decode_u64(&self, byte_offset: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(713usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_u64", self.sys_ptr, args)
}
}
pub fn decode_s64(&self, byte_offset: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(714usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_s64", self.sys_ptr, args)
}
}
pub fn decode_half(&self, byte_offset: i64,) -> f64 {
type CallSig = (f64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(715usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_half", self.sys_ptr, args)
}
}
pub fn decode_float(&self, byte_offset: i64,) -> f64 {
type CallSig = (f64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(716usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_float", self.sys_ptr, args)
}
}
pub fn decode_double(&self, byte_offset: i64,) -> f64 {
type CallSig = (f64, i64);
let args = (byte_offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(717usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_double", self.sys_ptr, args)
}
}
pub fn has_encoded_var(&self, byte_offset: i64, allow_objects: bool,) -> bool {
type CallSig = (bool, i64, bool);
let args = (byte_offset, allow_objects,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(718usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "has_encoded_var", self.sys_ptr, args)
}
}
pub fn decode_var(&self, byte_offset: i64, allow_objects: bool,) -> Variant {
type CallSig = (Variant, i64, bool);
let args = (byte_offset, allow_objects,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(719usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_var", self.sys_ptr, args)
}
}
pub fn decode_var_size(&self, byte_offset: i64, allow_objects: bool,) -> i64 {
type CallSig = (i64, i64, bool);
let args = (byte_offset, allow_objects,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(720usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "decode_var_size", self.sys_ptr, args)
}
}
pub fn to_int32_array(&self,) -> PackedInt32Array {
type CallSig = (PackedInt32Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(721usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "to_int32_array", self.sys_ptr, args)
}
}
pub fn to_int64_array(&self,) -> PackedInt64Array {
type CallSig = (PackedInt64Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(722usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "to_int64_array", self.sys_ptr, args)
}
}
pub fn to_float32_array(&self,) -> PackedFloat32Array {
type CallSig = (PackedFloat32Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(723usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "to_float32_array", self.sys_ptr, args)
}
}
pub fn to_float64_array(&self,) -> PackedFloat64Array {
type CallSig = (PackedFloat64Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(724usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "to_float64_array", self.sys_ptr, args)
}
}
pub fn encode_u8(&mut self, byte_offset: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(725usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_u8", self.sys_ptr, args)
}
}
pub fn encode_s8(&mut self, byte_offset: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(726usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_s8", self.sys_ptr, args)
}
}
pub fn encode_u16(&mut self, byte_offset: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(727usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_u16", self.sys_ptr, args)
}
}
pub fn encode_s16(&mut self, byte_offset: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(728usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_s16", self.sys_ptr, args)
}
}
pub fn encode_u32(&mut self, byte_offset: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(729usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_u32", self.sys_ptr, args)
}
}
pub fn encode_s32(&mut self, byte_offset: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(730usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_s32", self.sys_ptr, args)
}
}
pub fn encode_u64(&mut self, byte_offset: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(731usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_u64", self.sys_ptr, args)
}
}
pub fn encode_s64(&mut self, byte_offset: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(732usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_s64", self.sys_ptr, args)
}
}
pub fn encode_half(&mut self, byte_offset: i64, value: f64,) {
type CallSig = ((), i64, f64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(733usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_half", self.sys_ptr, args)
}
}
pub fn encode_float(&mut self, byte_offset: i64, value: f64,) {
type CallSig = ((), i64, f64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(734usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_float", self.sys_ptr, args)
}
}
pub fn encode_double(&mut self, byte_offset: i64, value: f64,) {
type CallSig = ((), i64, f64);
let args = (byte_offset, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(735usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_double", self.sys_ptr, args)
}
}
pub fn encode_var(&mut self, byte_offset: i64, value: &Variant, allow_objects: bool,) -> i64 {
type CallSig < 'a0, > = (i64, i64, RefArg < 'a0, Variant >, bool);
let args = (byte_offset, RefArg::new(value), allow_objects,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(736usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "encode_var", self.sys_ptr, args)
}
}
}
impl PackedByteArray {
pub fn get_string_from_ascii(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(698usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "get_string_from_ascii", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_string_from_utf8(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(699usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "get_string_from_utf8", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_string_from_utf16(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(700usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "get_string_from_utf16", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_string_from_utf32(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(701usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "get_string_from_utf32", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_string_from_wchar(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(702usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "get_string_from_wchar", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn hex_encode(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(703usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedByteArray", "hex_encode", sys::SysPtr::force_mut(self.sys()), args)
}
}
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedColorArray < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedColorArray < 'a > {
pub fn from_outer(outer: &PackedColorArray) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(884usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(885usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: Color,) {
type CallSig = ((), i64, Color);
let args = (index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(886usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: Color,) -> bool {
type CallSig = (bool, Color);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(887usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: Color,) -> bool {
type CallSig = (bool, Color);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(888usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedColorArray,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedColorArray >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(889usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(890usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: Color,) -> i64 {
type CallSig = (i64, i64, Color);
let args = (at_index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(891usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: Color,) {
type CallSig = ((), Color);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(892usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(893usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(894usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: Color,) -> bool {
type CallSig = (bool, Color);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(895usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(896usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedColorArray {
type CallSig = (PackedColorArray, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(897usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "slice", self.sys_ptr, args)
}
}
pub fn to_byte_array(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(898usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "to_byte_array", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(899usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: Color, before: bool,) -> i64 {
type CallSig = (i64, Color, bool);
let args = (value, before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(900usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedColorArray {
type CallSig = (PackedColorArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(901usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: Color, from: i64,) -> i64 {
type CallSig = (i64, Color, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(902usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: Color, from: i64,) -> i64 {
type CallSig = (i64, Color, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(903usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: Color,) -> i64 {
type CallSig = (i64, Color);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(904usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedColorArray", "count", self.sys_ptr, args)
}
}
}
impl PackedColorArray {
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedFloat32Array < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedFloat32Array < 'a > {
pub fn from_outer(outer: &PackedFloat32Array) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(779usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(780usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: f64,) {
type CallSig = ((), i64, f64);
let args = (index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(781usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: f64,) -> bool {
type CallSig = (bool, f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(782usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: f64,) -> bool {
type CallSig = (bool, f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(783usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedFloat32Array,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedFloat32Array >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(784usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(785usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: f64,) -> i64 {
type CallSig = (i64, i64, f64);
let args = (at_index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(786usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: f64,) {
type CallSig = ((), f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(787usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(788usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(789usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: f64,) -> bool {
type CallSig = (bool, f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(790usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(791usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedFloat32Array {
type CallSig = (PackedFloat32Array, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(792usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "slice", self.sys_ptr, args)
}
}
pub fn to_byte_array(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(793usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "to_byte_array", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(794usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: f64, before: bool,) -> i64 {
type CallSig = (i64, f64, bool);
let args = (value, before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(795usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedFloat32Array {
type CallSig = (PackedFloat32Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(796usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: f64, from: i64,) -> i64 {
type CallSig = (i64, f64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(797usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: f64, from: i64,) -> i64 {
type CallSig = (i64, f64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(798usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: f64,) -> i64 {
type CallSig = (i64, f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(799usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat32Array", "count", self.sys_ptr, args)
}
}
}
impl PackedFloat32Array {
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedFloat64Array < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedFloat64Array < 'a > {
pub fn from_outer(outer: &PackedFloat64Array) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(800usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(801usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: f64,) {
type CallSig = ((), i64, f64);
let args = (index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(802usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: f64,) -> bool {
type CallSig = (bool, f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(803usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: f64,) -> bool {
type CallSig = (bool, f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(804usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedFloat64Array,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedFloat64Array >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(805usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(806usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: f64,) -> i64 {
type CallSig = (i64, i64, f64);
let args = (at_index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(807usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: f64,) {
type CallSig = ((), f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(808usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(809usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(810usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: f64,) -> bool {
type CallSig = (bool, f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(811usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(812usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedFloat64Array {
type CallSig = (PackedFloat64Array, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(813usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "slice", self.sys_ptr, args)
}
}
pub fn to_byte_array(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(814usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "to_byte_array", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(815usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: f64, before: bool,) -> i64 {
type CallSig = (i64, f64, bool);
let args = (value, before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(816usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedFloat64Array {
type CallSig = (PackedFloat64Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(817usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: f64, from: i64,) -> i64 {
type CallSig = (i64, f64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(818usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: f64, from: i64,) -> i64 {
type CallSig = (i64, f64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(819usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: f64,) -> i64 {
type CallSig = (i64, f64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(820usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedFloat64Array", "count", self.sys_ptr, args)
}
}
}
impl PackedFloat64Array {
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedInt32Array < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedInt32Array < 'a > {
pub fn from_outer(outer: &PackedInt32Array) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(737usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(738usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(739usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: i64,) -> bool {
type CallSig = (bool, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(740usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: i64,) -> bool {
type CallSig = (bool, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(741usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedInt32Array,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedInt32Array >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(742usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(743usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: i64,) -> i64 {
type CallSig = (i64, i64, i64);
let args = (at_index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(744usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: i64,) {
type CallSig = ((), i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(745usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(746usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(747usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: i64,) -> bool {
type CallSig = (bool, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(748usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(749usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedInt32Array {
type CallSig = (PackedInt32Array, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(750usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "slice", self.sys_ptr, args)
}
}
pub fn to_byte_array(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(751usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "to_byte_array", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(752usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: i64, before: bool,) -> i64 {
type CallSig = (i64, i64, bool);
let args = (value, before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(753usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedInt32Array {
type CallSig = (PackedInt32Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(754usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: i64, from: i64,) -> i64 {
type CallSig = (i64, i64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(755usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: i64, from: i64,) -> i64 {
type CallSig = (i64, i64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(756usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(757usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt32Array", "count", self.sys_ptr, args)
}
}
}
impl PackedInt32Array {
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedInt64Array < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedInt64Array < 'a > {
pub fn from_outer(outer: &PackedInt64Array) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(758usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(759usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: i64,) {
type CallSig = ((), i64, i64);
let args = (index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(760usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: i64,) -> bool {
type CallSig = (bool, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(761usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: i64,) -> bool {
type CallSig = (bool, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(762usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedInt64Array,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedInt64Array >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(763usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(764usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: i64,) -> i64 {
type CallSig = (i64, i64, i64);
let args = (at_index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(765usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: i64,) {
type CallSig = ((), i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(766usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(767usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(768usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: i64,) -> bool {
type CallSig = (bool, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(769usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(770usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedInt64Array {
type CallSig = (PackedInt64Array, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(771usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "slice", self.sys_ptr, args)
}
}
pub fn to_byte_array(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(772usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "to_byte_array", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(773usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: i64, before: bool,) -> i64 {
type CallSig = (i64, i64, bool);
let args = (value, before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(774usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedInt64Array {
type CallSig = (PackedInt64Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(775usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: i64, from: i64,) -> i64 {
type CallSig = (i64, i64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(776usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: i64, from: i64,) -> i64 {
type CallSig = (i64, i64, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(777usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(778usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedInt64Array", "count", self.sys_ptr, args)
}
}
}
impl PackedInt64Array {
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedStringArray < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedStringArray < 'a > {
pub fn from_outer(outer: &PackedStringArray) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(821usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(822usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), i64, CowArg < 'a0, GString >);
let args = (index, value.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(823usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (value.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(824usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (value.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(825usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedStringArray,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedStringArray >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(826usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(827usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, i64, CowArg < 'a0, GString >);
let args = (at_index, value.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(828usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (value.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(829usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(830usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(831usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (value.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(832usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(833usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedStringArray {
type CallSig = (PackedStringArray, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(834usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "slice", self.sys_ptr, args)
}
}
pub fn to_byte_array(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(835usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "to_byte_array", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(836usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: impl AsArg < GString >, before: bool,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, bool);
let args = (value.into_arg(), before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(837usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedStringArray {
type CallSig = (PackedStringArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(838usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (value.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(839usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (value.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(840usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (value.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(841usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedStringArray", "count", self.sys_ptr, args)
}
}
}
impl PackedStringArray {
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedVector2Array < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedVector2Array < 'a > {
pub fn from_outer(outer: &PackedVector2Array) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(842usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(843usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: Vector2,) {
type CallSig = ((), i64, Vector2);
let args = (index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(844usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: Vector2,) -> bool {
type CallSig = (bool, Vector2);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(845usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: Vector2,) -> bool {
type CallSig = (bool, Vector2);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(846usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedVector2Array,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedVector2Array >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(847usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(848usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: Vector2,) -> i64 {
type CallSig = (i64, i64, Vector2);
let args = (at_index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(849usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: Vector2,) {
type CallSig = ((), Vector2);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(850usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(851usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(852usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: Vector2,) -> bool {
type CallSig = (bool, Vector2);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(853usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(854usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedVector2Array {
type CallSig = (PackedVector2Array, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(855usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "slice", self.sys_ptr, args)
}
}
pub fn to_byte_array(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(856usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "to_byte_array", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(857usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: Vector2, before: bool,) -> i64 {
type CallSig = (i64, Vector2, bool);
let args = (value, before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(858usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedVector2Array {
type CallSig = (PackedVector2Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(859usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: Vector2, from: i64,) -> i64 {
type CallSig = (i64, Vector2, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(860usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: Vector2, from: i64,) -> i64 {
type CallSig = (i64, Vector2, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(861usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: Vector2,) -> i64 {
type CallSig = (i64, Vector2);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(862usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector2Array", "count", self.sys_ptr, args)
}
}
}
impl PackedVector2Array {
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedVector3Array < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedVector3Array < 'a > {
pub fn from_outer(outer: &PackedVector3Array) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(863usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(864usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: Vector3,) {
type CallSig = ((), i64, Vector3);
let args = (index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(865usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: Vector3,) -> bool {
type CallSig = (bool, Vector3);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(866usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: Vector3,) -> bool {
type CallSig = (bool, Vector3);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(867usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedVector3Array,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedVector3Array >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(868usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(869usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: Vector3,) -> i64 {
type CallSig = (i64, i64, Vector3);
let args = (at_index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(870usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: Vector3,) {
type CallSig = ((), Vector3);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(871usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(872usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(873usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: Vector3,) -> bool {
type CallSig = (bool, Vector3);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(874usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(875usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedVector3Array {
type CallSig = (PackedVector3Array, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(876usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "slice", self.sys_ptr, args)
}
}
pub fn to_byte_array(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(877usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "to_byte_array", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(878usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: Vector3, before: bool,) -> i64 {
type CallSig = (i64, Vector3, bool);
let args = (value, before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(879usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedVector3Array {
type CallSig = (PackedVector3Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(880usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: Vector3, from: i64,) -> i64 {
type CallSig = (i64, Vector3, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(881usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: Vector3, from: i64,) -> i64 {
type CallSig = (i64, Vector3, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(882usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: Vector3,) -> i64 {
type CallSig = (i64, Vector3);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(883usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector3Array", "count", self.sys_ptr, args)
}
}
}
impl PackedVector3Array {
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPackedVector4Array < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPackedVector4Array < 'a > {
pub fn from_outer(outer: &PackedVector4Array) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn size(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(905usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "size", self.sys_ptr, args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(906usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "is_empty", self.sys_ptr, args)
}
}
pub fn set(&mut self, index: i64, value: Vector4,) {
type CallSig = ((), i64, Vector4);
let args = (index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(907usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "set", self.sys_ptr, args)
}
}
pub fn push_back(&mut self, value: Vector4,) -> bool {
type CallSig = (bool, Vector4);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(908usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "push_back", self.sys_ptr, args)
}
}
pub fn append(&mut self, value: Vector4,) -> bool {
type CallSig = (bool, Vector4);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(909usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "append", self.sys_ptr, args)
}
}
pub fn append_array(&mut self, array: &PackedVector4Array,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedVector4Array >);
let args = (RefArg::new(array),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(910usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "append_array", self.sys_ptr, args)
}
}
pub fn remove_at(&mut self, index: i64,) {
type CallSig = ((), i64);
let args = (index,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(911usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "remove_at", self.sys_ptr, args)
}
}
pub fn insert(&mut self, at_index: i64, value: Vector4,) -> i64 {
type CallSig = (i64, i64, Vector4);
let args = (at_index, value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(912usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "insert", self.sys_ptr, args)
}
}
pub fn fill(&mut self, value: Vector4,) {
type CallSig = ((), Vector4);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(913usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "fill", self.sys_ptr, args)
}
}
pub fn resize(&mut self, new_size: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (new_size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(914usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "resize", self.sys_ptr, args)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(915usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "clear", self.sys_ptr, args)
}
}
pub fn has(&self, value: Vector4,) -> bool {
type CallSig = (bool, Vector4);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(916usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "has", self.sys_ptr, args)
}
}
pub fn reverse(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(917usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "reverse", self.sys_ptr, args)
}
}
pub fn slice(&self, begin: i64, end: i64,) -> PackedVector4Array {
type CallSig = (PackedVector4Array, i64, i64);
let args = (begin, end,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(918usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "slice", self.sys_ptr, args)
}
}
pub fn to_byte_array(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(919usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "to_byte_array", self.sys_ptr, args)
}
}
pub fn sort(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(920usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "sort", self.sys_ptr, args)
}
}
pub fn bsearch(&mut self, value: Vector4, before: bool,) -> i64 {
type CallSig = (i64, Vector4, bool);
let args = (value, before,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(921usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "bsearch", self.sys_ptr, args)
}
}
pub fn duplicate(&mut self,) -> PackedVector4Array {
type CallSig = (PackedVector4Array,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(922usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "duplicate", self.sys_ptr, args)
}
}
pub fn find(&self, value: Vector4, from: i64,) -> i64 {
type CallSig = (i64, Vector4, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(923usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "find", self.sys_ptr, args)
}
}
pub fn rfind(&self, value: Vector4, from: i64,) -> i64 {
type CallSig = (i64, Vector4, i64);
let args = (value, from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(924usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "rfind", self.sys_ptr, args)
}
}
pub fn count(&self, value: Vector4,) -> i64 {
type CallSig = (i64, Vector4);
let args = (value,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(925usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "PackedVector4Array", "count", self.sys_ptr, args)
}
}
}
impl PackedVector4Array {
}

View File

@@ -0,0 +1,111 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerPlane < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerPlane < 'a > {
pub fn from_outer(outer: &Plane) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn normalized(&self,) -> Plane {
type CallSig = (Plane,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(333usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "normalized", self.sys_ptr, args)
}
}
pub fn get_center(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(334usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "get_center", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, to_plane: Plane,) -> bool {
type CallSig = (bool, Plane);
let args = (to_plane,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(335usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(336usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "is_finite", self.sys_ptr, args)
}
}
pub fn is_point_over(&self, point: Vector3,) -> bool {
type CallSig = (bool, Vector3);
let args = (point,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(337usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "is_point_over", self.sys_ptr, args)
}
}
pub fn distance_to(&self, point: Vector3,) -> f64 {
type CallSig = (f64, Vector3);
let args = (point,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(338usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "distance_to", self.sys_ptr, args)
}
}
pub fn has_point(&self, point: Vector3, tolerance: f64,) -> bool {
type CallSig = (bool, Vector3, f64);
let args = (point, tolerance,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(339usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "has_point", self.sys_ptr, args)
}
}
pub fn project(&self, point: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (point,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(340usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "project", self.sys_ptr, args)
}
}
pub fn intersect_3(&self, b: Plane, c: Plane,) -> Variant {
type CallSig = (Variant, Plane, Plane);
let args = (b, c,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(341usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "intersect_3", self.sys_ptr, args)
}
}
pub fn intersects_ray(&self, from: Vector3, dir: Vector3,) -> Variant {
type CallSig = (Variant, Vector3, Vector3);
let args = (from, dir,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(342usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "intersects_ray", self.sys_ptr, args)
}
}
pub fn intersects_segment(&self, from: Vector3, to: Vector3,) -> Variant {
type CallSig = (Variant, Vector3, Vector3);
let args = (from, to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(343usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Plane", "intersects_segment", self.sys_ptr, args)
}
}
}
impl Plane {
}

View File

@@ -0,0 +1,321 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerProjection < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerProjection < 'a > {
pub fn from_outer(outer: &Projection) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn create_depth_correction(flip_y: bool,) -> Projection {
type CallSig = (Projection, bool);
let args = (flip_y,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(420usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_depth_correction", std::ptr::null_mut(), args)
}
}
pub fn create_light_atlas_rect(rect: Rect2,) -> Projection {
type CallSig = (Projection, Rect2);
let args = (rect,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(421usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_light_atlas_rect", std::ptr::null_mut(), args)
}
}
pub fn create_perspective(fovy: f64, aspect: f64, z_near: f64, z_far: f64, flip_fov: bool,) -> Projection {
type CallSig = (Projection, f64, f64, f64, f64, bool);
let args = (fovy, aspect, z_near, z_far, flip_fov,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(422usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_perspective", std::ptr::null_mut(), args)
}
}
pub fn create_perspective_hmd(fovy: f64, aspect: f64, z_near: f64, z_far: f64, flip_fov: bool, eye: i64, intraocular_dist: f64, convergence_dist: f64,) -> Projection {
type CallSig = (Projection, f64, f64, f64, f64, bool, i64, f64, f64);
let args = (fovy, aspect, z_near, z_far, flip_fov, eye, intraocular_dist, convergence_dist,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(423usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_perspective_hmd", std::ptr::null_mut(), args)
}
}
pub fn create_for_hmd(eye: i64, aspect: f64, intraocular_dist: f64, display_width: f64, display_to_lens: f64, oversample: f64, z_near: f64, z_far: f64,) -> Projection {
type CallSig = (Projection, i64, f64, f64, f64, f64, f64, f64, f64);
let args = (eye, aspect, intraocular_dist, display_width, display_to_lens, oversample, z_near, z_far,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(424usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_for_hmd", std::ptr::null_mut(), args)
}
}
pub fn create_orthogonal(left: f64, right: f64, bottom: f64, top: f64, z_near: f64, z_far: f64,) -> Projection {
type CallSig = (Projection, f64, f64, f64, f64, f64, f64);
let args = (left, right, bottom, top, z_near, z_far,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(425usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_orthogonal", std::ptr::null_mut(), args)
}
}
pub fn create_orthogonal_aspect(size: f64, aspect: f64, z_near: f64, z_far: f64, flip_fov: bool,) -> Projection {
type CallSig = (Projection, f64, f64, f64, f64, bool);
let args = (size, aspect, z_near, z_far, flip_fov,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(426usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_orthogonal_aspect", std::ptr::null_mut(), args)
}
}
pub fn create_frustum(left: f64, right: f64, bottom: f64, top: f64, z_near: f64, z_far: f64,) -> Projection {
type CallSig = (Projection, f64, f64, f64, f64, f64, f64);
let args = (left, right, bottom, top, z_near, z_far,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(427usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_frustum", std::ptr::null_mut(), args)
}
}
pub fn create_frustum_aspect(size: f64, aspect: f64, offset: Vector2, z_near: f64, z_far: f64, flip_fov: bool,) -> Projection {
type CallSig = (Projection, f64, f64, Vector2, f64, f64, bool);
let args = (size, aspect, offset, z_near, z_far, flip_fov,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(428usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_frustum_aspect", std::ptr::null_mut(), args)
}
}
pub fn create_fit_aabb(aabb: Aabb,) -> Projection {
type CallSig = (Projection, Aabb);
let args = (aabb,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(429usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "create_fit_aabb", std::ptr::null_mut(), args)
}
}
pub fn determinant(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(430usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "determinant", self.sys_ptr, args)
}
}
pub fn perspective_znear_adjusted(&self, new_znear: f64,) -> Projection {
type CallSig = (Projection, f64);
let args = (new_znear,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(431usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "perspective_znear_adjusted", self.sys_ptr, args)
}
}
pub fn get_projection_plane(&self, plane: i64,) -> Plane {
type CallSig = (Plane, i64);
let args = (plane,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(432usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_projection_plane", self.sys_ptr, args)
}
}
pub fn flipped_y(&self,) -> Projection {
type CallSig = (Projection,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(433usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "flipped_y", self.sys_ptr, args)
}
}
pub fn jitter_offseted(&self, offset: Vector2,) -> Projection {
type CallSig = (Projection, Vector2);
let args = (offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(434usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "jitter_offseted", self.sys_ptr, args)
}
}
pub fn get_fovy(fovx: f64, aspect: f64,) -> f64 {
type CallSig = (f64, f64, f64);
let args = (fovx, aspect,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(435usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_fovy", std::ptr::null_mut(), args)
}
}
pub fn get_z_far(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(436usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_z_far", self.sys_ptr, args)
}
}
pub fn get_z_near(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(437usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_z_near", self.sys_ptr, args)
}
}
pub fn get_aspect(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(438usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_aspect", self.sys_ptr, args)
}
}
pub fn get_fov(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(439usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_fov", self.sys_ptr, args)
}
}
pub fn is_orthogonal(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(440usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "is_orthogonal", self.sys_ptr, args)
}
}
pub fn get_viewport_half_extents(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(441usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_viewport_half_extents", self.sys_ptr, args)
}
}
pub fn get_far_plane_half_extents(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(442usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_far_plane_half_extents", self.sys_ptr, args)
}
}
pub fn inverse(&self,) -> Projection {
type CallSig = (Projection,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(443usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "inverse", self.sys_ptr, args)
}
}
pub fn get_pixels_per_meter(&self, for_pixel_width: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (for_pixel_width,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(444usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_pixels_per_meter", self.sys_ptr, args)
}
}
pub fn get_lod_multiplier(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(445usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Projection", "get_lod_multiplier", self.sys_ptr, args)
}
}
}
impl Projection {
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Planes {
ord: i32
}
impl Planes {
#[doc(alias = "PLANE_NEAR")]
#[doc = "Godot enumerator name: `PLANE_NEAR`"]
pub const NEAR: Planes = Planes {
ord: 0i32
};
#[doc(alias = "PLANE_FAR")]
#[doc = "Godot enumerator name: `PLANE_FAR`"]
pub const FAR: Planes = Planes {
ord: 1i32
};
#[doc(alias = "PLANE_LEFT")]
#[doc = "Godot enumerator name: `PLANE_LEFT`"]
pub const LEFT: Planes = Planes {
ord: 2i32
};
#[doc(alias = "PLANE_TOP")]
#[doc = "Godot enumerator name: `PLANE_TOP`"]
pub const TOP: Planes = Planes {
ord: 3i32
};
#[doc(alias = "PLANE_RIGHT")]
#[doc = "Godot enumerator name: `PLANE_RIGHT`"]
pub const RIGHT: Planes = Planes {
ord: 4i32
};
#[doc(alias = "PLANE_BOTTOM")]
#[doc = "Godot enumerator name: `PLANE_BOTTOM`"]
pub const BOTTOM: Planes = Planes {
ord: 5i32
};
}
impl std::fmt::Debug for Planes {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("Planes") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for Planes {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 | ord @ 4i32 | ord @ 5i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::NEAR => "NEAR", Self::FAR => "FAR", Self::LEFT => "LEFT", Self::TOP => "TOP", Self::RIGHT => "RIGHT", Self::BOTTOM => "BOTTOM", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::NEAR => "PLANE_NEAR", Self::FAR => "PLANE_FAR", Self::LEFT => "PLANE_LEFT", Self::TOP => "PLANE_TOP", Self::RIGHT => "PLANE_RIGHT", Self::BOTTOM => "PLANE_BOTTOM", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for Planes {
type Via = i32;
}
impl crate::meta::ToGodot for Planes {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for Planes {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,175 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerQuaternion < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerQuaternion < 'a > {
pub fn from_outer(outer: &Quaternion) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn length(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(344usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "length", self.sys_ptr, args)
}
}
pub fn length_squared(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(345usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "length_squared", self.sys_ptr, args)
}
}
pub fn normalized(&self,) -> Quaternion {
type CallSig = (Quaternion,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(346usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "normalized", self.sys_ptr, args)
}
}
pub fn is_normalized(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(347usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "is_normalized", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, to: Quaternion,) -> bool {
type CallSig = (bool, Quaternion);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(348usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(349usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "is_finite", self.sys_ptr, args)
}
}
pub fn inverse(&self,) -> Quaternion {
type CallSig = (Quaternion,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(350usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "inverse", self.sys_ptr, args)
}
}
pub fn log(&self,) -> Quaternion {
type CallSig = (Quaternion,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(351usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "log", self.sys_ptr, args)
}
}
pub fn exp(&self,) -> Quaternion {
type CallSig = (Quaternion,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(352usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "exp", self.sys_ptr, args)
}
}
pub fn angle_to(&self, to: Quaternion,) -> f64 {
type CallSig = (f64, Quaternion);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(353usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "angle_to", self.sys_ptr, args)
}
}
pub fn dot(&self, with: Quaternion,) -> f64 {
type CallSig = (f64, Quaternion);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(354usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "dot", self.sys_ptr, args)
}
}
pub fn slerp(&self, to: Quaternion, weight: f64,) -> Quaternion {
type CallSig = (Quaternion, Quaternion, f64);
let args = (to, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(355usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "slerp", self.sys_ptr, args)
}
}
pub fn slerpni(&self, to: Quaternion, weight: f64,) -> Quaternion {
type CallSig = (Quaternion, Quaternion, f64);
let args = (to, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(356usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "slerpni", self.sys_ptr, args)
}
}
pub fn spherical_cubic_interpolate(&self, b: Quaternion, pre_a: Quaternion, post_b: Quaternion, weight: f64,) -> Quaternion {
type CallSig = (Quaternion, Quaternion, Quaternion, Quaternion, f64);
let args = (b, pre_a, post_b, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(357usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "spherical_cubic_interpolate", self.sys_ptr, args)
}
}
pub fn spherical_cubic_interpolate_in_time(&self, b: Quaternion, pre_a: Quaternion, post_b: Quaternion, weight: f64, b_t: f64, pre_a_t: f64, post_b_t: f64,) -> Quaternion {
type CallSig = (Quaternion, Quaternion, Quaternion, Quaternion, f64, f64, f64, f64);
let args = (b, pre_a, post_b, weight, b_t, pre_a_t, post_b_t,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(358usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "spherical_cubic_interpolate_in_time", self.sys_ptr, args)
}
}
pub fn get_euler(&self, order: i64,) -> Vector3 {
type CallSig = (Vector3, i64);
let args = (order,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(359usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "get_euler", self.sys_ptr, args)
}
}
pub fn from_euler(euler: Vector3,) -> Quaternion {
type CallSig = (Quaternion, Vector3);
let args = (euler,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(360usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "from_euler", std::ptr::null_mut(), args)
}
}
pub fn get_axis(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(361usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "get_axis", self.sys_ptr, args)
}
}
pub fn get_angle(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(362usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Quaternion", "get_angle", self.sys_ptr, args)
}
}
}
impl Quaternion {
}

View File

@@ -0,0 +1,143 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerRect2 < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerRect2 < 'a > {
pub fn from_outer(outer: &Rect2) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn get_center(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(172usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "get_center", self.sys_ptr, args)
}
}
pub fn get_area(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(173usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "get_area", self.sys_ptr, args)
}
}
pub fn has_area(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(174usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "has_area", self.sys_ptr, args)
}
}
pub fn has_point(&self, point: Vector2,) -> bool {
type CallSig = (bool, Vector2);
let args = (point,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(175usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "has_point", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, rect: Rect2,) -> bool {
type CallSig = (bool, Rect2);
let args = (rect,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(176usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(177usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "is_finite", self.sys_ptr, args)
}
}
pub fn intersects(&self, b: Rect2, include_borders: bool,) -> bool {
type CallSig = (bool, Rect2, bool);
let args = (b, include_borders,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(178usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "intersects", self.sys_ptr, args)
}
}
pub fn encloses(&self, b: Rect2,) -> bool {
type CallSig = (bool, Rect2);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(179usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "encloses", self.sys_ptr, args)
}
}
pub fn intersection(&self, b: Rect2,) -> Rect2 {
type CallSig = (Rect2, Rect2);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(180usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "intersection", self.sys_ptr, args)
}
}
pub fn merge(&self, b: Rect2,) -> Rect2 {
type CallSig = (Rect2, Rect2);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(181usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "merge", self.sys_ptr, args)
}
}
pub fn expand(&self, to: Vector2,) -> Rect2 {
type CallSig = (Rect2, Vector2);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(182usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "expand", self.sys_ptr, args)
}
}
pub fn grow(&self, amount: f64,) -> Rect2 {
type CallSig = (Rect2, f64);
let args = (amount,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(183usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "grow", self.sys_ptr, args)
}
}
pub fn grow_side(&self, side: i64, amount: f64,) -> Rect2 {
type CallSig = (Rect2, i64, f64);
let args = (side, amount,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(184usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "grow_side", self.sys_ptr, args)
}
}
pub fn grow_individual(&self, left: f64, top: f64, right: f64, bottom: f64,) -> Rect2 {
type CallSig = (Rect2, f64, f64, f64, f64);
let args = (left, top, right, bottom,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(185usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "grow_individual", self.sys_ptr, args)
}
}
pub fn abs(&self,) -> Rect2 {
type CallSig = (Rect2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(186usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2", "abs", self.sys_ptr, args)
}
}
}
impl Rect2 {
}

View File

@@ -0,0 +1,127 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerRect2i < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerRect2i < 'a > {
pub fn from_outer(outer: &Rect2i) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn get_center(&self,) -> Vector2i {
type CallSig = (Vector2i,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(187usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "get_center", self.sys_ptr, args)
}
}
pub fn get_area(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(188usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "get_area", self.sys_ptr, args)
}
}
pub fn has_area(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(189usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "has_area", self.sys_ptr, args)
}
}
pub fn has_point(&self, point: Vector2i,) -> bool {
type CallSig = (bool, Vector2i);
let args = (point,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(190usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "has_point", self.sys_ptr, args)
}
}
pub fn intersects(&self, b: Rect2i,) -> bool {
type CallSig = (bool, Rect2i);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(191usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "intersects", self.sys_ptr, args)
}
}
pub fn encloses(&self, b: Rect2i,) -> bool {
type CallSig = (bool, Rect2i);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(192usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "encloses", self.sys_ptr, args)
}
}
pub fn intersection(&self, b: Rect2i,) -> Rect2i {
type CallSig = (Rect2i, Rect2i);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(193usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "intersection", self.sys_ptr, args)
}
}
pub fn merge(&self, b: Rect2i,) -> Rect2i {
type CallSig = (Rect2i, Rect2i);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(194usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "merge", self.sys_ptr, args)
}
}
pub fn expand(&self, to: Vector2i,) -> Rect2i {
type CallSig = (Rect2i, Vector2i);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(195usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "expand", self.sys_ptr, args)
}
}
pub fn grow(&self, amount: i64,) -> Rect2i {
type CallSig = (Rect2i, i64);
let args = (amount,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(196usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "grow", self.sys_ptr, args)
}
}
pub fn grow_side(&self, side: i64, amount: i64,) -> Rect2i {
type CallSig = (Rect2i, i64, i64);
let args = (side, amount,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(197usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "grow_side", self.sys_ptr, args)
}
}
pub fn grow_individual(&self, left: i64, top: i64, right: i64, bottom: i64,) -> Rect2i {
type CallSig = (Rect2i, i64, i64, i64, i64);
let args = (left, top, right, bottom,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(198usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "grow_individual", self.sys_ptr, args)
}
}
pub fn abs(&self,) -> Rect2i {
type CallSig = (Rect2i,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(199usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rect2i", "abs", self.sys_ptr, args)
}
}
}
impl Rect2i {
}

View File

@@ -0,0 +1,39 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerRid < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerRid < 'a > {
pub fn from_outer(outer: &Rid) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn is_valid(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(583usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rid", "is_valid", self.sys_ptr, args)
}
}
pub fn get_id(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(584usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Rid", "get_id", self.sys_ptr, args)
}
}
}
impl Rid {
}

View File

@@ -0,0 +1,95 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerSignal < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerSignal < 'a > {
pub fn from_outer(outer: &Signal) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn is_null(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(605usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Signal", "is_null", self.sys_ptr, args)
}
}
pub fn get_object(&self,) -> Option < Gd < crate::classes::Object > > {
type CallSig = (Option < Gd < crate::classes::Object > >,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(606usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Signal", "get_object", self.sys_ptr, args)
}
}
pub fn get_object_id(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(607usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Signal", "get_object_id", self.sys_ptr, args)
}
}
pub fn get_name(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(608usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Signal", "get_name", self.sys_ptr, args)
}
}
pub fn connect(&mut self, callable: &Callable, flags: i64,) -> i64 {
type CallSig < 'a0, > = (i64, RefArg < 'a0, Callable >, i64);
let args = (RefArg::new(callable), flags,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(609usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Signal", "connect", self.sys_ptr, args)
}
}
pub fn disconnect(&mut self, callable: &Callable,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, Callable >);
let args = (RefArg::new(callable),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(610usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Signal", "disconnect", self.sys_ptr, args)
}
}
pub fn is_connected(&self, callable: &Callable,) -> bool {
type CallSig < 'a0, > = (bool, RefArg < 'a0, Callable >);
let args = (RefArg::new(callable),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(611usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Signal", "is_connected", self.sys_ptr, args)
}
}
pub fn get_connections(&self,) -> VariantArray {
type CallSig = (VariantArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(612usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Signal", "get_connections", self.sys_ptr, args)
}
}
pub fn emit(&self, varargs: &[Variant]) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(613usize);
< CallSig as VarcallSignatureTuple > ::out_builtin_ptrcall_varargs(method_bind, "Signal", "emit", self.sys_ptr, args, varargs)
}
}
}
impl Signal {
}

View File

@@ -0,0 +1,878 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerString < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerString < 'a > {
pub fn from_outer(outer: &GString) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn casecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(0usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "casecmp_to", self.sys_ptr, args)
}
}
pub fn nocasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(1usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "nocasecmp_to", self.sys_ptr, args)
}
}
pub fn naturalcasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(2usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "naturalcasecmp_to", self.sys_ptr, args)
}
}
pub fn naturalnocasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(3usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "naturalnocasecmp_to", self.sys_ptr, args)
}
}
pub fn filecasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(4usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "filecasecmp_to", self.sys_ptr, args)
}
}
pub fn filenocasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(5usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "filenocasecmp_to", self.sys_ptr, args)
}
}
pub fn length(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(6usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "length", self.sys_ptr, args)
}
}
pub fn substr(&self, from: i64, len: i64,) -> GString {
type CallSig = (GString, i64, i64);
let args = (from, len,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(7usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "substr", self.sys_ptr, args)
}
}
pub fn get_slice(&self, delimiter: impl AsArg < GString >, slice: i64,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >, i64);
let args = (delimiter.into_arg(), slice,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(8usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "get_slice", self.sys_ptr, args)
}
}
pub fn get_slicec(&self, delimiter: i64, slice: i64,) -> GString {
type CallSig = (GString, i64, i64);
let args = (delimiter, slice,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(9usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "get_slicec", self.sys_ptr, args)
}
}
pub fn get_slice_count(&self, delimiter: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (delimiter.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(10usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "get_slice_count", self.sys_ptr, args)
}
}
pub fn find(&self, what: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (what.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(11usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "find", self.sys_ptr, args)
}
}
pub fn findn(&self, what: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (what.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(12usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "findn", self.sys_ptr, args)
}
}
pub fn count(&self, what: impl AsArg < GString >, from: i64, to: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64, i64);
let args = (what.into_arg(), from, to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(13usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "count", self.sys_ptr, args)
}
}
pub fn countn(&self, what: impl AsArg < GString >, from: i64, to: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64, i64);
let args = (what.into_arg(), from, to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(14usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "countn", self.sys_ptr, args)
}
}
pub fn rfind(&self, what: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (what.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(15usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "rfind", self.sys_ptr, args)
}
}
pub fn rfindn(&self, what: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (what.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(16usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "rfindn", self.sys_ptr, args)
}
}
pub fn match_(&self, expr: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (expr.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(17usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "match", self.sys_ptr, args)
}
}
pub fn matchn(&self, expr: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (expr.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(18usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "matchn", self.sys_ptr, args)
}
}
pub fn format(&self, values: &Variant, placeholder: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, 'a1, > = (GString, RefArg < 'a0, Variant >, CowArg < 'a1, GString >);
let args = (RefArg::new(values), placeholder.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(25usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "format", self.sys_ptr, args)
}
}
pub fn insert(&self, position: i64, what: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, i64, CowArg < 'a0, GString >);
let args = (position, what.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(30usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "insert", self.sys_ptr, args)
}
}
pub fn erase(&self, position: i64, chars: i64,) -> GString {
type CallSig = (GString, i64, i64);
let args = (position, chars,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(31usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "erase", self.sys_ptr, args)
}
}
pub fn split(&self, delimiter: impl AsArg < GString >, allow_empty: bool, maxsplit: i64,) -> PackedStringArray {
type CallSig < 'a0, > = (PackedStringArray, CowArg < 'a0, GString >, bool, i64);
let args = (delimiter.into_arg(), allow_empty, maxsplit,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(36usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "split", self.sys_ptr, args)
}
}
pub fn rsplit(&self, delimiter: impl AsArg < GString >, allow_empty: bool, maxsplit: i64,) -> PackedStringArray {
type CallSig < 'a0, > = (PackedStringArray, CowArg < 'a0, GString >, bool, i64);
let args = (delimiter.into_arg(), allow_empty, maxsplit,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(37usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "rsplit", self.sys_ptr, args)
}
}
pub fn unicode_at(&self, at: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (at,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(51usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "unicode_at", self.sys_ptr, args)
}
}
pub fn hash(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(54usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "hash", self.sys_ptr, args)
}
}
pub fn lpad(&self, min_length: i64, character: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, i64, CowArg < 'a0, GString >);
let args = (min_length, character.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(89usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "lpad", self.sys_ptr, args)
}
}
pub fn rpad(&self, min_length: i64, character: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, i64, CowArg < 'a0, GString >);
let args = (min_length, character.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(90usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "rpad", self.sys_ptr, args)
}
}
pub fn pad_decimals(&self, digits: i64,) -> GString {
type CallSig = (GString, i64);
let args = (digits,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(91usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "pad_decimals", self.sys_ptr, args)
}
}
pub fn pad_zeros(&self, digits: i64,) -> GString {
type CallSig = (GString, i64);
let args = (digits,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(92usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "pad_zeros", self.sys_ptr, args)
}
}
}
impl GString {
pub fn begins_with(&self, text: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(19usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "begins_with", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn ends_with(&self, text: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(20usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "ends_with", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_subsequence_of(&self, text: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(21usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_subsequence_of", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_subsequence_ofn(&self, text: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(22usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_subsequence_ofn", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn bigrams(&self,) -> PackedStringArray {
type CallSig = (PackedStringArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(23usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "bigrams", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn similarity(&self, text: impl AsArg < GString >,) -> f64 {
type CallSig < 'a0, > = (f64, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(24usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "similarity", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn replace(&self, what: impl AsArg < GString >, forwhat: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, 'a1, > = (GString, CowArg < 'a0, GString >, CowArg < 'a1, GString >);
let args = (what.into_arg(), forwhat.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(26usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "replace", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn replacen(&self, what: impl AsArg < GString >, forwhat: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, 'a1, > = (GString, CowArg < 'a0, GString >, CowArg < 'a1, GString >);
let args = (what.into_arg(), forwhat.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(27usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "replacen", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn repeat(&self, count: i64,) -> GString {
type CallSig = (GString, i64);
let args = (count,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(28usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "repeat", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn reverse(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(29usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "reverse", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn capitalize(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(32usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "capitalize", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_camel_case(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(33usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_camel_case", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_pascal_case(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(34usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_pascal_case", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_snake_case(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(35usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_snake_case", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn split_floats(&self, delimiter: impl AsArg < GString >, allow_empty: bool,) -> PackedFloat64Array {
type CallSig < 'a0, > = (PackedFloat64Array, CowArg < 'a0, GString >, bool);
let args = (delimiter.into_arg(), allow_empty,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(38usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "split_floats", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn join(&self, parts: &PackedStringArray,) -> GString {
type CallSig < 'a0, > = (GString, RefArg < 'a0, PackedStringArray >);
let args = (RefArg::new(parts),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(39usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "join", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_upper(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(40usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_upper", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_lower(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(41usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_lower", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn left(&self, length: i64,) -> GString {
type CallSig = (GString, i64);
let args = (length,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(42usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "left", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn right(&self, length: i64,) -> GString {
type CallSig = (GString, i64);
let args = (length,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(43usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "right", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn strip_edges(&self, left: bool, right: bool,) -> GString {
type CallSig = (GString, bool, bool);
let args = (left, right,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(44usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "strip_edges", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn strip_escapes(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(45usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "strip_escapes", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn lstrip(&self, chars: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (chars.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(46usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "lstrip", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn rstrip(&self, chars: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (chars.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(47usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "rstrip", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_extension(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(48usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "get_extension", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_basename(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(49usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "get_basename", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn path_join(&self, file: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (file.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(50usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "path_join", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn indent(&self, prefix: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (prefix.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(52usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "indent", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn dedent(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(53usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "dedent", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn md5_text(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(55usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "md5_text", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn sha1_text(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(56usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "sha1_text", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn sha256_text(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(57usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "sha256_text", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn md5_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(58usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "md5_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn sha1_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(59usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "sha1_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn sha256_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(60usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "sha256_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(61usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_empty", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn contains(&self, what: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (what.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(62usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "contains", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn containsn(&self, what: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (what.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(63usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "containsn", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_absolute_path(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(64usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_absolute_path", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_relative_path(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(65usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_relative_path", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn simplify_path(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(66usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "simplify_path", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_base_dir(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(67usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "get_base_dir", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_file(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(68usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "get_file", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn xml_escape(&self, escape_quotes: bool,) -> GString {
type CallSig = (GString, bool);
let args = (escape_quotes,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(69usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "xml_escape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn xml_unescape(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(70usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "xml_unescape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn uri_encode(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(71usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "uri_encode", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn uri_decode(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(72usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "uri_decode", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn c_escape(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(73usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "c_escape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn c_unescape(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(74usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "c_unescape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn json_escape(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(75usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "json_escape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn validate_node_name(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(76usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "validate_node_name", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn validate_filename(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(77usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "validate_filename", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_identifier(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(78usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_valid_identifier", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_int(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(79usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_valid_int", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_float(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(80usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_valid_float", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_hex_number(&self, with_prefix: bool,) -> bool {
type CallSig = (bool, bool);
let args = (with_prefix,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(81usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_valid_hex_number", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_html_color(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(82usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_valid_html_color", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_ip_address(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(83usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_valid_ip_address", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_filename(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(84usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "is_valid_filename", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_int(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(85usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_int", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_float(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(86usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_float", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn hex_to_int(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(87usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "hex_to_int", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn bin_to_int(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(88usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "bin_to_int", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn trim_prefix(&self, prefix: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (prefix.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(93usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "trim_prefix", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn trim_suffix(&self, suffix: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (suffix.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(94usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "trim_suffix", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_ascii_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(95usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_ascii_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_utf8_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(96usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_utf8_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_utf16_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(97usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_utf16_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_utf32_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(98usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_utf32_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn hex_decode(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(99usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "hex_decode", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_wchar_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(100usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "to_wchar_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn num_scientific(number: f64,) -> GString {
type CallSig = (GString, f64);
let args = (number,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(101usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "num_scientific", std::ptr::null_mut(), args)
}
}
pub fn num(number: f64, decimals: i64,) -> GString {
type CallSig = (GString, f64, i64);
let args = (number, decimals,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(102usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "num", std::ptr::null_mut(), args)
}
}
pub fn num_int64(number: i64, base: i64, capitalize_hex: bool,) -> GString {
type CallSig = (GString, i64, i64, bool);
let args = (number, base, capitalize_hex,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(103usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "num_int64", std::ptr::null_mut(), args)
}
}
pub fn num_uint64(number: i64, base: i64, capitalize_hex: bool,) -> GString {
type CallSig = (GString, i64, i64, bool);
let args = (number, base, capitalize_hex,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(104usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "num_uint64", std::ptr::null_mut(), args)
}
}
pub fn chr(char: i64,) -> GString {
type CallSig = (GString, i64);
let args = (char,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(105usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "chr", std::ptr::null_mut(), args)
}
}
pub fn humanize_size(size: i64,) -> GString {
type CallSig = (GString, i64);
let args = (size,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(106usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "String", "humanize_size", std::ptr::null_mut(), args)
}
}
}

View File

@@ -0,0 +1,830 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerStringName < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerStringName < 'a > {
pub fn from_outer(outer: &StringName) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn casecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(471usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "casecmp_to", self.sys_ptr, args)
}
}
pub fn nocasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(472usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "nocasecmp_to", self.sys_ptr, args)
}
}
pub fn naturalcasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(473usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "naturalcasecmp_to", self.sys_ptr, args)
}
}
pub fn naturalnocasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(474usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "naturalnocasecmp_to", self.sys_ptr, args)
}
}
pub fn filecasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(475usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "filecasecmp_to", self.sys_ptr, args)
}
}
pub fn filenocasecmp_to(&self, to: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (to.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(476usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "filenocasecmp_to", self.sys_ptr, args)
}
}
pub fn length(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(477usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "length", self.sys_ptr, args)
}
}
pub fn substr(&self, from: i64, len: i64,) -> GString {
type CallSig = (GString, i64, i64);
let args = (from, len,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(478usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "substr", self.sys_ptr, args)
}
}
pub fn get_slice(&self, delimiter: impl AsArg < GString >, slice: i64,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >, i64);
let args = (delimiter.into_arg(), slice,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(479usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "get_slice", self.sys_ptr, args)
}
}
pub fn get_slicec(&self, delimiter: i64, slice: i64,) -> GString {
type CallSig = (GString, i64, i64);
let args = (delimiter, slice,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(480usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "get_slicec", self.sys_ptr, args)
}
}
pub fn get_slice_count(&self, delimiter: impl AsArg < GString >,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >);
let args = (delimiter.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(481usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "get_slice_count", self.sys_ptr, args)
}
}
pub fn find(&self, what: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (what.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(482usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "find", self.sys_ptr, args)
}
}
pub fn findn(&self, what: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (what.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(483usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "findn", self.sys_ptr, args)
}
}
pub fn count(&self, what: impl AsArg < GString >, from: i64, to: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64, i64);
let args = (what.into_arg(), from, to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(484usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "count", self.sys_ptr, args)
}
}
pub fn countn(&self, what: impl AsArg < GString >, from: i64, to: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64, i64);
let args = (what.into_arg(), from, to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(485usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "countn", self.sys_ptr, args)
}
}
pub fn rfind(&self, what: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (what.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(486usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "rfind", self.sys_ptr, args)
}
}
pub fn rfindn(&self, what: impl AsArg < GString >, from: i64,) -> i64 {
type CallSig < 'a0, > = (i64, CowArg < 'a0, GString >, i64);
let args = (what.into_arg(), from,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(487usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "rfindn", self.sys_ptr, args)
}
}
pub fn match_(&self, expr: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (expr.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(488usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "match", self.sys_ptr, args)
}
}
pub fn matchn(&self, expr: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (expr.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(489usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "matchn", self.sys_ptr, args)
}
}
pub fn format(&self, values: &Variant, placeholder: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, 'a1, > = (GString, RefArg < 'a0, Variant >, CowArg < 'a1, GString >);
let args = (RefArg::new(values), placeholder.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(496usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "format", self.sys_ptr, args)
}
}
pub fn insert(&self, position: i64, what: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, i64, CowArg < 'a0, GString >);
let args = (position, what.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(501usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "insert", self.sys_ptr, args)
}
}
pub fn erase(&self, position: i64, chars: i64,) -> GString {
type CallSig = (GString, i64, i64);
let args = (position, chars,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(502usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "erase", self.sys_ptr, args)
}
}
pub fn split(&self, delimiter: impl AsArg < GString >, allow_empty: bool, maxsplit: i64,) -> PackedStringArray {
type CallSig < 'a0, > = (PackedStringArray, CowArg < 'a0, GString >, bool, i64);
let args = (delimiter.into_arg(), allow_empty, maxsplit,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(507usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "split", self.sys_ptr, args)
}
}
pub fn rsplit(&self, delimiter: impl AsArg < GString >, allow_empty: bool, maxsplit: i64,) -> PackedStringArray {
type CallSig < 'a0, > = (PackedStringArray, CowArg < 'a0, GString >, bool, i64);
let args = (delimiter.into_arg(), allow_empty, maxsplit,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(508usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "rsplit", self.sys_ptr, args)
}
}
pub fn unicode_at(&self, at: i64,) -> i64 {
type CallSig = (i64, i64);
let args = (at,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(522usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "unicode_at", self.sys_ptr, args)
}
}
pub fn lpad(&self, min_length: i64, character: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, i64, CowArg < 'a0, GString >);
let args = (min_length, character.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(559usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "lpad", self.sys_ptr, args)
}
}
pub fn rpad(&self, min_length: i64, character: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, i64, CowArg < 'a0, GString >);
let args = (min_length, character.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(560usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "rpad", self.sys_ptr, args)
}
}
pub fn pad_decimals(&self, digits: i64,) -> GString {
type CallSig = (GString, i64);
let args = (digits,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(561usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "pad_decimals", self.sys_ptr, args)
}
}
pub fn pad_zeros(&self, digits: i64,) -> GString {
type CallSig = (GString, i64);
let args = (digits,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(562usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "pad_zeros", self.sys_ptr, args)
}
}
pub fn hash(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(571usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "hash", self.sys_ptr, args)
}
}
}
impl StringName {
pub fn begins_with(&self, text: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(490usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "begins_with", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn ends_with(&self, text: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(491usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "ends_with", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_subsequence_of(&self, text: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(492usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_subsequence_of", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_subsequence_ofn(&self, text: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(493usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_subsequence_ofn", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn bigrams(&self,) -> PackedStringArray {
type CallSig = (PackedStringArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(494usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "bigrams", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn similarity(&self, text: impl AsArg < GString >,) -> f64 {
type CallSig < 'a0, > = (f64, CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(495usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "similarity", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn replace(&self, what: impl AsArg < GString >, forwhat: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, 'a1, > = (GString, CowArg < 'a0, GString >, CowArg < 'a1, GString >);
let args = (what.into_arg(), forwhat.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(497usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "replace", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn replacen(&self, what: impl AsArg < GString >, forwhat: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, 'a1, > = (GString, CowArg < 'a0, GString >, CowArg < 'a1, GString >);
let args = (what.into_arg(), forwhat.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(498usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "replacen", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn repeat(&self, count: i64,) -> GString {
type CallSig = (GString, i64);
let args = (count,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(499usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "repeat", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn reverse(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(500usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "reverse", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn capitalize(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(503usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "capitalize", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_camel_case(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(504usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_camel_case", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_pascal_case(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(505usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_pascal_case", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_snake_case(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(506usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_snake_case", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn split_floats(&self, delimiter: impl AsArg < GString >, allow_empty: bool,) -> PackedFloat64Array {
type CallSig < 'a0, > = (PackedFloat64Array, CowArg < 'a0, GString >, bool);
let args = (delimiter.into_arg(), allow_empty,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(509usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "split_floats", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn join(&self, parts: &PackedStringArray,) -> GString {
type CallSig < 'a0, > = (GString, RefArg < 'a0, PackedStringArray >);
let args = (RefArg::new(parts),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(510usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "join", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_upper(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(511usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_upper", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_lower(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(512usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_lower", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn left(&self, length: i64,) -> GString {
type CallSig = (GString, i64);
let args = (length,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(513usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "left", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn right(&self, length: i64,) -> GString {
type CallSig = (GString, i64);
let args = (length,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(514usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "right", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn strip_edges(&self, left: bool, right: bool,) -> GString {
type CallSig = (GString, bool, bool);
let args = (left, right,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(515usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "strip_edges", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn strip_escapes(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(516usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "strip_escapes", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn lstrip(&self, chars: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (chars.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(517usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "lstrip", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn rstrip(&self, chars: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (chars.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(518usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "rstrip", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_extension(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(519usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "get_extension", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_basename(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(520usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "get_basename", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn path_join(&self, file: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (file.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(521usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "path_join", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn indent(&self, prefix: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (prefix.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(523usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "indent", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn dedent(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(524usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "dedent", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn md5_text(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(525usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "md5_text", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn sha1_text(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(526usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "sha1_text", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn sha256_text(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(527usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "sha256_text", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn md5_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(528usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "md5_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn sha1_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(529usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "sha1_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn sha256_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(530usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "sha256_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_empty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(531usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_empty", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn contains(&self, what: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (what.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(532usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "contains", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn containsn(&self, what: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (what.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(533usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "containsn", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_absolute_path(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(534usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_absolute_path", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_relative_path(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(535usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_relative_path", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn simplify_path(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(536usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "simplify_path", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_base_dir(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(537usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "get_base_dir", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn get_file(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(538usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "get_file", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn xml_escape(&self, escape_quotes: bool,) -> GString {
type CallSig = (GString, bool);
let args = (escape_quotes,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(539usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "xml_escape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn xml_unescape(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(540usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "xml_unescape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn uri_encode(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(541usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "uri_encode", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn uri_decode(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(542usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "uri_decode", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn c_escape(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(543usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "c_escape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn c_unescape(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(544usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "c_unescape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn json_escape(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(545usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "json_escape", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn validate_node_name(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(546usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "validate_node_name", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn validate_filename(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(547usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "validate_filename", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_identifier(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(548usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_valid_identifier", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_int(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(549usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_valid_int", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_float(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(550usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_valid_float", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_hex_number(&self, with_prefix: bool,) -> bool {
type CallSig = (bool, bool);
let args = (with_prefix,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(551usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_valid_hex_number", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_html_color(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(552usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_valid_html_color", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_ip_address(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(553usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_valid_ip_address", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn is_valid_filename(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(554usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "is_valid_filename", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_int(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(555usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_int", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_float(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(556usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_float", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn hex_to_int(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(557usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "hex_to_int", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn bin_to_int(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(558usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "bin_to_int", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn trim_prefix(&self, prefix: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (prefix.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(563usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "trim_prefix", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn trim_suffix(&self, suffix: impl AsArg < GString >,) -> GString {
type CallSig < 'a0, > = (GString, CowArg < 'a0, GString >);
let args = (suffix.into_arg(),);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(564usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "trim_suffix", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_ascii_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(565usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_ascii_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_utf8_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(566usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_utf8_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_utf16_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(567usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_utf16_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_utf32_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(568usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_utf32_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn hex_decode(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(569usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "hex_decode", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn to_wchar_buffer(&self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(570usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "StringName", "to_wchar_buffer", sys::SysPtr::force_mut(self.sys()), args)
}
}
}

View File

@@ -0,0 +1,191 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerTransform2D < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerTransform2D < 'a > {
pub fn from_outer(outer: &Transform2D) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn inverse(&self,) -> Transform2D {
type CallSig = (Transform2D,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(264usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "inverse", self.sys_ptr, args)
}
}
pub fn affine_inverse(&self,) -> Transform2D {
type CallSig = (Transform2D,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(265usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "affine_inverse", self.sys_ptr, args)
}
}
pub fn get_rotation(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(266usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "get_rotation", self.sys_ptr, args)
}
}
pub fn get_origin(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(267usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "get_origin", self.sys_ptr, args)
}
}
pub fn get_scale(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(268usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "get_scale", self.sys_ptr, args)
}
}
pub fn get_skew(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(269usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "get_skew", self.sys_ptr, args)
}
}
pub fn orthonormalized(&self,) -> Transform2D {
type CallSig = (Transform2D,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(270usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "orthonormalized", self.sys_ptr, args)
}
}
pub fn rotated(&self, angle: f64,) -> Transform2D {
type CallSig = (Transform2D, f64);
let args = (angle,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(271usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "rotated", self.sys_ptr, args)
}
}
pub fn rotated_local(&self, angle: f64,) -> Transform2D {
type CallSig = (Transform2D, f64);
let args = (angle,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(272usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "rotated_local", self.sys_ptr, args)
}
}
pub fn scaled(&self, scale: Vector2,) -> Transform2D {
type CallSig = (Transform2D, Vector2);
let args = (scale,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(273usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "scaled", self.sys_ptr, args)
}
}
pub fn scaled_local(&self, scale: Vector2,) -> Transform2D {
type CallSig = (Transform2D, Vector2);
let args = (scale,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(274usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "scaled_local", self.sys_ptr, args)
}
}
pub fn translated(&self, offset: Vector2,) -> Transform2D {
type CallSig = (Transform2D, Vector2);
let args = (offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(275usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "translated", self.sys_ptr, args)
}
}
pub fn translated_local(&self, offset: Vector2,) -> Transform2D {
type CallSig = (Transform2D, Vector2);
let args = (offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(276usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "translated_local", self.sys_ptr, args)
}
}
pub fn determinant(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(277usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "determinant", self.sys_ptr, args)
}
}
pub fn basis_xform(&self, v: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (v,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(278usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "basis_xform", self.sys_ptr, args)
}
}
pub fn basis_xform_inv(&self, v: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (v,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(279usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "basis_xform_inv", self.sys_ptr, args)
}
}
pub fn interpolate_with(&self, xform: Transform2D, weight: f64,) -> Transform2D {
type CallSig = (Transform2D, Transform2D, f64);
let args = (xform, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(280usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "interpolate_with", self.sys_ptr, args)
}
}
pub fn is_conformal(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(281usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "is_conformal", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, xform: Transform2D,) -> bool {
type CallSig = (bool, Transform2D);
let args = (xform,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(282usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(283usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "is_finite", self.sys_ptr, args)
}
}
pub fn looking_at(&self, target: Vector2,) -> Transform2D {
type CallSig = (Transform2D, Vector2);
let args = (target,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(284usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform2D", "looking_at", self.sys_ptr, args)
}
}
}
impl Transform2D {
}

View File

@@ -0,0 +1,127 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerTransform3D < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerTransform3D < 'a > {
pub fn from_outer(outer: &Transform3D) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn inverse(&self,) -> Transform3D {
type CallSig = (Transform3D,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(407usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "inverse", self.sys_ptr, args)
}
}
pub fn affine_inverse(&self,) -> Transform3D {
type CallSig = (Transform3D,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(408usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "affine_inverse", self.sys_ptr, args)
}
}
pub fn orthonormalized(&self,) -> Transform3D {
type CallSig = (Transform3D,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(409usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "orthonormalized", self.sys_ptr, args)
}
}
pub fn rotated(&self, axis: Vector3, angle: f64,) -> Transform3D {
type CallSig = (Transform3D, Vector3, f64);
let args = (axis, angle,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(410usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "rotated", self.sys_ptr, args)
}
}
pub fn rotated_local(&self, axis: Vector3, angle: f64,) -> Transform3D {
type CallSig = (Transform3D, Vector3, f64);
let args = (axis, angle,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(411usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "rotated_local", self.sys_ptr, args)
}
}
pub fn scaled(&self, scale: Vector3,) -> Transform3D {
type CallSig = (Transform3D, Vector3);
let args = (scale,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(412usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "scaled", self.sys_ptr, args)
}
}
pub fn scaled_local(&self, scale: Vector3,) -> Transform3D {
type CallSig = (Transform3D, Vector3);
let args = (scale,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(413usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "scaled_local", self.sys_ptr, args)
}
}
pub fn translated(&self, offset: Vector3,) -> Transform3D {
type CallSig = (Transform3D, Vector3);
let args = (offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(414usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "translated", self.sys_ptr, args)
}
}
pub fn translated_local(&self, offset: Vector3,) -> Transform3D {
type CallSig = (Transform3D, Vector3);
let args = (offset,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(415usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "translated_local", self.sys_ptr, args)
}
}
pub fn looking_at(&self, target: Vector3, up: Vector3, use_model_front: bool,) -> Transform3D {
type CallSig = (Transform3D, Vector3, Vector3, bool);
let args = (target, up, use_model_front,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(416usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "looking_at", self.sys_ptr, args)
}
}
pub fn interpolate_with(&self, xform: Transform3D, weight: f64,) -> Transform3D {
type CallSig = (Transform3D, Transform3D, f64);
let args = (xform, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(417usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "interpolate_with", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, xform: Transform3D,) -> bool {
type CallSig = (bool, Transform3D);
let args = (xform,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(418usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(419usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Transform3D", "is_finite", self.sys_ptr, args)
}
}
}
impl Transform3D {
}

View File

@@ -0,0 +1,477 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerVector2 < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerVector2 < 'a > {
pub fn from_outer(outer: &Vector2) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn angle(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(107usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "angle", self.sys_ptr, args)
}
}
pub fn angle_to(&self, to: Vector2,) -> f64 {
type CallSig = (f64, Vector2);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(108usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "angle_to", self.sys_ptr, args)
}
}
pub fn angle_to_point(&self, to: Vector2,) -> f64 {
type CallSig = (f64, Vector2);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(109usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "angle_to_point", self.sys_ptr, args)
}
}
pub fn direction_to(&self, to: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(110usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "direction_to", self.sys_ptr, args)
}
}
pub fn distance_to(&self, to: Vector2,) -> f64 {
type CallSig = (f64, Vector2);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(111usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "distance_to", self.sys_ptr, args)
}
}
pub fn distance_squared_to(&self, to: Vector2,) -> f64 {
type CallSig = (f64, Vector2);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(112usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "distance_squared_to", self.sys_ptr, args)
}
}
pub fn length(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(113usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "length", self.sys_ptr, args)
}
}
pub fn length_squared(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(114usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "length_squared", self.sys_ptr, args)
}
}
pub fn limit_length(&self, length: f64,) -> Vector2 {
type CallSig = (Vector2, f64);
let args = (length,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(115usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "limit_length", self.sys_ptr, args)
}
}
pub fn normalized(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(116usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "normalized", self.sys_ptr, args)
}
}
pub fn is_normalized(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(117usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "is_normalized", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, to: Vector2,) -> bool {
type CallSig = (bool, Vector2);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(118usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_zero_approx(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(119usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "is_zero_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(120usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "is_finite", self.sys_ptr, args)
}
}
pub fn posmod(&self, mod_: f64,) -> Vector2 {
type CallSig = (Vector2, f64);
let args = (mod_,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(121usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "posmod", self.sys_ptr, args)
}
}
pub fn posmodv(&self, modv: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (modv,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(122usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "posmodv", self.sys_ptr, args)
}
}
pub fn project(&self, b: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(123usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "project", self.sys_ptr, args)
}
}
pub fn lerp(&self, to: Vector2, weight: f64,) -> Vector2 {
type CallSig = (Vector2, Vector2, f64);
let args = (to, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(124usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "lerp", self.sys_ptr, args)
}
}
pub fn slerp(&self, to: Vector2, weight: f64,) -> Vector2 {
type CallSig = (Vector2, Vector2, f64);
let args = (to, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(125usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "slerp", self.sys_ptr, args)
}
}
pub fn cubic_interpolate(&self, b: Vector2, pre_a: Vector2, post_b: Vector2, weight: f64,) -> Vector2 {
type CallSig = (Vector2, Vector2, Vector2, Vector2, f64);
let args = (b, pre_a, post_b, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(126usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "cubic_interpolate", self.sys_ptr, args)
}
}
pub fn cubic_interpolate_in_time(&self, b: Vector2, pre_a: Vector2, post_b: Vector2, weight: f64, b_t: f64, pre_a_t: f64, post_b_t: f64,) -> Vector2 {
type CallSig = (Vector2, Vector2, Vector2, Vector2, f64, f64, f64, f64);
let args = (b, pre_a, post_b, weight, b_t, pre_a_t, post_b_t,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(127usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "cubic_interpolate_in_time", self.sys_ptr, args)
}
}
pub fn bezier_interpolate(&self, control_1: Vector2, control_2: Vector2, end: Vector2, t: f64,) -> Vector2 {
type CallSig = (Vector2, Vector2, Vector2, Vector2, f64);
let args = (control_1, control_2, end, t,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(128usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "bezier_interpolate", self.sys_ptr, args)
}
}
pub fn bezier_derivative(&self, control_1: Vector2, control_2: Vector2, end: Vector2, t: f64,) -> Vector2 {
type CallSig = (Vector2, Vector2, Vector2, Vector2, f64);
let args = (control_1, control_2, end, t,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(129usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "bezier_derivative", self.sys_ptr, args)
}
}
pub fn max_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(130usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "max_axis_index", self.sys_ptr, args)
}
}
pub fn min_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(131usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "min_axis_index", self.sys_ptr, args)
}
}
pub fn move_toward(&self, to: Vector2, delta: f64,) -> Vector2 {
type CallSig = (Vector2, Vector2, f64);
let args = (to, delta,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(132usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "move_toward", self.sys_ptr, args)
}
}
pub fn rotated(&self, angle: f64,) -> Vector2 {
type CallSig = (Vector2, f64);
let args = (angle,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(133usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "rotated", self.sys_ptr, args)
}
}
pub fn orthogonal(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(134usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "orthogonal", self.sys_ptr, args)
}
}
pub fn floor(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(135usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "floor", self.sys_ptr, args)
}
}
pub fn ceil(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(136usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "ceil", self.sys_ptr, args)
}
}
pub fn round(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(137usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "round", self.sys_ptr, args)
}
}
pub fn aspect(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(138usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "aspect", self.sys_ptr, args)
}
}
pub fn dot(&self, with: Vector2,) -> f64 {
type CallSig = (f64, Vector2);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(139usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "dot", self.sys_ptr, args)
}
}
pub fn slide(&self, n: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (n,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(140usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "slide", self.sys_ptr, args)
}
}
pub fn bounce(&self, n: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (n,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(141usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "bounce", self.sys_ptr, args)
}
}
pub fn reflect(&self, line: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (line,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(142usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "reflect", self.sys_ptr, args)
}
}
pub fn cross(&self, with: Vector2,) -> f64 {
type CallSig = (f64, Vector2);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(143usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "cross", self.sys_ptr, args)
}
}
pub fn abs(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(144usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "abs", self.sys_ptr, args)
}
}
pub fn sign(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(145usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "sign", self.sys_ptr, args)
}
}
pub fn clamp(&self, min: Vector2, max: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2, Vector2);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(146usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "clamp", self.sys_ptr, args)
}
}
pub fn clampf(&self, min: f64, max: f64,) -> Vector2 {
type CallSig = (Vector2, f64, f64);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(147usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "clampf", self.sys_ptr, args)
}
}
pub fn snapped(&self, step: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(148usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "snapped", self.sys_ptr, args)
}
}
pub fn snappedf(&self, step: f64,) -> Vector2 {
type CallSig = (Vector2, f64);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(149usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "snappedf", self.sys_ptr, args)
}
}
pub fn min(&self, with: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(150usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "min", self.sys_ptr, args)
}
}
pub fn minf(&self, with: f64,) -> Vector2 {
type CallSig = (Vector2, f64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(151usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "minf", self.sys_ptr, args)
}
}
pub fn max(&self, with: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(152usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "max", self.sys_ptr, args)
}
}
pub fn maxf(&self, with: f64,) -> Vector2 {
type CallSig = (Vector2, f64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(153usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "maxf", self.sys_ptr, args)
}
}
pub fn from_angle(angle: f64,) -> Vector2 {
type CallSig = (Vector2, f64);
let args = (angle,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(154usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2", "from_angle", std::ptr::null_mut(), args)
}
}
}
impl Vector2 {
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Axis {
ord: i32
}
impl Axis {
#[doc(alias = "AXIS_X")]
#[doc = "Godot enumerator name: `AXIS_X`"]
pub const X: Axis = Axis {
ord: 0i32
};
#[doc(alias = "AXIS_Y")]
#[doc = "Godot enumerator name: `AXIS_Y`"]
pub const Y: Axis = Axis {
ord: 1i32
};
}
impl std::fmt::Debug for Axis {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("Axis") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for Axis {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "X", Self::Y => "Y", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "AXIS_X", Self::Y => "AXIS_Y", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for Axis {
type Via = i32;
}
impl crate::meta::ToGodot for Axis {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for Axis {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,228 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerVector2i < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerVector2i < 'a > {
pub fn from_outer(outer: &Vector2i) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn aspect(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(155usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "aspect", self.sys_ptr, args)
}
}
pub fn max_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(156usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "max_axis_index", self.sys_ptr, args)
}
}
pub fn min_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(157usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "min_axis_index", self.sys_ptr, args)
}
}
pub fn length(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(160usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "length", self.sys_ptr, args)
}
}
pub fn length_squared(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(161usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "length_squared", self.sys_ptr, args)
}
}
pub fn sign(&self,) -> Vector2i {
type CallSig = (Vector2i,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(162usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "sign", self.sys_ptr, args)
}
}
pub fn abs(&self,) -> Vector2i {
type CallSig = (Vector2i,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(163usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "abs", self.sys_ptr, args)
}
}
pub fn clamp(&self, min: Vector2i, max: Vector2i,) -> Vector2i {
type CallSig = (Vector2i, Vector2i, Vector2i);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(164usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "clamp", self.sys_ptr, args)
}
}
pub fn snapped(&self, step: Vector2i,) -> Vector2i {
type CallSig = (Vector2i, Vector2i);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(166usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "snapped", self.sys_ptr, args)
}
}
pub fn min(&self, with: Vector2i,) -> Vector2i {
type CallSig = (Vector2i, Vector2i);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(168usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "min", self.sys_ptr, args)
}
}
pub fn max(&self, with: Vector2i,) -> Vector2i {
type CallSig = (Vector2i, Vector2i);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(170usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "max", self.sys_ptr, args)
}
}
}
impl Vector2i {
pub fn distance_to(&self, to: Vector2i,) -> f64 {
type CallSig = (f64, Vector2i);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(158usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "distance_to", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn distance_squared_to(&self, to: Vector2i,) -> i64 {
type CallSig = (i64, Vector2i);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(159usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "distance_squared_to", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn clampi(&self, min: i64, max: i64,) -> Vector2i {
type CallSig = (Vector2i, i64, i64);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(165usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "clampi", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn snappedi(&self, step: i64,) -> Vector2i {
type CallSig = (Vector2i, i64);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(167usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "snappedi", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn mini(&self, with: i64,) -> Vector2i {
type CallSig = (Vector2i, i64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(169usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "mini", sys::SysPtr::force_mut(self.sys()), args)
}
}
pub fn maxi(&self, with: i64,) -> Vector2i {
type CallSig = (Vector2i, i64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(171usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector2i", "maxi", sys::SysPtr::force_mut(self.sys()), args)
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Axis {
ord: i32
}
impl Axis {
#[doc(alias = "AXIS_X")]
#[doc = "Godot enumerator name: `AXIS_X`"]
pub const X: Axis = Axis {
ord: 0i32
};
#[doc(alias = "AXIS_Y")]
#[doc = "Godot enumerator name: `AXIS_Y`"]
pub const Y: Axis = Axis {
ord: 1i32
};
}
impl std::fmt::Debug for Axis {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("Axis") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for Axis {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "X", Self::Y => "Y", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "AXIS_X", Self::Y => "AXIS_Y", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for Axis {
type Via = i32;
}
impl crate::meta::ToGodot for Axis {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for Axis {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,482 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerVector3 < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerVector3 < 'a > {
pub fn from_outer(outer: &Vector3) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn min_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(200usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "min_axis_index", self.sys_ptr, args)
}
}
pub fn max_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(201usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "max_axis_index", self.sys_ptr, args)
}
}
pub fn angle_to(&self, to: Vector3,) -> f64 {
type CallSig = (f64, Vector3);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(202usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "angle_to", self.sys_ptr, args)
}
}
pub fn signed_angle_to(&self, to: Vector3, axis: Vector3,) -> f64 {
type CallSig = (f64, Vector3, Vector3);
let args = (to, axis,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(203usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "signed_angle_to", self.sys_ptr, args)
}
}
pub fn direction_to(&self, to: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(204usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "direction_to", self.sys_ptr, args)
}
}
pub fn distance_to(&self, to: Vector3,) -> f64 {
type CallSig = (f64, Vector3);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(205usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "distance_to", self.sys_ptr, args)
}
}
pub fn distance_squared_to(&self, to: Vector3,) -> f64 {
type CallSig = (f64, Vector3);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(206usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "distance_squared_to", self.sys_ptr, args)
}
}
pub fn length(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(207usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "length", self.sys_ptr, args)
}
}
pub fn length_squared(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(208usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "length_squared", self.sys_ptr, args)
}
}
pub fn limit_length(&self, length: f64,) -> Vector3 {
type CallSig = (Vector3, f64);
let args = (length,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(209usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "limit_length", self.sys_ptr, args)
}
}
pub fn normalized(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(210usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "normalized", self.sys_ptr, args)
}
}
pub fn is_normalized(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(211usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "is_normalized", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, to: Vector3,) -> bool {
type CallSig = (bool, Vector3);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(212usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_zero_approx(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(213usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "is_zero_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(214usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "is_finite", self.sys_ptr, args)
}
}
pub fn inverse(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(215usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "inverse", self.sys_ptr, args)
}
}
pub fn clamp(&self, min: Vector3, max: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3, Vector3);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(216usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "clamp", self.sys_ptr, args)
}
}
pub fn clampf(&self, min: f64, max: f64,) -> Vector3 {
type CallSig = (Vector3, f64, f64);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(217usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "clampf", self.sys_ptr, args)
}
}
pub fn snapped(&self, step: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(218usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "snapped", self.sys_ptr, args)
}
}
pub fn snappedf(&self, step: f64,) -> Vector3 {
type CallSig = (Vector3, f64);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(219usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "snappedf", self.sys_ptr, args)
}
}
pub fn rotated(&self, axis: Vector3, angle: f64,) -> Vector3 {
type CallSig = (Vector3, Vector3, f64);
let args = (axis, angle,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(220usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "rotated", self.sys_ptr, args)
}
}
pub fn lerp(&self, to: Vector3, weight: f64,) -> Vector3 {
type CallSig = (Vector3, Vector3, f64);
let args = (to, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(221usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "lerp", self.sys_ptr, args)
}
}
pub fn slerp(&self, to: Vector3, weight: f64,) -> Vector3 {
type CallSig = (Vector3, Vector3, f64);
let args = (to, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(222usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "slerp", self.sys_ptr, args)
}
}
pub fn cubic_interpolate(&self, b: Vector3, pre_a: Vector3, post_b: Vector3, weight: f64,) -> Vector3 {
type CallSig = (Vector3, Vector3, Vector3, Vector3, f64);
let args = (b, pre_a, post_b, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(223usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "cubic_interpolate", self.sys_ptr, args)
}
}
pub fn cubic_interpolate_in_time(&self, b: Vector3, pre_a: Vector3, post_b: Vector3, weight: f64, b_t: f64, pre_a_t: f64, post_b_t: f64,) -> Vector3 {
type CallSig = (Vector3, Vector3, Vector3, Vector3, f64, f64, f64, f64);
let args = (b, pre_a, post_b, weight, b_t, pre_a_t, post_b_t,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(224usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "cubic_interpolate_in_time", self.sys_ptr, args)
}
}
pub fn bezier_interpolate(&self, control_1: Vector3, control_2: Vector3, end: Vector3, t: f64,) -> Vector3 {
type CallSig = (Vector3, Vector3, Vector3, Vector3, f64);
let args = (control_1, control_2, end, t,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(225usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "bezier_interpolate", self.sys_ptr, args)
}
}
pub fn bezier_derivative(&self, control_1: Vector3, control_2: Vector3, end: Vector3, t: f64,) -> Vector3 {
type CallSig = (Vector3, Vector3, Vector3, Vector3, f64);
let args = (control_1, control_2, end, t,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(226usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "bezier_derivative", self.sys_ptr, args)
}
}
pub fn move_toward(&self, to: Vector3, delta: f64,) -> Vector3 {
type CallSig = (Vector3, Vector3, f64);
let args = (to, delta,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(227usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "move_toward", self.sys_ptr, args)
}
}
pub fn dot(&self, with: Vector3,) -> f64 {
type CallSig = (f64, Vector3);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(228usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "dot", self.sys_ptr, args)
}
}
pub fn cross(&self, with: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(229usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "cross", self.sys_ptr, args)
}
}
pub fn outer(&self, with: Vector3,) -> Basis {
type CallSig = (Basis, Vector3);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(230usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "outer", self.sys_ptr, args)
}
}
pub fn abs(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(231usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "abs", self.sys_ptr, args)
}
}
pub fn floor(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(232usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "floor", self.sys_ptr, args)
}
}
pub fn ceil(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(233usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "ceil", self.sys_ptr, args)
}
}
pub fn round(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(234usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "round", self.sys_ptr, args)
}
}
pub fn posmod(&self, mod_: f64,) -> Vector3 {
type CallSig = (Vector3, f64);
let args = (mod_,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(235usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "posmod", self.sys_ptr, args)
}
}
pub fn posmodv(&self, modv: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (modv,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(236usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "posmodv", self.sys_ptr, args)
}
}
pub fn project(&self, b: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (b,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(237usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "project", self.sys_ptr, args)
}
}
pub fn slide(&self, n: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (n,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(238usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "slide", self.sys_ptr, args)
}
}
pub fn bounce(&self, n: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (n,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(239usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "bounce", self.sys_ptr, args)
}
}
pub fn reflect(&self, n: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (n,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(240usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "reflect", self.sys_ptr, args)
}
}
pub fn sign(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(241usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "sign", self.sys_ptr, args)
}
}
pub fn octahedron_encode(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(242usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "octahedron_encode", self.sys_ptr, args)
}
}
pub fn min(&self, with: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(243usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "min", self.sys_ptr, args)
}
}
pub fn minf(&self, with: f64,) -> Vector3 {
type CallSig = (Vector3, f64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(244usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "minf", self.sys_ptr, args)
}
}
pub fn max(&self, with: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(245usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "max", self.sys_ptr, args)
}
}
pub fn maxf(&self, with: f64,) -> Vector3 {
type CallSig = (Vector3, f64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(246usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "maxf", self.sys_ptr, args)
}
}
pub fn octahedron_decode(uv: Vector2,) -> Vector3 {
type CallSig = (Vector3, Vector2);
let args = (uv,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(247usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3", "octahedron_decode", std::ptr::null_mut(), args)
}
}
}
impl Vector3 {
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Axis {
ord: i32
}
impl Axis {
#[doc(alias = "AXIS_X")]
#[doc = "Godot enumerator name: `AXIS_X`"]
pub const X: Axis = Axis {
ord: 0i32
};
#[doc(alias = "AXIS_Y")]
#[doc = "Godot enumerator name: `AXIS_Y`"]
pub const Y: Axis = Axis {
ord: 1i32
};
#[doc(alias = "AXIS_Z")]
#[doc = "Godot enumerator name: `AXIS_Z`"]
pub const Z: Axis = Axis {
ord: 2i32
};
}
impl std::fmt::Debug for Axis {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("Axis") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for Axis {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "X", Self::Y => "Y", Self::Z => "Z", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "AXIS_X", Self::Y => "AXIS_Y", Self::Z => "AXIS_Z", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for Axis {
type Via = i32;
}
impl crate::meta::ToGodot for Axis {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for Axis {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,226 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerVector3i < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerVector3i < 'a > {
pub fn from_outer(outer: &Vector3i) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn min_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(248usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "min_axis_index", self.sys_ptr, args)
}
}
pub fn max_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(249usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "max_axis_index", self.sys_ptr, args)
}
}
pub fn distance_to(&self, to: Vector3i,) -> f64 {
type CallSig = (f64, Vector3i);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(250usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "distance_to", self.sys_ptr, args)
}
}
pub fn distance_squared_to(&self, to: Vector3i,) -> i64 {
type CallSig = (i64, Vector3i);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(251usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "distance_squared_to", self.sys_ptr, args)
}
}
pub fn length(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(252usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "length", self.sys_ptr, args)
}
}
pub fn length_squared(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(253usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "length_squared", self.sys_ptr, args)
}
}
pub fn sign(&self,) -> Vector3i {
type CallSig = (Vector3i,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(254usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "sign", self.sys_ptr, args)
}
}
pub fn abs(&self,) -> Vector3i {
type CallSig = (Vector3i,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(255usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "abs", self.sys_ptr, args)
}
}
pub fn clamp(&self, min: Vector3i, max: Vector3i,) -> Vector3i {
type CallSig = (Vector3i, Vector3i, Vector3i);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(256usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "clamp", self.sys_ptr, args)
}
}
pub fn clampi(&self, min: i64, max: i64,) -> Vector3i {
type CallSig = (Vector3i, i64, i64);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(257usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "clampi", self.sys_ptr, args)
}
}
pub fn snapped(&self, step: Vector3i,) -> Vector3i {
type CallSig = (Vector3i, Vector3i);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(258usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "snapped", self.sys_ptr, args)
}
}
pub fn snappedi(&self, step: i64,) -> Vector3i {
type CallSig = (Vector3i, i64);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(259usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "snappedi", self.sys_ptr, args)
}
}
pub fn min(&self, with: Vector3i,) -> Vector3i {
type CallSig = (Vector3i, Vector3i);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(260usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "min", self.sys_ptr, args)
}
}
pub fn mini(&self, with: i64,) -> Vector3i {
type CallSig = (Vector3i, i64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(261usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "mini", self.sys_ptr, args)
}
}
pub fn max(&self, with: Vector3i,) -> Vector3i {
type CallSig = (Vector3i, Vector3i);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(262usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "max", self.sys_ptr, args)
}
}
pub fn maxi(&self, with: i64,) -> Vector3i {
type CallSig = (Vector3i, i64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(263usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector3i", "maxi", self.sys_ptr, args)
}
}
}
impl Vector3i {
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Axis {
ord: i32
}
impl Axis {
#[doc(alias = "AXIS_X")]
#[doc = "Godot enumerator name: `AXIS_X`"]
pub const X: Axis = Axis {
ord: 0i32
};
#[doc(alias = "AXIS_Y")]
#[doc = "Godot enumerator name: `AXIS_Y`"]
pub const Y: Axis = Axis {
ord: 1i32
};
#[doc(alias = "AXIS_Z")]
#[doc = "Godot enumerator name: `AXIS_Z`"]
pub const Z: Axis = Axis {
ord: 2i32
};
}
impl std::fmt::Debug for Axis {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("Axis") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for Axis {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "X", Self::Y => "Y", Self::Z => "Z", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "AXIS_X", Self::Y => "AXIS_Y", Self::Z => "AXIS_Z", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for Axis {
type Via = i32;
}
impl crate::meta::ToGodot for Axis {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for Axis {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,359 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerVector4 < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerVector4 < 'a > {
pub fn from_outer(outer: &Vector4) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn min_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(285usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "min_axis_index", self.sys_ptr, args)
}
}
pub fn max_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(286usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "max_axis_index", self.sys_ptr, args)
}
}
pub fn length(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(287usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "length", self.sys_ptr, args)
}
}
pub fn length_squared(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(288usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "length_squared", self.sys_ptr, args)
}
}
pub fn abs(&self,) -> Vector4 {
type CallSig = (Vector4,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(289usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "abs", self.sys_ptr, args)
}
}
pub fn sign(&self,) -> Vector4 {
type CallSig = (Vector4,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(290usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "sign", self.sys_ptr, args)
}
}
pub fn floor(&self,) -> Vector4 {
type CallSig = (Vector4,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(291usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "floor", self.sys_ptr, args)
}
}
pub fn ceil(&self,) -> Vector4 {
type CallSig = (Vector4,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(292usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "ceil", self.sys_ptr, args)
}
}
pub fn round(&self,) -> Vector4 {
type CallSig = (Vector4,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(293usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "round", self.sys_ptr, args)
}
}
pub fn lerp(&self, to: Vector4, weight: f64,) -> Vector4 {
type CallSig = (Vector4, Vector4, f64);
let args = (to, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(294usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "lerp", self.sys_ptr, args)
}
}
pub fn cubic_interpolate(&self, b: Vector4, pre_a: Vector4, post_b: Vector4, weight: f64,) -> Vector4 {
type CallSig = (Vector4, Vector4, Vector4, Vector4, f64);
let args = (b, pre_a, post_b, weight,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(295usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "cubic_interpolate", self.sys_ptr, args)
}
}
pub fn cubic_interpolate_in_time(&self, b: Vector4, pre_a: Vector4, post_b: Vector4, weight: f64, b_t: f64, pre_a_t: f64, post_b_t: f64,) -> Vector4 {
type CallSig = (Vector4, Vector4, Vector4, Vector4, f64, f64, f64, f64);
let args = (b, pre_a, post_b, weight, b_t, pre_a_t, post_b_t,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(296usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "cubic_interpolate_in_time", self.sys_ptr, args)
}
}
pub fn posmod(&self, mod_: f64,) -> Vector4 {
type CallSig = (Vector4, f64);
let args = (mod_,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(297usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "posmod", self.sys_ptr, args)
}
}
pub fn posmodv(&self, modv: Vector4,) -> Vector4 {
type CallSig = (Vector4, Vector4);
let args = (modv,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(298usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "posmodv", self.sys_ptr, args)
}
}
pub fn snapped(&self, step: Vector4,) -> Vector4 {
type CallSig = (Vector4, Vector4);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(299usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "snapped", self.sys_ptr, args)
}
}
pub fn snappedf(&self, step: f64,) -> Vector4 {
type CallSig = (Vector4, f64);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(300usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "snappedf", self.sys_ptr, args)
}
}
pub fn clamp(&self, min: Vector4, max: Vector4,) -> Vector4 {
type CallSig = (Vector4, Vector4, Vector4);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(301usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "clamp", self.sys_ptr, args)
}
}
pub fn clampf(&self, min: f64, max: f64,) -> Vector4 {
type CallSig = (Vector4, f64, f64);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(302usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "clampf", self.sys_ptr, args)
}
}
pub fn normalized(&self,) -> Vector4 {
type CallSig = (Vector4,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(303usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "normalized", self.sys_ptr, args)
}
}
pub fn is_normalized(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(304usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "is_normalized", self.sys_ptr, args)
}
}
pub fn direction_to(&self, to: Vector4,) -> Vector4 {
type CallSig = (Vector4, Vector4);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(305usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "direction_to", self.sys_ptr, args)
}
}
pub fn distance_to(&self, to: Vector4,) -> f64 {
type CallSig = (f64, Vector4);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(306usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "distance_to", self.sys_ptr, args)
}
}
pub fn distance_squared_to(&self, to: Vector4,) -> f64 {
type CallSig = (f64, Vector4);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(307usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "distance_squared_to", self.sys_ptr, args)
}
}
pub fn dot(&self, with: Vector4,) -> f64 {
type CallSig = (f64, Vector4);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(308usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "dot", self.sys_ptr, args)
}
}
pub fn inverse(&self,) -> Vector4 {
type CallSig = (Vector4,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(309usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "inverse", self.sys_ptr, args)
}
}
pub fn is_equal_approx(&self, to: Vector4,) -> bool {
type CallSig = (bool, Vector4);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(310usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "is_equal_approx", self.sys_ptr, args)
}
}
pub fn is_zero_approx(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(311usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "is_zero_approx", self.sys_ptr, args)
}
}
pub fn is_finite(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(312usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "is_finite", self.sys_ptr, args)
}
}
pub fn min(&self, with: Vector4,) -> Vector4 {
type CallSig = (Vector4, Vector4);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(313usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "min", self.sys_ptr, args)
}
}
pub fn minf(&self, with: f64,) -> Vector4 {
type CallSig = (Vector4, f64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(314usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "minf", self.sys_ptr, args)
}
}
pub fn max(&self, with: Vector4,) -> Vector4 {
type CallSig = (Vector4, Vector4);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(315usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "max", self.sys_ptr, args)
}
}
pub fn maxf(&self, with: f64,) -> Vector4 {
type CallSig = (Vector4, f64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(316usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4", "maxf", self.sys_ptr, args)
}
}
}
impl Vector4 {
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Axis {
ord: i32
}
impl Axis {
#[doc(alias = "AXIS_X")]
#[doc = "Godot enumerator name: `AXIS_X`"]
pub const X: Axis = Axis {
ord: 0i32
};
#[doc(alias = "AXIS_Y")]
#[doc = "Godot enumerator name: `AXIS_Y`"]
pub const Y: Axis = Axis {
ord: 1i32
};
#[doc(alias = "AXIS_Z")]
#[doc = "Godot enumerator name: `AXIS_Z`"]
pub const Z: Axis = Axis {
ord: 2i32
};
#[doc(alias = "AXIS_W")]
#[doc = "Godot enumerator name: `AXIS_W`"]
pub const W: Axis = Axis {
ord: 3i32
};
}
impl std::fmt::Debug for Axis {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("Axis") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for Axis {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "X", Self::Y => "Y", Self::Z => "Z", Self::W => "W", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "AXIS_X", Self::Y => "AXIS_Y", Self::Z => "AXIS_Z", Self::W => "AXIS_W", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for Axis {
type Via = i32;
}
impl crate::meta::ToGodot for Axis {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for Axis {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,231 @@
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
#[repr(transparent)]
pub struct InnerVector4i < 'a > {
_outer_lifetime: std::marker::PhantomData < &'a() >, sys_ptr: sys::GDExtensionTypePtr,
}
impl < 'a > InnerVector4i < 'a > {
pub fn from_outer(outer: &Vector4i) -> Self {
Self {
_outer_lifetime: std::marker::PhantomData, sys_ptr: sys::SysPtr::force_mut(outer.sys()),
}
}
pub fn min_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(317usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "min_axis_index", self.sys_ptr, args)
}
}
pub fn max_axis_index(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(318usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "max_axis_index", self.sys_ptr, args)
}
}
pub fn length(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(319usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "length", self.sys_ptr, args)
}
}
pub fn length_squared(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(320usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "length_squared", self.sys_ptr, args)
}
}
pub fn sign(&self,) -> Vector4i {
type CallSig = (Vector4i,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(321usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "sign", self.sys_ptr, args)
}
}
pub fn abs(&self,) -> Vector4i {
type CallSig = (Vector4i,);
let args = ();
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(322usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "abs", self.sys_ptr, args)
}
}
pub fn clamp(&self, min: Vector4i, max: Vector4i,) -> Vector4i {
type CallSig = (Vector4i, Vector4i, Vector4i);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(323usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "clamp", self.sys_ptr, args)
}
}
pub fn clampi(&self, min: i64, max: i64,) -> Vector4i {
type CallSig = (Vector4i, i64, i64);
let args = (min, max,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(324usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "clampi", self.sys_ptr, args)
}
}
pub fn snapped(&self, step: Vector4i,) -> Vector4i {
type CallSig = (Vector4i, Vector4i);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(325usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "snapped", self.sys_ptr, args)
}
}
pub fn snappedi(&self, step: i64,) -> Vector4i {
type CallSig = (Vector4i, i64);
let args = (step,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(326usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "snappedi", self.sys_ptr, args)
}
}
pub fn min(&self, with: Vector4i,) -> Vector4i {
type CallSig = (Vector4i, Vector4i);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(327usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "min", self.sys_ptr, args)
}
}
pub fn mini(&self, with: i64,) -> Vector4i {
type CallSig = (Vector4i, i64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(328usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "mini", self.sys_ptr, args)
}
}
pub fn max(&self, with: Vector4i,) -> Vector4i {
type CallSig = (Vector4i, Vector4i);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(329usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "max", self.sys_ptr, args)
}
}
pub fn maxi(&self, with: i64,) -> Vector4i {
type CallSig = (Vector4i, i64);
let args = (with,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(330usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "maxi", self.sys_ptr, args)
}
}
pub fn distance_to(&self, to: Vector4i,) -> f64 {
type CallSig = (f64, Vector4i);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(331usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "distance_to", self.sys_ptr, args)
}
}
pub fn distance_squared_to(&self, to: Vector4i,) -> i64 {
type CallSig = (i64, Vector4i);
let args = (to,);
unsafe {
let method_bind = sys::builtin_method_table() . fptr_by_index(332usize);
< CallSig as PtrcallSignatureTuple > ::out_builtin_ptrcall(method_bind, "Vector4i", "distance_squared_to", self.sys_ptr, args)
}
}
}
impl Vector4i {
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Axis {
ord: i32
}
impl Axis {
#[doc(alias = "AXIS_X")]
#[doc = "Godot enumerator name: `AXIS_X`"]
pub const X: Axis = Axis {
ord: 0i32
};
#[doc(alias = "AXIS_Y")]
#[doc = "Godot enumerator name: `AXIS_Y`"]
pub const Y: Axis = Axis {
ord: 1i32
};
#[doc(alias = "AXIS_Z")]
#[doc = "Godot enumerator name: `AXIS_Z`"]
pub const Z: Axis = Axis {
ord: 2i32
};
#[doc(alias = "AXIS_W")]
#[doc = "Godot enumerator name: `AXIS_W`"]
pub const W: Axis = Axis {
ord: 3i32
};
}
impl std::fmt::Debug for Axis {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("Axis") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for Axis {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "X", Self::Y => "Y", Self::Z => "Z", Self::W => "W", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::X => "AXIS_X", Self::Y => "AXIS_Y", Self::Z => "AXIS_Z", Self::W => "AXIS_W", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for Axis {
type Via = i32;
}
impl crate::meta::ToGodot for Axis {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for Axis {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,679 @@
#![doc = "Sidecar module for class [`AStar2D`][crate::classes::AStar2D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AStar2D` enums](https://docs.godotengine.org/en/stable/classes/class_astar2d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AStar2D.`\n\nInherits [`RefCounted`][crate::classes::RefCounted].\n\nRelated symbols:\n\n* [`a_star_2d`][crate::classes::a_star_2d]: sidecar module with related enum/flag types\n* [`IAStar2D`][crate::classes::IAStar2D]: virtual methods\n\n\nSee also [Godot docs for `AStar2D`](https://docs.godotengine.org/en/stable/classes/class_astar2d.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AStar2D::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AStar2D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AStar2D`][crate::classes::AStar2D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AStar2D` methods](https://docs.godotengine.org/en/stable/classes/class_astar2d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAStar2D: crate::obj::GodotClass < Base = AStar2D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn estimate_cost(&self, from_id: i64, to_id: i64,) -> f32 {
unimplemented !()
}
fn compute_cost(&self, from_id: i64, to_id: i64,) -> f32 {
unimplemented !()
}
}
impl AStar2D {
pub fn get_available_point_id(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(4usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_available_point_id", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn add_point_full(&mut self, id: i64, position: Vector2, weight_scale: f32,) {
type CallSig = ((), i64, Vector2, f32);
let args = (id, position, weight_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(5usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "add_point", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::add_point_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn add_point(&mut self, id: i64, position: Vector2,) {
self.add_point_ex(id, position,) . done()
}
#[inline]
pub fn add_point_ex < 'a > (&'a mut self, id: i64, position: Vector2,) -> ExAddPoint < 'a > {
ExAddPoint::new(self, id, position,)
}
pub fn get_point_position(&self, id: i64,) -> Vector2 {
type CallSig = (Vector2, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(6usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_point_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_point_position(&mut self, id: i64, position: Vector2,) {
type CallSig = ((), i64, Vector2);
let args = (id, position,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(7usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "set_point_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_weight_scale(&self, id: i64,) -> f32 {
type CallSig = (f32, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(8usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_point_weight_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_point_weight_scale(&mut self, id: i64, weight_scale: f32,) {
type CallSig = ((), i64, f32);
let args = (id, weight_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(9usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "set_point_weight_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_point(&mut self, id: i64,) {
type CallSig = ((), i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(10usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "remove_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_point(&self, id: i64,) -> bool {
type CallSig = (bool, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(11usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "has_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_connections(&mut self, id: i64,) -> PackedInt64Array {
type CallSig = (PackedInt64Array, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(12usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_point_connections", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_ids(&mut self,) -> PackedInt64Array {
type CallSig = (PackedInt64Array,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(13usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_point_ids", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn set_point_disabled_full(&mut self, id: i64, disabled: bool,) {
type CallSig = ((), i64, bool);
let args = (id, disabled,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(14usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "set_point_disabled", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::set_point_disabled_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn set_point_disabled(&mut self, id: i64,) {
self.set_point_disabled_ex(id,) . done()
}
#[inline]
pub fn set_point_disabled_ex < 'a > (&'a mut self, id: i64,) -> ExSetPointDisabled < 'a > {
ExSetPointDisabled::new(self, id,)
}
pub fn is_point_disabled(&self, id: i64,) -> bool {
type CallSig = (bool, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(15usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "is_point_disabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn connect_points_full(&mut self, id: i64, to_id: i64, bidirectional: bool,) {
type CallSig = ((), i64, i64, bool);
let args = (id, to_id, bidirectional,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(16usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "connect_points", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::connect_points_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn connect_points(&mut self, id: i64, to_id: i64,) {
self.connect_points_ex(id, to_id,) . done()
}
#[inline]
pub fn connect_points_ex < 'a > (&'a mut self, id: i64, to_id: i64,) -> ExConnectPoints < 'a > {
ExConnectPoints::new(self, id, to_id,)
}
pub(crate) fn disconnect_points_full(&mut self, id: i64, to_id: i64, bidirectional: bool,) {
type CallSig = ((), i64, i64, bool);
let args = (id, to_id, bidirectional,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(17usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "disconnect_points", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::disconnect_points_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn disconnect_points(&mut self, id: i64, to_id: i64,) {
self.disconnect_points_ex(id, to_id,) . done()
}
#[inline]
pub fn disconnect_points_ex < 'a > (&'a mut self, id: i64, to_id: i64,) -> ExDisconnectPoints < 'a > {
ExDisconnectPoints::new(self, id, to_id,)
}
pub(crate) fn are_points_connected_full(&self, id: i64, to_id: i64, bidirectional: bool,) -> bool {
type CallSig = (bool, i64, i64, bool);
let args = (id, to_id, bidirectional,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(18usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "are_points_connected", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::are_points_connected_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn are_points_connected(&self, id: i64, to_id: i64,) -> bool {
self.are_points_connected_ex(id, to_id,) . done()
}
#[inline]
pub fn are_points_connected_ex < 'a > (&'a self, id: i64, to_id: i64,) -> ExArePointsConnected < 'a > {
ExArePointsConnected::new(self, id, to_id,)
}
pub fn get_point_count(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(19usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_point_count", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_capacity(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(20usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_point_capacity", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn reserve_space(&mut self, num_nodes: i64,) {
type CallSig = ((), i64);
let args = (num_nodes,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(21usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "reserve_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(22usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "clear", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn get_closest_point_full(&self, to_position: Vector2, include_disabled: bool,) -> i64 {
type CallSig = (i64, Vector2, bool);
let args = (to_position, include_disabled,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(23usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_closest_point", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::get_closest_point_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn get_closest_point(&self, to_position: Vector2,) -> i64 {
self.get_closest_point_ex(to_position,) . done()
}
#[inline]
pub fn get_closest_point_ex < 'a > (&'a self, to_position: Vector2,) -> ExGetClosestPoint < 'a > {
ExGetClosestPoint::new(self, to_position,)
}
pub fn get_closest_position_in_segment(&self, to_position: Vector2,) -> Vector2 {
type CallSig = (Vector2, Vector2);
let args = (to_position,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(24usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_closest_position_in_segment", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn get_point_path_full(&mut self, from_id: i64, to_id: i64, allow_partial_path: bool,) -> PackedVector2Array {
type CallSig = (PackedVector2Array, i64, i64, bool);
let args = (from_id, to_id, allow_partial_path,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(25usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_point_path", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::get_point_path_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn get_point_path(&mut self, from_id: i64, to_id: i64,) -> PackedVector2Array {
self.get_point_path_ex(from_id, to_id,) . done()
}
#[inline]
pub fn get_point_path_ex < 'a > (&'a mut self, from_id: i64, to_id: i64,) -> ExGetPointPath < 'a > {
ExGetPointPath::new(self, from_id, to_id,)
}
pub(crate) fn get_id_path_full(&mut self, from_id: i64, to_id: i64, allow_partial_path: bool,) -> PackedInt64Array {
type CallSig = (PackedInt64Array, i64, i64, bool);
let args = (from_id, to_id, allow_partial_path,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(26usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar2D", "get_id_path", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::get_id_path_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn get_id_path(&mut self, from_id: i64, to_id: i64,) -> PackedInt64Array {
self.get_id_path_ex(from_id, to_id,) . done()
}
#[inline]
pub fn get_id_path_ex < 'a > (&'a mut self, from_id: i64, to_id: i64,) -> ExGetIdPath < 'a > {
ExGetIdPath::new(self, from_id, to_id,)
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AStar2D {
type Base = crate::classes::RefCounted;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AStar2D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AStar2D {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::No;
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AStar2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AStar2D {
}
impl crate::obj::cap::GodotDefault for AStar2D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AStar2D {
type Target = crate::classes::RefCounted;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AStar2D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AStar2D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AStar2D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AStar2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AStar2D::add_point_ex`][super::AStar2D::add_point_ex]."]
#[must_use]
pub struct ExAddPoint < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar2D, id: i64, position: Vector2, weight_scale: f32,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExAddPoint < 'a > {
fn new(surround_object: &'a mut re_export::AStar2D, id: i64, position: Vector2,) -> Self {
let weight_scale = 1f32;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, position: position, weight_scale: weight_scale,
}
}
#[inline]
pub fn weight_scale(self, weight_scale: f32) -> Self {
Self {
weight_scale: weight_scale, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, id, position, weight_scale,
}
= self;
re_export::AStar2D::add_point_full(surround_object, id, position, weight_scale,)
}
}
#[doc = "Default-param extender for [`AStar2D::set_point_disabled_ex`][super::AStar2D::set_point_disabled_ex]."]
#[must_use]
pub struct ExSetPointDisabled < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar2D, id: i64, disabled: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExSetPointDisabled < 'a > {
fn new(surround_object: &'a mut re_export::AStar2D, id: i64,) -> Self {
let disabled = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, disabled: disabled,
}
}
#[inline]
pub fn disabled(self, disabled: bool) -> Self {
Self {
disabled: disabled, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, id, disabled,
}
= self;
re_export::AStar2D::set_point_disabled_full(surround_object, id, disabled,)
}
}
#[doc = "Default-param extender for [`AStar2D::connect_points_ex`][super::AStar2D::connect_points_ex]."]
#[must_use]
pub struct ExConnectPoints < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar2D, id: i64, to_id: i64, bidirectional: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExConnectPoints < 'a > {
fn new(surround_object: &'a mut re_export::AStar2D, id: i64, to_id: i64,) -> Self {
let bidirectional = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, to_id: to_id, bidirectional: bidirectional,
}
}
#[inline]
pub fn bidirectional(self, bidirectional: bool) -> Self {
Self {
bidirectional: bidirectional, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, id, to_id, bidirectional,
}
= self;
re_export::AStar2D::connect_points_full(surround_object, id, to_id, bidirectional,)
}
}
#[doc = "Default-param extender for [`AStar2D::disconnect_points_ex`][super::AStar2D::disconnect_points_ex]."]
#[must_use]
pub struct ExDisconnectPoints < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar2D, id: i64, to_id: i64, bidirectional: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExDisconnectPoints < 'a > {
fn new(surround_object: &'a mut re_export::AStar2D, id: i64, to_id: i64,) -> Self {
let bidirectional = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, to_id: to_id, bidirectional: bidirectional,
}
}
#[inline]
pub fn bidirectional(self, bidirectional: bool) -> Self {
Self {
bidirectional: bidirectional, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, id, to_id, bidirectional,
}
= self;
re_export::AStar2D::disconnect_points_full(surround_object, id, to_id, bidirectional,)
}
}
#[doc = "Default-param extender for [`AStar2D::are_points_connected_ex`][super::AStar2D::are_points_connected_ex]."]
#[must_use]
pub struct ExArePointsConnected < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a re_export::AStar2D, id: i64, to_id: i64, bidirectional: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExArePointsConnected < 'a > {
fn new(surround_object: &'a re_export::AStar2D, id: i64, to_id: i64,) -> Self {
let bidirectional = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, to_id: to_id, bidirectional: bidirectional,
}
}
#[inline]
pub fn bidirectional(self, bidirectional: bool) -> Self {
Self {
bidirectional: bidirectional, .. self
}
}
#[inline]
pub fn done(self) -> bool {
let Self {
_phantom, surround_object, id, to_id, bidirectional,
}
= self;
re_export::AStar2D::are_points_connected_full(surround_object, id, to_id, bidirectional,)
}
}
#[doc = "Default-param extender for [`AStar2D::get_closest_point_ex`][super::AStar2D::get_closest_point_ex]."]
#[must_use]
pub struct ExGetClosestPoint < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a re_export::AStar2D, to_position: Vector2, include_disabled: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExGetClosestPoint < 'a > {
fn new(surround_object: &'a re_export::AStar2D, to_position: Vector2,) -> Self {
let include_disabled = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, to_position: to_position, include_disabled: include_disabled,
}
}
#[inline]
pub fn include_disabled(self, include_disabled: bool) -> Self {
Self {
include_disabled: include_disabled, .. self
}
}
#[inline]
pub fn done(self) -> i64 {
let Self {
_phantom, surround_object, to_position, include_disabled,
}
= self;
re_export::AStar2D::get_closest_point_full(surround_object, to_position, include_disabled,)
}
}
#[doc = "Default-param extender for [`AStar2D::get_point_path_ex`][super::AStar2D::get_point_path_ex]."]
#[must_use]
pub struct ExGetPointPath < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar2D, from_id: i64, to_id: i64, allow_partial_path: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExGetPointPath < 'a > {
fn new(surround_object: &'a mut re_export::AStar2D, from_id: i64, to_id: i64,) -> Self {
let allow_partial_path = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, from_id: from_id, to_id: to_id, allow_partial_path: allow_partial_path,
}
}
#[inline]
pub fn allow_partial_path(self, allow_partial_path: bool) -> Self {
Self {
allow_partial_path: allow_partial_path, .. self
}
}
#[inline]
pub fn done(self) -> PackedVector2Array {
let Self {
_phantom, surround_object, from_id, to_id, allow_partial_path,
}
= self;
re_export::AStar2D::get_point_path_full(surround_object, from_id, to_id, allow_partial_path,)
}
}
#[doc = "Default-param extender for [`AStar2D::get_id_path_ex`][super::AStar2D::get_id_path_ex]."]
#[must_use]
pub struct ExGetIdPath < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar2D, from_id: i64, to_id: i64, allow_partial_path: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExGetIdPath < 'a > {
fn new(surround_object: &'a mut re_export::AStar2D, from_id: i64, to_id: i64,) -> Self {
let allow_partial_path = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, from_id: from_id, to_id: to_id, allow_partial_path: allow_partial_path,
}
}
#[inline]
pub fn allow_partial_path(self, allow_partial_path: bool) -> Self {
Self {
allow_partial_path: allow_partial_path, .. self
}
}
#[inline]
pub fn done(self) -> PackedInt64Array {
let Self {
_phantom, surround_object, from_id, to_id, allow_partial_path,
}
= self;
re_export::AStar2D::get_id_path_full(surround_object, from_id, to_id, allow_partial_path,)
}
}

View File

@@ -0,0 +1,679 @@
#![doc = "Sidecar module for class [`AStar3D`][crate::classes::AStar3D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AStar3D` enums](https://docs.godotengine.org/en/stable/classes/class_astar3d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AStar3D.`\n\nInherits [`RefCounted`][crate::classes::RefCounted].\n\nRelated symbols:\n\n* [`a_star_3d`][crate::classes::a_star_3d]: sidecar module with related enum/flag types\n* [`IAStar3D`][crate::classes::IAStar3D]: virtual methods\n\n\nSee also [Godot docs for `AStar3D`](https://docs.godotengine.org/en/stable/classes/class_astar3d.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AStar3D::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AStar3D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AStar3D`][crate::classes::AStar3D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AStar3D` methods](https://docs.godotengine.org/en/stable/classes/class_astar3d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAStar3D: crate::obj::GodotClass < Base = AStar3D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn estimate_cost(&self, from_id: i64, to_id: i64,) -> f32 {
unimplemented !()
}
fn compute_cost(&self, from_id: i64, to_id: i64,) -> f32 {
unimplemented !()
}
}
impl AStar3D {
pub fn get_available_point_id(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(27usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_available_point_id", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn add_point_full(&mut self, id: i64, position: Vector3, weight_scale: f32,) {
type CallSig = ((), i64, Vector3, f32);
let args = (id, position, weight_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(28usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "add_point", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::add_point_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn add_point(&mut self, id: i64, position: Vector3,) {
self.add_point_ex(id, position,) . done()
}
#[inline]
pub fn add_point_ex < 'a > (&'a mut self, id: i64, position: Vector3,) -> ExAddPoint < 'a > {
ExAddPoint::new(self, id, position,)
}
pub fn get_point_position(&self, id: i64,) -> Vector3 {
type CallSig = (Vector3, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(29usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_point_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_point_position(&mut self, id: i64, position: Vector3,) {
type CallSig = ((), i64, Vector3);
let args = (id, position,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(30usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "set_point_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_weight_scale(&self, id: i64,) -> f32 {
type CallSig = (f32, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(31usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_point_weight_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_point_weight_scale(&mut self, id: i64, weight_scale: f32,) {
type CallSig = ((), i64, f32);
let args = (id, weight_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(32usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "set_point_weight_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_point(&mut self, id: i64,) {
type CallSig = ((), i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(33usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "remove_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_point(&self, id: i64,) -> bool {
type CallSig = (bool, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(34usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "has_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_connections(&mut self, id: i64,) -> PackedInt64Array {
type CallSig = (PackedInt64Array, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(35usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_point_connections", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_ids(&mut self,) -> PackedInt64Array {
type CallSig = (PackedInt64Array,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(36usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_point_ids", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn set_point_disabled_full(&mut self, id: i64, disabled: bool,) {
type CallSig = ((), i64, bool);
let args = (id, disabled,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(37usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "set_point_disabled", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::set_point_disabled_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn set_point_disabled(&mut self, id: i64,) {
self.set_point_disabled_ex(id,) . done()
}
#[inline]
pub fn set_point_disabled_ex < 'a > (&'a mut self, id: i64,) -> ExSetPointDisabled < 'a > {
ExSetPointDisabled::new(self, id,)
}
pub fn is_point_disabled(&self, id: i64,) -> bool {
type CallSig = (bool, i64);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(38usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "is_point_disabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn connect_points_full(&mut self, id: i64, to_id: i64, bidirectional: bool,) {
type CallSig = ((), i64, i64, bool);
let args = (id, to_id, bidirectional,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(39usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "connect_points", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::connect_points_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn connect_points(&mut self, id: i64, to_id: i64,) {
self.connect_points_ex(id, to_id,) . done()
}
#[inline]
pub fn connect_points_ex < 'a > (&'a mut self, id: i64, to_id: i64,) -> ExConnectPoints < 'a > {
ExConnectPoints::new(self, id, to_id,)
}
pub(crate) fn disconnect_points_full(&mut self, id: i64, to_id: i64, bidirectional: bool,) {
type CallSig = ((), i64, i64, bool);
let args = (id, to_id, bidirectional,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(40usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "disconnect_points", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::disconnect_points_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn disconnect_points(&mut self, id: i64, to_id: i64,) {
self.disconnect_points_ex(id, to_id,) . done()
}
#[inline]
pub fn disconnect_points_ex < 'a > (&'a mut self, id: i64, to_id: i64,) -> ExDisconnectPoints < 'a > {
ExDisconnectPoints::new(self, id, to_id,)
}
pub(crate) fn are_points_connected_full(&self, id: i64, to_id: i64, bidirectional: bool,) -> bool {
type CallSig = (bool, i64, i64, bool);
let args = (id, to_id, bidirectional,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(41usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "are_points_connected", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::are_points_connected_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn are_points_connected(&self, id: i64, to_id: i64,) -> bool {
self.are_points_connected_ex(id, to_id,) . done()
}
#[inline]
pub fn are_points_connected_ex < 'a > (&'a self, id: i64, to_id: i64,) -> ExArePointsConnected < 'a > {
ExArePointsConnected::new(self, id, to_id,)
}
pub fn get_point_count(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(42usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_point_count", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_capacity(&self,) -> i64 {
type CallSig = (i64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(43usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_point_capacity", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn reserve_space(&mut self, num_nodes: i64,) {
type CallSig = ((), i64);
let args = (num_nodes,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(44usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "reserve_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(45usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "clear", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn get_closest_point_full(&self, to_position: Vector3, include_disabled: bool,) -> i64 {
type CallSig = (i64, Vector3, bool);
let args = (to_position, include_disabled,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(46usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_closest_point", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::get_closest_point_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn get_closest_point(&self, to_position: Vector3,) -> i64 {
self.get_closest_point_ex(to_position,) . done()
}
#[inline]
pub fn get_closest_point_ex < 'a > (&'a self, to_position: Vector3,) -> ExGetClosestPoint < 'a > {
ExGetClosestPoint::new(self, to_position,)
}
pub fn get_closest_position_in_segment(&self, to_position: Vector3,) -> Vector3 {
type CallSig = (Vector3, Vector3);
let args = (to_position,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(47usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_closest_position_in_segment", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn get_point_path_full(&mut self, from_id: i64, to_id: i64, allow_partial_path: bool,) -> PackedVector3Array {
type CallSig = (PackedVector3Array, i64, i64, bool);
let args = (from_id, to_id, allow_partial_path,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(48usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_point_path", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::get_point_path_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn get_point_path(&mut self, from_id: i64, to_id: i64,) -> PackedVector3Array {
self.get_point_path_ex(from_id, to_id,) . done()
}
#[inline]
pub fn get_point_path_ex < 'a > (&'a mut self, from_id: i64, to_id: i64,) -> ExGetPointPath < 'a > {
ExGetPointPath::new(self, from_id, to_id,)
}
pub(crate) fn get_id_path_full(&mut self, from_id: i64, to_id: i64, allow_partial_path: bool,) -> PackedInt64Array {
type CallSig = (PackedInt64Array, i64, i64, bool);
let args = (from_id, to_id, allow_partial_path,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(49usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStar3D", "get_id_path", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::get_id_path_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn get_id_path(&mut self, from_id: i64, to_id: i64,) -> PackedInt64Array {
self.get_id_path_ex(from_id, to_id,) . done()
}
#[inline]
pub fn get_id_path_ex < 'a > (&'a mut self, from_id: i64, to_id: i64,) -> ExGetIdPath < 'a > {
ExGetIdPath::new(self, from_id, to_id,)
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AStar3D {
type Base = crate::classes::RefCounted;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AStar3D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AStar3D {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::No;
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AStar3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AStar3D {
}
impl crate::obj::cap::GodotDefault for AStar3D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AStar3D {
type Target = crate::classes::RefCounted;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AStar3D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AStar3D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AStar3D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AStar3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AStar3D::add_point_ex`][super::AStar3D::add_point_ex]."]
#[must_use]
pub struct ExAddPoint < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar3D, id: i64, position: Vector3, weight_scale: f32,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExAddPoint < 'a > {
fn new(surround_object: &'a mut re_export::AStar3D, id: i64, position: Vector3,) -> Self {
let weight_scale = 1f32;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, position: position, weight_scale: weight_scale,
}
}
#[inline]
pub fn weight_scale(self, weight_scale: f32) -> Self {
Self {
weight_scale: weight_scale, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, id, position, weight_scale,
}
= self;
re_export::AStar3D::add_point_full(surround_object, id, position, weight_scale,)
}
}
#[doc = "Default-param extender for [`AStar3D::set_point_disabled_ex`][super::AStar3D::set_point_disabled_ex]."]
#[must_use]
pub struct ExSetPointDisabled < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar3D, id: i64, disabled: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExSetPointDisabled < 'a > {
fn new(surround_object: &'a mut re_export::AStar3D, id: i64,) -> Self {
let disabled = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, disabled: disabled,
}
}
#[inline]
pub fn disabled(self, disabled: bool) -> Self {
Self {
disabled: disabled, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, id, disabled,
}
= self;
re_export::AStar3D::set_point_disabled_full(surround_object, id, disabled,)
}
}
#[doc = "Default-param extender for [`AStar3D::connect_points_ex`][super::AStar3D::connect_points_ex]."]
#[must_use]
pub struct ExConnectPoints < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar3D, id: i64, to_id: i64, bidirectional: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExConnectPoints < 'a > {
fn new(surround_object: &'a mut re_export::AStar3D, id: i64, to_id: i64,) -> Self {
let bidirectional = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, to_id: to_id, bidirectional: bidirectional,
}
}
#[inline]
pub fn bidirectional(self, bidirectional: bool) -> Self {
Self {
bidirectional: bidirectional, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, id, to_id, bidirectional,
}
= self;
re_export::AStar3D::connect_points_full(surround_object, id, to_id, bidirectional,)
}
}
#[doc = "Default-param extender for [`AStar3D::disconnect_points_ex`][super::AStar3D::disconnect_points_ex]."]
#[must_use]
pub struct ExDisconnectPoints < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar3D, id: i64, to_id: i64, bidirectional: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExDisconnectPoints < 'a > {
fn new(surround_object: &'a mut re_export::AStar3D, id: i64, to_id: i64,) -> Self {
let bidirectional = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, to_id: to_id, bidirectional: bidirectional,
}
}
#[inline]
pub fn bidirectional(self, bidirectional: bool) -> Self {
Self {
bidirectional: bidirectional, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, id, to_id, bidirectional,
}
= self;
re_export::AStar3D::disconnect_points_full(surround_object, id, to_id, bidirectional,)
}
}
#[doc = "Default-param extender for [`AStar3D::are_points_connected_ex`][super::AStar3D::are_points_connected_ex]."]
#[must_use]
pub struct ExArePointsConnected < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a re_export::AStar3D, id: i64, to_id: i64, bidirectional: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExArePointsConnected < 'a > {
fn new(surround_object: &'a re_export::AStar3D, id: i64, to_id: i64,) -> Self {
let bidirectional = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, to_id: to_id, bidirectional: bidirectional,
}
}
#[inline]
pub fn bidirectional(self, bidirectional: bool) -> Self {
Self {
bidirectional: bidirectional, .. self
}
}
#[inline]
pub fn done(self) -> bool {
let Self {
_phantom, surround_object, id, to_id, bidirectional,
}
= self;
re_export::AStar3D::are_points_connected_full(surround_object, id, to_id, bidirectional,)
}
}
#[doc = "Default-param extender for [`AStar3D::get_closest_point_ex`][super::AStar3D::get_closest_point_ex]."]
#[must_use]
pub struct ExGetClosestPoint < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a re_export::AStar3D, to_position: Vector3, include_disabled: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExGetClosestPoint < 'a > {
fn new(surround_object: &'a re_export::AStar3D, to_position: Vector3,) -> Self {
let include_disabled = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, to_position: to_position, include_disabled: include_disabled,
}
}
#[inline]
pub fn include_disabled(self, include_disabled: bool) -> Self {
Self {
include_disabled: include_disabled, .. self
}
}
#[inline]
pub fn done(self) -> i64 {
let Self {
_phantom, surround_object, to_position, include_disabled,
}
= self;
re_export::AStar3D::get_closest_point_full(surround_object, to_position, include_disabled,)
}
}
#[doc = "Default-param extender for [`AStar3D::get_point_path_ex`][super::AStar3D::get_point_path_ex]."]
#[must_use]
pub struct ExGetPointPath < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar3D, from_id: i64, to_id: i64, allow_partial_path: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExGetPointPath < 'a > {
fn new(surround_object: &'a mut re_export::AStar3D, from_id: i64, to_id: i64,) -> Self {
let allow_partial_path = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, from_id: from_id, to_id: to_id, allow_partial_path: allow_partial_path,
}
}
#[inline]
pub fn allow_partial_path(self, allow_partial_path: bool) -> Self {
Self {
allow_partial_path: allow_partial_path, .. self
}
}
#[inline]
pub fn done(self) -> PackedVector3Array {
let Self {
_phantom, surround_object, from_id, to_id, allow_partial_path,
}
= self;
re_export::AStar3D::get_point_path_full(surround_object, from_id, to_id, allow_partial_path,)
}
}
#[doc = "Default-param extender for [`AStar3D::get_id_path_ex`][super::AStar3D::get_id_path_ex]."]
#[must_use]
pub struct ExGetIdPath < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStar3D, from_id: i64, to_id: i64, allow_partial_path: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExGetIdPath < 'a > {
fn new(surround_object: &'a mut re_export::AStar3D, from_id: i64, to_id: i64,) -> Self {
let allow_partial_path = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, from_id: from_id, to_id: to_id, allow_partial_path: allow_partial_path,
}
}
#[inline]
pub fn allow_partial_path(self, allow_partial_path: bool) -> Self {
Self {
allow_partial_path: allow_partial_path, .. self
}
}
#[inline]
pub fn done(self) -> PackedInt64Array {
let Self {
_phantom, surround_object, from_id, to_id, allow_partial_path,
}
= self;
re_export::AStar3D::get_id_path_full(surround_object, from_id, to_id, allow_partial_path,)
}
}

View File

@@ -0,0 +1,865 @@
#![doc = "Sidecar module for class [`AStarGrid2D`][crate::classes::AStarGrid2D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AStarGrid2D` enums](https://docs.godotengine.org/en/stable/classes/class_astargrid2d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AStarGrid2D.`\n\nInherits [`RefCounted`][crate::classes::RefCounted].\n\nRelated symbols:\n\n* [`a_star_grid_2d`][crate::classes::a_star_grid_2d]: sidecar module with related enum/flag types\n* [`IAStarGrid2D`][crate::classes::IAStarGrid2D]: virtual methods\n\n\nSee also [Godot docs for `AStarGrid2D`](https://docs.godotengine.org/en/stable/classes/class_astargrid2d.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AStarGrid2D::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AStarGrid2D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AStarGrid2D`][crate::classes::AStarGrid2D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AStarGrid2D` methods](https://docs.godotengine.org/en/stable/classes/class_astargrid2d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAStarGrid2D: crate::obj::GodotClass < Base = AStarGrid2D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn estimate_cost(&self, from_id: Vector2i, to_id: Vector2i,) -> f32 {
unimplemented !()
}
fn compute_cost(&self, from_id: Vector2i, to_id: Vector2i,) -> f32 {
unimplemented !()
}
}
impl AStarGrid2D {
pub fn set_region(&mut self, region: Rect2i,) {
type CallSig = ((), Rect2i);
let args = (region,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(50usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_region", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_region(&self,) -> Rect2i {
type CallSig = (Rect2i,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(51usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_region", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_size(&mut self, size: Vector2i,) {
type CallSig = ((), Vector2i);
let args = (size,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(52usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_size", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_size(&self,) -> Vector2i {
type CallSig = (Vector2i,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(53usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_size", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_offset(&mut self, offset: Vector2,) {
type CallSig = ((), Vector2);
let args = (offset,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(54usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_offset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_offset(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(55usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_offset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_cell_size(&mut self, cell_size: Vector2,) {
type CallSig = ((), Vector2);
let args = (cell_size,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(56usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_cell_size", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_cell_size(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(57usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_cell_size", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_cell_shape(&mut self, cell_shape: crate::classes::a_star_grid_2d::CellShape,) {
type CallSig = ((), crate::classes::a_star_grid_2d::CellShape);
let args = (cell_shape,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(58usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_cell_shape", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_cell_shape(&self,) -> crate::classes::a_star_grid_2d::CellShape {
type CallSig = (crate::classes::a_star_grid_2d::CellShape,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(59usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_cell_shape", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_in_bounds(&self, x: i32, y: i32,) -> bool {
type CallSig = (bool, i32, i32);
let args = (x, y,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(60usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "is_in_bounds", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_in_boundsv(&self, id: Vector2i,) -> bool {
type CallSig = (bool, Vector2i);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(61usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "is_in_boundsv", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_dirty(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(62usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "is_dirty", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn update(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(63usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "update", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_jumping_enabled(&mut self, enabled: bool,) {
type CallSig = ((), bool);
let args = (enabled,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(64usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_jumping_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_jumping_enabled(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(65usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "is_jumping_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_diagonal_mode(&mut self, mode: crate::classes::a_star_grid_2d::DiagonalMode,) {
type CallSig = ((), crate::classes::a_star_grid_2d::DiagonalMode);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(66usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_diagonal_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_diagonal_mode(&self,) -> crate::classes::a_star_grid_2d::DiagonalMode {
type CallSig = (crate::classes::a_star_grid_2d::DiagonalMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(67usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_diagonal_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_default_compute_heuristic(&mut self, heuristic: crate::classes::a_star_grid_2d::Heuristic,) {
type CallSig = ((), crate::classes::a_star_grid_2d::Heuristic);
let args = (heuristic,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(68usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_default_compute_heuristic", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_default_compute_heuristic(&self,) -> crate::classes::a_star_grid_2d::Heuristic {
type CallSig = (crate::classes::a_star_grid_2d::Heuristic,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(69usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_default_compute_heuristic", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_default_estimate_heuristic(&mut self, heuristic: crate::classes::a_star_grid_2d::Heuristic,) {
type CallSig = ((), crate::classes::a_star_grid_2d::Heuristic);
let args = (heuristic,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(70usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_default_estimate_heuristic", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_default_estimate_heuristic(&self,) -> crate::classes::a_star_grid_2d::Heuristic {
type CallSig = (crate::classes::a_star_grid_2d::Heuristic,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(71usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_default_estimate_heuristic", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn set_point_solid_full(&mut self, id: Vector2i, solid: bool,) {
type CallSig = ((), Vector2i, bool);
let args = (id, solid,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(72usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_point_solid", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::set_point_solid_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn set_point_solid(&mut self, id: Vector2i,) {
self.set_point_solid_ex(id,) . done()
}
#[inline]
pub fn set_point_solid_ex < 'a > (&'a mut self, id: Vector2i,) -> ExSetPointSolid < 'a > {
ExSetPointSolid::new(self, id,)
}
pub fn is_point_solid(&self, id: Vector2i,) -> bool {
type CallSig = (bool, Vector2i);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(73usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "is_point_solid", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_point_weight_scale(&mut self, id: Vector2i, weight_scale: f32,) {
type CallSig = ((), Vector2i, f32);
let args = (id, weight_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(74usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "set_point_weight_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_weight_scale(&self, id: Vector2i,) -> f32 {
type CallSig = (f32, Vector2i);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(75usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_point_weight_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn fill_solid_region_full(&mut self, region: Rect2i, solid: bool,) {
type CallSig = ((), Rect2i, bool);
let args = (region, solid,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(76usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "fill_solid_region", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::fill_solid_region_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn fill_solid_region(&mut self, region: Rect2i,) {
self.fill_solid_region_ex(region,) . done()
}
#[inline]
pub fn fill_solid_region_ex < 'a > (&'a mut self, region: Rect2i,) -> ExFillSolidRegion < 'a > {
ExFillSolidRegion::new(self, region,)
}
pub fn fill_weight_scale_region(&mut self, region: Rect2i, weight_scale: f32,) {
type CallSig = ((), Rect2i, f32);
let args = (region, weight_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(77usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "fill_weight_scale_region", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn clear(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(78usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "clear", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_point_position(&self, id: Vector2i,) -> Vector2 {
type CallSig = (Vector2, Vector2i);
let args = (id,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(79usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_point_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn get_point_path_full(&mut self, from_id: Vector2i, to_id: Vector2i, allow_partial_path: bool,) -> PackedVector2Array {
type CallSig = (PackedVector2Array, Vector2i, Vector2i, bool);
let args = (from_id, to_id, allow_partial_path,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(80usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_point_path", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::get_point_path_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn get_point_path(&mut self, from_id: Vector2i, to_id: Vector2i,) -> PackedVector2Array {
self.get_point_path_ex(from_id, to_id,) . done()
}
#[inline]
pub fn get_point_path_ex < 'a > (&'a mut self, from_id: Vector2i, to_id: Vector2i,) -> ExGetPointPath < 'a > {
ExGetPointPath::new(self, from_id, to_id,)
}
pub(crate) fn get_id_path_full(&mut self, from_id: Vector2i, to_id: Vector2i, allow_partial_path: bool,) -> Array < Vector2i > {
type CallSig = (Array < Vector2i >, Vector2i, Vector2i, bool);
let args = (from_id, to_id, allow_partial_path,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(81usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AStarGrid2D", "get_id_path", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::get_id_path_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn get_id_path(&mut self, from_id: Vector2i, to_id: Vector2i,) -> Array < Vector2i > {
self.get_id_path_ex(from_id, to_id,) . done()
}
#[inline]
pub fn get_id_path_ex < 'a > (&'a mut self, from_id: Vector2i, to_id: Vector2i,) -> ExGetIdPath < 'a > {
ExGetIdPath::new(self, from_id, to_id,)
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AStarGrid2D {
type Base = crate::classes::RefCounted;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AStarGrid2D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AStarGrid2D {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::No;
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AStarGrid2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AStarGrid2D {
}
impl crate::obj::cap::GodotDefault for AStarGrid2D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AStarGrid2D {
type Target = crate::classes::RefCounted;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AStarGrid2D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AStarGrid2D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AStarGrid2D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AStarGrid2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AStarGrid2D::set_point_solid_ex`][super::AStarGrid2D::set_point_solid_ex]."]
#[must_use]
pub struct ExSetPointSolid < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStarGrid2D, id: Vector2i, solid: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExSetPointSolid < 'a > {
fn new(surround_object: &'a mut re_export::AStarGrid2D, id: Vector2i,) -> Self {
let solid = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, id: id, solid: solid,
}
}
#[inline]
pub fn solid(self, solid: bool) -> Self {
Self {
solid: solid, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, id, solid,
}
= self;
re_export::AStarGrid2D::set_point_solid_full(surround_object, id, solid,)
}
}
#[doc = "Default-param extender for [`AStarGrid2D::fill_solid_region_ex`][super::AStarGrid2D::fill_solid_region_ex]."]
#[must_use]
pub struct ExFillSolidRegion < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStarGrid2D, region: Rect2i, solid: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExFillSolidRegion < 'a > {
fn new(surround_object: &'a mut re_export::AStarGrid2D, region: Rect2i,) -> Self {
let solid = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, region: region, solid: solid,
}
}
#[inline]
pub fn solid(self, solid: bool) -> Self {
Self {
solid: solid, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, region, solid,
}
= self;
re_export::AStarGrid2D::fill_solid_region_full(surround_object, region, solid,)
}
}
#[doc = "Default-param extender for [`AStarGrid2D::get_point_path_ex`][super::AStarGrid2D::get_point_path_ex]."]
#[must_use]
pub struct ExGetPointPath < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStarGrid2D, from_id: Vector2i, to_id: Vector2i, allow_partial_path: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExGetPointPath < 'a > {
fn new(surround_object: &'a mut re_export::AStarGrid2D, from_id: Vector2i, to_id: Vector2i,) -> Self {
let allow_partial_path = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, from_id: from_id, to_id: to_id, allow_partial_path: allow_partial_path,
}
}
#[inline]
pub fn allow_partial_path(self, allow_partial_path: bool) -> Self {
Self {
allow_partial_path: allow_partial_path, .. self
}
}
#[inline]
pub fn done(self) -> PackedVector2Array {
let Self {
_phantom, surround_object, from_id, to_id, allow_partial_path,
}
= self;
re_export::AStarGrid2D::get_point_path_full(surround_object, from_id, to_id, allow_partial_path,)
}
}
#[doc = "Default-param extender for [`AStarGrid2D::get_id_path_ex`][super::AStarGrid2D::get_id_path_ex]."]
#[must_use]
pub struct ExGetIdPath < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AStarGrid2D, from_id: Vector2i, to_id: Vector2i, allow_partial_path: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExGetIdPath < 'a > {
fn new(surround_object: &'a mut re_export::AStarGrid2D, from_id: Vector2i, to_id: Vector2i,) -> Self {
let allow_partial_path = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, from_id: from_id, to_id: to_id, allow_partial_path: allow_partial_path,
}
}
#[inline]
pub fn allow_partial_path(self, allow_partial_path: bool) -> Self {
Self {
allow_partial_path: allow_partial_path, .. self
}
}
#[inline]
pub fn done(self) -> Array < Vector2i > {
let Self {
_phantom, surround_object, from_id, to_id, allow_partial_path,
}
= self;
re_export::AStarGrid2D::get_id_path_full(surround_object, from_id, to_id, allow_partial_path,)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Heuristic {
ord: i32
}
impl Heuristic {
#[doc(alias = "HEURISTIC_EUCLIDEAN")]
#[doc = "Godot enumerator name: `HEURISTIC_EUCLIDEAN`"]
pub const EUCLIDEAN: Heuristic = Heuristic {
ord: 0i32
};
#[doc(alias = "HEURISTIC_MANHATTAN")]
#[doc = "Godot enumerator name: `HEURISTIC_MANHATTAN`"]
pub const MANHATTAN: Heuristic = Heuristic {
ord: 1i32
};
#[doc(alias = "HEURISTIC_OCTILE")]
#[doc = "Godot enumerator name: `HEURISTIC_OCTILE`"]
pub const OCTILE: Heuristic = Heuristic {
ord: 2i32
};
#[doc(alias = "HEURISTIC_CHEBYSHEV")]
#[doc = "Godot enumerator name: `HEURISTIC_CHEBYSHEV`"]
pub const CHEBYSHEV: Heuristic = Heuristic {
ord: 3i32
};
#[doc(alias = "HEURISTIC_MAX")]
#[doc = "Godot enumerator name: `HEURISTIC_MAX`"]
pub const MAX: Heuristic = Heuristic {
ord: 4i32
};
}
impl std::fmt::Debug for Heuristic {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("Heuristic") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for Heuristic {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 | ord @ 4i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::EUCLIDEAN => "EUCLIDEAN", Self::MANHATTAN => "MANHATTAN", Self::OCTILE => "OCTILE", Self::CHEBYSHEV => "CHEBYSHEV", Self::MAX => "MAX", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::EUCLIDEAN => "HEURISTIC_EUCLIDEAN", Self::MANHATTAN => "HEURISTIC_MANHATTAN", Self::OCTILE => "HEURISTIC_OCTILE", Self::CHEBYSHEV => "HEURISTIC_CHEBYSHEV", Self::MAX => "HEURISTIC_MAX", _ => self.as_str(),
}
}
}
impl crate::obj::IndexEnum for Heuristic {
const ENUMERATOR_COUNT: usize = 4usize;
}
impl crate::meta::GodotConvert for Heuristic {
type Via = i32;
}
impl crate::meta::ToGodot for Heuristic {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for Heuristic {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct DiagonalMode {
ord: i32
}
impl DiagonalMode {
#[doc(alias = "DIAGONAL_MODE_ALWAYS")]
#[doc = "Godot enumerator name: `DIAGONAL_MODE_ALWAYS`"]
pub const ALWAYS: DiagonalMode = DiagonalMode {
ord: 0i32
};
#[doc(alias = "DIAGONAL_MODE_NEVER")]
#[doc = "Godot enumerator name: `DIAGONAL_MODE_NEVER`"]
pub const NEVER: DiagonalMode = DiagonalMode {
ord: 1i32
};
#[doc(alias = "DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE")]
#[doc = "Godot enumerator name: `DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE`"]
pub const AT_LEAST_ONE_WALKABLE: DiagonalMode = DiagonalMode {
ord: 2i32
};
#[doc(alias = "DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES")]
#[doc = "Godot enumerator name: `DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES`"]
pub const ONLY_IF_NO_OBSTACLES: DiagonalMode = DiagonalMode {
ord: 3i32
};
#[doc(alias = "DIAGONAL_MODE_MAX")]
#[doc = "Godot enumerator name: `DIAGONAL_MODE_MAX`"]
pub const MAX: DiagonalMode = DiagonalMode {
ord: 4i32
};
}
impl std::fmt::Debug for DiagonalMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("DiagonalMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for DiagonalMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 | ord @ 4i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::ALWAYS => "ALWAYS", Self::NEVER => "NEVER", Self::AT_LEAST_ONE_WALKABLE => "AT_LEAST_ONE_WALKABLE", Self::ONLY_IF_NO_OBSTACLES => "ONLY_IF_NO_OBSTACLES", Self::MAX => "MAX", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::ALWAYS => "DIAGONAL_MODE_ALWAYS", Self::NEVER => "DIAGONAL_MODE_NEVER", Self::AT_LEAST_ONE_WALKABLE => "DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE", Self::ONLY_IF_NO_OBSTACLES => "DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES", Self::MAX => "DIAGONAL_MODE_MAX", _ => self.as_str(),
}
}
}
impl crate::obj::IndexEnum for DiagonalMode {
const ENUMERATOR_COUNT: usize = 4usize;
}
impl crate::meta::GodotConvert for DiagonalMode {
type Via = i32;
}
impl crate::meta::ToGodot for DiagonalMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for DiagonalMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct CellShape {
ord: i32
}
impl CellShape {
#[doc(alias = "CELL_SHAPE_SQUARE")]
#[doc = "Godot enumerator name: `CELL_SHAPE_SQUARE`"]
pub const SQUARE: CellShape = CellShape {
ord: 0i32
};
#[doc(alias = "CELL_SHAPE_ISOMETRIC_RIGHT")]
#[doc = "Godot enumerator name: `CELL_SHAPE_ISOMETRIC_RIGHT`"]
pub const ISOMETRIC_RIGHT: CellShape = CellShape {
ord: 1i32
};
#[doc(alias = "CELL_SHAPE_ISOMETRIC_DOWN")]
#[doc = "Godot enumerator name: `CELL_SHAPE_ISOMETRIC_DOWN`"]
pub const ISOMETRIC_DOWN: CellShape = CellShape {
ord: 2i32
};
#[doc(alias = "CELL_SHAPE_MAX")]
#[doc = "Godot enumerator name: `CELL_SHAPE_MAX`"]
pub const MAX: CellShape = CellShape {
ord: 3i32
};
}
impl std::fmt::Debug for CellShape {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("CellShape") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for CellShape {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::SQUARE => "SQUARE", Self::ISOMETRIC_RIGHT => "ISOMETRIC_RIGHT", Self::ISOMETRIC_DOWN => "ISOMETRIC_DOWN", Self::MAX => "MAX", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::SQUARE => "CELL_SHAPE_SQUARE", Self::ISOMETRIC_RIGHT => "CELL_SHAPE_ISOMETRIC_RIGHT", Self::ISOMETRIC_DOWN => "CELL_SHAPE_ISOMETRIC_DOWN", Self::MAX => "CELL_SHAPE_MAX", _ => self.as_str(),
}
}
}
impl crate::obj::IndexEnum for CellShape {
const ENUMERATOR_COUNT: usize = 3usize;
}
impl crate::meta::GodotConvert for CellShape {
type Via = i32;
}
impl crate::meta::ToGodot for CellShape {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for CellShape {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,410 @@
#![doc = "Sidecar module for class [`AcceptDialog`][crate::classes::AcceptDialog].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AcceptDialog` enums](https://docs.godotengine.org/en/stable/classes/class_acceptdialog.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AcceptDialog.`\n\nInherits [`Window`][crate::classes::Window].\n\nRelated symbols:\n\n* [`accept_dialog`][crate::classes::accept_dialog]: sidecar module with related enum/flag types\n* [`IAcceptDialog`][crate::classes::IAcceptDialog]: virtual methods\n\n\nSee also [Godot docs for `AcceptDialog`](https://docs.godotengine.org/en/stable/classes/class_acceptdialog.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`AcceptDialog::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct AcceptDialog {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AcceptDialog`][crate::classes::AcceptDialog].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AcceptDialog` methods](https://docs.godotengine.org/en/stable/classes/class_acceptdialog.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAcceptDialog: crate::obj::GodotClass < Base = AcceptDialog > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: WindowNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_contents_minimum_size(&self,) -> Vector2 {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl AcceptDialog {
pub fn get_ok_button(&mut self,) -> Option < Gd < crate::classes::Button > > {
type CallSig = (Option < Gd < crate::classes::Button > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(82usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "get_ok_button", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_label(&mut self,) -> Option < Gd < crate::classes::Label > > {
type CallSig = (Option < Gd < crate::classes::Label > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(83usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "get_label", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_hide_on_ok(&mut self, enabled: bool,) {
type CallSig = ((), bool);
let args = (enabled,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(84usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "set_hide_on_ok", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_hide_on_ok(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(85usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "get_hide_on_ok", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_close_on_escape(&mut self, enabled: bool,) {
type CallSig = ((), bool);
let args = (enabled,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(86usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "set_close_on_escape", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_close_on_escape(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(87usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "get_close_on_escape", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn add_button_full(&mut self, text: CowArg < GString >, right: bool, action: CowArg < GString >,) -> Option < Gd < crate::classes::Button > > {
type CallSig < 'a0, 'a1, > = (Option < Gd < crate::classes::Button > >, CowArg < 'a0, GString >, bool, CowArg < 'a1, GString >);
let args = (text, right, action,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(88usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "add_button", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::add_button_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn add_button(&mut self, text: impl AsArg < GString >,) -> Option < Gd < crate::classes::Button > > {
self.add_button_ex(text,) . done()
}
#[inline]
pub fn add_button_ex < 'a > (&'a mut self, text: impl AsArg < GString > + 'a,) -> ExAddButton < 'a > {
ExAddButton::new(self, text,)
}
pub fn add_cancel_button(&mut self, name: impl AsArg < GString >,) -> Option < Gd < crate::classes::Button > > {
type CallSig < 'a0, > = (Option < Gd < crate::classes::Button > >, CowArg < 'a0, GString >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(89usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "add_cancel_button", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_button(&mut self, button: impl AsObjectArg < crate::classes::Button >,) {
type CallSig = ((), ObjectArg < crate::classes::Button >);
let args = (button.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(90usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "remove_button", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn register_text_enter(&mut self, line_edit: impl AsObjectArg < crate::classes::LineEdit >,) {
type CallSig = ((), ObjectArg < crate::classes::LineEdit >);
let args = (line_edit.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(91usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "register_text_enter", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_text(&mut self, text: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(92usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "set_text", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_text(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(93usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "get_text", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_autowrap(&mut self, autowrap: bool,) {
type CallSig = ((), bool);
let args = (autowrap,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(94usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "set_autowrap", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_autowrap(&mut self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(95usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "has_autowrap", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_ok_button_text(&mut self, text: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(96usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "set_ok_button_text", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_ok_button_text(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(97usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AcceptDialog", "get_ok_button_text", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AcceptDialog {
type Base = crate::classes::Window;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AcceptDialog"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AcceptDialog {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Window > for AcceptDialog {
}
unsafe impl crate::obj::Inherits < crate::classes::Viewport > for AcceptDialog {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for AcceptDialog {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AcceptDialog {
}
impl crate::obj::cap::GodotDefault for AcceptDialog {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AcceptDialog {
type Target = crate::classes::Window;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AcceptDialog {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AcceptDialog`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AcceptDialog {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AcceptDialog > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Window > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Viewport > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AcceptDialog::add_button_ex`][super::AcceptDialog::add_button_ex]."]
#[must_use]
pub struct ExAddButton < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AcceptDialog, text: CowArg < 'a, GString >, right: bool, action: CowArg < 'a, GString >,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExAddButton < 'a > {
fn new(surround_object: &'a mut re_export::AcceptDialog, text: impl AsArg < GString > + 'a,) -> Self {
let right = false;
let action = GString::from("");
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, text: text.into_arg(), right: right, action: CowArg::Owned(action),
}
}
#[inline]
pub fn right(self, right: bool) -> Self {
Self {
right: right, .. self
}
}
#[inline]
pub fn action(self, action: impl AsArg < GString > + 'a) -> Self {
Self {
action: action.into_arg(), .. self
}
}
#[inline]
pub fn done(self) -> Option < Gd < crate::classes::Button > > {
let Self {
_phantom, surround_object, text, right, action,
}
= self;
re_export::AcceptDialog::add_button_full(surround_object, text, right, action,)
}
}

View File

@@ -0,0 +1,351 @@
#![doc = "Sidecar module for class [`AesContext`][crate::classes::AesContext].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AESContext` enums](https://docs.godotengine.org/en/stable/classes/class_aescontext.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AESContext.`\n\nInherits [`RefCounted`][crate::classes::RefCounted].\n\nRelated symbols:\n\n* [`aes_context`][crate::classes::aes_context]: sidecar module with related enum/flag types\n* [`IAesContext`][crate::classes::IAesContext]: virtual methods\n\n\nSee also [Godot docs for `AESContext`](https://docs.godotengine.org/en/stable/classes/class_aescontext.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AesContext::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AesContext {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AesContext`][crate::classes::AesContext].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AESContext` methods](https://docs.godotengine.org/en/stable/classes/class_aescontext.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAesContext: crate::obj::GodotClass < Base = AesContext > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
}
impl AesContext {
pub(crate) fn start_full(&mut self, mode: crate::classes::aes_context::Mode, key: RefArg < PackedByteArray >, iv: RefArg < PackedByteArray >,) -> crate::global::Error {
type CallSig < 'a0, 'a1, > = (crate::global::Error, crate::classes::aes_context::Mode, RefArg < 'a0, PackedByteArray >, RefArg < 'a1, PackedByteArray >);
let args = (mode, key, iv,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(0usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AesContext", "start", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::start_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn start(&mut self, mode: crate::classes::aes_context::Mode, key: &PackedByteArray,) -> crate::global::Error {
self.start_ex(mode, key,) . done()
}
#[inline]
pub fn start_ex < 'a > (&'a mut self, mode: crate::classes::aes_context::Mode, key: &'a PackedByteArray,) -> ExStart < 'a > {
ExStart::new(self, mode, key,)
}
pub fn update(&mut self, src: &PackedByteArray,) -> PackedByteArray {
type CallSig < 'a0, > = (PackedByteArray, RefArg < 'a0, PackedByteArray >);
let args = (RefArg::new(src),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(1usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AesContext", "update", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_iv_state(&mut self,) -> PackedByteArray {
type CallSig = (PackedByteArray,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(2usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AesContext", "get_iv_state", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn finish(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(3usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AesContext", "finish", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AesContext {
type Base = crate::classes::RefCounted;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AESContext"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AesContext {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::No;
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AesContext {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AesContext {
}
impl crate::obj::cap::GodotDefault for AesContext {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AesContext {
type Target = crate::classes::RefCounted;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AesContext {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AesContext`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AesContext {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AesContext > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AesContext::start_ex`][super::AesContext::start_ex]."]
#[must_use]
pub struct ExStart < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AesContext, mode: crate::classes::aes_context::Mode, key: CowArg < 'a, PackedByteArray >, iv: CowArg < 'a, PackedByteArray >,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExStart < 'a > {
fn new(surround_object: &'a mut re_export::AesContext, mode: crate::classes::aes_context::Mode, key: &'a PackedByteArray,) -> Self {
let iv = PackedByteArray::new();
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, mode: mode, key: CowArg::Borrowed(key), iv: CowArg::Owned(iv),
}
}
#[inline]
pub fn iv(self, iv: &'a PackedByteArray) -> Self {
Self {
iv: CowArg::Borrowed(iv), .. self
}
}
#[inline]
pub fn done(self) -> crate::global::Error {
let Self {
_phantom, surround_object, mode, key, iv,
}
= self;
re_export::AesContext::start_full(surround_object, mode, key.cow_as_arg(), iv.cow_as_arg(),)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Mode {
ord: i32
}
impl Mode {
#[doc(alias = "MODE_ECB_ENCRYPT")]
#[doc = "Godot enumerator name: `MODE_ECB_ENCRYPT`"]
pub const ECB_ENCRYPT: Mode = Mode {
ord: 0i32
};
#[doc(alias = "MODE_ECB_DECRYPT")]
#[doc = "Godot enumerator name: `MODE_ECB_DECRYPT`"]
pub const ECB_DECRYPT: Mode = Mode {
ord: 1i32
};
#[doc(alias = "MODE_CBC_ENCRYPT")]
#[doc = "Godot enumerator name: `MODE_CBC_ENCRYPT`"]
pub const CBC_ENCRYPT: Mode = Mode {
ord: 2i32
};
#[doc(alias = "MODE_CBC_DECRYPT")]
#[doc = "Godot enumerator name: `MODE_CBC_DECRYPT`"]
pub const CBC_DECRYPT: Mode = Mode {
ord: 3i32
};
#[doc(alias = "MODE_MAX")]
#[doc = "Godot enumerator name: `MODE_MAX`"]
pub const MAX: Mode = Mode {
ord: 4i32
};
}
impl std::fmt::Debug for Mode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("Mode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for Mode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 | ord @ 4i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::ECB_ENCRYPT => "ECB_ENCRYPT", Self::ECB_DECRYPT => "ECB_DECRYPT", Self::CBC_ENCRYPT => "CBC_ENCRYPT", Self::CBC_DECRYPT => "CBC_DECRYPT", Self::MAX => "MAX", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::ECB_ENCRYPT => "MODE_ECB_ENCRYPT", Self::ECB_DECRYPT => "MODE_ECB_DECRYPT", Self::CBC_ENCRYPT => "MODE_CBC_ENCRYPT", Self::CBC_DECRYPT => "MODE_CBC_DECRYPT", Self::MAX => "MODE_MAX", _ => self.as_str(),
}
}
}
impl crate::obj::IndexEnum for Mode {
const ENUMERATOR_COUNT: usize = 4usize;
}
impl crate::meta::GodotConvert for Mode {
type Via = i32;
}
impl crate::meta::ToGodot for Mode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for Mode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,287 @@
#![doc = "Sidecar module for class [`AnimatableBody2D`][crate::classes::AnimatableBody2D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimatableBody2D` enums](https://docs.godotengine.org/en/stable/classes/class_animatablebody2d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimatableBody2D.`\n\nInherits [`StaticBody2D`][crate::classes::StaticBody2D].\n\nRelated symbols:\n\n* [`IAnimatableBody2D`][crate::classes::IAnimatableBody2D]: virtual methods\n\n\nSee also [Godot docs for `AnimatableBody2D`](https://docs.godotengine.org/en/stable/classes/class_animatablebody2d.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`AnimatableBody2D::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimatableBody2D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimatableBody2D`][crate::classes::AnimatableBody2D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimatableBody2D` methods](https://docs.godotengine.org/en/stable/classes/class_animatablebody2d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimatableBody2D: crate::obj::GodotClass < Base = AnimatableBody2D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: CanvasItemNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn input_event(&mut self, viewport: Gd < crate::classes::Viewport >, event: Gd < crate::classes::InputEvent >, shape_idx: i32,) {
unimplemented !()
}
fn mouse_enter(&mut self,) {
unimplemented !()
}
fn mouse_exit(&mut self,) {
unimplemented !()
}
fn mouse_shape_enter(&mut self, shape_idx: i32,) {
unimplemented !()
}
fn mouse_shape_exit(&mut self, shape_idx: i32,) {
unimplemented !()
}
fn draw(&mut self,) {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl AnimatableBody2D {
pub fn set_sync_to_physics(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(98usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatableBody2D", "set_sync_to_physics", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_sync_to_physics_enabled(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(99usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatableBody2D", "is_sync_to_physics_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimatableBody2D {
type Base = crate::classes::StaticBody2D;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimatableBody2D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimatableBody2D {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::StaticBody2D > for AnimatableBody2D {
}
unsafe impl crate::obj::Inherits < crate::classes::PhysicsBody2D > for AnimatableBody2D {
}
unsafe impl crate::obj::Inherits < crate::classes::CollisionObject2D > for AnimatableBody2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node2D > for AnimatableBody2D {
}
unsafe impl crate::obj::Inherits < crate::classes::CanvasItem > for AnimatableBody2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for AnimatableBody2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimatableBody2D {
}
impl crate::obj::cap::GodotDefault for AnimatableBody2D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimatableBody2D {
type Target = crate::classes::StaticBody2D;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimatableBody2D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimatableBody2D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimatableBody2D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimatableBody2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::StaticBody2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::PhysicsBody2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::CollisionObject2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::CanvasItem > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,272 @@
#![doc = "Sidecar module for class [`AnimatableBody3D`][crate::classes::AnimatableBody3D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimatableBody3D` enums](https://docs.godotengine.org/en/stable/classes/class_animatablebody3d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimatableBody3D.`\n\nInherits [`StaticBody3D`][crate::classes::StaticBody3D].\n\nRelated symbols:\n\n* [`IAnimatableBody3D`][crate::classes::IAnimatableBody3D]: virtual methods\n\n\nSee also [Godot docs for `AnimatableBody3D`](https://docs.godotengine.org/en/stable/classes/class_animatablebody3d.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`AnimatableBody3D::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimatableBody3D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimatableBody3D`][crate::classes::AnimatableBody3D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimatableBody3D` methods](https://docs.godotengine.org/en/stable/classes/class_animatablebody3d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimatableBody3D: crate::obj::GodotClass < Base = AnimatableBody3D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: Node3DNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn input_event(&mut self, camera: Option < Gd < crate::classes::Camera3D > >, event: Option < Gd < crate::classes::InputEvent > >, event_position: Vector3, normal: Vector3, shape_idx: i32,) {
unimplemented !()
}
fn mouse_enter(&mut self,) {
unimplemented !()
}
fn mouse_exit(&mut self,) {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl AnimatableBody3D {
pub fn set_sync_to_physics(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(100usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatableBody3D", "set_sync_to_physics", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_sync_to_physics_enabled(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(101usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatableBody3D", "is_sync_to_physics_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimatableBody3D {
type Base = crate::classes::StaticBody3D;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimatableBody3D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimatableBody3D {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::StaticBody3D > for AnimatableBody3D {
}
unsafe impl crate::obj::Inherits < crate::classes::PhysicsBody3D > for AnimatableBody3D {
}
unsafe impl crate::obj::Inherits < crate::classes::CollisionObject3D > for AnimatableBody3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node3D > for AnimatableBody3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for AnimatableBody3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimatableBody3D {
}
impl crate::obj::cap::GodotDefault for AnimatableBody3D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimatableBody3D {
type Target = crate::classes::StaticBody3D;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimatableBody3D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimatableBody3D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimatableBody3D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimatableBody3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::StaticBody3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::PhysicsBody3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::CollisionObject3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,542 @@
#![doc = "Sidecar module for class [`AnimatedSprite2D`][crate::classes::AnimatedSprite2D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimatedSprite2D` enums](https://docs.godotengine.org/en/stable/classes/class_animatedsprite2d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimatedSprite2D.`\n\nInherits [`Node2D`][crate::classes::Node2D].\n\nRelated symbols:\n\n* [`animated_sprite_2d`][crate::classes::animated_sprite_2d]: sidecar module with related enum/flag types\n* [`IAnimatedSprite2D`][crate::classes::IAnimatedSprite2D]: virtual methods\n\n\nSee also [Godot docs for `AnimatedSprite2D`](https://docs.godotengine.org/en/stable/classes/class_animatedsprite2d.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`AnimatedSprite2D::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimatedSprite2D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimatedSprite2D`][crate::classes::AnimatedSprite2D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimatedSprite2D` methods](https://docs.godotengine.org/en/stable/classes/class_animatedsprite2d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimatedSprite2D: crate::obj::GodotClass < Base = AnimatedSprite2D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: CanvasItemNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn draw(&mut self,) {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl AnimatedSprite2D {
pub fn set_sprite_frames(&mut self, sprite_frames: impl AsObjectArg < crate::classes::SpriteFrames >,) {
type CallSig = ((), ObjectArg < crate::classes::SpriteFrames >);
let args = (sprite_frames.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(102usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_sprite_frames", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_sprite_frames(&self,) -> Option < Gd < crate::classes::SpriteFrames > > {
type CallSig = (Option < Gd < crate::classes::SpriteFrames > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(103usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "get_sprite_frames", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_animation(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(104usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(105usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "get_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_autoplay(&mut self, name: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(106usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_autoplay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_autoplay(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(107usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "get_autoplay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_playing(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(108usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "is_playing", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn play_full(&mut self, name: CowArg < StringName >, custom_speed: f32, from_end: bool,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, f32, bool);
let args = (name, custom_speed, from_end,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(109usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "play", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::play_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn play(&mut self,) {
self.play_ex() . done()
}
#[inline]
pub fn play_ex < 'a > (&'a mut self,) -> ExPlay < 'a > {
ExPlay::new(self,)
}
pub(crate) fn play_backwards_full(&mut self, name: CowArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(110usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "play_backwards", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::play_backwards_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn play_backwards(&mut self,) {
self.play_backwards_ex() . done()
}
#[inline]
pub fn play_backwards_ex < 'a > (&'a mut self,) -> ExPlayBackwards < 'a > {
ExPlayBackwards::new(self,)
}
pub fn pause(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(111usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "pause", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn stop(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(112usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "stop", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_centered(&mut self, centered: bool,) {
type CallSig = ((), bool);
let args = (centered,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(113usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_centered", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_centered(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(114usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "is_centered", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_offset(&mut self, offset: Vector2,) {
type CallSig = ((), Vector2);
let args = (offset,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(115usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_offset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_offset(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(116usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "get_offset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_flip_h(&mut self, flip_h: bool,) {
type CallSig = ((), bool);
let args = (flip_h,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(117usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_flip_h", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_flipped_h(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(118usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "is_flipped_h", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_flip_v(&mut self, flip_v: bool,) {
type CallSig = ((), bool);
let args = (flip_v,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(119usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_flip_v", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_flipped_v(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(120usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "is_flipped_v", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_frame(&mut self, frame: i32,) {
type CallSig = ((), i32);
let args = (frame,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(121usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_frame", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_frame(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(122usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "get_frame", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_frame_progress(&mut self, progress: f32,) {
type CallSig = ((), f32);
let args = (progress,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(123usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_frame_progress", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_frame_progress(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(124usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "get_frame_progress", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_frame_and_progress(&mut self, frame: i32, progress: f32,) {
type CallSig = ((), i32, f32);
let args = (frame, progress,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(125usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_frame_and_progress", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_speed_scale(&mut self, speed_scale: f32,) {
type CallSig = ((), f32);
let args = (speed_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(126usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "set_speed_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_speed_scale(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(127usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "get_speed_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_playing_speed(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(128usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite2D", "get_playing_speed", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimatedSprite2D {
type Base = crate::classes::Node2D;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimatedSprite2D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimatedSprite2D {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Node2D > for AnimatedSprite2D {
}
unsafe impl crate::obj::Inherits < crate::classes::CanvasItem > for AnimatedSprite2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for AnimatedSprite2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimatedSprite2D {
}
impl crate::obj::cap::GodotDefault for AnimatedSprite2D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimatedSprite2D {
type Target = crate::classes::Node2D;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimatedSprite2D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimatedSprite2D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimatedSprite2D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimatedSprite2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::CanvasItem > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimatedSprite2D::play_ex`][super::AnimatedSprite2D::play_ex]."]
#[must_use]
pub struct ExPlay < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimatedSprite2D, name: CowArg < 'a, StringName >, custom_speed: f32, from_end: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExPlay < 'a > {
fn new(surround_object: &'a mut re_export::AnimatedSprite2D,) -> Self {
let name = StringName::from("");
let custom_speed = 1f32;
let from_end = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: CowArg::Owned(name), custom_speed: custom_speed, from_end: from_end,
}
}
#[inline]
pub fn name(self, name: impl AsArg < StringName > + 'a) -> Self {
Self {
name: name.into_arg(), .. self
}
}
#[inline]
pub fn custom_speed(self, custom_speed: f32) -> Self {
Self {
custom_speed: custom_speed, .. self
}
}
#[inline]
pub fn from_end(self, from_end: bool) -> Self {
Self {
from_end: from_end, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name, custom_speed, from_end,
}
= self;
re_export::AnimatedSprite2D::play_full(surround_object, name, custom_speed, from_end,)
}
}
#[doc = "Default-param extender for [`AnimatedSprite2D::play_backwards_ex`][super::AnimatedSprite2D::play_backwards_ex]."]
#[must_use]
pub struct ExPlayBackwards < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimatedSprite2D, name: CowArg < 'a, StringName >,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExPlayBackwards < 'a > {
fn new(surround_object: &'a mut re_export::AnimatedSprite2D,) -> Self {
let name = StringName::from("");
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: CowArg::Owned(name),
}
}
#[inline]
pub fn name(self, name: impl AsArg < StringName > + 'a) -> Self {
Self {
name: name.into_arg(), .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name,
}
= self;
re_export::AnimatedSprite2D::play_backwards_full(surround_object, name,)
}
}

View File

@@ -0,0 +1,490 @@
#![doc = "Sidecar module for class [`AnimatedSprite3D`][crate::classes::AnimatedSprite3D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimatedSprite3D` enums](https://docs.godotengine.org/en/stable/classes/class_animatedsprite3d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimatedSprite3D.`\n\nInherits [`SpriteBase3D`][crate::classes::SpriteBase3D].\n\nRelated symbols:\n\n* [`animated_sprite_3d`][crate::classes::animated_sprite_3d]: sidecar module with related enum/flag types\n* [`IAnimatedSprite3D`][crate::classes::IAnimatedSprite3D]: virtual methods\n\n\nSee also [Godot docs for `AnimatedSprite3D`](https://docs.godotengine.org/en/stable/classes/class_animatedsprite3d.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`AnimatedSprite3D::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimatedSprite3D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimatedSprite3D`][crate::classes::AnimatedSprite3D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimatedSprite3D` methods](https://docs.godotengine.org/en/stable/classes/class_animatedsprite3d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimatedSprite3D: crate::obj::GodotClass < Base = AnimatedSprite3D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: Node3DNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_aabb(&self,) -> Aabb {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl AnimatedSprite3D {
pub fn set_sprite_frames(&mut self, sprite_frames: impl AsObjectArg < crate::classes::SpriteFrames >,) {
type CallSig = ((), ObjectArg < crate::classes::SpriteFrames >);
let args = (sprite_frames.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(129usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "set_sprite_frames", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_sprite_frames(&self,) -> Option < Gd < crate::classes::SpriteFrames > > {
type CallSig = (Option < Gd < crate::classes::SpriteFrames > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(130usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "get_sprite_frames", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_animation(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(131usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "set_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(132usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "get_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_autoplay(&mut self, name: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(133usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "set_autoplay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_autoplay(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(134usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "get_autoplay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_playing(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(135usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "is_playing", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn play_full(&mut self, name: CowArg < StringName >, custom_speed: f32, from_end: bool,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, f32, bool);
let args = (name, custom_speed, from_end,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(136usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "play", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::play_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn play(&mut self,) {
self.play_ex() . done()
}
#[inline]
pub fn play_ex < 'a > (&'a mut self,) -> ExPlay < 'a > {
ExPlay::new(self,)
}
pub(crate) fn play_backwards_full(&mut self, name: CowArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(137usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "play_backwards", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::play_backwards_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn play_backwards(&mut self,) {
self.play_backwards_ex() . done()
}
#[inline]
pub fn play_backwards_ex < 'a > (&'a mut self,) -> ExPlayBackwards < 'a > {
ExPlayBackwards::new(self,)
}
pub fn pause(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(138usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "pause", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn stop(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(139usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "stop", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_frame(&mut self, frame: i32,) {
type CallSig = ((), i32);
let args = (frame,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(140usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "set_frame", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_frame(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(141usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "get_frame", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_frame_progress(&mut self, progress: f32,) {
type CallSig = ((), f32);
let args = (progress,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(142usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "set_frame_progress", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_frame_progress(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(143usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "get_frame_progress", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_frame_and_progress(&mut self, frame: i32, progress: f32,) {
type CallSig = ((), i32, f32);
let args = (frame, progress,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(144usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "set_frame_and_progress", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_speed_scale(&mut self, speed_scale: f32,) {
type CallSig = ((), f32);
let args = (speed_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(145usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "set_speed_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_speed_scale(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(146usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "get_speed_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_playing_speed(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(147usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedSprite3D", "get_playing_speed", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimatedSprite3D {
type Base = crate::classes::SpriteBase3D;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimatedSprite3D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimatedSprite3D {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::SpriteBase3D > for AnimatedSprite3D {
}
unsafe impl crate::obj::Inherits < crate::classes::GeometryInstance3D > for AnimatedSprite3D {
}
unsafe impl crate::obj::Inherits < crate::classes::VisualInstance3D > for AnimatedSprite3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node3D > for AnimatedSprite3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for AnimatedSprite3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimatedSprite3D {
}
impl crate::obj::cap::GodotDefault for AnimatedSprite3D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimatedSprite3D {
type Target = crate::classes::SpriteBase3D;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimatedSprite3D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimatedSprite3D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimatedSprite3D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimatedSprite3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::SpriteBase3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::GeometryInstance3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::VisualInstance3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimatedSprite3D::play_ex`][super::AnimatedSprite3D::play_ex]."]
#[must_use]
pub struct ExPlay < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimatedSprite3D, name: CowArg < 'a, StringName >, custom_speed: f32, from_end: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExPlay < 'a > {
fn new(surround_object: &'a mut re_export::AnimatedSprite3D,) -> Self {
let name = StringName::from("");
let custom_speed = 1f32;
let from_end = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: CowArg::Owned(name), custom_speed: custom_speed, from_end: from_end,
}
}
#[inline]
pub fn name(self, name: impl AsArg < StringName > + 'a) -> Self {
Self {
name: name.into_arg(), .. self
}
}
#[inline]
pub fn custom_speed(self, custom_speed: f32) -> Self {
Self {
custom_speed: custom_speed, .. self
}
}
#[inline]
pub fn from_end(self, from_end: bool) -> Self {
Self {
from_end: from_end, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name, custom_speed, from_end,
}
= self;
re_export::AnimatedSprite3D::play_full(surround_object, name, custom_speed, from_end,)
}
}
#[doc = "Default-param extender for [`AnimatedSprite3D::play_backwards_ex`][super::AnimatedSprite3D::play_backwards_ex]."]
#[must_use]
pub struct ExPlayBackwards < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimatedSprite3D, name: CowArg < 'a, StringName >,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExPlayBackwards < 'a > {
fn new(surround_object: &'a mut re_export::AnimatedSprite3D,) -> Self {
let name = StringName::from("");
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: CowArg::Owned(name),
}
}
#[inline]
pub fn name(self, name: impl AsArg < StringName > + 'a) -> Self {
Self {
name: name.into_arg(), .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name,
}
= self;
re_export::AnimatedSprite3D::play_backwards_full(surround_object, name,)
}
}

View File

@@ -0,0 +1,345 @@
#![doc = "Sidecar module for class [`AnimatedTexture`][crate::classes::AnimatedTexture].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimatedTexture` enums](https://docs.godotengine.org/en/stable/classes/class_animatedtexture.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimatedTexture.`\n\nInherits [`Texture2D`][crate::classes::Texture2D].\n\nRelated symbols:\n\n* [`IAnimatedTexture`][crate::classes::IAnimatedTexture]: virtual methods\n\n\nSee also [Godot docs for `AnimatedTexture`](https://docs.godotengine.org/en/stable/classes/class_animatedtexture.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimatedTexture::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimatedTexture {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimatedTexture`][crate::classes::AnimatedTexture].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimatedTexture` methods](https://docs.godotengine.org/en/stable/classes/class_animatedtexture.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimatedTexture: crate::obj::GodotClass < Base = AnimatedTexture > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_width(&self,) -> i32;
fn get_height(&self,) -> i32;
fn is_pixel_opaque(&self, x: i32, y: i32,) -> bool {
unimplemented !()
}
fn has_alpha(&self,) -> bool {
unimplemented !()
}
fn draw(&self, to_canvas_item: Rid, pos: Vector2, modulate: Color, transpose: bool,) {
unimplemented !()
}
fn draw_rect(&self, to_canvas_item: Rid, rect: Rect2, tile: bool, modulate: Color, transpose: bool,) {
unimplemented !()
}
fn draw_rect_region(&self, to_canvas_item: Rid, rect: Rect2, src_rect: Rect2, modulate: Color, transpose: bool, clip_uv: bool,) {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimatedTexture {
pub fn set_frames(&mut self, frames: i32,) {
type CallSig = ((), i32);
let args = (frames,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(148usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "set_frames", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_frames(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(149usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "get_frames", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_current_frame(&mut self, frame: i32,) {
type CallSig = ((), i32);
let args = (frame,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(150usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "set_current_frame", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_current_frame(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(151usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "get_current_frame", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_pause(&mut self, pause: bool,) {
type CallSig = ((), bool);
let args = (pause,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(152usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "set_pause", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_pause(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(153usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "get_pause", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_one_shot(&mut self, one_shot: bool,) {
type CallSig = ((), bool);
let args = (one_shot,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(154usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "set_one_shot", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_one_shot(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(155usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "get_one_shot", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_speed_scale(&mut self, scale: f32,) {
type CallSig = ((), f32);
let args = (scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(156usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "set_speed_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_speed_scale(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(157usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "get_speed_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_frame_texture(&mut self, frame: i32, texture: impl AsObjectArg < crate::classes::Texture2D >,) {
type CallSig = ((), i32, ObjectArg < crate::classes::Texture2D >);
let args = (frame, texture.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(158usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "set_frame_texture", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_frame_texture(&self, frame: i32,) -> Option < Gd < crate::classes::Texture2D > > {
type CallSig = (Option < Gd < crate::classes::Texture2D > >, i32);
let args = (frame,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(159usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "get_frame_texture", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_frame_duration(&mut self, frame: i32, duration: f32,) {
type CallSig = ((), i32, f32);
let args = (frame, duration,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(160usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "set_frame_duration", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_frame_duration(&self, frame: i32,) -> f32 {
type CallSig = (f32, i32);
let args = (frame,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(161usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimatedTexture", "get_frame_duration", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
pub const MAX_FRAMES: i32 = 256i32;
}
impl crate::obj::GodotClass for AnimatedTexture {
type Base = crate::classes::Texture2D;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimatedTexture"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimatedTexture {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Texture2D > for AnimatedTexture {
}
unsafe impl crate::obj::Inherits < crate::classes::Texture > for AnimatedTexture {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimatedTexture {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimatedTexture {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimatedTexture {
}
impl crate::obj::cap::GodotDefault for AnimatedTexture {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimatedTexture {
type Target = crate::classes::Texture2D;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimatedTexture {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimatedTexture`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimatedTexture {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimatedTexture > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Texture2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Texture > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,250 @@
#![doc = "Sidecar module for class [`AnimationLibrary`][crate::classes::AnimationLibrary].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationLibrary` enums](https://docs.godotengine.org/en/stable/classes/class_animationlibrary.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationLibrary.`\n\nInherits [`Resource`][crate::classes::Resource].\n\nRelated symbols:\n\n* [`IAnimationLibrary`][crate::classes::IAnimationLibrary]: virtual methods\n\n\nSee also [Godot docs for `AnimationLibrary`](https://docs.godotengine.org/en/stable/classes/class_animationlibrary.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationLibrary::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationLibrary {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationLibrary`][crate::classes::AnimationLibrary].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationLibrary` methods](https://docs.godotengine.org/en/stable/classes/class_animationlibrary.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationLibrary: crate::obj::GodotClass < Base = AnimationLibrary > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationLibrary {
pub fn add_animation(&mut self, name: impl AsArg < StringName >, animation: impl AsObjectArg < crate::classes::Animation >,) -> crate::global::Error {
type CallSig < 'a0, > = (crate::global::Error, CowArg < 'a0, StringName >, ObjectArg < crate::classes::Animation >);
let args = (name.into_arg(), animation.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(236usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationLibrary", "add_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_animation(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(237usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationLibrary", "remove_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn rename_animation(&mut self, name: impl AsArg < StringName >, newname: impl AsArg < StringName >,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, CowArg < 'a1, StringName >);
let args = (name.into_arg(), newname.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(238usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationLibrary", "rename_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_animation(&self, name: impl AsArg < StringName >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(239usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationLibrary", "has_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation(&self, name: impl AsArg < StringName >,) -> Option < Gd < crate::classes::Animation > > {
type CallSig < 'a0, > = (Option < Gd < crate::classes::Animation > >, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(240usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationLibrary", "get_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation_list(&self,) -> Array < StringName > {
type CallSig = (Array < StringName >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(241usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationLibrary", "get_animation_list", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationLibrary {
type Base = crate::classes::Resource;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationLibrary"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationLibrary {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationLibrary {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationLibrary {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationLibrary {
}
impl crate::obj::cap::GodotDefault for AnimationLibrary {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationLibrary {
type Target = crate::classes::Resource;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationLibrary {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationLibrary`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationLibrary {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationLibrary > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,789 @@
#![doc = "Sidecar module for class [`AnimationMixer`][crate::classes::AnimationMixer].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationMixer` enums](https://docs.godotengine.org/en/stable/classes/class_animationmixer.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationMixer.`\n\nInherits [`Node`][crate::classes::Node].\n\nRelated symbols:\n\n* [`animation_mixer`][crate::classes::animation_mixer]: sidecar module with related enum/flag types\n* [`IAnimationMixer`][crate::classes::IAnimationMixer]: virtual methods\n\n\nSee also [Godot docs for `AnimationMixer`](https://docs.godotengine.org/en/stable/classes/class_animationmixer.html).\n\n"]
#[doc = "# Not instantiable\n\nThis class cannot be constructed. Obtain `Gd<AnimationMixer>` instances via Godot APIs."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationMixer {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationMixer`][crate::classes::AnimationMixer].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationMixer` methods](https://docs.godotengine.org/en/stable/classes/class_animationmixer.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationMixer: crate::obj::GodotClass < Base = AnimationMixer > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: NodeNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn post_process_key_value(&self, animation: Option < Gd < crate::classes::Animation > >, track: i32, value: Variant, object_id: u64, object_sub_idx: i32,) -> Variant {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl AnimationMixer {
pub fn add_animation_library(&mut self, name: impl AsArg < StringName >, library: impl AsObjectArg < crate::classes::AnimationLibrary >,) -> crate::global::Error {
type CallSig < 'a0, > = (crate::global::Error, CowArg < 'a0, StringName >, ObjectArg < crate::classes::AnimationLibrary >);
let args = (name.into_arg(), library.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(242usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "add_animation_library", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_animation_library(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(243usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "remove_animation_library", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn rename_animation_library(&mut self, name: impl AsArg < StringName >, newname: impl AsArg < StringName >,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, CowArg < 'a1, StringName >);
let args = (name.into_arg(), newname.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(244usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "rename_animation_library", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_animation_library(&self, name: impl AsArg < StringName >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(245usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "has_animation_library", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation_library(&self, name: impl AsArg < StringName >,) -> Option < Gd < crate::classes::AnimationLibrary > > {
type CallSig < 'a0, > = (Option < Gd < crate::classes::AnimationLibrary > >, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(246usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_animation_library", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation_library_list(&self,) -> Array < StringName > {
type CallSig = (Array < StringName >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(247usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_animation_library_list", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_animation(&self, name: impl AsArg < StringName >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(248usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "has_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation(&self, name: impl AsArg < StringName >,) -> Option < Gd < crate::classes::Animation > > {
type CallSig < 'a0, > = (Option < Gd < crate::classes::Animation > >, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(249usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation_list(&self,) -> PackedStringArray {
type CallSig = (PackedStringArray,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(250usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_animation_list", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_active(&mut self, active: bool,) {
type CallSig = ((), bool);
let args = (active,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(251usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "set_active", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_active(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(252usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "is_active", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_deterministic(&mut self, deterministic: bool,) {
type CallSig = ((), bool);
let args = (deterministic,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(253usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "set_deterministic", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_deterministic(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(254usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "is_deterministic", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_root_node(&mut self, path: impl AsArg < NodePath >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, NodePath >);
let args = (path.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(255usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "set_root_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_root_node(&self,) -> NodePath {
type CallSig = (NodePath,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(256usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_root_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_callback_mode_process(&mut self, mode: crate::classes::animation_mixer::AnimationCallbackModeProcess,) {
type CallSig = ((), crate::classes::animation_mixer::AnimationCallbackModeProcess);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(257usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "set_callback_mode_process", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_callback_mode_process(&self,) -> crate::classes::animation_mixer::AnimationCallbackModeProcess {
type CallSig = (crate::classes::animation_mixer::AnimationCallbackModeProcess,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(258usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_callback_mode_process", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_callback_mode_method(&mut self, mode: crate::classes::animation_mixer::AnimationCallbackModeMethod,) {
type CallSig = ((), crate::classes::animation_mixer::AnimationCallbackModeMethod);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(259usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "set_callback_mode_method", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_callback_mode_method(&self,) -> crate::classes::animation_mixer::AnimationCallbackModeMethod {
type CallSig = (crate::classes::animation_mixer::AnimationCallbackModeMethod,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(260usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_callback_mode_method", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_callback_mode_discrete(&mut self, mode: crate::classes::animation_mixer::AnimationCallbackModeDiscrete,) {
type CallSig = ((), crate::classes::animation_mixer::AnimationCallbackModeDiscrete);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(261usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "set_callback_mode_discrete", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_callback_mode_discrete(&self,) -> crate::classes::animation_mixer::AnimationCallbackModeDiscrete {
type CallSig = (crate::classes::animation_mixer::AnimationCallbackModeDiscrete,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(262usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_callback_mode_discrete", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_audio_max_polyphony(&mut self, max_polyphony: i32,) {
type CallSig = ((), i32);
let args = (max_polyphony,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(263usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "set_audio_max_polyphony", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_audio_max_polyphony(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(264usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_audio_max_polyphony", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_root_motion_track(&mut self, path: impl AsArg < NodePath >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, NodePath >);
let args = (path.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(265usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "set_root_motion_track", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_root_motion_track(&self,) -> NodePath {
type CallSig = (NodePath,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(266usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_root_motion_track", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_root_motion_position(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(267usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_root_motion_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_root_motion_rotation(&self,) -> Quaternion {
type CallSig = (Quaternion,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(268usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_root_motion_rotation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_root_motion_scale(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(269usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_root_motion_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_root_motion_position_accumulator(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(270usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_root_motion_position_accumulator", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_root_motion_rotation_accumulator(&self,) -> Quaternion {
type CallSig = (Quaternion,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(271usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_root_motion_rotation_accumulator", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_root_motion_scale_accumulator(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(272usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "get_root_motion_scale_accumulator", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn clear_caches(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(273usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "clear_caches", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn advance(&mut self, delta: f64,) {
type CallSig = ((), f64);
let args = (delta,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(274usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "advance", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn capture_full(&mut self, name: CowArg < StringName >, duration: f64, trans_type: crate::classes::tween::TransitionType, ease_type: crate::classes::tween::EaseType,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, f64, crate::classes::tween::TransitionType, crate::classes::tween::EaseType);
let args = (name, duration, trans_type, ease_type,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(275usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "capture", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::capture_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn capture(&mut self, name: impl AsArg < StringName >, duration: f64,) {
self.capture_ex(name, duration,) . done()
}
#[inline]
pub fn capture_ex < 'a > (&'a mut self, name: impl AsArg < StringName > + 'a, duration: f64,) -> ExCapture < 'a > {
ExCapture::new(self, name, duration,)
}
pub fn set_reset_on_save_enabled(&mut self, enabled: bool,) {
type CallSig = ((), bool);
let args = (enabled,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(276usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "set_reset_on_save_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_reset_on_save_enabled(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(277usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "is_reset_on_save_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn find_animation(&self, animation: impl AsObjectArg < crate::classes::Animation >,) -> StringName {
type CallSig = (StringName, ObjectArg < crate::classes::Animation >);
let args = (animation.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(278usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "find_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn find_animation_library(&self, animation: impl AsObjectArg < crate::classes::Animation >,) -> StringName {
type CallSig = (StringName, ObjectArg < crate::classes::Animation >);
let args = (animation.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(279usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationMixer", "find_animation_library", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationMixer {
type Base = crate::classes::Node;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationMixer"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationMixer {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for AnimationMixer {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationMixer {
}
impl std::ops::Deref for AnimationMixer {
type Target = crate::classes::Node;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationMixer {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationMixer`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationMixer {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationMixer > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimationMixer::capture_ex`][super::AnimationMixer::capture_ex]."]
#[must_use]
pub struct ExCapture < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationMixer, name: CowArg < 'a, StringName >, duration: f64, trans_type: crate::classes::tween::TransitionType, ease_type: crate::classes::tween::EaseType,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExCapture < 'a > {
fn new(surround_object: &'a mut re_export::AnimationMixer, name: impl AsArg < StringName > + 'a, duration: f64,) -> Self {
let trans_type = crate::obj::EngineEnum::from_ord(0);
let ease_type = crate::obj::EngineEnum::from_ord(0);
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: name.into_arg(), duration: duration, trans_type: trans_type, ease_type: ease_type,
}
}
#[inline]
pub fn trans_type(self, trans_type: crate::classes::tween::TransitionType) -> Self {
Self {
trans_type: trans_type, .. self
}
}
#[inline]
pub fn ease_type(self, ease_type: crate::classes::tween::EaseType) -> Self {
Self {
ease_type: ease_type, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name, duration, trans_type, ease_type,
}
= self;
re_export::AnimationMixer::capture_full(surround_object, name, duration, trans_type, ease_type,)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct AnimationCallbackModeProcess {
ord: i32
}
impl AnimationCallbackModeProcess {
#[doc(alias = "ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS")]
#[doc = "Godot enumerator name: `ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`"]
pub const PHYSICS: AnimationCallbackModeProcess = AnimationCallbackModeProcess {
ord: 0i32
};
#[doc(alias = "ANIMATION_CALLBACK_MODE_PROCESS_IDLE")]
#[doc = "Godot enumerator name: `ANIMATION_CALLBACK_MODE_PROCESS_IDLE`"]
pub const IDLE: AnimationCallbackModeProcess = AnimationCallbackModeProcess {
ord: 1i32
};
#[doc(alias = "ANIMATION_CALLBACK_MODE_PROCESS_MANUAL")]
#[doc = "Godot enumerator name: `ANIMATION_CALLBACK_MODE_PROCESS_MANUAL`"]
pub const MANUAL: AnimationCallbackModeProcess = AnimationCallbackModeProcess {
ord: 2i32
};
}
impl std::fmt::Debug for AnimationCallbackModeProcess {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("AnimationCallbackModeProcess") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for AnimationCallbackModeProcess {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::PHYSICS => "PHYSICS", Self::IDLE => "IDLE", Self::MANUAL => "MANUAL", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::PHYSICS => "ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS", Self::IDLE => "ANIMATION_CALLBACK_MODE_PROCESS_IDLE", Self::MANUAL => "ANIMATION_CALLBACK_MODE_PROCESS_MANUAL", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for AnimationCallbackModeProcess {
type Via = i32;
}
impl crate::meta::ToGodot for AnimationCallbackModeProcess {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for AnimationCallbackModeProcess {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct AnimationCallbackModeMethod {
ord: i32
}
impl AnimationCallbackModeMethod {
#[doc(alias = "ANIMATION_CALLBACK_MODE_METHOD_DEFERRED")]
#[doc = "Godot enumerator name: `ANIMATION_CALLBACK_MODE_METHOD_DEFERRED`"]
pub const DEFERRED: AnimationCallbackModeMethod = AnimationCallbackModeMethod {
ord: 0i32
};
#[doc(alias = "ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE")]
#[doc = "Godot enumerator name: `ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE`"]
pub const IMMEDIATE: AnimationCallbackModeMethod = AnimationCallbackModeMethod {
ord: 1i32
};
}
impl std::fmt::Debug for AnimationCallbackModeMethod {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("AnimationCallbackModeMethod") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for AnimationCallbackModeMethod {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DEFERRED => "DEFERRED", Self::IMMEDIATE => "IMMEDIATE", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DEFERRED => "ANIMATION_CALLBACK_MODE_METHOD_DEFERRED", Self::IMMEDIATE => "ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for AnimationCallbackModeMethod {
type Via = i32;
}
impl crate::meta::ToGodot for AnimationCallbackModeMethod {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for AnimationCallbackModeMethod {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct AnimationCallbackModeDiscrete {
ord: i32
}
impl AnimationCallbackModeDiscrete {
#[doc(alias = "ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT")]
#[doc = "Godot enumerator name: `ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT`"]
pub const DOMINANT: AnimationCallbackModeDiscrete = AnimationCallbackModeDiscrete {
ord: 0i32
};
#[doc(alias = "ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE")]
#[doc = "Godot enumerator name: `ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE`"]
pub const RECESSIVE: AnimationCallbackModeDiscrete = AnimationCallbackModeDiscrete {
ord: 1i32
};
#[doc(alias = "ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS")]
#[doc = "Godot enumerator name: `ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS`"]
pub const FORCE_CONTINUOUS: AnimationCallbackModeDiscrete = AnimationCallbackModeDiscrete {
ord: 2i32
};
}
impl std::fmt::Debug for AnimationCallbackModeDiscrete {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("AnimationCallbackModeDiscrete") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for AnimationCallbackModeDiscrete {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DOMINANT => "DOMINANT", Self::RECESSIVE => "RECESSIVE", Self::FORCE_CONTINUOUS => "FORCE_CONTINUOUS", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DOMINANT => "ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT", Self::RECESSIVE => "ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE", Self::FORCE_CONTINUOUS => "ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for AnimationCallbackModeDiscrete {
type Via = i32;
}
impl crate::meta::ToGodot for AnimationCallbackModeDiscrete {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for AnimationCallbackModeDiscrete {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,565 @@
#![doc = "Sidecar module for class [`AnimationNode`][crate::classes::AnimationNode].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNode` enums](https://docs.godotengine.org/en/stable/classes/class_animationnode.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNode.`\n\nInherits [`Resource`][crate::classes::Resource].\n\nRelated symbols:\n\n* [`animation_node`][crate::classes::animation_node]: sidecar module with related enum/flag types\n* [`IAnimationNode`][crate::classes::IAnimationNode]: virtual methods\n\n\nSee also [Godot docs for `AnimationNode`](https://docs.godotengine.org/en/stable/classes/class_animationnode.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNode::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNode {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNode`][crate::classes::AnimationNode].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNode` methods](https://docs.godotengine.org/en/stable/classes/class_animationnode.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNode: crate::obj::GodotClass < Base = AnimationNode > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNode {
pub fn add_input(&mut self, name: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, GString >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(280usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "add_input", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_input(&mut self, index: i32,) {
type CallSig = ((), i32);
let args = (index,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(281usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "remove_input", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_input_name(&mut self, input: i32, name: impl AsArg < GString >,) -> bool {
type CallSig < 'a0, > = (bool, i32, CowArg < 'a0, GString >);
let args = (input, name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(282usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "set_input_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_input_name(&self, input: i32,) -> GString {
type CallSig = (GString, i32);
let args = (input,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(283usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "get_input_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_input_count(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(284usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "get_input_count", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn find_input(&self, name: impl AsArg < GString >,) -> i32 {
type CallSig < 'a0, > = (i32, CowArg < 'a0, GString >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(285usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "find_input", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_filter_path(&mut self, path: impl AsArg < NodePath >, enable: bool,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, NodePath >, bool);
let args = (path.into_arg(), enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(286usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "set_filter_path", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_path_filtered(&self, path: impl AsArg < NodePath >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, NodePath >);
let args = (path.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(287usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "is_path_filtered", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_filter_enabled(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(288usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "set_filter_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_filter_enabled(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(289usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "is_filter_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn blend_animation_full(&mut self, animation: CowArg < StringName >, time: f64, delta: f64, seeked: bool, is_external_seeking: bool, blend: f32, looped_flag: crate::classes::animation::LoopedFlag,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, f64, f64, bool, bool, f32, crate::classes::animation::LoopedFlag);
let args = (animation, time, delta, seeked, is_external_seeking, blend, looped_flag,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(290usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "blend_animation", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::blend_animation_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn blend_animation(&mut self, animation: impl AsArg < StringName >, time: f64, delta: f64, seeked: bool, is_external_seeking: bool, blend: f32,) {
self.blend_animation_ex(animation, time, delta, seeked, is_external_seeking, blend,) . done()
}
#[inline]
pub fn blend_animation_ex < 'a > (&'a mut self, animation: impl AsArg < StringName > + 'a, time: f64, delta: f64, seeked: bool, is_external_seeking: bool, blend: f32,) -> ExBlendAnimation < 'a > {
ExBlendAnimation::new(self, animation, time, delta, seeked, is_external_seeking, blend,)
}
pub(crate) fn blend_node_full(&mut self, name: CowArg < StringName >, node: ObjectArg < crate::classes::AnimationNode >, time: f64, seek: bool, is_external_seeking: bool, blend: f32, filter: crate::classes::animation_node::FilterAction, sync: bool, test_only: bool,) -> f64 {
type CallSig < 'a0, > = (f64, CowArg < 'a0, StringName >, ObjectArg < crate::classes::AnimationNode >, f64, bool, bool, f32, crate::classes::animation_node::FilterAction, bool, bool);
let args = (name, node, time, seek, is_external_seeking, blend, filter, sync, test_only,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(291usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "blend_node", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::blend_node_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn blend_node(&mut self, name: impl AsArg < StringName >, node: impl AsObjectArg < crate::classes::AnimationNode >, time: f64, seek: bool, is_external_seeking: bool, blend: f32,) -> f64 {
self.blend_node_ex(name, node, time, seek, is_external_seeking, blend,) . done()
}
#[inline]
pub fn blend_node_ex < 'a > (&'a mut self, name: impl AsArg < StringName > + 'a, node: impl AsObjectArg < crate::classes::AnimationNode >, time: f64, seek: bool, is_external_seeking: bool, blend: f32,) -> ExBlendNode < 'a > {
ExBlendNode::new(self, name, node, time, seek, is_external_seeking, blend,)
}
pub(crate) fn blend_input_full(&mut self, input_index: i32, time: f64, seek: bool, is_external_seeking: bool, blend: f32, filter: crate::classes::animation_node::FilterAction, sync: bool, test_only: bool,) -> f64 {
type CallSig = (f64, i32, f64, bool, bool, f32, crate::classes::animation_node::FilterAction, bool, bool);
let args = (input_index, time, seek, is_external_seeking, blend, filter, sync, test_only,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(292usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "blend_input", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::blend_input_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn blend_input(&mut self, input_index: i32, time: f64, seek: bool, is_external_seeking: bool, blend: f32,) -> f64 {
self.blend_input_ex(input_index, time, seek, is_external_seeking, blend,) . done()
}
#[inline]
pub fn blend_input_ex < 'a > (&'a mut self, input_index: i32, time: f64, seek: bool, is_external_seeking: bool, blend: f32,) -> ExBlendInput < 'a > {
ExBlendInput::new(self, input_index, time, seek, is_external_seeking, blend,)
}
pub fn set_parameter(&mut self, name: impl AsArg < StringName >, value: &Variant,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, RefArg < 'a1, Variant >);
let args = (name.into_arg(), RefArg::new(value),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(293usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "set_parameter", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_parameter(&self, name: impl AsArg < StringName >,) -> Variant {
type CallSig < 'a0, > = (Variant, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(294usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNode", "get_parameter", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNode {
type Base = crate::classes::Resource;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNode"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNode {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNode {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNode {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNode {
}
impl crate::obj::cap::GodotDefault for AnimationNode {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNode {
type Target = crate::classes::Resource;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNode {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNode`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNode {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimationNode::blend_animation_ex`][super::AnimationNode::blend_animation_ex]."]
#[must_use]
pub struct ExBlendAnimation < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNode, animation: CowArg < 'a, StringName >, time: f64, delta: f64, seeked: bool, is_external_seeking: bool, blend: f32, looped_flag: crate::classes::animation::LoopedFlag,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExBlendAnimation < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNode, animation: impl AsArg < StringName > + 'a, time: f64, delta: f64, seeked: bool, is_external_seeking: bool, blend: f32,) -> Self {
let looped_flag = crate::obj::EngineEnum::from_ord(0);
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, animation: animation.into_arg(), time: time, delta: delta, seeked: seeked, is_external_seeking: is_external_seeking, blend: blend, looped_flag: looped_flag,
}
}
#[inline]
pub fn looped_flag(self, looped_flag: crate::classes::animation::LoopedFlag) -> Self {
Self {
looped_flag: looped_flag, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, animation, time, delta, seeked, is_external_seeking, blend, looped_flag,
}
= self;
re_export::AnimationNode::blend_animation_full(surround_object, animation, time, delta, seeked, is_external_seeking, blend, looped_flag,)
}
}
#[doc = "Default-param extender for [`AnimationNode::blend_node_ex`][super::AnimationNode::blend_node_ex]."]
#[must_use]
pub struct ExBlendNode < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNode, name: CowArg < 'a, StringName >, node: ObjectCow < crate::classes::AnimationNode >, time: f64, seek: bool, is_external_seeking: bool, blend: f32, filter: crate::classes::animation_node::FilterAction, sync: bool, test_only: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExBlendNode < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNode, name: impl AsArg < StringName > + 'a, node: impl AsObjectArg < crate::classes::AnimationNode >, time: f64, seek: bool, is_external_seeking: bool, blend: f32,) -> Self {
let filter = crate::obj::EngineEnum::from_ord(0);
let sync = true;
let test_only = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: name.into_arg(), node: node.consume_arg(), time: time, seek: seek, is_external_seeking: is_external_seeking, blend: blend, filter: filter, sync: sync, test_only: test_only,
}
}
#[inline]
pub fn filter(self, filter: crate::classes::animation_node::FilterAction) -> Self {
Self {
filter: filter, .. self
}
}
#[inline]
pub fn sync(self, sync: bool) -> Self {
Self {
sync: sync, .. self
}
}
#[inline]
pub fn test_only(self, test_only: bool) -> Self {
Self {
test_only: test_only, .. self
}
}
#[inline]
pub fn done(self) -> f64 {
let Self {
_phantom, surround_object, name, node, time, seek, is_external_seeking, blend, filter, sync, test_only,
}
= self;
re_export::AnimationNode::blend_node_full(surround_object, name, node.cow_as_object_arg(), time, seek, is_external_seeking, blend, filter, sync, test_only,)
}
}
#[doc = "Default-param extender for [`AnimationNode::blend_input_ex`][super::AnimationNode::blend_input_ex]."]
#[must_use]
pub struct ExBlendInput < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNode, input_index: i32, time: f64, seek: bool, is_external_seeking: bool, blend: f32, filter: crate::classes::animation_node::FilterAction, sync: bool, test_only: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExBlendInput < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNode, input_index: i32, time: f64, seek: bool, is_external_seeking: bool, blend: f32,) -> Self {
let filter = crate::obj::EngineEnum::from_ord(0);
let sync = true;
let test_only = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, input_index: input_index, time: time, seek: seek, is_external_seeking: is_external_seeking, blend: blend, filter: filter, sync: sync, test_only: test_only,
}
}
#[inline]
pub fn filter(self, filter: crate::classes::animation_node::FilterAction) -> Self {
Self {
filter: filter, .. self
}
}
#[inline]
pub fn sync(self, sync: bool) -> Self {
Self {
sync: sync, .. self
}
}
#[inline]
pub fn test_only(self, test_only: bool) -> Self {
Self {
test_only: test_only, .. self
}
}
#[inline]
pub fn done(self) -> f64 {
let Self {
_phantom, surround_object, input_index, time, seek, is_external_seeking, blend, filter, sync, test_only,
}
= self;
re_export::AnimationNode::blend_input_full(surround_object, input_index, time, seek, is_external_seeking, blend, filter, sync, test_only,)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct FilterAction {
ord: i32
}
impl FilterAction {
#[doc(alias = "FILTER_IGNORE")]
#[doc = "Godot enumerator name: `FILTER_IGNORE`"]
pub const IGNORE: FilterAction = FilterAction {
ord: 0i32
};
#[doc(alias = "FILTER_PASS")]
#[doc = "Godot enumerator name: `FILTER_PASS`"]
pub const PASS: FilterAction = FilterAction {
ord: 1i32
};
#[doc(alias = "FILTER_STOP")]
#[doc = "Godot enumerator name: `FILTER_STOP`"]
pub const STOP: FilterAction = FilterAction {
ord: 2i32
};
#[doc(alias = "FILTER_BLEND")]
#[doc = "Godot enumerator name: `FILTER_BLEND`"]
pub const BLEND: FilterAction = FilterAction {
ord: 3i32
};
}
impl std::fmt::Debug for FilterAction {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("FilterAction") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for FilterAction {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::IGNORE => "IGNORE", Self::PASS => "PASS", Self::STOP => "STOP", Self::BLEND => "BLEND", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::IGNORE => "FILTER_IGNORE", Self::PASS => "FILTER_PASS", Self::STOP => "FILTER_STOP", Self::BLEND => "FILTER_BLEND", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for FilterAction {
type Via = i32;
}
impl crate::meta::ToGodot for FilterAction {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for FilterAction {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,238 @@
#![doc = "Sidecar module for class [`AnimationNodeAdd2`][crate::classes::AnimationNodeAdd2].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeAdd2` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeadd2.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeAdd2.`\n\nInherits [`AnimationNodeSync`][crate::classes::AnimationNodeSync].\n\nRelated symbols:\n\n* [`IAnimationNodeAdd2`][crate::classes::IAnimationNodeAdd2]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeAdd2`](https://docs.godotengine.org/en/stable/classes/class_animationnodeadd2.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeAdd2::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeAdd2 {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeAdd2`][crate::classes::AnimationNodeAdd2].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeAdd2` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeadd2.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeAdd2: crate::obj::GodotClass < Base = AnimationNodeAdd2 > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeAdd2 {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeAdd2 {
type Base = crate::classes::AnimationNodeSync;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeAdd2"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeAdd2 {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNodeSync > for AnimationNodeAdd2 {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeAdd2 {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeAdd2 {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeAdd2 {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeAdd2 {
}
impl crate::obj::cap::GodotDefault for AnimationNodeAdd2 {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeAdd2 {
type Target = crate::classes::AnimationNodeSync;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeAdd2 {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeAdd2`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeAdd2 {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeAdd2 > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeSync > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,238 @@
#![doc = "Sidecar module for class [`AnimationNodeAdd3`][crate::classes::AnimationNodeAdd3].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeAdd3` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeadd3.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeAdd3.`\n\nInherits [`AnimationNodeSync`][crate::classes::AnimationNodeSync].\n\nRelated symbols:\n\n* [`IAnimationNodeAdd3`][crate::classes::IAnimationNodeAdd3]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeAdd3`](https://docs.godotengine.org/en/stable/classes/class_animationnodeadd3.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeAdd3::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeAdd3 {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeAdd3`][crate::classes::AnimationNodeAdd3].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeAdd3` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeadd3.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeAdd3: crate::obj::GodotClass < Base = AnimationNodeAdd3 > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeAdd3 {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeAdd3 {
type Base = crate::classes::AnimationNodeSync;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeAdd3"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeAdd3 {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNodeSync > for AnimationNodeAdd3 {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeAdd3 {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeAdd3 {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeAdd3 {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeAdd3 {
}
impl crate::obj::cap::GodotDefault for AnimationNodeAdd3 {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeAdd3 {
type Target = crate::classes::AnimationNodeSync;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeAdd3 {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeAdd3`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeAdd3 {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeAdd3 > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeSync > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,420 @@
#![doc = "Sidecar module for class [`AnimationNodeAnimation`][crate::classes::AnimationNodeAnimation].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeAnimation` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeanimation.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeAnimation.`\n\nInherits [`AnimationRootNode`][crate::classes::AnimationRootNode].\n\nRelated symbols:\n\n* [`animation_node_animation`][crate::classes::animation_node_animation]: sidecar module with related enum/flag types\n* [`IAnimationNodeAnimation`][crate::classes::IAnimationNodeAnimation]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeAnimation`](https://docs.godotengine.org/en/stable/classes/class_animationnodeanimation.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeAnimation::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeAnimation {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeAnimation`][crate::classes::AnimationNodeAnimation].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeAnimation` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeanimation.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeAnimation: crate::obj::GodotClass < Base = AnimationNodeAnimation > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeAnimation {
pub fn set_animation(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(295usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "set_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(296usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "get_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_play_mode(&mut self, mode: crate::classes::animation_node_animation::PlayMode,) {
type CallSig = ((), crate::classes::animation_node_animation::PlayMode);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(297usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "set_play_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_play_mode(&self,) -> crate::classes::animation_node_animation::PlayMode {
type CallSig = (crate::classes::animation_node_animation::PlayMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(298usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "get_play_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_use_custom_timeline(&mut self, use_custom_timeline: bool,) {
type CallSig = ((), bool);
let args = (use_custom_timeline,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(299usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "set_use_custom_timeline", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_using_custom_timeline(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(300usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "is_using_custom_timeline", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_timeline_length(&mut self, timeline_length: f64,) {
type CallSig = ((), f64);
let args = (timeline_length,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(301usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "set_timeline_length", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_timeline_length(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(302usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "get_timeline_length", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_stretch_time_scale(&mut self, stretch_time_scale: bool,) {
type CallSig = ((), bool);
let args = (stretch_time_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(303usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "set_stretch_time_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_stretching_time_scale(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(304usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "is_stretching_time_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_start_offset(&mut self, start_offset: f64,) {
type CallSig = ((), f64);
let args = (start_offset,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(305usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "set_start_offset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_start_offset(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(306usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "get_start_offset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_loop_mode(&mut self, loop_mode: crate::classes::animation::LoopMode,) {
type CallSig = ((), crate::classes::animation::LoopMode);
let args = (loop_mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(307usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "set_loop_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_loop_mode(&self,) -> crate::classes::animation::LoopMode {
type CallSig = (crate::classes::animation::LoopMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(308usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeAnimation", "get_loop_mode", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeAnimation {
type Base = crate::classes::AnimationRootNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeAnimation"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeAnimation {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationRootNode > for AnimationNodeAnimation {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeAnimation {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeAnimation {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeAnimation {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeAnimation {
}
impl crate::obj::cap::GodotDefault for AnimationNodeAnimation {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeAnimation {
type Target = crate::classes::AnimationRootNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeAnimation {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeAnimation`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeAnimation {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeAnimation > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationRootNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct PlayMode {
ord: i32
}
impl PlayMode {
#[doc(alias = "PLAY_MODE_FORWARD")]
#[doc = "Godot enumerator name: `PLAY_MODE_FORWARD`"]
pub const FORWARD: PlayMode = PlayMode {
ord: 0i32
};
#[doc(alias = "PLAY_MODE_BACKWARD")]
#[doc = "Godot enumerator name: `PLAY_MODE_BACKWARD`"]
pub const BACKWARD: PlayMode = PlayMode {
ord: 1i32
};
}
impl std::fmt::Debug for PlayMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("PlayMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for PlayMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::FORWARD => "FORWARD", Self::BACKWARD => "BACKWARD", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::FORWARD => "PLAY_MODE_FORWARD", Self::BACKWARD => "PLAY_MODE_BACKWARD", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for PlayMode {
type Via = i32;
}
impl crate::meta::ToGodot for PlayMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for PlayMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,238 @@
#![doc = "Sidecar module for class [`AnimationNodeBlend2`][crate::classes::AnimationNodeBlend2].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeBlend2` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeblend2.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeBlend2.`\n\nInherits [`AnimationNodeSync`][crate::classes::AnimationNodeSync].\n\nRelated symbols:\n\n* [`IAnimationNodeBlend2`][crate::classes::IAnimationNodeBlend2]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeBlend2`](https://docs.godotengine.org/en/stable/classes/class_animationnodeblend2.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeBlend2::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeBlend2 {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeBlend2`][crate::classes::AnimationNodeBlend2].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeBlend2` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeblend2.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeBlend2: crate::obj::GodotClass < Base = AnimationNodeBlend2 > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeBlend2 {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeBlend2 {
type Base = crate::classes::AnimationNodeSync;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeBlend2"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeBlend2 {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNodeSync > for AnimationNodeBlend2 {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeBlend2 {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeBlend2 {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeBlend2 {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeBlend2 {
}
impl crate::obj::cap::GodotDefault for AnimationNodeBlend2 {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeBlend2 {
type Target = crate::classes::AnimationNodeSync;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeBlend2 {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeBlend2`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeBlend2 {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeBlend2 > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeSync > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,238 @@
#![doc = "Sidecar module for class [`AnimationNodeBlend3`][crate::classes::AnimationNodeBlend3].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeBlend3` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeblend3.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeBlend3.`\n\nInherits [`AnimationNodeSync`][crate::classes::AnimationNodeSync].\n\nRelated symbols:\n\n* [`IAnimationNodeBlend3`][crate::classes::IAnimationNodeBlend3]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeBlend3`](https://docs.godotengine.org/en/stable/classes/class_animationnodeblend3.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeBlend3::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeBlend3 {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeBlend3`][crate::classes::AnimationNodeBlend3].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeBlend3` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeblend3.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeBlend3: crate::obj::GodotClass < Base = AnimationNodeBlend3 > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeBlend3 {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeBlend3 {
type Base = crate::classes::AnimationNodeSync;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeBlend3"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeBlend3 {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNodeSync > for AnimationNodeBlend3 {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeBlend3 {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeBlend3 {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeBlend3 {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeBlend3 {
}
impl crate::obj::cap::GodotDefault for AnimationNodeBlend3 {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeBlend3 {
type Target = crate::classes::AnimationNodeSync;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeBlend3 {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeBlend3`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeBlend3 {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeBlend3 > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeSync > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,502 @@
#![doc = "Sidecar module for class [`AnimationNodeBlendSpace1D`][crate::classes::AnimationNodeBlendSpace1D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeBlendSpace1D` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeblendspace1d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeBlendSpace1D.`\n\nInherits [`AnimationRootNode`][crate::classes::AnimationRootNode].\n\nRelated symbols:\n\n* [`animation_node_blend_space_1d`][crate::classes::animation_node_blend_space_1d]: sidecar module with related enum/flag types\n* [`IAnimationNodeBlendSpace1D`][crate::classes::IAnimationNodeBlendSpace1D]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeBlendSpace1D`](https://docs.godotengine.org/en/stable/classes/class_animationnodeblendspace1d.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeBlendSpace1D::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeBlendSpace1D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeBlendSpace1D`][crate::classes::AnimationNodeBlendSpace1D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeBlendSpace1D` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeblendspace1d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeBlendSpace1D: crate::obj::GodotClass < Base = AnimationNodeBlendSpace1D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeBlendSpace1D {
pub(crate) fn add_blend_point_full(&mut self, node: ObjectArg < crate::classes::AnimationRootNode >, pos: f32, at_index: i32,) {
type CallSig = ((), ObjectArg < crate::classes::AnimationRootNode >, f32, i32);
let args = (node, pos, at_index,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(309usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "add_blend_point", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::add_blend_point_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn add_blend_point(&mut self, node: impl AsObjectArg < crate::classes::AnimationRootNode >, pos: f32,) {
self.add_blend_point_ex(node, pos,) . done()
}
#[inline]
pub fn add_blend_point_ex < 'a > (&'a mut self, node: impl AsObjectArg < crate::classes::AnimationRootNode >, pos: f32,) -> ExAddBlendPoint < 'a > {
ExAddBlendPoint::new(self, node, pos,)
}
pub fn set_blend_point_position(&mut self, point: i32, pos: f32,) {
type CallSig = ((), i32, f32);
let args = (point, pos,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(310usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "set_blend_point_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_point_position(&self, point: i32,) -> f32 {
type CallSig = (f32, i32);
let args = (point,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(311usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "get_blend_point_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_blend_point_node(&mut self, point: i32, node: impl AsObjectArg < crate::classes::AnimationRootNode >,) {
type CallSig = ((), i32, ObjectArg < crate::classes::AnimationRootNode >);
let args = (point, node.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(312usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "set_blend_point_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_point_node(&self, point: i32,) -> Option < Gd < crate::classes::AnimationRootNode > > {
type CallSig = (Option < Gd < crate::classes::AnimationRootNode > >, i32);
let args = (point,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(313usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "get_blend_point_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_blend_point(&mut self, point: i32,) {
type CallSig = ((), i32);
let args = (point,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(314usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "remove_blend_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_point_count(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(315usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "get_blend_point_count", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_min_space(&mut self, min_space: f32,) {
type CallSig = ((), f32);
let args = (min_space,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(316usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "set_min_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_min_space(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(317usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "get_min_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_max_space(&mut self, max_space: f32,) {
type CallSig = ((), f32);
let args = (max_space,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(318usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "set_max_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_max_space(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(319usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "get_max_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_snap(&mut self, snap: f32,) {
type CallSig = ((), f32);
let args = (snap,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(320usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "set_snap", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_snap(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(321usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "get_snap", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_value_label(&mut self, text: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(322usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "set_value_label", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_value_label(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(323usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "get_value_label", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_blend_mode(&mut self, mode: crate::classes::animation_node_blend_space_1d::BlendMode,) {
type CallSig = ((), crate::classes::animation_node_blend_space_1d::BlendMode);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(324usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "set_blend_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_mode(&self,) -> crate::classes::animation_node_blend_space_1d::BlendMode {
type CallSig = (crate::classes::animation_node_blend_space_1d::BlendMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(325usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "get_blend_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_use_sync(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(326usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "set_use_sync", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_using_sync(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(327usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace1D", "is_using_sync", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeBlendSpace1D {
type Base = crate::classes::AnimationRootNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeBlendSpace1D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeBlendSpace1D {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationRootNode > for AnimationNodeBlendSpace1D {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeBlendSpace1D {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeBlendSpace1D {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeBlendSpace1D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeBlendSpace1D {
}
impl crate::obj::cap::GodotDefault for AnimationNodeBlendSpace1D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeBlendSpace1D {
type Target = crate::classes::AnimationRootNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeBlendSpace1D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeBlendSpace1D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeBlendSpace1D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeBlendSpace1D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationRootNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimationNodeBlendSpace1D::add_blend_point_ex`][super::AnimationNodeBlendSpace1D::add_blend_point_ex]."]
#[must_use]
pub struct ExAddBlendPoint < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNodeBlendSpace1D, node: ObjectCow < crate::classes::AnimationRootNode >, pos: f32, at_index: i32,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExAddBlendPoint < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNodeBlendSpace1D, node: impl AsObjectArg < crate::classes::AnimationRootNode >, pos: f32,) -> Self {
let at_index = - 1i32;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, node: node.consume_arg(), pos: pos, at_index: at_index,
}
}
#[inline]
pub fn at_index(self, at_index: i32) -> Self {
Self {
at_index: at_index, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, node, pos, at_index,
}
= self;
re_export::AnimationNodeBlendSpace1D::add_blend_point_full(surround_object, node.cow_as_object_arg(), pos, at_index,)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct BlendMode {
ord: i32
}
impl BlendMode {
#[doc(alias = "BLEND_MODE_INTERPOLATED")]
#[doc = "Godot enumerator name: `BLEND_MODE_INTERPOLATED`"]
pub const INTERPOLATED: BlendMode = BlendMode {
ord: 0i32
};
#[doc(alias = "BLEND_MODE_DISCRETE")]
#[doc = "Godot enumerator name: `BLEND_MODE_DISCRETE`"]
pub const DISCRETE: BlendMode = BlendMode {
ord: 1i32
};
#[doc(alias = "BLEND_MODE_DISCRETE_CARRY")]
#[doc = "Godot enumerator name: `BLEND_MODE_DISCRETE_CARRY`"]
pub const DISCRETE_CARRY: BlendMode = BlendMode {
ord: 2i32
};
}
impl std::fmt::Debug for BlendMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("BlendMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for BlendMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::INTERPOLATED => "INTERPOLATED", Self::DISCRETE => "DISCRETE", Self::DISCRETE_CARRY => "DISCRETE_CARRY", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::INTERPOLATED => "BLEND_MODE_INTERPOLATED", Self::DISCRETE => "BLEND_MODE_DISCRETE", Self::DISCRETE_CARRY => "BLEND_MODE_DISCRETE_CARRY", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for BlendMode {
type Via = i32;
}
impl crate::meta::ToGodot for BlendMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for BlendMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,603 @@
#![doc = "Sidecar module for class [`AnimationNodeBlendSpace2D`][crate::classes::AnimationNodeBlendSpace2D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeBlendSpace2D` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeblendspace2d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeBlendSpace2D.`\n\nInherits [`AnimationRootNode`][crate::classes::AnimationRootNode].\n\nRelated symbols:\n\n* [`animation_node_blend_space_2d`][crate::classes::animation_node_blend_space_2d]: sidecar module with related enum/flag types\n* [`IAnimationNodeBlendSpace2D`][crate::classes::IAnimationNodeBlendSpace2D]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeBlendSpace2D`](https://docs.godotengine.org/en/stable/classes/class_animationnodeblendspace2d.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeBlendSpace2D::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeBlendSpace2D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeBlendSpace2D`][crate::classes::AnimationNodeBlendSpace2D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeBlendSpace2D` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeblendspace2d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeBlendSpace2D: crate::obj::GodotClass < Base = AnimationNodeBlendSpace2D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeBlendSpace2D {
pub(crate) fn add_blend_point_full(&mut self, node: ObjectArg < crate::classes::AnimationRootNode >, pos: Vector2, at_index: i32,) {
type CallSig = ((), ObjectArg < crate::classes::AnimationRootNode >, Vector2, i32);
let args = (node, pos, at_index,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(328usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "add_blend_point", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::add_blend_point_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn add_blend_point(&mut self, node: impl AsObjectArg < crate::classes::AnimationRootNode >, pos: Vector2,) {
self.add_blend_point_ex(node, pos,) . done()
}
#[inline]
pub fn add_blend_point_ex < 'a > (&'a mut self, node: impl AsObjectArg < crate::classes::AnimationRootNode >, pos: Vector2,) -> ExAddBlendPoint < 'a > {
ExAddBlendPoint::new(self, node, pos,)
}
pub fn set_blend_point_position(&mut self, point: i32, pos: Vector2,) {
type CallSig = ((), i32, Vector2);
let args = (point, pos,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(329usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_blend_point_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_point_position(&self, point: i32,) -> Vector2 {
type CallSig = (Vector2, i32);
let args = (point,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(330usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_blend_point_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_blend_point_node(&mut self, point: i32, node: impl AsObjectArg < crate::classes::AnimationRootNode >,) {
type CallSig = ((), i32, ObjectArg < crate::classes::AnimationRootNode >);
let args = (point, node.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(331usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_blend_point_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_point_node(&self, point: i32,) -> Option < Gd < crate::classes::AnimationRootNode > > {
type CallSig = (Option < Gd < crate::classes::AnimationRootNode > >, i32);
let args = (point,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(332usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_blend_point_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_blend_point(&mut self, point: i32,) {
type CallSig = ((), i32);
let args = (point,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(333usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "remove_blend_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_point_count(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(334usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_blend_point_count", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn add_triangle_full(&mut self, x: i32, y: i32, z: i32, at_index: i32,) {
type CallSig = ((), i32, i32, i32, i32);
let args = (x, y, z, at_index,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(335usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "add_triangle", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::add_triangle_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn add_triangle(&mut self, x: i32, y: i32, z: i32,) {
self.add_triangle_ex(x, y, z,) . done()
}
#[inline]
pub fn add_triangle_ex < 'a > (&'a mut self, x: i32, y: i32, z: i32,) -> ExAddTriangle < 'a > {
ExAddTriangle::new(self, x, y, z,)
}
pub fn get_triangle_point(&mut self, triangle: i32, point: i32,) -> i32 {
type CallSig = (i32, i32, i32);
let args = (triangle, point,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(336usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_triangle_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_triangle(&mut self, triangle: i32,) {
type CallSig = ((), i32);
let args = (triangle,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(337usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "remove_triangle", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_triangle_count(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(338usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_triangle_count", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_min_space(&mut self, min_space: Vector2,) {
type CallSig = ((), Vector2);
let args = (min_space,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(339usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_min_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_min_space(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(340usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_min_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_max_space(&mut self, max_space: Vector2,) {
type CallSig = ((), Vector2);
let args = (max_space,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(341usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_max_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_max_space(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(342usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_max_space", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_snap(&mut self, snap: Vector2,) {
type CallSig = ((), Vector2);
let args = (snap,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(343usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_snap", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_snap(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(344usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_snap", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_x_label(&mut self, text: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(345usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_x_label", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_x_label(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(346usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_x_label", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_y_label(&mut self, text: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(347usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_y_label", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_y_label(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(348usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_y_label", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_auto_triangles(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(349usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_auto_triangles", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_auto_triangles(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(350usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_auto_triangles", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_blend_mode(&mut self, mode: crate::classes::animation_node_blend_space_2d::BlendMode,) {
type CallSig = ((), crate::classes::animation_node_blend_space_2d::BlendMode);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(351usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_blend_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_mode(&self,) -> crate::classes::animation_node_blend_space_2d::BlendMode {
type CallSig = (crate::classes::animation_node_blend_space_2d::BlendMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(352usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "get_blend_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_use_sync(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(353usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "set_use_sync", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_using_sync(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(354usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendSpace2D", "is_using_sync", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeBlendSpace2D {
type Base = crate::classes::AnimationRootNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeBlendSpace2D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeBlendSpace2D {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationRootNode > for AnimationNodeBlendSpace2D {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeBlendSpace2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeBlendSpace2D {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeBlendSpace2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeBlendSpace2D {
}
impl crate::obj::cap::GodotDefault for AnimationNodeBlendSpace2D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeBlendSpace2D {
type Target = crate::classes::AnimationRootNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeBlendSpace2D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeBlendSpace2D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeBlendSpace2D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeBlendSpace2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationRootNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimationNodeBlendSpace2D::add_blend_point_ex`][super::AnimationNodeBlendSpace2D::add_blend_point_ex]."]
#[must_use]
pub struct ExAddBlendPoint < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNodeBlendSpace2D, node: ObjectCow < crate::classes::AnimationRootNode >, pos: Vector2, at_index: i32,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExAddBlendPoint < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNodeBlendSpace2D, node: impl AsObjectArg < crate::classes::AnimationRootNode >, pos: Vector2,) -> Self {
let at_index = - 1i32;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, node: node.consume_arg(), pos: pos, at_index: at_index,
}
}
#[inline]
pub fn at_index(self, at_index: i32) -> Self {
Self {
at_index: at_index, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, node, pos, at_index,
}
= self;
re_export::AnimationNodeBlendSpace2D::add_blend_point_full(surround_object, node.cow_as_object_arg(), pos, at_index,)
}
}
#[doc = "Default-param extender for [`AnimationNodeBlendSpace2D::add_triangle_ex`][super::AnimationNodeBlendSpace2D::add_triangle_ex]."]
#[must_use]
pub struct ExAddTriangle < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNodeBlendSpace2D, x: i32, y: i32, z: i32, at_index: i32,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExAddTriangle < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNodeBlendSpace2D, x: i32, y: i32, z: i32,) -> Self {
let at_index = - 1i32;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, x: x, y: y, z: z, at_index: at_index,
}
}
#[inline]
pub fn at_index(self, at_index: i32) -> Self {
Self {
at_index: at_index, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, x, y, z, at_index,
}
= self;
re_export::AnimationNodeBlendSpace2D::add_triangle_full(surround_object, x, y, z, at_index,)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct BlendMode {
ord: i32
}
impl BlendMode {
#[doc(alias = "BLEND_MODE_INTERPOLATED")]
#[doc = "Godot enumerator name: `BLEND_MODE_INTERPOLATED`"]
pub const INTERPOLATED: BlendMode = BlendMode {
ord: 0i32
};
#[doc(alias = "BLEND_MODE_DISCRETE")]
#[doc = "Godot enumerator name: `BLEND_MODE_DISCRETE`"]
pub const DISCRETE: BlendMode = BlendMode {
ord: 1i32
};
#[doc(alias = "BLEND_MODE_DISCRETE_CARRY")]
#[doc = "Godot enumerator name: `BLEND_MODE_DISCRETE_CARRY`"]
pub const DISCRETE_CARRY: BlendMode = BlendMode {
ord: 2i32
};
}
impl std::fmt::Debug for BlendMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("BlendMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for BlendMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::INTERPOLATED => "INTERPOLATED", Self::DISCRETE => "DISCRETE", Self::DISCRETE_CARRY => "DISCRETE_CARRY", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::INTERPOLATED => "BLEND_MODE_INTERPOLATED", Self::DISCRETE => "BLEND_MODE_DISCRETE", Self::DISCRETE_CARRY => "BLEND_MODE_DISCRETE_CARRY", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for BlendMode {
type Via = i32;
}
impl crate::meta::ToGodot for BlendMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for BlendMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,370 @@
#![doc = "Sidecar module for class [`AnimationNodeBlendTree`][crate::classes::AnimationNodeBlendTree].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeBlendTree` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeblendtree.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeBlendTree.`\n\nInherits [`AnimationRootNode`][crate::classes::AnimationRootNode].\n\nRelated symbols:\n\n* [`animation_node_blend_tree`][crate::classes::animation_node_blend_tree]: sidecar module with related enum/flag types\n* [`IAnimationNodeBlendTree`][crate::classes::IAnimationNodeBlendTree]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeBlendTree`](https://docs.godotengine.org/en/stable/classes/class_animationnodeblendtree.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeBlendTree::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeBlendTree {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeBlendTree`][crate::classes::AnimationNodeBlendTree].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeBlendTree` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeblendtree.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeBlendTree: crate::obj::GodotClass < Base = AnimationNodeBlendTree > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeBlendTree {
pub(crate) fn add_node_full(&mut self, name: CowArg < StringName >, node: ObjectArg < crate::classes::AnimationNode >, position: Vector2,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, ObjectArg < crate::classes::AnimationNode >, Vector2);
let args = (name, node, position,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(355usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "add_node", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::add_node_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn add_node(&mut self, name: impl AsArg < StringName >, node: impl AsObjectArg < crate::classes::AnimationNode >,) {
self.add_node_ex(name, node,) . done()
}
#[inline]
pub fn add_node_ex < 'a > (&'a mut self, name: impl AsArg < StringName > + 'a, node: impl AsObjectArg < crate::classes::AnimationNode >,) -> ExAddNode < 'a > {
ExAddNode::new(self, name, node,)
}
pub fn get_node(&self, name: impl AsArg < StringName >,) -> Option < Gd < crate::classes::AnimationNode > > {
type CallSig < 'a0, > = (Option < Gd < crate::classes::AnimationNode > >, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(356usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "get_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_node(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(357usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "remove_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn rename_node(&mut self, name: impl AsArg < StringName >, new_name: impl AsArg < StringName >,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, CowArg < 'a1, StringName >);
let args = (name.into_arg(), new_name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(358usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "rename_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_node(&self, name: impl AsArg < StringName >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(359usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "has_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn connect_node(&mut self, input_node: impl AsArg < StringName >, input_index: i32, output_node: impl AsArg < StringName >,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, i32, CowArg < 'a1, StringName >);
let args = (input_node.into_arg(), input_index, output_node.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(360usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "connect_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn disconnect_node(&mut self, input_node: impl AsArg < StringName >, input_index: i32,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, i32);
let args = (input_node.into_arg(), input_index,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(361usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "disconnect_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_node_position(&mut self, name: impl AsArg < StringName >, position: Vector2,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, Vector2);
let args = (name.into_arg(), position,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(362usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "set_node_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_node_position(&self, name: impl AsArg < StringName >,) -> Vector2 {
type CallSig < 'a0, > = (Vector2, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(363usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "get_node_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_graph_offset(&mut self, offset: Vector2,) {
type CallSig = ((), Vector2);
let args = (offset,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(364usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "set_graph_offset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_graph_offset(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(365usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeBlendTree", "get_graph_offset", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
pub const CONNECTION_OK: i32 = 0i32;
pub const CONNECTION_ERROR_NO_INPUT: i32 = 1i32;
pub const CONNECTION_ERROR_NO_INPUT_INDEX: i32 = 2i32;
pub const CONNECTION_ERROR_NO_OUTPUT: i32 = 3i32;
pub const CONNECTION_ERROR_SAME_NODE: i32 = 4i32;
pub const CONNECTION_ERROR_CONNECTION_EXISTS: i32 = 5i32;
}
impl crate::obj::GodotClass for AnimationNodeBlendTree {
type Base = crate::classes::AnimationRootNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeBlendTree"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeBlendTree {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationRootNode > for AnimationNodeBlendTree {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeBlendTree {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeBlendTree {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeBlendTree {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeBlendTree {
}
impl crate::obj::cap::GodotDefault for AnimationNodeBlendTree {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeBlendTree {
type Target = crate::classes::AnimationRootNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeBlendTree {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeBlendTree`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeBlendTree {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeBlendTree > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationRootNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimationNodeBlendTree::add_node_ex`][super::AnimationNodeBlendTree::add_node_ex]."]
#[must_use]
pub struct ExAddNode < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNodeBlendTree, name: CowArg < 'a, StringName >, node: ObjectCow < crate::classes::AnimationNode >, position: Vector2,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExAddNode < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNodeBlendTree, name: impl AsArg < StringName > + 'a, node: impl AsObjectArg < crate::classes::AnimationNode >,) -> Self {
let position = Vector2::new(0 as _, 0 as _);
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: name.into_arg(), node: node.consume_arg(), position: position,
}
}
#[inline]
pub fn position(self, position: Vector2) -> Self {
Self {
position: position, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name, node, position,
}
= self;
re_export::AnimationNodeBlendTree::add_node_full(surround_object, name, node.cow_as_object_arg(), position,)
}
}

View File

@@ -0,0 +1,532 @@
#![doc = "Sidecar module for class [`AnimationNodeOneShot`][crate::classes::AnimationNodeOneShot].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeOneShot` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeoneshot.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeOneShot.`\n\nInherits [`AnimationNodeSync`][crate::classes::AnimationNodeSync].\n\nRelated symbols:\n\n* [`animation_node_one_shot`][crate::classes::animation_node_one_shot]: sidecar module with related enum/flag types\n* [`IAnimationNodeOneShot`][crate::classes::IAnimationNodeOneShot]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeOneShot`](https://docs.godotengine.org/en/stable/classes/class_animationnodeoneshot.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeOneShot::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeOneShot {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeOneShot`][crate::classes::AnimationNodeOneShot].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeOneShot` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeoneshot.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeOneShot: crate::obj::GodotClass < Base = AnimationNodeOneShot > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeOneShot {
pub fn set_fadein_time(&mut self, time: f64,) {
type CallSig = ((), f64);
let args = (time,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(366usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "set_fadein_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_fadein_time(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(367usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "get_fadein_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_fadein_curve(&mut self, curve: impl AsObjectArg < crate::classes::Curve >,) {
type CallSig = ((), ObjectArg < crate::classes::Curve >);
let args = (curve.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(368usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "set_fadein_curve", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_fadein_curve(&self,) -> Option < Gd < crate::classes::Curve > > {
type CallSig = (Option < Gd < crate::classes::Curve > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(369usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "get_fadein_curve", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_fadeout_time(&mut self, time: f64,) {
type CallSig = ((), f64);
let args = (time,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(370usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "set_fadeout_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_fadeout_time(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(371usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "get_fadeout_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_fadeout_curve(&mut self, curve: impl AsObjectArg < crate::classes::Curve >,) {
type CallSig = ((), ObjectArg < crate::classes::Curve >);
let args = (curve.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(372usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "set_fadeout_curve", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_fadeout_curve(&self,) -> Option < Gd < crate::classes::Curve > > {
type CallSig = (Option < Gd < crate::classes::Curve > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(373usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "get_fadeout_curve", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_break_loop_at_end(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(374usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "set_break_loop_at_end", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_loop_broken_at_end(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(375usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "is_loop_broken_at_end", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_autorestart(&mut self, active: bool,) {
type CallSig = ((), bool);
let args = (active,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(376usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "set_autorestart", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_autorestart(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(377usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "has_autorestart", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_autorestart_delay(&mut self, time: f64,) {
type CallSig = ((), f64);
let args = (time,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(378usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "set_autorestart_delay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_autorestart_delay(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(379usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "get_autorestart_delay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_autorestart_random_delay(&mut self, time: f64,) {
type CallSig = ((), f64);
let args = (time,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(380usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "set_autorestart_random_delay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_autorestart_random_delay(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(381usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "get_autorestart_random_delay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_mix_mode(&mut self, mode: crate::classes::animation_node_one_shot::MixMode,) {
type CallSig = ((), crate::classes::animation_node_one_shot::MixMode);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(382usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "set_mix_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_mix_mode(&self,) -> crate::classes::animation_node_one_shot::MixMode {
type CallSig = (crate::classes::animation_node_one_shot::MixMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(383usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeOneShot", "get_mix_mode", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeOneShot {
type Base = crate::classes::AnimationNodeSync;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeOneShot"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeOneShot {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNodeSync > for AnimationNodeOneShot {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeOneShot {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeOneShot {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeOneShot {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeOneShot {
}
impl crate::obj::cap::GodotDefault for AnimationNodeOneShot {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeOneShot {
type Target = crate::classes::AnimationNodeSync;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeOneShot {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeOneShot`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeOneShot {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeOneShot > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeSync > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct OneShotRequest {
ord: i32
}
impl OneShotRequest {
#[doc(alias = "ONE_SHOT_REQUEST_NONE")]
#[doc = "Godot enumerator name: `ONE_SHOT_REQUEST_NONE`"]
pub const NONE: OneShotRequest = OneShotRequest {
ord: 0i32
};
#[doc(alias = "ONE_SHOT_REQUEST_FIRE")]
#[doc = "Godot enumerator name: `ONE_SHOT_REQUEST_FIRE`"]
pub const FIRE: OneShotRequest = OneShotRequest {
ord: 1i32
};
#[doc(alias = "ONE_SHOT_REQUEST_ABORT")]
#[doc = "Godot enumerator name: `ONE_SHOT_REQUEST_ABORT`"]
pub const ABORT: OneShotRequest = OneShotRequest {
ord: 2i32
};
#[doc(alias = "ONE_SHOT_REQUEST_FADE_OUT")]
#[doc = "Godot enumerator name: `ONE_SHOT_REQUEST_FADE_OUT`"]
pub const FADE_OUT: OneShotRequest = OneShotRequest {
ord: 3i32
};
}
impl std::fmt::Debug for OneShotRequest {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("OneShotRequest") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for OneShotRequest {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::NONE => "NONE", Self::FIRE => "FIRE", Self::ABORT => "ABORT", Self::FADE_OUT => "FADE_OUT", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::NONE => "ONE_SHOT_REQUEST_NONE", Self::FIRE => "ONE_SHOT_REQUEST_FIRE", Self::ABORT => "ONE_SHOT_REQUEST_ABORT", Self::FADE_OUT => "ONE_SHOT_REQUEST_FADE_OUT", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for OneShotRequest {
type Via = i32;
}
impl crate::meta::ToGodot for OneShotRequest {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for OneShotRequest {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct MixMode {
ord: i32
}
impl MixMode {
#[doc(alias = "MIX_MODE_BLEND")]
#[doc = "Godot enumerator name: `MIX_MODE_BLEND`"]
pub const BLEND: MixMode = MixMode {
ord: 0i32
};
#[doc(alias = "MIX_MODE_ADD")]
#[doc = "Godot enumerator name: `MIX_MODE_ADD`"]
pub const ADD: MixMode = MixMode {
ord: 1i32
};
}
impl std::fmt::Debug for MixMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("MixMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for MixMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::BLEND => "BLEND", Self::ADD => "ADD", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::BLEND => "MIX_MODE_BLEND", Self::ADD => "MIX_MODE_ADD", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for MixMode {
type Via = i32;
}
impl crate::meta::ToGodot for MixMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for MixMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,232 @@
#![doc = "Sidecar module for class [`AnimationNodeOutput`][crate::classes::AnimationNodeOutput].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeOutput` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodeoutput.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeOutput.`\n\nInherits [`AnimationNode`][crate::classes::AnimationNode].\n\nRelated symbols:\n\n* [`IAnimationNodeOutput`][crate::classes::IAnimationNodeOutput]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeOutput`](https://docs.godotengine.org/en/stable/classes/class_animationnodeoutput.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeOutput::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeOutput {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeOutput`][crate::classes::AnimationNodeOutput].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeOutput` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodeoutput.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeOutput: crate::obj::GodotClass < Base = AnimationNodeOutput > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeOutput {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeOutput {
type Base = crate::classes::AnimationNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeOutput"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeOutput {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeOutput {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeOutput {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeOutput {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeOutput {
}
impl crate::obj::cap::GodotDefault for AnimationNodeOutput {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeOutput {
type Target = crate::classes::AnimationNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeOutput {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeOutput`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeOutput {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeOutput > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,550 @@
#![doc = "Sidecar module for class [`AnimationNodeStateMachine`][crate::classes::AnimationNodeStateMachine].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeStateMachine` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodestatemachine.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeStateMachine.`\n\nInherits [`AnimationRootNode`][crate::classes::AnimationRootNode].\n\nRelated symbols:\n\n* [`animation_node_state_machine`][crate::classes::animation_node_state_machine]: sidecar module with related enum/flag types\n* [`IAnimationNodeStateMachine`][crate::classes::IAnimationNodeStateMachine]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeStateMachine`](https://docs.godotengine.org/en/stable/classes/class_animationnodestatemachine.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeStateMachine::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeStateMachine {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeStateMachine`][crate::classes::AnimationNodeStateMachine].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeStateMachine` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodestatemachine.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeStateMachine: crate::obj::GodotClass < Base = AnimationNodeStateMachine > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeStateMachine {
pub(crate) fn add_node_full(&mut self, name: CowArg < StringName >, node: ObjectArg < crate::classes::AnimationNode >, position: Vector2,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, ObjectArg < crate::classes::AnimationNode >, Vector2);
let args = (name, node, position,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(384usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "add_node", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::add_node_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn add_node(&mut self, name: impl AsArg < StringName >, node: impl AsObjectArg < crate::classes::AnimationNode >,) {
self.add_node_ex(name, node,) . done()
}
#[inline]
pub fn add_node_ex < 'a > (&'a mut self, name: impl AsArg < StringName > + 'a, node: impl AsObjectArg < crate::classes::AnimationNode >,) -> ExAddNode < 'a > {
ExAddNode::new(self, name, node,)
}
pub fn replace_node(&mut self, name: impl AsArg < StringName >, node: impl AsObjectArg < crate::classes::AnimationNode >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, ObjectArg < crate::classes::AnimationNode >);
let args = (name.into_arg(), node.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(385usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "replace_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_node(&self, name: impl AsArg < StringName >,) -> Option < Gd < crate::classes::AnimationNode > > {
type CallSig < 'a0, > = (Option < Gd < crate::classes::AnimationNode > >, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(386usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "get_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_node(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(387usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "remove_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn rename_node(&mut self, name: impl AsArg < StringName >, new_name: impl AsArg < StringName >,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, CowArg < 'a1, StringName >);
let args = (name.into_arg(), new_name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(388usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "rename_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_node(&self, name: impl AsArg < StringName >,) -> bool {
type CallSig < 'a0, > = (bool, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(389usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "has_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_node_name(&self, node: impl AsObjectArg < crate::classes::AnimationNode >,) -> StringName {
type CallSig = (StringName, ObjectArg < crate::classes::AnimationNode >);
let args = (node.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(390usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "get_node_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_node_position(&mut self, name: impl AsArg < StringName >, position: Vector2,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, Vector2);
let args = (name.into_arg(), position,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(391usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "set_node_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_node_position(&self, name: impl AsArg < StringName >,) -> Vector2 {
type CallSig < 'a0, > = (Vector2, CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(392usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "get_node_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_transition(&self, from: impl AsArg < StringName >, to: impl AsArg < StringName >,) -> bool {
type CallSig < 'a0, 'a1, > = (bool, CowArg < 'a0, StringName >, CowArg < 'a1, StringName >);
let args = (from.into_arg(), to.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(393usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "has_transition", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn add_transition(&mut self, from: impl AsArg < StringName >, to: impl AsArg < StringName >, transition: impl AsObjectArg < crate::classes::AnimationNodeStateMachineTransition >,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, CowArg < 'a1, StringName >, ObjectArg < crate::classes::AnimationNodeStateMachineTransition >);
let args = (from.into_arg(), to.into_arg(), transition.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(394usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "add_transition", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_transition(&self, idx: i32,) -> Option < Gd < crate::classes::AnimationNodeStateMachineTransition > > {
type CallSig = (Option < Gd < crate::classes::AnimationNodeStateMachineTransition > >, i32);
let args = (idx,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(395usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "get_transition", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_transition_from(&self, idx: i32,) -> StringName {
type CallSig = (StringName, i32);
let args = (idx,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(396usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "get_transition_from", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_transition_to(&self, idx: i32,) -> StringName {
type CallSig = (StringName, i32);
let args = (idx,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(397usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "get_transition_to", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_transition_count(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(398usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "get_transition_count", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_transition_by_index(&mut self, idx: i32,) {
type CallSig = ((), i32);
let args = (idx,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(399usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "remove_transition_by_index", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn remove_transition(&mut self, from: impl AsArg < StringName >, to: impl AsArg < StringName >,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, CowArg < 'a1, StringName >);
let args = (from.into_arg(), to.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(400usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "remove_transition", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_graph_offset(&mut self, offset: Vector2,) {
type CallSig = ((), Vector2);
let args = (offset,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(401usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "set_graph_offset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_graph_offset(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(402usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "get_graph_offset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_state_machine_type(&mut self, state_machine_type: crate::classes::animation_node_state_machine::StateMachineType,) {
type CallSig = ((), crate::classes::animation_node_state_machine::StateMachineType);
let args = (state_machine_type,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(403usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "set_state_machine_type", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_state_machine_type(&self,) -> crate::classes::animation_node_state_machine::StateMachineType {
type CallSig = (crate::classes::animation_node_state_machine::StateMachineType,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(404usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "get_state_machine_type", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_allow_transition_to_self(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(405usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "set_allow_transition_to_self", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_allow_transition_to_self(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(406usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "is_allow_transition_to_self", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_reset_ends(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(407usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "set_reset_ends", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn are_ends_reset(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(408usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachine", "are_ends_reset", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeStateMachine {
type Base = crate::classes::AnimationRootNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeStateMachine"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeStateMachine {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationRootNode > for AnimationNodeStateMachine {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeStateMachine {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeStateMachine {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeStateMachine {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeStateMachine {
}
impl crate::obj::cap::GodotDefault for AnimationNodeStateMachine {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeStateMachine {
type Target = crate::classes::AnimationRootNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeStateMachine {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeStateMachine`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeStateMachine {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeStateMachine > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationRootNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimationNodeStateMachine::add_node_ex`][super::AnimationNodeStateMachine::add_node_ex]."]
#[must_use]
pub struct ExAddNode < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNodeStateMachine, name: CowArg < 'a, StringName >, node: ObjectCow < crate::classes::AnimationNode >, position: Vector2,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExAddNode < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNodeStateMachine, name: impl AsArg < StringName > + 'a, node: impl AsObjectArg < crate::classes::AnimationNode >,) -> Self {
let position = Vector2::new(0 as _, 0 as _);
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: name.into_arg(), node: node.consume_arg(), position: position,
}
}
#[inline]
pub fn position(self, position: Vector2) -> Self {
Self {
position: position, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name, node, position,
}
= self;
re_export::AnimationNodeStateMachine::add_node_full(surround_object, name, node.cow_as_object_arg(), position,)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct StateMachineType {
ord: i32
}
impl StateMachineType {
#[doc(alias = "STATE_MACHINE_TYPE_ROOT")]
#[doc = "Godot enumerator name: `STATE_MACHINE_TYPE_ROOT`"]
pub const ROOT: StateMachineType = StateMachineType {
ord: 0i32
};
#[doc(alias = "STATE_MACHINE_TYPE_NESTED")]
#[doc = "Godot enumerator name: `STATE_MACHINE_TYPE_NESTED`"]
pub const NESTED: StateMachineType = StateMachineType {
ord: 1i32
};
#[doc(alias = "STATE_MACHINE_TYPE_GROUPED")]
#[doc = "Godot enumerator name: `STATE_MACHINE_TYPE_GROUPED`"]
pub const GROUPED: StateMachineType = StateMachineType {
ord: 2i32
};
}
impl std::fmt::Debug for StateMachineType {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("StateMachineType") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for StateMachineType {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::ROOT => "ROOT", Self::NESTED => "NESTED", Self::GROUPED => "GROUPED", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::ROOT => "STATE_MACHINE_TYPE_ROOT", Self::NESTED => "STATE_MACHINE_TYPE_NESTED", Self::GROUPED => "STATE_MACHINE_TYPE_GROUPED", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for StateMachineType {
type Via = i32;
}
impl crate::meta::ToGodot for StateMachineType {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for StateMachineType {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,356 @@
#![doc = "Sidecar module for class [`AnimationNodeStateMachinePlayback`][crate::classes::AnimationNodeStateMachinePlayback].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeStateMachinePlayback` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodestatemachineplayback.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeStateMachinePlayback.`\n\nInherits [`Resource`][crate::classes::Resource].\n\nRelated symbols:\n\n* [`animation_node_state_machine_playback`][crate::classes::animation_node_state_machine_playback]: sidecar module with related enum/flag types\n* [`IAnimationNodeStateMachinePlayback`][crate::classes::IAnimationNodeStateMachinePlayback]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeStateMachinePlayback`](https://docs.godotengine.org/en/stable/classes/class_animationnodestatemachineplayback.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeStateMachinePlayback::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeStateMachinePlayback {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeStateMachinePlayback`][crate::classes::AnimationNodeStateMachinePlayback].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeStateMachinePlayback` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodestatemachineplayback.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeStateMachinePlayback: crate::obj::GodotClass < Base = AnimationNodeStateMachinePlayback > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeStateMachinePlayback {
pub(crate) fn travel_full(&mut self, to_node: CowArg < StringName >, reset_on_teleport: bool,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, bool);
let args = (to_node, reset_on_teleport,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(409usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "travel", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::travel_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn travel(&mut self, to_node: impl AsArg < StringName >,) {
self.travel_ex(to_node,) . done()
}
#[inline]
pub fn travel_ex < 'a > (&'a mut self, to_node: impl AsArg < StringName > + 'a,) -> ExTravel < 'a > {
ExTravel::new(self, to_node,)
}
pub(crate) fn start_full(&mut self, node: CowArg < StringName >, reset: bool,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, bool);
let args = (node, reset,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(410usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "start", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::start_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn start(&mut self, node: impl AsArg < StringName >,) {
self.start_ex(node,) . done()
}
#[inline]
pub fn start_ex < 'a > (&'a mut self, node: impl AsArg < StringName > + 'a,) -> ExStart < 'a > {
ExStart::new(self, node,)
}
pub fn next(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(411usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "next", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn stop(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(412usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "stop", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_playing(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(413usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "is_playing", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_current_node(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(414usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "get_current_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_current_play_position(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(415usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "get_current_play_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_current_length(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(416usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "get_current_length", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_fading_from_node(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(417usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "get_fading_from_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_travel_path(&self,) -> Array < StringName > {
type CallSig = (Array < StringName >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(418usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachinePlayback", "get_travel_path", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeStateMachinePlayback {
type Base = crate::classes::Resource;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeStateMachinePlayback"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeStateMachinePlayback {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeStateMachinePlayback {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeStateMachinePlayback {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeStateMachinePlayback {
}
impl crate::obj::cap::GodotDefault for AnimationNodeStateMachinePlayback {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeStateMachinePlayback {
type Target = crate::classes::Resource;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeStateMachinePlayback {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeStateMachinePlayback`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeStateMachinePlayback {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeStateMachinePlayback > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimationNodeStateMachinePlayback::travel_ex`][super::AnimationNodeStateMachinePlayback::travel_ex]."]
#[must_use]
pub struct ExTravel < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNodeStateMachinePlayback, to_node: CowArg < 'a, StringName >, reset_on_teleport: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExTravel < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNodeStateMachinePlayback, to_node: impl AsArg < StringName > + 'a,) -> Self {
let reset_on_teleport = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, to_node: to_node.into_arg(), reset_on_teleport: reset_on_teleport,
}
}
#[inline]
pub fn reset_on_teleport(self, reset_on_teleport: bool) -> Self {
Self {
reset_on_teleport: reset_on_teleport, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, to_node, reset_on_teleport,
}
= self;
re_export::AnimationNodeStateMachinePlayback::travel_full(surround_object, to_node, reset_on_teleport,)
}
}
#[doc = "Default-param extender for [`AnimationNodeStateMachinePlayback::start_ex`][super::AnimationNodeStateMachinePlayback::start_ex]."]
#[must_use]
pub struct ExStart < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationNodeStateMachinePlayback, node: CowArg < 'a, StringName >, reset: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExStart < 'a > {
fn new(surround_object: &'a mut re_export::AnimationNodeStateMachinePlayback, node: impl AsArg < StringName > + 'a,) -> Self {
let reset = true;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, node: node.into_arg(), reset: reset,
}
}
#[inline]
pub fn reset(self, reset: bool) -> Self {
Self {
reset: reset, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, node, reset,
}
= self;
re_export::AnimationNodeStateMachinePlayback::start_full(surround_object, node, reset,)
}
}

View File

@@ -0,0 +1,496 @@
#![doc = "Sidecar module for class [`AnimationNodeStateMachineTransition`][crate::classes::AnimationNodeStateMachineTransition].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeStateMachineTransition` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodestatemachinetransition.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeStateMachineTransition.`\n\nInherits [`Resource`][crate::classes::Resource].\n\nRelated symbols:\n\n* [`animation_node_state_machine_transition`][crate::classes::animation_node_state_machine_transition]: sidecar module with related enum/flag types\n* [`IAnimationNodeStateMachineTransition`][crate::classes::IAnimationNodeStateMachineTransition]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeStateMachineTransition`](https://docs.godotengine.org/en/stable/classes/class_animationnodestatemachinetransition.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeStateMachineTransition::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeStateMachineTransition {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeStateMachineTransition`][crate::classes::AnimationNodeStateMachineTransition].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeStateMachineTransition` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodestatemachinetransition.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeStateMachineTransition: crate::obj::GodotClass < Base = AnimationNodeStateMachineTransition > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeStateMachineTransition {
pub fn set_switch_mode(&mut self, mode: crate::classes::animation_node_state_machine_transition::SwitchMode,) {
type CallSig = ((), crate::classes::animation_node_state_machine_transition::SwitchMode);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(419usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "set_switch_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_switch_mode(&self,) -> crate::classes::animation_node_state_machine_transition::SwitchMode {
type CallSig = (crate::classes::animation_node_state_machine_transition::SwitchMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(420usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "get_switch_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_advance_mode(&mut self, mode: crate::classes::animation_node_state_machine_transition::AdvanceMode,) {
type CallSig = ((), crate::classes::animation_node_state_machine_transition::AdvanceMode);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(421usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "set_advance_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_advance_mode(&self,) -> crate::classes::animation_node_state_machine_transition::AdvanceMode {
type CallSig = (crate::classes::animation_node_state_machine_transition::AdvanceMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(422usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "get_advance_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_advance_condition(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(423usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "set_advance_condition", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_advance_condition(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(424usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "get_advance_condition", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_xfade_time(&mut self, secs: f32,) {
type CallSig = ((), f32);
let args = (secs,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(425usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "set_xfade_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_xfade_time(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(426usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "get_xfade_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_xfade_curve(&mut self, curve: impl AsObjectArg < crate::classes::Curve >,) {
type CallSig = ((), ObjectArg < crate::classes::Curve >);
let args = (curve.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(427usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "set_xfade_curve", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_xfade_curve(&self,) -> Option < Gd < crate::classes::Curve > > {
type CallSig = (Option < Gd < crate::classes::Curve > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(428usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "get_xfade_curve", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_break_loop_at_end(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(429usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "set_break_loop_at_end", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_loop_broken_at_end(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(430usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "is_loop_broken_at_end", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_reset(&mut self, reset: bool,) {
type CallSig = ((), bool);
let args = (reset,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(431usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "set_reset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_reset(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(432usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "is_reset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_priority(&mut self, priority: i32,) {
type CallSig = ((), i32);
let args = (priority,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(433usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "set_priority", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_priority(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(434usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "get_priority", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_advance_expression(&mut self, text: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (text.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(435usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "set_advance_expression", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_advance_expression(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(436usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeStateMachineTransition", "get_advance_expression", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeStateMachineTransition {
type Base = crate::classes::Resource;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeStateMachineTransition"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeStateMachineTransition {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeStateMachineTransition {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeStateMachineTransition {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeStateMachineTransition {
}
impl crate::obj::cap::GodotDefault for AnimationNodeStateMachineTransition {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeStateMachineTransition {
type Target = crate::classes::Resource;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeStateMachineTransition {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeStateMachineTransition`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeStateMachineTransition {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeStateMachineTransition > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct SwitchMode {
ord: i32
}
impl SwitchMode {
#[doc(alias = "SWITCH_MODE_IMMEDIATE")]
#[doc = "Godot enumerator name: `SWITCH_MODE_IMMEDIATE`"]
pub const IMMEDIATE: SwitchMode = SwitchMode {
ord: 0i32
};
#[doc(alias = "SWITCH_MODE_SYNC")]
#[doc = "Godot enumerator name: `SWITCH_MODE_SYNC`"]
pub const SYNC: SwitchMode = SwitchMode {
ord: 1i32
};
#[doc(alias = "SWITCH_MODE_AT_END")]
#[doc = "Godot enumerator name: `SWITCH_MODE_AT_END`"]
pub const AT_END: SwitchMode = SwitchMode {
ord: 2i32
};
}
impl std::fmt::Debug for SwitchMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("SwitchMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for SwitchMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::IMMEDIATE => "IMMEDIATE", Self::SYNC => "SYNC", Self::AT_END => "AT_END", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::IMMEDIATE => "SWITCH_MODE_IMMEDIATE", Self::SYNC => "SWITCH_MODE_SYNC", Self::AT_END => "SWITCH_MODE_AT_END", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for SwitchMode {
type Via = i32;
}
impl crate::meta::ToGodot for SwitchMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for SwitchMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct AdvanceMode {
ord: i32
}
impl AdvanceMode {
#[doc(alias = "ADVANCE_MODE_DISABLED")]
#[doc = "Godot enumerator name: `ADVANCE_MODE_DISABLED`"]
pub const DISABLED: AdvanceMode = AdvanceMode {
ord: 0i32
};
#[doc(alias = "ADVANCE_MODE_ENABLED")]
#[doc = "Godot enumerator name: `ADVANCE_MODE_ENABLED`"]
pub const ENABLED: AdvanceMode = AdvanceMode {
ord: 1i32
};
#[doc(alias = "ADVANCE_MODE_AUTO")]
#[doc = "Godot enumerator name: `ADVANCE_MODE_AUTO`"]
pub const AUTO: AdvanceMode = AdvanceMode {
ord: 2i32
};
}
impl std::fmt::Debug for AdvanceMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("AdvanceMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for AdvanceMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DISABLED => "DISABLED", Self::ENABLED => "ENABLED", Self::AUTO => "AUTO", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DISABLED => "ADVANCE_MODE_DISABLED", Self::ENABLED => "ADVANCE_MODE_ENABLED", Self::AUTO => "ADVANCE_MODE_AUTO", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for AdvanceMode {
type Via = i32;
}
impl crate::meta::ToGodot for AdvanceMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for AdvanceMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,238 @@
#![doc = "Sidecar module for class [`AnimationNodeSub2`][crate::classes::AnimationNodeSub2].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeSub2` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodesub2.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeSub2.`\n\nInherits [`AnimationNodeSync`][crate::classes::AnimationNodeSync].\n\nRelated symbols:\n\n* [`IAnimationNodeSub2`][crate::classes::IAnimationNodeSub2]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeSub2`](https://docs.godotengine.org/en/stable/classes/class_animationnodesub2.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeSub2::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeSub2 {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeSub2`][crate::classes::AnimationNodeSub2].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeSub2` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodesub2.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeSub2: crate::obj::GodotClass < Base = AnimationNodeSub2 > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeSub2 {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeSub2 {
type Base = crate::classes::AnimationNodeSync;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeSub2"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeSub2 {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNodeSync > for AnimationNodeSub2 {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeSub2 {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeSub2 {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeSub2 {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeSub2 {
}
impl crate::obj::cap::GodotDefault for AnimationNodeSub2 {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeSub2 {
type Target = crate::classes::AnimationNodeSync;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeSub2 {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeSub2`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeSub2 {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeSub2 > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeSync > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,248 @@
#![doc = "Sidecar module for class [`AnimationNodeSync`][crate::classes::AnimationNodeSync].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeSync` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodesync.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeSync.`\n\nInherits [`AnimationNode`][crate::classes::AnimationNode].\n\nRelated symbols:\n\n* [`IAnimationNodeSync`][crate::classes::IAnimationNodeSync]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeSync`](https://docs.godotengine.org/en/stable/classes/class_animationnodesync.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeSync::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeSync {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeSync`][crate::classes::AnimationNodeSync].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeSync` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodesync.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeSync: crate::obj::GodotClass < Base = AnimationNodeSync > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeSync {
pub fn set_use_sync(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(437usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeSync", "set_use_sync", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_using_sync(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(438usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeSync", "is_using_sync", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeSync {
type Base = crate::classes::AnimationNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeSync"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeSync {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeSync {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeSync {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeSync {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeSync {
}
impl crate::obj::cap::GodotDefault for AnimationNodeSync {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeSync {
type Target = crate::classes::AnimationNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeSync {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeSync`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeSync {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeSync > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,232 @@
#![doc = "Sidecar module for class [`AnimationNodeTimeScale`][crate::classes::AnimationNodeTimeScale].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeTimeScale` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodetimescale.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeTimeScale.`\n\nInherits [`AnimationNode`][crate::classes::AnimationNode].\n\nRelated symbols:\n\n* [`IAnimationNodeTimeScale`][crate::classes::IAnimationNodeTimeScale]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeTimeScale`](https://docs.godotengine.org/en/stable/classes/class_animationnodetimescale.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeTimeScale::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeTimeScale {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeTimeScale`][crate::classes::AnimationNodeTimeScale].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeTimeScale` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodetimescale.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeTimeScale: crate::obj::GodotClass < Base = AnimationNodeTimeScale > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeTimeScale {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeTimeScale {
type Base = crate::classes::AnimationNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeTimeScale"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeTimeScale {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeTimeScale {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeTimeScale {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeTimeScale {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeTimeScale {
}
impl crate::obj::cap::GodotDefault for AnimationNodeTimeScale {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeTimeScale {
type Target = crate::classes::AnimationNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeTimeScale {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeTimeScale`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeTimeScale {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeTimeScale > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,232 @@
#![doc = "Sidecar module for class [`AnimationNodeTimeSeek`][crate::classes::AnimationNodeTimeSeek].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeTimeSeek` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodetimeseek.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeTimeSeek.`\n\nInherits [`AnimationNode`][crate::classes::AnimationNode].\n\nRelated symbols:\n\n* [`IAnimationNodeTimeSeek`][crate::classes::IAnimationNodeTimeSeek]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeTimeSeek`](https://docs.godotengine.org/en/stable/classes/class_animationnodetimeseek.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeTimeSeek::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeTimeSeek {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeTimeSeek`][crate::classes::AnimationNodeTimeSeek].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeTimeSeek` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodetimeseek.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeTimeSeek: crate::obj::GodotClass < Base = AnimationNodeTimeSeek > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeTimeSeek {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeTimeSeek {
type Base = crate::classes::AnimationNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeTimeSeek"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeTimeSeek {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeTimeSeek {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeTimeSeek {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeTimeSeek {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeTimeSeek {
}
impl crate::obj::cap::GodotDefault for AnimationNodeTimeSeek {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeTimeSeek {
type Target = crate::classes::AnimationNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeTimeSeek {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeTimeSeek`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeTimeSeek {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeTimeSeek > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,342 @@
#![doc = "Sidecar module for class [`AnimationNodeTransition`][crate::classes::AnimationNodeTransition].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationNodeTransition` enums](https://docs.godotengine.org/en/stable/classes/class_animationnodetransition.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationNodeTransition.`\n\nInherits [`AnimationNodeSync`][crate::classes::AnimationNodeSync].\n\nRelated symbols:\n\n* [`IAnimationNodeTransition`][crate::classes::IAnimationNodeTransition]: virtual methods\n\n\nSee also [Godot docs for `AnimationNodeTransition`](https://docs.godotengine.org/en/stable/classes/class_animationnodetransition.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationNodeTransition::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationNodeTransition {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationNodeTransition`][crate::classes::AnimationNodeTransition].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationNodeTransition` methods](https://docs.godotengine.org/en/stable/classes/class_animationnodetransition.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationNodeTransition: crate::obj::GodotClass < Base = AnimationNodeTransition > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationNodeTransition {
pub fn set_input_count(&mut self, input_count: i32,) {
type CallSig = ((), i32);
let args = (input_count,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(439usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "set_input_count", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_input_as_auto_advance(&mut self, input: i32, enable: bool,) {
type CallSig = ((), i32, bool);
let args = (input, enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(440usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "set_input_as_auto_advance", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_input_set_as_auto_advance(&self, input: i32,) -> bool {
type CallSig = (bool, i32);
let args = (input,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(441usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "is_input_set_as_auto_advance", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_input_break_loop_at_end(&mut self, input: i32, enable: bool,) {
type CallSig = ((), i32, bool);
let args = (input, enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(442usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "set_input_break_loop_at_end", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_input_loop_broken_at_end(&self, input: i32,) -> bool {
type CallSig = (bool, i32);
let args = (input,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(443usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "is_input_loop_broken_at_end", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_input_reset(&mut self, input: i32, enable: bool,) {
type CallSig = ((), i32, bool);
let args = (input, enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(444usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "set_input_reset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_input_reset(&self, input: i32,) -> bool {
type CallSig = (bool, i32);
let args = (input,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(445usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "is_input_reset", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_xfade_time(&mut self, time: f64,) {
type CallSig = ((), f64);
let args = (time,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(446usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "set_xfade_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_xfade_time(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(447usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "get_xfade_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_xfade_curve(&mut self, curve: impl AsObjectArg < crate::classes::Curve >,) {
type CallSig = ((), ObjectArg < crate::classes::Curve >);
let args = (curve.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(448usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "set_xfade_curve", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_xfade_curve(&self,) -> Option < Gd < crate::classes::Curve > > {
type CallSig = (Option < Gd < crate::classes::Curve > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(449usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "get_xfade_curve", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_allow_transition_to_self(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(450usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "set_allow_transition_to_self", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_allow_transition_to_self(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(451usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationNodeTransition", "is_allow_transition_to_self", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationNodeTransition {
type Base = crate::classes::AnimationNodeSync;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationNodeTransition"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationNodeTransition {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNodeSync > for AnimationNodeTransition {
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationNodeTransition {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationNodeTransition {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationNodeTransition {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationNodeTransition {
}
impl crate::obj::cap::GodotDefault for AnimationNodeTransition {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationNodeTransition {
type Target = crate::classes::AnimationNodeSync;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationNodeTransition {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationNodeTransition`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationNodeTransition {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeTransition > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNodeSync > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,983 @@
#![doc = "Sidecar module for class [`AnimationPlayer`][crate::classes::AnimationPlayer].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationPlayer` enums](https://docs.godotengine.org/en/stable/classes/class_animationplayer.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationPlayer.`\n\nInherits [`AnimationMixer`][crate::classes::AnimationMixer].\n\nRelated symbols:\n\n* [`animation_player`][crate::classes::animation_player]: sidecar module with related enum/flag types\n* [`IAnimationPlayer`][crate::classes::IAnimationPlayer]: virtual methods\n\n\nSee also [Godot docs for `AnimationPlayer`](https://docs.godotengine.org/en/stable/classes/class_animationplayer.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`AnimationPlayer::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationPlayer {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationPlayer`][crate::classes::AnimationPlayer].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationPlayer` methods](https://docs.godotengine.org/en/stable/classes/class_animationplayer.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationPlayer: crate::obj::GodotClass < Base = AnimationPlayer > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: NodeNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn post_process_key_value(&self, animation: Option < Gd < crate::classes::Animation > >, track: i32, value: Variant, object_id: u64, object_sub_idx: i32,) -> Variant {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl AnimationPlayer {
pub fn animation_set_next(&mut self, animation_from: impl AsArg < StringName >, animation_to: impl AsArg < StringName >,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, CowArg < 'a1, StringName >);
let args = (animation_from.into_arg(), animation_to.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(452usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "animation_set_next", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn animation_get_next(&self, animation_from: impl AsArg < StringName >,) -> StringName {
type CallSig < 'a0, > = (StringName, CowArg < 'a0, StringName >);
let args = (animation_from.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(453usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "animation_get_next", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_blend_time(&mut self, animation_from: impl AsArg < StringName >, animation_to: impl AsArg < StringName >, sec: f64,) {
type CallSig < 'a0, 'a1, > = ((), CowArg < 'a0, StringName >, CowArg < 'a1, StringName >, f64);
let args = (animation_from.into_arg(), animation_to.into_arg(), sec,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(454usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_blend_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_time(&self, animation_from: impl AsArg < StringName >, animation_to: impl AsArg < StringName >,) -> f64 {
type CallSig < 'a0, 'a1, > = (f64, CowArg < 'a0, StringName >, CowArg < 'a1, StringName >);
let args = (animation_from.into_arg(), animation_to.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(455usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_blend_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_default_blend_time(&mut self, sec: f64,) {
type CallSig = ((), f64);
let args = (sec,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(456usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_default_blend_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_default_blend_time(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(457usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_default_blend_time", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_auto_capture(&mut self, auto_capture: bool,) {
type CallSig = ((), bool);
let args = (auto_capture,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(458usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_auto_capture", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_auto_capture(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(459usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "is_auto_capture", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_auto_capture_duration(&mut self, auto_capture_duration: f64,) {
type CallSig = ((), f64);
let args = (auto_capture_duration,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(460usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_auto_capture_duration", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_auto_capture_duration(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(461usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_auto_capture_duration", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_auto_capture_transition_type(&mut self, auto_capture_transition_type: crate::classes::tween::TransitionType,) {
type CallSig = ((), crate::classes::tween::TransitionType);
let args = (auto_capture_transition_type,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(462usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_auto_capture_transition_type", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_auto_capture_transition_type(&self,) -> crate::classes::tween::TransitionType {
type CallSig = (crate::classes::tween::TransitionType,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(463usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_auto_capture_transition_type", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_auto_capture_ease_type(&mut self, auto_capture_ease_type: crate::classes::tween::EaseType,) {
type CallSig = ((), crate::classes::tween::EaseType);
let args = (auto_capture_ease_type,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(464usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_auto_capture_ease_type", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_auto_capture_ease_type(&self,) -> crate::classes::tween::EaseType {
type CallSig = (crate::classes::tween::EaseType,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(465usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_auto_capture_ease_type", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn play_full(&mut self, name: CowArg < StringName >, custom_blend: f64, custom_speed: f32, from_end: bool,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, f64, f32, bool);
let args = (name, custom_blend, custom_speed, from_end,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(466usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "play", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::play_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn play(&mut self,) {
self.play_ex() . done()
}
#[inline]
pub fn play_ex < 'a > (&'a mut self,) -> ExPlay < 'a > {
ExPlay::new(self,)
}
pub(crate) fn play_backwards_full(&mut self, name: CowArg < StringName >, custom_blend: f64,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, f64);
let args = (name, custom_blend,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(467usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "play_backwards", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::play_backwards_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn play_backwards(&mut self,) {
self.play_backwards_ex() . done()
}
#[inline]
pub fn play_backwards_ex < 'a > (&'a mut self,) -> ExPlayBackwards < 'a > {
ExPlayBackwards::new(self,)
}
pub(crate) fn play_with_capture_full(&mut self, name: CowArg < StringName >, duration: f64, custom_blend: f64, custom_speed: f32, from_end: bool, trans_type: crate::classes::tween::TransitionType, ease_type: crate::classes::tween::EaseType,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >, f64, f64, f32, bool, crate::classes::tween::TransitionType, crate::classes::tween::EaseType);
let args = (name, duration, custom_blend, custom_speed, from_end, trans_type, ease_type,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(468usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "play_with_capture", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::play_with_capture_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn play_with_capture(&mut self,) {
self.play_with_capture_ex() . done()
}
#[inline]
pub fn play_with_capture_ex < 'a > (&'a mut self,) -> ExPlayWithCapture < 'a > {
ExPlayWithCapture::new(self,)
}
pub fn pause(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(469usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "pause", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn stop_full(&mut self, keep_state: bool,) {
type CallSig = ((), bool);
let args = (keep_state,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(470usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "stop", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::stop_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn stop(&mut self,) {
self.stop_ex() . done()
}
#[inline]
pub fn stop_ex < 'a > (&'a mut self,) -> ExStop < 'a > {
ExStop::new(self,)
}
pub fn is_playing(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(471usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "is_playing", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_current_animation(&mut self, animation: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (animation.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(472usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_current_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_current_animation(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(473usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_current_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_assigned_animation(&mut self, animation: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (animation.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(474usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_assigned_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_assigned_animation(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(475usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_assigned_animation", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn queue(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(476usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "queue", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_queue(&mut self,) -> PackedStringArray {
type CallSig = (PackedStringArray,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(477usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_queue", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn clear_queue(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(478usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "clear_queue", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_speed_scale(&mut self, speed: f32,) {
type CallSig = ((), f32);
let args = (speed,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(479usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_speed_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_speed_scale(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(480usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_speed_scale", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_playing_speed(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(481usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_playing_speed", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_autoplay(&mut self, name: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, GString >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(482usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_autoplay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_autoplay(&self,) -> GString {
type CallSig = (GString,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(483usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_autoplay", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_movie_quit_on_finish_enabled(&mut self, enabled: bool,) {
type CallSig = ((), bool);
let args = (enabled,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(484usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_movie_quit_on_finish_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_movie_quit_on_finish_enabled(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(485usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "is_movie_quit_on_finish_enabled", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_current_animation_position(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(486usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_current_animation_position", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_current_animation_length(&self,) -> f64 {
type CallSig = (f64,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(487usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_current_animation_length", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn seek_full(&mut self, seconds: f64, update: bool, update_only: bool,) {
type CallSig = ((), f64, bool, bool);
let args = (seconds, update, update_only,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(488usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "seek", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::seek_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn seek(&mut self, seconds: f64,) {
self.seek_ex(seconds,) . done()
}
#[inline]
pub fn seek_ex < 'a > (&'a mut self, seconds: f64,) -> ExSeek < 'a > {
ExSeek::new(self, seconds,)
}
pub fn set_process_callback(&mut self, mode: crate::classes::animation_player::AnimationProcessCallback,) {
type CallSig = ((), crate::classes::animation_player::AnimationProcessCallback);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(489usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_process_callback", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_process_callback(&self,) -> crate::classes::animation_player::AnimationProcessCallback {
type CallSig = (crate::classes::animation_player::AnimationProcessCallback,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(490usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_process_callback", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_method_call_mode(&mut self, mode: crate::classes::animation_player::AnimationMethodCallMode,) {
type CallSig = ((), crate::classes::animation_player::AnimationMethodCallMode);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(491usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_method_call_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_method_call_mode(&self,) -> crate::classes::animation_player::AnimationMethodCallMode {
type CallSig = (crate::classes::animation_player::AnimationMethodCallMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(492usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_method_call_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_root(&mut self, path: impl AsArg < NodePath >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, NodePath >);
let args = (path.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(493usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "set_root", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_root(&self,) -> NodePath {
type CallSig = (NodePath,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(494usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationPlayer", "get_root", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationPlayer {
type Base = crate::classes::AnimationMixer;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationPlayer"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationPlayer {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationMixer > for AnimationPlayer {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for AnimationPlayer {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationPlayer {
}
impl crate::obj::cap::GodotDefault for AnimationPlayer {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationPlayer {
type Target = crate::classes::AnimationMixer;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationPlayer {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationPlayer`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationPlayer {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationPlayer > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationMixer > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`AnimationPlayer::play_ex`][super::AnimationPlayer::play_ex]."]
#[must_use]
pub struct ExPlay < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationPlayer, name: CowArg < 'a, StringName >, custom_blend: f64, custom_speed: f32, from_end: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExPlay < 'a > {
fn new(surround_object: &'a mut re_export::AnimationPlayer,) -> Self {
let name = StringName::from("");
let custom_blend = - 1f64;
let custom_speed = 1f32;
let from_end = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: CowArg::Owned(name), custom_blend: custom_blend, custom_speed: custom_speed, from_end: from_end,
}
}
#[inline]
pub fn name(self, name: impl AsArg < StringName > + 'a) -> Self {
Self {
name: name.into_arg(), .. self
}
}
#[inline]
pub fn custom_blend(self, custom_blend: f64) -> Self {
Self {
custom_blend: custom_blend, .. self
}
}
#[inline]
pub fn custom_speed(self, custom_speed: f32) -> Self {
Self {
custom_speed: custom_speed, .. self
}
}
#[inline]
pub fn from_end(self, from_end: bool) -> Self {
Self {
from_end: from_end, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name, custom_blend, custom_speed, from_end,
}
= self;
re_export::AnimationPlayer::play_full(surround_object, name, custom_blend, custom_speed, from_end,)
}
}
#[doc = "Default-param extender for [`AnimationPlayer::play_backwards_ex`][super::AnimationPlayer::play_backwards_ex]."]
#[must_use]
pub struct ExPlayBackwards < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationPlayer, name: CowArg < 'a, StringName >, custom_blend: f64,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExPlayBackwards < 'a > {
fn new(surround_object: &'a mut re_export::AnimationPlayer,) -> Self {
let name = StringName::from("");
let custom_blend = - 1f64;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: CowArg::Owned(name), custom_blend: custom_blend,
}
}
#[inline]
pub fn name(self, name: impl AsArg < StringName > + 'a) -> Self {
Self {
name: name.into_arg(), .. self
}
}
#[inline]
pub fn custom_blend(self, custom_blend: f64) -> Self {
Self {
custom_blend: custom_blend, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name, custom_blend,
}
= self;
re_export::AnimationPlayer::play_backwards_full(surround_object, name, custom_blend,)
}
}
#[doc = "Default-param extender for [`AnimationPlayer::play_with_capture_ex`][super::AnimationPlayer::play_with_capture_ex]."]
#[must_use]
pub struct ExPlayWithCapture < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationPlayer, name: CowArg < 'a, StringName >, duration: f64, custom_blend: f64, custom_speed: f32, from_end: bool, trans_type: crate::classes::tween::TransitionType, ease_type: crate::classes::tween::EaseType,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExPlayWithCapture < 'a > {
fn new(surround_object: &'a mut re_export::AnimationPlayer,) -> Self {
let name = StringName::from("");
let duration = - 1f64;
let custom_blend = - 1f64;
let custom_speed = 1f32;
let from_end = false;
let trans_type = crate::obj::EngineEnum::from_ord(0);
let ease_type = crate::obj::EngineEnum::from_ord(0);
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, name: CowArg::Owned(name), duration: duration, custom_blend: custom_blend, custom_speed: custom_speed, from_end: from_end, trans_type: trans_type, ease_type: ease_type,
}
}
#[inline]
pub fn name(self, name: impl AsArg < StringName > + 'a) -> Self {
Self {
name: name.into_arg(), .. self
}
}
#[inline]
pub fn duration(self, duration: f64) -> Self {
Self {
duration: duration, .. self
}
}
#[inline]
pub fn custom_blend(self, custom_blend: f64) -> Self {
Self {
custom_blend: custom_blend, .. self
}
}
#[inline]
pub fn custom_speed(self, custom_speed: f32) -> Self {
Self {
custom_speed: custom_speed, .. self
}
}
#[inline]
pub fn from_end(self, from_end: bool) -> Self {
Self {
from_end: from_end, .. self
}
}
#[inline]
pub fn trans_type(self, trans_type: crate::classes::tween::TransitionType) -> Self {
Self {
trans_type: trans_type, .. self
}
}
#[inline]
pub fn ease_type(self, ease_type: crate::classes::tween::EaseType) -> Self {
Self {
ease_type: ease_type, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, name, duration, custom_blend, custom_speed, from_end, trans_type, ease_type,
}
= self;
re_export::AnimationPlayer::play_with_capture_full(surround_object, name, duration, custom_blend, custom_speed, from_end, trans_type, ease_type,)
}
}
#[doc = "Default-param extender for [`AnimationPlayer::stop_ex`][super::AnimationPlayer::stop_ex]."]
#[must_use]
pub struct ExStop < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationPlayer, keep_state: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExStop < 'a > {
fn new(surround_object: &'a mut re_export::AnimationPlayer,) -> Self {
let keep_state = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, keep_state: keep_state,
}
}
#[inline]
pub fn keep_state(self, keep_state: bool) -> Self {
Self {
keep_state: keep_state, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, keep_state,
}
= self;
re_export::AnimationPlayer::stop_full(surround_object, keep_state,)
}
}
#[doc = "Default-param extender for [`AnimationPlayer::seek_ex`][super::AnimationPlayer::seek_ex]."]
#[must_use]
pub struct ExSeek < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::AnimationPlayer, seconds: f64, update: bool, update_only: bool,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExSeek < 'a > {
fn new(surround_object: &'a mut re_export::AnimationPlayer, seconds: f64,) -> Self {
let update = false;
let update_only = false;
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, seconds: seconds, update: update, update_only: update_only,
}
}
#[inline]
pub fn update(self, update: bool) -> Self {
Self {
update: update, .. self
}
}
#[inline]
pub fn update_only(self, update_only: bool) -> Self {
Self {
update_only: update_only, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, seconds, update, update_only,
}
= self;
re_export::AnimationPlayer::seek_full(surround_object, seconds, update, update_only,)
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct AnimationProcessCallback {
ord: i32
}
impl AnimationProcessCallback {
#[doc(alias = "ANIMATION_PROCESS_PHYSICS")]
#[doc = "Godot enumerator name: `ANIMATION_PROCESS_PHYSICS`"]
pub const PHYSICS: AnimationProcessCallback = AnimationProcessCallback {
ord: 0i32
};
#[doc(alias = "ANIMATION_PROCESS_IDLE")]
#[doc = "Godot enumerator name: `ANIMATION_PROCESS_IDLE`"]
pub const IDLE: AnimationProcessCallback = AnimationProcessCallback {
ord: 1i32
};
#[doc(alias = "ANIMATION_PROCESS_MANUAL")]
#[doc = "Godot enumerator name: `ANIMATION_PROCESS_MANUAL`"]
pub const MANUAL: AnimationProcessCallback = AnimationProcessCallback {
ord: 2i32
};
}
impl std::fmt::Debug for AnimationProcessCallback {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("AnimationProcessCallback") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for AnimationProcessCallback {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::PHYSICS => "PHYSICS", Self::IDLE => "IDLE", Self::MANUAL => "MANUAL", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::PHYSICS => "ANIMATION_PROCESS_PHYSICS", Self::IDLE => "ANIMATION_PROCESS_IDLE", Self::MANUAL => "ANIMATION_PROCESS_MANUAL", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for AnimationProcessCallback {
type Via = i32;
}
impl crate::meta::ToGodot for AnimationProcessCallback {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for AnimationProcessCallback {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct AnimationMethodCallMode {
ord: i32
}
impl AnimationMethodCallMode {
#[doc(alias = "ANIMATION_METHOD_CALL_DEFERRED")]
#[doc = "Godot enumerator name: `ANIMATION_METHOD_CALL_DEFERRED`"]
pub const DEFERRED: AnimationMethodCallMode = AnimationMethodCallMode {
ord: 0i32
};
#[doc(alias = "ANIMATION_METHOD_CALL_IMMEDIATE")]
#[doc = "Godot enumerator name: `ANIMATION_METHOD_CALL_IMMEDIATE`"]
pub const IMMEDIATE: AnimationMethodCallMode = AnimationMethodCallMode {
ord: 1i32
};
}
impl std::fmt::Debug for AnimationMethodCallMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("AnimationMethodCallMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for AnimationMethodCallMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DEFERRED => "DEFERRED", Self::IMMEDIATE => "IMMEDIATE", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DEFERRED => "ANIMATION_METHOD_CALL_DEFERRED", Self::IMMEDIATE => "ANIMATION_METHOD_CALL_IMMEDIATE", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for AnimationMethodCallMode {
type Via = i32;
}
impl crate::meta::ToGodot for AnimationMethodCallMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for AnimationMethodCallMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,232 @@
#![doc = "Sidecar module for class [`AnimationRootNode`][crate::classes::AnimationRootNode].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationRootNode` enums](https://docs.godotengine.org/en/stable/classes/class_animationrootnode.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationRootNode.`\n\nInherits [`AnimationNode`][crate::classes::AnimationNode].\n\nRelated symbols:\n\n* [`IAnimationRootNode`][crate::classes::IAnimationRootNode]: virtual methods\n\n\nSee also [Godot docs for `AnimationRootNode`](https://docs.godotengine.org/en/stable/classes/class_animationrootnode.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AnimationRootNode::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationRootNode {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationRootNode`][crate::classes::AnimationRootNode].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationRootNode` methods](https://docs.godotengine.org/en/stable/classes/class_animationrootnode.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationRootNode: crate::obj::GodotClass < Base = AnimationRootNode > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_child_nodes(&self,) -> Dictionary {
unimplemented !()
}
fn get_parameter_list(&self,) -> VariantArray {
unimplemented !()
}
fn get_child_by_name(&self, name: StringName,) -> Option < Gd < crate::classes::AnimationNode > > {
unimplemented !()
}
fn get_parameter_default_value(&self, parameter: StringName,) -> Variant {
unimplemented !()
}
fn is_parameter_read_only(&self, parameter: StringName,) -> bool {
unimplemented !()
}
fn process(&self, time: f64, seek: bool, is_external_seeking: bool, test_only: bool,) -> f64 {
unimplemented !()
}
fn get_caption(&self,) -> GString {
unimplemented !()
}
fn has_filter(&self,) -> bool {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AnimationRootNode {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationRootNode {
type Base = crate::classes::AnimationNode;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationRootNode"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationRootNode {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationNode > for AnimationRootNode {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AnimationRootNode {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AnimationRootNode {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationRootNode {
}
impl crate::obj::cap::GodotDefault for AnimationRootNode {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationRootNode {
type Target = crate::classes::AnimationNode;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationRootNode {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationRootNode`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationRootNode {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationRootNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationNode > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,371 @@
#![doc = "Sidecar module for class [`AnimationTree`][crate::classes::AnimationTree].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AnimationTree` enums](https://docs.godotengine.org/en/stable/classes/class_animationtree.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AnimationTree.`\n\nInherits [`AnimationMixer`][crate::classes::AnimationMixer].\n\nRelated symbols:\n\n* [`animation_tree`][crate::classes::animation_tree]: sidecar module with related enum/flag types\n* [`IAnimationTree`][crate::classes::IAnimationTree]: virtual methods\n\n\nSee also [Godot docs for `AnimationTree`](https://docs.godotengine.org/en/stable/classes/class_animationtree.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`AnimationTree::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct AnimationTree {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AnimationTree`][crate::classes::AnimationTree].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AnimationTree` methods](https://docs.godotengine.org/en/stable/classes/class_animationtree.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAnimationTree: crate::obj::GodotClass < Base = AnimationTree > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: NodeNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn post_process_key_value(&self, animation: Option < Gd < crate::classes::Animation > >, track: i32, value: Variant, object_id: u64, object_sub_idx: i32,) -> Variant {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl AnimationTree {
pub fn set_tree_root(&mut self, animation_node: impl AsObjectArg < crate::classes::AnimationRootNode >,) {
type CallSig = ((), ObjectArg < crate::classes::AnimationRootNode >);
let args = (animation_node.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(495usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationTree", "set_tree_root", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_tree_root(&self,) -> Option < Gd < crate::classes::AnimationRootNode > > {
type CallSig = (Option < Gd < crate::classes::AnimationRootNode > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(496usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationTree", "get_tree_root", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_advance_expression_base_node(&mut self, path: impl AsArg < NodePath >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, NodePath >);
let args = (path.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(497usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationTree", "set_advance_expression_base_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_advance_expression_base_node(&self,) -> NodePath {
type CallSig = (NodePath,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(498usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationTree", "get_advance_expression_base_node", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_animation_player(&mut self, path: impl AsArg < NodePath >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, NodePath >);
let args = (path.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(499usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationTree", "set_animation_player", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_animation_player(&self,) -> NodePath {
type CallSig = (NodePath,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(500usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationTree", "get_animation_player", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_process_callback(&mut self, mode: crate::classes::animation_tree::AnimationProcessCallback,) {
type CallSig = ((), crate::classes::animation_tree::AnimationProcessCallback);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(501usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationTree", "set_process_callback", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_process_callback(&self,) -> crate::classes::animation_tree::AnimationProcessCallback {
type CallSig = (crate::classes::animation_tree::AnimationProcessCallback,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(502usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AnimationTree", "get_process_callback", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AnimationTree {
type Base = crate::classes::AnimationMixer;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AnimationTree"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AnimationTree {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AnimationMixer > for AnimationTree {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for AnimationTree {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AnimationTree {
}
impl crate::obj::cap::GodotDefault for AnimationTree {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AnimationTree {
type Target = crate::classes::AnimationMixer;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AnimationTree {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AnimationTree`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AnimationTree {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationTree > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AnimationMixer > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct AnimationProcessCallback {
ord: i32
}
impl AnimationProcessCallback {
#[doc(alias = "ANIMATION_PROCESS_PHYSICS")]
#[doc = "Godot enumerator name: `ANIMATION_PROCESS_PHYSICS`"]
pub const PHYSICS: AnimationProcessCallback = AnimationProcessCallback {
ord: 0i32
};
#[doc(alias = "ANIMATION_PROCESS_IDLE")]
#[doc = "Godot enumerator name: `ANIMATION_PROCESS_IDLE`"]
pub const IDLE: AnimationProcessCallback = AnimationProcessCallback {
ord: 1i32
};
#[doc(alias = "ANIMATION_PROCESS_MANUAL")]
#[doc = "Godot enumerator name: `ANIMATION_PROCESS_MANUAL`"]
pub const MANUAL: AnimationProcessCallback = AnimationProcessCallback {
ord: 2i32
};
}
impl std::fmt::Debug for AnimationProcessCallback {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("AnimationProcessCallback") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for AnimationProcessCallback {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::PHYSICS => "PHYSICS", Self::IDLE => "IDLE", Self::MANUAL => "MANUAL", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::PHYSICS => "ANIMATION_PROCESS_PHYSICS", Self::IDLE => "ANIMATION_PROCESS_IDLE", Self::MANUAL => "ANIMATION_PROCESS_MANUAL", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for AnimationProcessCallback {
type Via = i32;
}
impl crate::meta::ToGodot for AnimationProcessCallback {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for AnimationProcessCallback {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,632 @@
#![doc = "Sidecar module for class [`Area2D`][crate::classes::Area2D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `Area2D` enums](https://docs.godotengine.org/en/stable/classes/class_area2d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `Area2D.`\n\nInherits [`CollisionObject2D`][crate::classes::CollisionObject2D].\n\nRelated symbols:\n\n* [`area_2d`][crate::classes::area_2d]: sidecar module with related enum/flag types\n* [`IArea2D`][crate::classes::IArea2D]: virtual methods\n\n\nSee also [Godot docs for `Area2D`](https://docs.godotengine.org/en/stable/classes/class_area2d.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`Area2D::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct Area2D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`Area2D`][crate::classes::Area2D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `Area2D` methods](https://docs.godotengine.org/en/stable/classes/class_area2d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IArea2D: crate::obj::GodotClass < Base = Area2D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: CanvasItemNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn input_event(&mut self, viewport: Gd < crate::classes::Viewport >, event: Gd < crate::classes::InputEvent >, shape_idx: i32,) {
unimplemented !()
}
fn mouse_enter(&mut self,) {
unimplemented !()
}
fn mouse_exit(&mut self,) {
unimplemented !()
}
fn mouse_shape_enter(&mut self, shape_idx: i32,) {
unimplemented !()
}
fn mouse_shape_exit(&mut self, shape_idx: i32,) {
unimplemented !()
}
fn draw(&mut self,) {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl Area2D {
pub fn set_gravity_space_override_mode(&mut self, space_override_mode: crate::classes::area_2d::SpaceOverride,) {
type CallSig = ((), crate::classes::area_2d::SpaceOverride);
let args = (space_override_mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(503usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_gravity_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity_space_override_mode(&self,) -> crate::classes::area_2d::SpaceOverride {
type CallSig = (crate::classes::area_2d::SpaceOverride,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(504usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_gravity_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity_is_point(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(505usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_gravity_is_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_gravity_a_point(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(506usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "is_gravity_a_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity_point_unit_distance(&mut self, distance_scale: f32,) {
type CallSig = ((), f32);
let args = (distance_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(507usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_gravity_point_unit_distance", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity_point_unit_distance(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(508usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_gravity_point_unit_distance", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity_point_center(&mut self, center: Vector2,) {
type CallSig = ((), Vector2);
let args = (center,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(509usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_gravity_point_center", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity_point_center(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(510usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_gravity_point_center", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity_direction(&mut self, direction: Vector2,) {
type CallSig = ((), Vector2);
let args = (direction,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(511usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_gravity_direction", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity_direction(&self,) -> Vector2 {
type CallSig = (Vector2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(512usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_gravity_direction", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity(&mut self, gravity: f32,) {
type CallSig = ((), f32);
let args = (gravity,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(513usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_gravity", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(514usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_gravity", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_linear_damp_space_override_mode(&mut self, space_override_mode: crate::classes::area_2d::SpaceOverride,) {
type CallSig = ((), crate::classes::area_2d::SpaceOverride);
let args = (space_override_mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(515usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_linear_damp_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_linear_damp_space_override_mode(&self,) -> crate::classes::area_2d::SpaceOverride {
type CallSig = (crate::classes::area_2d::SpaceOverride,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(516usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_linear_damp_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_angular_damp_space_override_mode(&mut self, space_override_mode: crate::classes::area_2d::SpaceOverride,) {
type CallSig = ((), crate::classes::area_2d::SpaceOverride);
let args = (space_override_mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(517usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_angular_damp_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_angular_damp_space_override_mode(&self,) -> crate::classes::area_2d::SpaceOverride {
type CallSig = (crate::classes::area_2d::SpaceOverride,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(518usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_angular_damp_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_linear_damp(&mut self, linear_damp: f32,) {
type CallSig = ((), f32);
let args = (linear_damp,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(519usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_linear_damp", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_linear_damp(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(520usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_linear_damp", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_angular_damp(&mut self, angular_damp: f32,) {
type CallSig = ((), f32);
let args = (angular_damp,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(521usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_angular_damp", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_angular_damp(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(522usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_angular_damp", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_priority(&mut self, priority: i32,) {
type CallSig = ((), i32);
let args = (priority,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(523usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_priority", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_priority(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(524usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_priority", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_monitoring(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(525usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_monitoring", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_monitoring(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(526usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "is_monitoring", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_monitorable(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(527usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_monitorable", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_monitorable(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(528usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "is_monitorable", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_overlapping_bodies(&self,) -> Array < Gd < crate::classes::Node2D > > {
type CallSig = (Array < Gd < crate::classes::Node2D > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(529usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_overlapping_bodies", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_overlapping_areas(&self,) -> Array < Gd < crate::classes::Area2D > > {
type CallSig = (Array < Gd < crate::classes::Area2D > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(530usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_overlapping_areas", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_overlapping_bodies(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(531usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "has_overlapping_bodies", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_overlapping_areas(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(532usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "has_overlapping_areas", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn overlaps_body(&self, body: impl AsObjectArg < crate::classes::Node >,) -> bool {
type CallSig = (bool, ObjectArg < crate::classes::Node >);
let args = (body.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(533usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "overlaps_body", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn overlaps_area(&self, area: impl AsObjectArg < crate::classes::Node >,) -> bool {
type CallSig = (bool, ObjectArg < crate::classes::Node >);
let args = (area.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(534usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "overlaps_area", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_audio_bus_name(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(535usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_audio_bus_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_audio_bus_name(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(536usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "get_audio_bus_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_audio_bus_override(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(537usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "set_audio_bus_override", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_overriding_audio_bus(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(538usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area2D", "is_overriding_audio_bus", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for Area2D {
type Base = crate::classes::CollisionObject2D;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"Area2D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for Area2D {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::CollisionObject2D > for Area2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node2D > for Area2D {
}
unsafe impl crate::obj::Inherits < crate::classes::CanvasItem > for Area2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for Area2D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for Area2D {
}
impl crate::obj::cap::GodotDefault for Area2D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for Area2D {
type Target = crate::classes::CollisionObject2D;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for Area2D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`Area2D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_Area2D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::Area2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::CollisionObject2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::CanvasItem > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct SpaceOverride {
ord: i32
}
impl SpaceOverride {
#[doc(alias = "SPACE_OVERRIDE_DISABLED")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_DISABLED`"]
pub const DISABLED: SpaceOverride = SpaceOverride {
ord: 0i32
};
#[doc(alias = "SPACE_OVERRIDE_COMBINE")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_COMBINE`"]
pub const COMBINE: SpaceOverride = SpaceOverride {
ord: 1i32
};
#[doc(alias = "SPACE_OVERRIDE_COMBINE_REPLACE")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_COMBINE_REPLACE`"]
pub const COMBINE_REPLACE: SpaceOverride = SpaceOverride {
ord: 2i32
};
#[doc(alias = "SPACE_OVERRIDE_REPLACE")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_REPLACE`"]
pub const REPLACE: SpaceOverride = SpaceOverride {
ord: 3i32
};
#[doc(alias = "SPACE_OVERRIDE_REPLACE_COMBINE")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_REPLACE_COMBINE`"]
pub const REPLACE_COMBINE: SpaceOverride = SpaceOverride {
ord: 4i32
};
}
impl std::fmt::Debug for SpaceOverride {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("SpaceOverride") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for SpaceOverride {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 | ord @ 4i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DISABLED => "DISABLED", Self::COMBINE => "COMBINE", Self::COMBINE_REPLACE => "COMBINE_REPLACE", Self::REPLACE => "REPLACE", Self::REPLACE_COMBINE => "REPLACE_COMBINE", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DISABLED => "SPACE_OVERRIDE_DISABLED", Self::COMBINE => "SPACE_OVERRIDE_COMBINE", Self::COMBINE_REPLACE => "SPACE_OVERRIDE_COMBINE_REPLACE", Self::REPLACE => "SPACE_OVERRIDE_REPLACE", Self::REPLACE_COMBINE => "SPACE_OVERRIDE_REPLACE_COMBINE", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for SpaceOverride {
type Via = i32;
}
impl crate::meta::ToGodot for SpaceOverride {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for SpaceOverride {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,729 @@
#![doc = "Sidecar module for class [`Area3D`][crate::classes::Area3D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `Area3D` enums](https://docs.godotengine.org/en/stable/classes/class_area3d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `Area3D.`\n\nInherits [`CollisionObject3D`][crate::classes::CollisionObject3D].\n\nRelated symbols:\n\n* [`area_3d`][crate::classes::area_3d]: sidecar module with related enum/flag types\n* [`IArea3D`][crate::classes::IArea3D]: virtual methods\n\n\nSee also [Godot docs for `Area3D`](https://docs.godotengine.org/en/stable/classes/class_area3d.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`Area3D::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct Area3D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`Area3D`][crate::classes::Area3D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `Area3D` methods](https://docs.godotengine.org/en/stable/classes/class_area3d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IArea3D: crate::obj::GodotClass < Base = Area3D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: Node3DNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn input_event(&mut self, camera: Option < Gd < crate::classes::Camera3D > >, event: Option < Gd < crate::classes::InputEvent > >, event_position: Vector3, normal: Vector3, shape_idx: i32,) {
unimplemented !()
}
fn mouse_enter(&mut self,) {
unimplemented !()
}
fn mouse_exit(&mut self,) {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl Area3D {
pub fn set_gravity_space_override_mode(&mut self, space_override_mode: crate::classes::area_3d::SpaceOverride,) {
type CallSig = ((), crate::classes::area_3d::SpaceOverride);
let args = (space_override_mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(539usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_gravity_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity_space_override_mode(&self,) -> crate::classes::area_3d::SpaceOverride {
type CallSig = (crate::classes::area_3d::SpaceOverride,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(540usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_gravity_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity_is_point(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(541usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_gravity_is_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_gravity_a_point(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(542usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "is_gravity_a_point", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity_point_unit_distance(&mut self, distance_scale: f32,) {
type CallSig = ((), f32);
let args = (distance_scale,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(543usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_gravity_point_unit_distance", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity_point_unit_distance(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(544usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_gravity_point_unit_distance", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity_point_center(&mut self, center: Vector3,) {
type CallSig = ((), Vector3);
let args = (center,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(545usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_gravity_point_center", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity_point_center(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(546usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_gravity_point_center", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity_direction(&mut self, direction: Vector3,) {
type CallSig = ((), Vector3);
let args = (direction,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(547usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_gravity_direction", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity_direction(&self,) -> Vector3 {
type CallSig = (Vector3,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(548usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_gravity_direction", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_gravity(&mut self, gravity: f32,) {
type CallSig = ((), f32);
let args = (gravity,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(549usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_gravity", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_gravity(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(550usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_gravity", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_linear_damp_space_override_mode(&mut self, space_override_mode: crate::classes::area_3d::SpaceOverride,) {
type CallSig = ((), crate::classes::area_3d::SpaceOverride);
let args = (space_override_mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(551usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_linear_damp_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_linear_damp_space_override_mode(&self,) -> crate::classes::area_3d::SpaceOverride {
type CallSig = (crate::classes::area_3d::SpaceOverride,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(552usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_linear_damp_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_angular_damp_space_override_mode(&mut self, space_override_mode: crate::classes::area_3d::SpaceOverride,) {
type CallSig = ((), crate::classes::area_3d::SpaceOverride);
let args = (space_override_mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(553usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_angular_damp_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_angular_damp_space_override_mode(&self,) -> crate::classes::area_3d::SpaceOverride {
type CallSig = (crate::classes::area_3d::SpaceOverride,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(554usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_angular_damp_space_override_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_angular_damp(&mut self, angular_damp: f32,) {
type CallSig = ((), f32);
let args = (angular_damp,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(555usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_angular_damp", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_angular_damp(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(556usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_angular_damp", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_linear_damp(&mut self, linear_damp: f32,) {
type CallSig = ((), f32);
let args = (linear_damp,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(557usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_linear_damp", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_linear_damp(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(558usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_linear_damp", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_priority(&mut self, priority: i32,) {
type CallSig = ((), i32);
let args = (priority,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(559usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_priority", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_priority(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(560usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_priority", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_wind_force_magnitude(&mut self, wind_force_magnitude: f32,) {
type CallSig = ((), f32);
let args = (wind_force_magnitude,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(561usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_wind_force_magnitude", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_wind_force_magnitude(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(562usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_wind_force_magnitude", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_wind_attenuation_factor(&mut self, wind_attenuation_factor: f32,) {
type CallSig = ((), f32);
let args = (wind_attenuation_factor,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(563usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_wind_attenuation_factor", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_wind_attenuation_factor(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(564usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_wind_attenuation_factor", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_wind_source_path(&mut self, wind_source_path: impl AsArg < NodePath >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, NodePath >);
let args = (wind_source_path.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(565usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_wind_source_path", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_wind_source_path(&self,) -> NodePath {
type CallSig = (NodePath,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(566usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_wind_source_path", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_monitorable(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(567usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_monitorable", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_monitorable(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(568usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "is_monitorable", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_monitoring(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(569usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_monitoring", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_monitoring(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(570usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "is_monitoring", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_overlapping_bodies(&self,) -> Array < Gd < crate::classes::Node3D > > {
type CallSig = (Array < Gd < crate::classes::Node3D > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(571usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_overlapping_bodies", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_overlapping_areas(&self,) -> Array < Gd < crate::classes::Area3D > > {
type CallSig = (Array < Gd < crate::classes::Area3D > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(572usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_overlapping_areas", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_overlapping_bodies(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(573usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "has_overlapping_bodies", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_overlapping_areas(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(574usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "has_overlapping_areas", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn overlaps_body(&self, body: impl AsObjectArg < crate::classes::Node >,) -> bool {
type CallSig = (bool, ObjectArg < crate::classes::Node >);
let args = (body.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(575usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "overlaps_body", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn overlaps_area(&self, area: impl AsObjectArg < crate::classes::Node >,) -> bool {
type CallSig = (bool, ObjectArg < crate::classes::Node >);
let args = (area.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(576usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "overlaps_area", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_audio_bus_override(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(577usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_audio_bus_override", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_overriding_audio_bus(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(578usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "is_overriding_audio_bus", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_audio_bus_name(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(579usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_audio_bus_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_audio_bus_name(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(580usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_audio_bus_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_use_reverb_bus(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(581usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_use_reverb_bus", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn is_using_reverb_bus(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(582usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "is_using_reverb_bus", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_reverb_bus_name(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(583usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_reverb_bus_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_reverb_bus_name(&self,) -> StringName {
type CallSig = (StringName,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(584usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_reverb_bus_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_reverb_amount(&mut self, amount: f32,) {
type CallSig = ((), f32);
let args = (amount,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(585usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_reverb_amount", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_reverb_amount(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(586usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_reverb_amount", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_reverb_uniformity(&mut self, amount: f32,) {
type CallSig = ((), f32);
let args = (amount,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(587usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "set_reverb_uniformity", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_reverb_uniformity(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(588usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "Area3D", "get_reverb_uniformity", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for Area3D {
type Base = crate::classes::CollisionObject3D;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"Area3D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for Area3D {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::CollisionObject3D > for Area3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node3D > for Area3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for Area3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for Area3D {
}
impl crate::obj::cap::GodotDefault for Area3D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for Area3D {
type Target = crate::classes::CollisionObject3D;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for Area3D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`Area3D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_Area3D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::Area3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::CollisionObject3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct SpaceOverride {
ord: i32
}
impl SpaceOverride {
#[doc(alias = "SPACE_OVERRIDE_DISABLED")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_DISABLED`"]
pub const DISABLED: SpaceOverride = SpaceOverride {
ord: 0i32
};
#[doc(alias = "SPACE_OVERRIDE_COMBINE")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_COMBINE`"]
pub const COMBINE: SpaceOverride = SpaceOverride {
ord: 1i32
};
#[doc(alias = "SPACE_OVERRIDE_COMBINE_REPLACE")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_COMBINE_REPLACE`"]
pub const COMBINE_REPLACE: SpaceOverride = SpaceOverride {
ord: 2i32
};
#[doc(alias = "SPACE_OVERRIDE_REPLACE")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_REPLACE`"]
pub const REPLACE: SpaceOverride = SpaceOverride {
ord: 3i32
};
#[doc(alias = "SPACE_OVERRIDE_REPLACE_COMBINE")]
#[doc = "Godot enumerator name: `SPACE_OVERRIDE_REPLACE_COMBINE`"]
pub const REPLACE_COMBINE: SpaceOverride = SpaceOverride {
ord: 4i32
};
}
impl std::fmt::Debug for SpaceOverride {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("SpaceOverride") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for SpaceOverride {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 | ord @ 4i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DISABLED => "DISABLED", Self::COMBINE => "COMBINE", Self::COMBINE_REPLACE => "COMBINE_REPLACE", Self::REPLACE => "REPLACE", Self::REPLACE_COMBINE => "REPLACE_COMBINE", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::DISABLED => "SPACE_OVERRIDE_DISABLED", Self::COMBINE => "SPACE_OVERRIDE_COMBINE", Self::COMBINE_REPLACE => "SPACE_OVERRIDE_COMBINE_REPLACE", Self::REPLACE => "SPACE_OVERRIDE_REPLACE", Self::REPLACE_COMBINE => "SPACE_OVERRIDE_REPLACE_COMBINE", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for SpaceOverride {
type Via = i32;
}
impl crate::meta::ToGodot for SpaceOverride {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for SpaceOverride {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,473 @@
#![doc = "Sidecar module for class [`ArrayMesh`][crate::classes::ArrayMesh].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `ArrayMesh` enums](https://docs.godotengine.org/en/stable/classes/class_arraymesh.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `ArrayMesh.`\n\nInherits [`Mesh`][crate::classes::Mesh].\n\nRelated symbols:\n\n* [`array_mesh`][crate::classes::array_mesh]: sidecar module with related enum/flag types\n* [`IArrayMesh`][crate::classes::IArrayMesh]: virtual methods\n\n\nSee also [Godot docs for `ArrayMesh`](https://docs.godotengine.org/en/stable/classes/class_arraymesh.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`ArrayMesh::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct ArrayMesh {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`ArrayMesh`][crate::classes::ArrayMesh].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `ArrayMesh` methods](https://docs.godotengine.org/en/stable/classes/class_arraymesh.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IArrayMesh: crate::obj::GodotClass < Base = ArrayMesh > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_surface_count(&self,) -> i32;
fn surface_get_array_len(&self, index: i32,) -> i32;
fn surface_get_array_index_len(&self, index: i32,) -> i32;
fn surface_get_arrays(&self, index: i32,) -> VariantArray;
fn surface_get_blend_shape_arrays(&self, index: i32,) -> Array < VariantArray >;
fn surface_get_lods(&self, index: i32,) -> Dictionary;
fn surface_get_format(&self, index: i32,) -> u32;
fn surface_get_primitive_type(&self, index: i32,) -> u32;
fn surface_set_material(&mut self, index: i32, material: Option < Gd < crate::classes::Material > >,);
fn surface_get_material(&self, index: i32,) -> Option < Gd < crate::classes::Material > >;
fn get_blend_shape_count(&self,) -> i32;
fn get_blend_shape_name(&self, index: i32,) -> StringName;
fn set_blend_shape_name(&mut self, index: i32, name: StringName,);
fn get_aabb(&self,) -> Aabb;
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl ArrayMesh {
pub fn add_blend_shape(&mut self, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), CowArg < 'a0, StringName >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(589usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "add_blend_shape", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_shape_count(&self,) -> i32 {
type CallSig = (i32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(590usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "get_blend_shape_count", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_shape_name(&self, index: i32,) -> StringName {
type CallSig = (StringName, i32);
let args = (index,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(591usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "get_blend_shape_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_blend_shape_name(&mut self, index: i32, name: impl AsArg < StringName >,) {
type CallSig < 'a0, > = ((), i32, CowArg < 'a0, StringName >);
let args = (index, name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(592usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "set_blend_shape_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn clear_blend_shapes(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(593usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "clear_blend_shapes", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_blend_shape_mode(&mut self, mode: crate::classes::mesh::BlendShapeMode,) {
type CallSig = ((), crate::classes::mesh::BlendShapeMode);
let args = (mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(594usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "set_blend_shape_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_blend_shape_mode(&self,) -> crate::classes::mesh::BlendShapeMode {
type CallSig = (crate::classes::mesh::BlendShapeMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(595usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "get_blend_shape_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub(crate) fn add_surface_from_arrays_full(&mut self, primitive: crate::classes::mesh::PrimitiveType, arrays: RefArg < VariantArray >, blend_shapes: RefArg < Array < VariantArray > >, lods: RefArg < Dictionary >, flags: crate::classes::mesh::ArrayFormat,) {
type CallSig < 'a0, 'a1, 'a2, > = ((), crate::classes::mesh::PrimitiveType, RefArg < 'a0, VariantArray >, RefArg < 'a1, Array < VariantArray > >, RefArg < 'a2, Dictionary >, crate::classes::mesh::ArrayFormat);
let args = (primitive, arrays, blend_shapes, lods, flags,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(596usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "add_surface_from_arrays", self.object_ptr, self.__checked_id(), args,)
}
}
#[doc = "To set the default parameters, use [`Self::add_surface_from_arrays_ex`] and its builder methods. See [the book](https://godot-rust.github.io/book/godot-api/functions.html#default-parameters) for detailed usage instructions."]
#[inline]
pub fn add_surface_from_arrays(&mut self, primitive: crate::classes::mesh::PrimitiveType, arrays: &VariantArray,) {
self.add_surface_from_arrays_ex(primitive, arrays,) . done()
}
#[inline]
pub fn add_surface_from_arrays_ex < 'a > (&'a mut self, primitive: crate::classes::mesh::PrimitiveType, arrays: &'a VariantArray,) -> ExAddSurfaceFromArrays < 'a > {
ExAddSurfaceFromArrays::new(self, primitive, arrays,)
}
pub fn clear_surfaces(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(597usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "clear_surfaces", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_update_vertex_region(&mut self, surf_idx: i32, offset: i32, data: &PackedByteArray,) {
type CallSig < 'a0, > = ((), i32, i32, RefArg < 'a0, PackedByteArray >);
let args = (surf_idx, offset, RefArg::new(data),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(598usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_update_vertex_region", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_update_attribute_region(&mut self, surf_idx: i32, offset: i32, data: &PackedByteArray,) {
type CallSig < 'a0, > = ((), i32, i32, RefArg < 'a0, PackedByteArray >);
let args = (surf_idx, offset, RefArg::new(data),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(599usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_update_attribute_region", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_update_skin_region(&mut self, surf_idx: i32, offset: i32, data: &PackedByteArray,) {
type CallSig < 'a0, > = ((), i32, i32, RefArg < 'a0, PackedByteArray >);
let args = (surf_idx, offset, RefArg::new(data),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(600usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_update_skin_region", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_get_array_len(&self, surf_idx: i32,) -> i32 {
type CallSig = (i32, i32);
let args = (surf_idx,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(601usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_get_array_len", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_get_array_index_len(&self, surf_idx: i32,) -> i32 {
type CallSig = (i32, i32);
let args = (surf_idx,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(602usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_get_array_index_len", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_get_format(&self, surf_idx: i32,) -> crate::classes::mesh::ArrayFormat {
type CallSig = (crate::classes::mesh::ArrayFormat, i32);
let args = (surf_idx,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(603usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_get_format", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_get_primitive_type(&self, surf_idx: i32,) -> crate::classes::mesh::PrimitiveType {
type CallSig = (crate::classes::mesh::PrimitiveType, i32);
let args = (surf_idx,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(604usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_get_primitive_type", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_find_by_name(&self, name: impl AsArg < GString >,) -> i32 {
type CallSig < 'a0, > = (i32, CowArg < 'a0, GString >);
let args = (name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(605usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_find_by_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_set_name(&mut self, surf_idx: i32, name: impl AsArg < GString >,) {
type CallSig < 'a0, > = ((), i32, CowArg < 'a0, GString >);
let args = (surf_idx, name.into_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(606usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_set_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn surface_get_name(&self, surf_idx: i32,) -> GString {
type CallSig = (GString, i32);
let args = (surf_idx,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(607usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "surface_get_name", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn regen_normal_maps(&mut self,) {
type CallSig = ((),);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(608usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "regen_normal_maps", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn lightmap_unwrap(&mut self, transform: Transform3D, texel_size: f32,) -> crate::global::Error {
type CallSig = (crate::global::Error, Transform3D, f32);
let args = (transform, texel_size,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(609usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "lightmap_unwrap", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_custom_aabb(&mut self, aabb: Aabb,) {
type CallSig = ((), Aabb);
let args = (aabb,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(610usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "set_custom_aabb", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_custom_aabb(&self,) -> Aabb {
type CallSig = (Aabb,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(611usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "get_custom_aabb", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_shadow_mesh(&mut self, mesh: impl AsObjectArg < crate::classes::ArrayMesh >,) {
type CallSig = ((), ObjectArg < crate::classes::ArrayMesh >);
let args = (mesh.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(612usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "set_shadow_mesh", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_shadow_mesh(&self,) -> Option < Gd < crate::classes::ArrayMesh > > {
type CallSig = (Option < Gd < crate::classes::ArrayMesh > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(613usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayMesh", "get_shadow_mesh", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for ArrayMesh {
type Base = crate::classes::Mesh;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"ArrayMesh"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for ArrayMesh {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Mesh > for ArrayMesh {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for ArrayMesh {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for ArrayMesh {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for ArrayMesh {
}
impl crate::obj::cap::GodotDefault for ArrayMesh {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for ArrayMesh {
type Target = crate::classes::Mesh;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for ArrayMesh {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`ArrayMesh`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_ArrayMesh {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::ArrayMesh > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Mesh > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[doc = "Default-param extender for [`ArrayMesh::add_surface_from_arrays_ex`][super::ArrayMesh::add_surface_from_arrays_ex]."]
#[must_use]
pub struct ExAddSurfaceFromArrays < 'a > {
_phantom: std::marker::PhantomData < &'a() >, surround_object: &'a mut re_export::ArrayMesh, primitive: crate::classes::mesh::PrimitiveType, arrays: CowArg < 'a, VariantArray >, blend_shapes: CowArg < 'a, Array < VariantArray > >, lods: CowArg < 'a, Dictionary >, flags: crate::classes::mesh::ArrayFormat,
}
#[allow(clippy::wrong_self_convention, clippy::redundant_field_names, clippy::needless_update)]
impl < 'a > ExAddSurfaceFromArrays < 'a > {
fn new(surround_object: &'a mut re_export::ArrayMesh, primitive: crate::classes::mesh::PrimitiveType, arrays: &'a VariantArray,) -> Self {
let blend_shapes = Array::new();
let lods = Dictionary::new();
let flags = crate::obj::EngineBitfield::from_ord(0);
Self {
_phantom: std::marker::PhantomData, surround_object: surround_object, primitive: primitive, arrays: CowArg::Borrowed(arrays), blend_shapes: CowArg::Owned(blend_shapes), lods: CowArg::Owned(lods), flags: flags,
}
}
#[inline]
pub fn blend_shapes(self, blend_shapes: &'a Array < VariantArray >) -> Self {
Self {
blend_shapes: CowArg::Borrowed(blend_shapes), .. self
}
}
#[inline]
pub fn lods(self, lods: &'a Dictionary) -> Self {
Self {
lods: CowArg::Borrowed(lods), .. self
}
}
#[inline]
pub fn flags(self, flags: crate::classes::mesh::ArrayFormat) -> Self {
Self {
flags: flags, .. self
}
}
#[inline]
pub fn done(self) {
let Self {
_phantom, surround_object, primitive, arrays, blend_shapes, lods, flags,
}
= self;
re_export::ArrayMesh::add_surface_from_arrays_full(surround_object, primitive, arrays.cow_as_arg(), blend_shapes.cow_as_arg(), lods.cow_as_arg(), flags,)
}
}

View File

@@ -0,0 +1,232 @@
#![doc = "Sidecar module for class [`ArrayOccluder3D`][crate::classes::ArrayOccluder3D].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `ArrayOccluder3D` enums](https://docs.godotengine.org/en/stable/classes/class_arrayoccluder3d.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `ArrayOccluder3D.`\n\nInherits [`Occluder3D`][crate::classes::Occluder3D].\n\nRelated symbols:\n\n* [`IArrayOccluder3D`][crate::classes::IArrayOccluder3D]: virtual methods\n\n\nSee also [Godot docs for `ArrayOccluder3D`](https://docs.godotengine.org/en/stable/classes/class_arrayoccluder3d.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`ArrayOccluder3D::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct ArrayOccluder3D {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`ArrayOccluder3D`][crate::classes::ArrayOccluder3D].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `ArrayOccluder3D` methods](https://docs.godotengine.org/en/stable/classes/class_arrayoccluder3d.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IArrayOccluder3D: crate::obj::GodotClass < Base = ArrayOccluder3D > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl ArrayOccluder3D {
pub fn set_arrays(&mut self, vertices: &PackedVector3Array, indices: &PackedInt32Array,) {
type CallSig < 'a0, 'a1, > = ((), RefArg < 'a0, PackedVector3Array >, RefArg < 'a1, PackedInt32Array >);
let args = (RefArg::new(vertices), RefArg::new(indices),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(614usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayOccluder3D", "set_arrays", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_vertices(&mut self, vertices: &PackedVector3Array,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedVector3Array >);
let args = (RefArg::new(vertices),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(615usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayOccluder3D", "set_vertices", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_indices(&mut self, indices: &PackedInt32Array,) {
type CallSig < 'a0, > = ((), RefArg < 'a0, PackedInt32Array >);
let args = (RefArg::new(indices),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(616usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "ArrayOccluder3D", "set_indices", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for ArrayOccluder3D {
type Base = crate::classes::Occluder3D;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"ArrayOccluder3D"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for ArrayOccluder3D {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Occluder3D > for ArrayOccluder3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for ArrayOccluder3D {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for ArrayOccluder3D {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for ArrayOccluder3D {
}
impl crate::obj::cap::GodotDefault for ArrayOccluder3D {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for ArrayOccluder3D {
type Target = crate::classes::Occluder3D;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for ArrayOccluder3D {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`ArrayOccluder3D`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_ArrayOccluder3D {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::ArrayOccluder3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Occluder3D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,496 @@
#![doc = "Sidecar module for class [`AspectRatioContainer`][crate::classes::AspectRatioContainer].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AspectRatioContainer` enums](https://docs.godotengine.org/en/stable/classes/class_aspectratiocontainer.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AspectRatioContainer.`\n\nInherits [`Container`][crate::classes::Container].\n\nRelated symbols:\n\n* [`aspect_ratio_container`][crate::classes::aspect_ratio_container]: sidecar module with related enum/flag types\n* [`IAspectRatioContainer`][crate::classes::IAspectRatioContainer]: virtual methods\n\n\nSee also [Godot docs for `AspectRatioContainer`](https://docs.godotengine.org/en/stable/classes/class_aspectratiocontainer.html).\n\n"]
#[doc = "# Construction\n\nThis class is manually managed. You can create a new instance using [`AspectRatioContainer::new_alloc()`][crate::obj::NewAlloc::new_alloc].\n\nDo not forget to call [`free()`][crate::obj::Gd::free] or hand over ownership to Godot."]
#[derive(Debug)]
#[repr(C)]
pub struct AspectRatioContainer {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AspectRatioContainer`][crate::classes::AspectRatioContainer].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AspectRatioContainer` methods](https://docs.godotengine.org/en/stable/classes/class_aspectratiocontainer.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAspectRatioContainer: crate::obj::GodotClass < Base = AspectRatioContainer > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ContainerNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_allowed_size_flags_horizontal(&self,) -> PackedInt32Array {
unimplemented !()
}
fn get_allowed_size_flags_vertical(&self,) -> PackedInt32Array {
unimplemented !()
}
fn has_point(&self, point: Vector2,) -> bool {
unimplemented !()
}
fn structured_text_parser(&self, args: VariantArray, text: GString,) -> Array < Vector3i > {
unimplemented !()
}
fn get_minimum_size(&self,) -> Vector2 {
unimplemented !()
}
fn get_tooltip(&self, at_position: Vector2,) -> GString {
unimplemented !()
}
fn get_drag_data(&mut self, at_position: Vector2,) -> Variant {
unimplemented !()
}
fn can_drop_data(&self, at_position: Vector2, data: Variant,) -> bool {
unimplemented !()
}
fn drop_data(&mut self, at_position: Vector2, data: Variant,) {
unimplemented !()
}
fn make_custom_tooltip(&self, for_text: GString,) -> Option < Gd < crate::classes::Object > > {
unimplemented !()
}
fn gui_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn draw(&mut self,) {
unimplemented !()
}
fn process(&mut self, delta: f64,) {
unimplemented !()
}
fn physics_process(&mut self, delta: f64,) {
unimplemented !()
}
fn enter_tree(&mut self,) {
unimplemented !()
}
fn exit_tree(&mut self,) {
unimplemented !()
}
fn ready(&mut self,) {
unimplemented !()
}
fn get_configuration_warnings(&self,) -> PackedStringArray {
unimplemented !()
}
fn input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn shortcut_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
fn unhandled_key_input(&mut self, event: Gd < crate::classes::InputEvent >,) {
unimplemented !()
}
}
impl AspectRatioContainer {
pub fn set_ratio(&mut self, ratio: f32,) {
type CallSig = ((), f32);
let args = (ratio,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(617usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AspectRatioContainer", "set_ratio", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_ratio(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(618usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AspectRatioContainer", "get_ratio", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_stretch_mode(&mut self, stretch_mode: crate::classes::aspect_ratio_container::StretchMode,) {
type CallSig = ((), crate::classes::aspect_ratio_container::StretchMode);
let args = (stretch_mode,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(619usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AspectRatioContainer", "set_stretch_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_stretch_mode(&self,) -> crate::classes::aspect_ratio_container::StretchMode {
type CallSig = (crate::classes::aspect_ratio_container::StretchMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(620usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AspectRatioContainer", "get_stretch_mode", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_alignment_horizontal(&mut self, alignment_horizontal: crate::classes::aspect_ratio_container::AlignmentMode,) {
type CallSig = ((), crate::classes::aspect_ratio_container::AlignmentMode);
let args = (alignment_horizontal,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(621usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AspectRatioContainer", "set_alignment_horizontal", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_alignment_horizontal(&self,) -> crate::classes::aspect_ratio_container::AlignmentMode {
type CallSig = (crate::classes::aspect_ratio_container::AlignmentMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(622usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AspectRatioContainer", "get_alignment_horizontal", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_alignment_vertical(&mut self, alignment_vertical: crate::classes::aspect_ratio_container::AlignmentMode,) {
type CallSig = ((), crate::classes::aspect_ratio_container::AlignmentMode);
let args = (alignment_vertical,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(623usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AspectRatioContainer", "set_alignment_vertical", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_alignment_vertical(&self,) -> crate::classes::aspect_ratio_container::AlignmentMode {
type CallSig = (crate::classes::aspect_ratio_container::AlignmentMode,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(624usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AspectRatioContainer", "get_alignment_vertical", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AspectRatioContainer {
type Base = crate::classes::Container;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AspectRatioContainer"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AspectRatioContainer {
type Memory = crate::obj::bounds::MemManual;
type DynMemory = crate::obj::bounds::MemManual;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Container > for AspectRatioContainer {
}
unsafe impl crate::obj::Inherits < crate::classes::Control > for AspectRatioContainer {
}
unsafe impl crate::obj::Inherits < crate::classes::CanvasItem > for AspectRatioContainer {
}
unsafe impl crate::obj::Inherits < crate::classes::Node > for AspectRatioContainer {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AspectRatioContainer {
}
impl crate::obj::cap::GodotDefault for AspectRatioContainer {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AspectRatioContainer {
type Target = crate::classes::Container;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AspectRatioContainer {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AspectRatioContainer`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AspectRatioContainer {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AspectRatioContainer > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Container > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Control > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::CanvasItem > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Node > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct StretchMode {
ord: i32
}
impl StretchMode {
#[doc(alias = "STRETCH_WIDTH_CONTROLS_HEIGHT")]
#[doc = "Godot enumerator name: `STRETCH_WIDTH_CONTROLS_HEIGHT`"]
pub const WIDTH_CONTROLS_HEIGHT: StretchMode = StretchMode {
ord: 0i32
};
#[doc(alias = "STRETCH_HEIGHT_CONTROLS_WIDTH")]
#[doc = "Godot enumerator name: `STRETCH_HEIGHT_CONTROLS_WIDTH`"]
pub const HEIGHT_CONTROLS_WIDTH: StretchMode = StretchMode {
ord: 1i32
};
#[doc(alias = "STRETCH_FIT")]
#[doc = "Godot enumerator name: `STRETCH_FIT`"]
pub const FIT: StretchMode = StretchMode {
ord: 2i32
};
#[doc(alias = "STRETCH_COVER")]
#[doc = "Godot enumerator name: `STRETCH_COVER`"]
pub const COVER: StretchMode = StretchMode {
ord: 3i32
};
}
impl std::fmt::Debug for StretchMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("StretchMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for StretchMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 | ord @ 3i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::WIDTH_CONTROLS_HEIGHT => "WIDTH_CONTROLS_HEIGHT", Self::HEIGHT_CONTROLS_WIDTH => "HEIGHT_CONTROLS_WIDTH", Self::FIT => "FIT", Self::COVER => "COVER", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::WIDTH_CONTROLS_HEIGHT => "STRETCH_WIDTH_CONTROLS_HEIGHT", Self::HEIGHT_CONTROLS_WIDTH => "STRETCH_HEIGHT_CONTROLS_WIDTH", Self::FIT => "STRETCH_FIT", Self::COVER => "STRETCH_COVER", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for StretchMode {
type Via = i32;
}
impl crate::meta::ToGodot for StretchMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for StretchMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct AlignmentMode {
ord: i32
}
impl AlignmentMode {
#[doc(alias = "ALIGNMENT_BEGIN")]
#[doc = "Godot enumerator name: `ALIGNMENT_BEGIN`"]
pub const BEGIN: AlignmentMode = AlignmentMode {
ord: 0i32
};
#[doc(alias = "ALIGNMENT_CENTER")]
#[doc = "Godot enumerator name: `ALIGNMENT_CENTER`"]
pub const CENTER: AlignmentMode = AlignmentMode {
ord: 1i32
};
#[doc(alias = "ALIGNMENT_END")]
#[doc = "Godot enumerator name: `ALIGNMENT_END`"]
pub const END: AlignmentMode = AlignmentMode {
ord: 2i32
};
}
impl std::fmt::Debug for AlignmentMode {
fn fmt(&self, f: &mut std::fmt::Formatter < '_ >) -> std::fmt::Result {
use crate::obj::EngineEnum;
let enumerator = self.as_str();
if enumerator.is_empty() {
f.debug_struct("AlignmentMode") . field("ord", &self.ord) . finish() ?;
return Ok(());
}
f.write_str(enumerator)
}
}
impl crate::obj::EngineEnum for AlignmentMode {
fn try_from_ord(ord: i32) -> Option < Self > {
match ord {
ord @ 0i32 | ord @ 1i32 | ord @ 2i32 => Some(Self {
ord
}), _ => None,
}
}
fn ord(self) -> i32 {
self.ord
}
#[inline]
fn as_str(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::BEGIN => "BEGIN", Self::CENTER => "CENTER", Self::END => "END", _ => "",
}
}
fn godot_name(&self) -> &'static str {
#[allow(unreachable_patterns)]
match * self {
Self::BEGIN => "ALIGNMENT_BEGIN", Self::CENTER => "ALIGNMENT_CENTER", Self::END => "ALIGNMENT_END", _ => self.as_str(),
}
}
}
impl crate::meta::GodotConvert for AlignmentMode {
type Via = i32;
}
impl crate::meta::ToGodot for AlignmentMode {
type ToVia < 'v > = i32;
fn to_godot(&self) -> Self::ToVia < '_ > {
< Self as crate::obj::EngineEnum > ::ord(* self)
}
}
impl crate::meta::FromGodot for AlignmentMode {
fn try_from_godot(via: Self::Via) -> std::result::Result < Self, crate::meta::error::ConvertError > {
< Self as crate::obj::EngineEnum > ::try_from_ord(via) . ok_or_else(|| crate::meta::error::FromGodotError::InvalidEnum.into_error(via))
}
}

View File

@@ -0,0 +1,295 @@
#![doc = "Sidecar module for class [`AtlasTexture`][crate::classes::AtlasTexture].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AtlasTexture` enums](https://docs.godotengine.org/en/stable/classes/class_atlastexture.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AtlasTexture.`\n\nInherits [`Texture2D`][crate::classes::Texture2D].\n\nRelated symbols:\n\n* [`IAtlasTexture`][crate::classes::IAtlasTexture]: virtual methods\n\n\nSee also [Godot docs for `AtlasTexture`](https://docs.godotengine.org/en/stable/classes/class_atlastexture.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AtlasTexture::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AtlasTexture {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AtlasTexture`][crate::classes::AtlasTexture].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AtlasTexture` methods](https://docs.godotengine.org/en/stable/classes/class_atlastexture.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAtlasTexture: crate::obj::GodotClass < Base = AtlasTexture > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn get_width(&self,) -> i32;
fn get_height(&self,) -> i32;
fn is_pixel_opaque(&self, x: i32, y: i32,) -> bool {
unimplemented !()
}
fn has_alpha(&self,) -> bool {
unimplemented !()
}
fn draw(&self, to_canvas_item: Rid, pos: Vector2, modulate: Color, transpose: bool,) {
unimplemented !()
}
fn draw_rect(&self, to_canvas_item: Rid, rect: Rect2, tile: bool, modulate: Color, transpose: bool,) {
unimplemented !()
}
fn draw_rect_region(&self, to_canvas_item: Rid, rect: Rect2, src_rect: Rect2, modulate: Color, transpose: bool, clip_uv: bool,) {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AtlasTexture {
pub fn set_atlas(&mut self, atlas: impl AsObjectArg < crate::classes::Texture2D >,) {
type CallSig = ((), ObjectArg < crate::classes::Texture2D >);
let args = (atlas.as_object_arg(),);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(625usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AtlasTexture", "set_atlas", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_atlas(&self,) -> Option < Gd < crate::classes::Texture2D > > {
type CallSig = (Option < Gd < crate::classes::Texture2D > >,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(626usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AtlasTexture", "get_atlas", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_region(&mut self, region: Rect2,) {
type CallSig = ((), Rect2);
let args = (region,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(627usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AtlasTexture", "set_region", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_region(&self,) -> Rect2 {
type CallSig = (Rect2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(628usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AtlasTexture", "get_region", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_margin(&mut self, margin: Rect2,) {
type CallSig = ((), Rect2);
let args = (margin,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(629usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AtlasTexture", "set_margin", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_margin(&self,) -> Rect2 {
type CallSig = (Rect2,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(630usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AtlasTexture", "get_margin", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn set_filter_clip(&mut self, enable: bool,) {
type CallSig = ((), bool);
let args = (enable,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(631usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AtlasTexture", "set_filter_clip", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn has_filter_clip(&self,) -> bool {
type CallSig = (bool,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(632usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AtlasTexture", "has_filter_clip", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AtlasTexture {
type Base = crate::classes::Texture2D;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AtlasTexture"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AtlasTexture {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Texture2D > for AtlasTexture {
}
unsafe impl crate::obj::Inherits < crate::classes::Texture > for AtlasTexture {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AtlasTexture {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AtlasTexture {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AtlasTexture {
}
impl crate::obj::cap::GodotDefault for AtlasTexture {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AtlasTexture {
type Target = crate::classes::Texture2D;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AtlasTexture {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AtlasTexture`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AtlasTexture {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AtlasTexture > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Texture2D > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Texture > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,202 @@
#![doc = "Sidecar module for class [`AudioBusLayout`][crate::classes::AudioBusLayout].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AudioBusLayout` enums](https://docs.godotengine.org/en/stable/classes/class_audiobuslayout.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AudioBusLayout.`\n\nInherits [`Resource`][crate::classes::Resource].\n\nRelated symbols:\n\n* [`IAudioBusLayout`][crate::classes::IAudioBusLayout]: virtual methods\n\n\nSee also [Godot docs for `AudioBusLayout`](https://docs.godotengine.org/en/stable/classes/class_audiobuslayout.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AudioBusLayout::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AudioBusLayout {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AudioBusLayout`][crate::classes::AudioBusLayout].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AudioBusLayout` methods](https://docs.godotengine.org/en/stable/classes/class_audiobuslayout.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAudioBusLayout: crate::obj::GodotClass < Base = AudioBusLayout > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AudioBusLayout {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AudioBusLayout {
type Base = crate::classes::Resource;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AudioBusLayout"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AudioBusLayout {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AudioBusLayout {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AudioBusLayout {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AudioBusLayout {
}
impl crate::obj::cap::GodotDefault for AudioBusLayout {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AudioBusLayout {
type Target = crate::classes::Resource;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AudioBusLayout {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AudioBusLayout`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AudioBusLayout {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioBusLayout > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,203 @@
#![doc = "Sidecar module for class [`AudioEffect`][crate::classes::AudioEffect].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AudioEffect` enums](https://docs.godotengine.org/en/stable/classes/class_audioeffect.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AudioEffect.`\n\nInherits [`Resource`][crate::classes::Resource].\n\nRelated symbols:\n\n* [`IAudioEffect`][crate::classes::IAudioEffect]: virtual methods\n\n\nSee also [Godot docs for `AudioEffect`](https://docs.godotengine.org/en/stable/classes/class_audioeffect.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AudioEffect::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AudioEffect {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AudioEffect`][crate::classes::AudioEffect].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AudioEffect` methods](https://docs.godotengine.org/en/stable/classes/class_audioeffect.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAudioEffect: crate::obj::GodotClass < Base = AudioEffect > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn instantiate(&mut self,) -> Option < Gd < crate::classes::AudioEffectInstance > >;
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AudioEffect {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AudioEffect {
type Base = crate::classes::Resource;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AudioEffect"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AudioEffect {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AudioEffect {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AudioEffect {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AudioEffect {
}
impl crate::obj::cap::GodotDefault for AudioEffect {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AudioEffect {
type Target = crate::classes::Resource;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AudioEffect {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AudioEffect`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AudioEffect {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioEffect > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,225 @@
#![doc = "Sidecar module for class [`AudioEffectAmplify`][crate::classes::AudioEffectAmplify].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AudioEffectAmplify` enums](https://docs.godotengine.org/en/stable/classes/class_audioeffectamplify.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AudioEffectAmplify.`\n\nInherits [`AudioEffect`][crate::classes::AudioEffect].\n\nRelated symbols:\n\n* [`IAudioEffectAmplify`][crate::classes::IAudioEffectAmplify]: virtual methods\n\n\nSee also [Godot docs for `AudioEffectAmplify`](https://docs.godotengine.org/en/stable/classes/class_audioeffectamplify.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AudioEffectAmplify::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AudioEffectAmplify {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AudioEffectAmplify`][crate::classes::AudioEffectAmplify].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AudioEffectAmplify` methods](https://docs.godotengine.org/en/stable/classes/class_audioeffectamplify.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAudioEffectAmplify: crate::obj::GodotClass < Base = AudioEffectAmplify > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn instantiate(&mut self,) -> Option < Gd < crate::classes::AudioEffectInstance > >;
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AudioEffectAmplify {
pub fn set_volume_db(&mut self, volume: f32,) {
type CallSig = ((), f32);
let args = (volume,);
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(633usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AudioEffectAmplify", "set_volume_db", self.object_ptr, self.__checked_id(), args,)
}
}
pub fn get_volume_db(&self,) -> f32 {
type CallSig = (f32,);
let args = ();
unsafe {
let method_bind = sys::class_scene_api() . fptr_by_index(634usize);
< CallSig as PtrcallSignatureTuple > ::out_class_ptrcall(method_bind, "AudioEffectAmplify", "get_volume_db", self.object_ptr, self.__checked_id(), args,)
}
}
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AudioEffectAmplify {
type Base = crate::classes::AudioEffect;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AudioEffectAmplify"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AudioEffectAmplify {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AudioEffect > for AudioEffectAmplify {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AudioEffectAmplify {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AudioEffectAmplify {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AudioEffectAmplify {
}
impl crate::obj::cap::GodotDefault for AudioEffectAmplify {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AudioEffectAmplify {
type Target = crate::classes::AudioEffect;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AudioEffectAmplify {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AudioEffectAmplify`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AudioEffectAmplify {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioEffectAmplify > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioEffect > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,215 @@
#![doc = "Sidecar module for class [`AudioEffectBandLimitFilter`][crate::classes::AudioEffectBandLimitFilter].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AudioEffectBandLimitFilter` enums](https://docs.godotengine.org/en/stable/classes/class_audioeffectbandlimitfilter.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AudioEffectBandLimitFilter.`\n\nInherits [`AudioEffectFilter`][crate::classes::AudioEffectFilter].\n\nRelated symbols:\n\n* [`IAudioEffectBandLimitFilter`][crate::classes::IAudioEffectBandLimitFilter]: virtual methods\n\n\nSee also [Godot docs for `AudioEffectBandLimitFilter`](https://docs.godotengine.org/en/stable/classes/class_audioeffectbandlimitfilter.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AudioEffectBandLimitFilter::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AudioEffectBandLimitFilter {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AudioEffectBandLimitFilter`][crate::classes::AudioEffectBandLimitFilter].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AudioEffectBandLimitFilter` methods](https://docs.godotengine.org/en/stable/classes/class_audioeffectbandlimitfilter.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAudioEffectBandLimitFilter: crate::obj::GodotClass < Base = AudioEffectBandLimitFilter > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn instantiate(&mut self,) -> Option < Gd < crate::classes::AudioEffectInstance > >;
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AudioEffectBandLimitFilter {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AudioEffectBandLimitFilter {
type Base = crate::classes::AudioEffectFilter;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AudioEffectBandLimitFilter"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AudioEffectBandLimitFilter {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AudioEffectFilter > for AudioEffectBandLimitFilter {
}
unsafe impl crate::obj::Inherits < crate::classes::AudioEffect > for AudioEffectBandLimitFilter {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AudioEffectBandLimitFilter {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AudioEffectBandLimitFilter {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AudioEffectBandLimitFilter {
}
impl crate::obj::cap::GodotDefault for AudioEffectBandLimitFilter {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AudioEffectBandLimitFilter {
type Target = crate::classes::AudioEffectFilter;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AudioEffectBandLimitFilter {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AudioEffectBandLimitFilter`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AudioEffectBandLimitFilter {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioEffectBandLimitFilter > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioEffectFilter > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioEffect > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

View File

@@ -0,0 +1,215 @@
#![doc = "Sidecar module for class [`AudioEffectBandPassFilter`][crate::classes::AudioEffectBandPassFilter].\n\nDefines related flag and enum types. In GDScript, those are nested under the class scope.\n\nSee also [Godot docs for `AudioEffectBandPassFilter` enums](https://docs.godotengine.org/en/stable/classes/class_audioeffectbandpassfilter.html#enumerations).\n\n"]
use godot_ffi as sys;
use crate::builtin::*;
use crate::meta::{
AsArg, AsObjectArg, ClassName, CowArg, ObjectArg, ObjectCow, PtrcallSignatureTuple, RefArg, VarcallSignatureTuple
};
use crate::classes::native::*;
use crate::classes::Object;
use crate::obj::Gd;
use crate::sys::GodotFfi as _;
use crate::classes::notify::*;
use std::ffi::c_void;
pub(super) mod re_export {
use super::*;
#[doc = "Godot class `AudioEffectBandPassFilter.`\n\nInherits [`AudioEffectFilter`][crate::classes::AudioEffectFilter].\n\nRelated symbols:\n\n* [`IAudioEffectBandPassFilter`][crate::classes::IAudioEffectBandPassFilter]: virtual methods\n\n\nSee also [Godot docs for `AudioEffectBandPassFilter`](https://docs.godotengine.org/en/stable/classes/class_audioeffectbandpassfilter.html).\n\n"]
#[doc = "# Construction\n\nThis class is reference-counted. You can create a new instance using [`AudioEffectBandPassFilter::new_gd()`][crate::obj::NewGd::new_gd]."]
#[derive(Debug)]
#[repr(C)]
pub struct AudioEffectBandPassFilter {
object_ptr: sys::GDExtensionObjectPtr, rtti: Option < crate::private::ObjectRtti >,
}
#[doc = "Virtual methods for class [`AudioEffectBandPassFilter`][crate::classes::AudioEffectBandPassFilter].\n\nThese methods represent constructors (`init`) or callbacks invoked by the engine.\n\nSee also [Godot docs for `AudioEffectBandPassFilter` methods](https://docs.godotengine.org/en/stable/classes/class_audioeffectbandpassfilter.html#methods).\n\n"]
#[allow(unused_variables)]
#[allow(clippy::unimplemented)]
pub trait IAudioEffectBandPassFilter: crate::obj::GodotClass < Base = AudioEffectBandPassFilter > + crate::private::You_forgot_the_attribute__godot_api {
#[doc(hidden)]
fn register_class(builder: &mut crate::builder::ClassBuilder < Self >) {
unimplemented !()
}
#[doc = r" Godot constructor, accepting an injected `base` object."]
#[doc = r""]
#[doc = r" `base` refers to the base instance of the class, which can either be stored in a `Base<T>` field or discarded."]
#[doc = r" This method returns a fully-constructed instance, which will then be moved into a [`Gd<T>`][crate::obj::Gd] pointer."]
#[doc = r""]
#[doc = r" If the class has a `#[class(init)]` attribute, this method will be auto-generated and must not be overridden."]
fn init(base: crate::obj::Base < Self::Base >) -> Self {
unimplemented !()
}
#[doc = r" String representation of the Godot instance."]
#[doc = r""]
#[doc = r" Override this method to define how the instance is represented as a string."]
#[doc = r" Used by `impl Display for Gd<T>`, as well as `str()` and `print()` in GDScript."]
fn to_string(&self) -> crate::builtin::GString {
unimplemented !()
}
#[doc = r" Called when the object receives a Godot notification."]
#[doc = r""]
#[doc = r" The type of notification can be identified through `what`. The enum is designed to hold all possible `NOTIFICATION_*`"]
#[doc = r" constants that the current class can handle. However, this is not validated in Godot, so an enum variant `Unknown` exists"]
#[doc = r" to represent integers out of known constants (mistakes or future additions)."]
#[doc = r""]
#[doc = r" This method is named `_notification` in Godot, but `on_notification` in Rust. To _send_ notifications, use the"]
#[doc = r" [`Object::notify`][crate::classes::Object::notify] method."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_notification`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-notification)."]
#[doc = r" * [Notifications tutorial](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)."]
fn on_notification(&mut self, what: ObjectNotification) {
unimplemented !()
}
#[doc = r" Called whenever [`get()`](crate::classes::Object::get) is called or Godot gets the value of a property."]
#[doc = r""]
#[doc = r" Should return the given `property`'s value as `Some(value)`, or `None` if the property should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-get)."]
fn get_property(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
#[doc = r" Called whenever Godot [`set()`](crate::classes::Object::set) is called or Godot sets the value of a property."]
#[doc = r""]
#[doc = r" Should set `property` to the given `value` and return `true`, or return `false` to indicate the `property`"]
#[doc = r" should be handled normally."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_set`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-set)."]
fn set_property(&mut self, property: StringName, value: Variant) -> bool {
unimplemented !()
}
#[doc = r" Called whenever Godot [`get_property_list()`](crate::classes::Object::get_property_list) is called, the returned vector here is"]
#[doc = r" appended to the existing list of properties."]
#[doc = r""]
#[doc = r" This should mainly be used for advanced purposes, such as dynamically updating the property list in the editor."]
#[doc = r""]
#[doc = r" See also in Godot docs:"]
#[doc = r" * [`Object::_get_property_list`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-get-property-list)"]
#[cfg(since_api = "4.3")]
fn get_property_list(&mut self) -> Vec < crate::meta::PropertyInfo > {
unimplemented !()
}
#[doc = r" Called whenever Godot retrieves value of property. Allows to customize existing properties."]
#[doc = r" Every property info goes through this method, except properties **added** with `get_property_list()`."]
#[doc = r""]
#[doc = r" Exposed `property` here is a shared mutable reference obtained (and returned to) from Godot."]
#[doc = r""]
#[doc = r" See also in the Godot docs:"]
#[doc = r" * [`Object::_validate_property`](https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-private-method-validate-property)"]
#[cfg(since_api = "4.2")]
fn validate_property(&self, property: &mut crate::meta::PropertyInfo) {
unimplemented !()
}
#[doc = r" Called by Godot to tell if a property has a custom revert or not."]
#[doc = r""]
#[doc = r" Return `None` for no custom revert, and return `Some(value)` to specify the custom revert."]
#[doc = r""]
#[doc = r" This is a combination of Godot's [`Object::_property_get_revert`] and [`Object::_property_can_revert`]. This means that this"]
#[doc = r" function will usually be called twice by Godot to find the revert."]
#[doc = r""]
#[doc = r" Note that this should be a _pure_ function. That is, it should always return the same value for a property as long as `self`"]
#[doc = r" remains unchanged. Otherwise, this may lead to unexpected (safe) behavior."]
#[doc = r""]
#[doc = r" [`Object::_property_get_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-get-revert"]
#[doc = r" [`Object::_property_can_revert`]: https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-private-method-property-can-revert"]
#[doc(alias = "property_can_revert")]
fn property_get_revert(&self, property: StringName) -> Option < Variant > {
unimplemented !()
}
fn instantiate(&mut self,) -> Option < Gd < crate::classes::AudioEffectInstance > >;
fn setup_local_to_scene(&mut self,) {
unimplemented !()
}
}
impl AudioEffectBandPassFilter {
fn __checked_id(&self) -> Option < crate::obj::InstanceId > {
let rtti = unsafe {
self.rtti.as_ref() . unwrap_unchecked()
};
let instance_id = rtti.check_type::< Self > ();
Some(instance_id)
}
#[doc(hidden)]
pub fn __object_ptr(&self) -> sys::GDExtensionObjectPtr {
self.object_ptr
}
}
impl crate::obj::GodotClass for AudioEffectBandPassFilter {
type Base = crate::classes::AudioEffectFilter;
fn class_name() -> ClassName {
static CLASS_NAME: std::sync::OnceLock < ClassName > = std::sync::OnceLock::new();
let name: &'static ClassName = CLASS_NAME.get_or_init(|| ClassName::alloc_next_ascii(c"AudioEffectBandPassFilter"));
* name
}
const INIT_LEVEL: crate::init::InitLevel = crate::init::InitLevel::Scene;
}
unsafe impl crate::obj::Bounds for AudioEffectBandPassFilter {
type Memory = crate::obj::bounds::MemRefCounted;
type DynMemory = crate::obj::bounds::MemRefCounted;
type Declarer = crate::obj::bounds::DeclEngine;
type Exportable = crate::obj::bounds::Yes;
}
unsafe impl crate::obj::Inherits < crate::classes::AudioEffectFilter > for AudioEffectBandPassFilter {
}
unsafe impl crate::obj::Inherits < crate::classes::AudioEffect > for AudioEffectBandPassFilter {
}
unsafe impl crate::obj::Inherits < crate::classes::Resource > for AudioEffectBandPassFilter {
}
unsafe impl crate::obj::Inherits < crate::classes::RefCounted > for AudioEffectBandPassFilter {
}
unsafe impl crate::obj::Inherits < crate::classes::Object > for AudioEffectBandPassFilter {
}
impl crate::obj::cap::GodotDefault for AudioEffectBandPassFilter {
fn __godot_default() -> crate::obj::Gd < Self > {
crate::classes::construct_engine_object::< Self > ()
}
}
impl std::ops::Deref for AudioEffectBandPassFilter {
type Target = crate::classes::AudioEffectFilter;
fn deref(&self) -> &Self::Target {
unsafe {
std::mem::transmute::< &Self, &Self::Target > (self)
}
}
}
impl std::ops::DerefMut for AudioEffectBandPassFilter {
fn deref_mut(&mut self) -> &mut Self::Target {
unsafe {
std::mem::transmute::< &mut Self, &mut Self::Target > (self)
}
}
}
#[doc = r" # Safety"]
#[doc = r""]
#[doc = "The provided class must be a subclass of all the superclasses of [`AudioEffectBandPassFilter`]"]
#[macro_export]
#[allow(non_snake_case)]
macro_rules !unsafe_inherits_transitive_AudioEffectBandPassFilter {
($Class: ident) => {
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioEffectBandPassFilter > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioEffectFilter > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::AudioEffect > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Resource > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::RefCounted > for $Class {
}
unsafe impl::godot::obj::Inherits < ::godot::classes::Object > for $Class {
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More