Skip to main content

engage/generated/unity_engine/yoga/
baselinefunction.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-yoga-baselinefunction-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        delegate::{Delegate, IDelegate},
10        multicastdelegate::{IMulticastDelegate, MulticastDelegate},
11        object::{IObject, Object},
12    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/yoga/baselinefunction/BaselineFunction.md"))]
15    #[::unity::class(namespace = "UnityEngine.Yoga", name = "BaselineFunction")]
16    #[parent(crate::system::multicastdelegate::MulticastDelegate)]
17    pub struct BaselineFunction {}
18}
19
20#[cfg(feature = "unity_engine-yoga-baselinefunction-types")]
21pub use __types::*;
22
23#[cfg(feature = "unity_engine-yoga-baselinefunction")]
24pub trait IBaselineFunctionMethods: IBaselineFunction {
25    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` overload"]
26    fn ctor(self, object: impl ::core::convert::Into<crate::system::object::Object>, method: impl ::core::convert::Into<::unity::IntPtr>) -> () {
27        unsafe {
28            let __receiver = <BaselineFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
29            ::unity::il2cpp_call!((::unity::module_base()+0x3f3f6c0usize)as*mut u8,();
30(BaselineFunction)__receiver,(crate::system::object::Object)::core::convert::Into::into(object),(::unity::IntPtr)::core::convert::Into::into(method))
31        }
32    }
33    #[doc = "`Invoke(crate::unity_engine::yoga::yoganode::YogaNode, f32, f32)` overload"]
34    fn invoke(
35        self,
36        node: impl ::core::convert::Into<crate::unity_engine::yoga::yoganode::YogaNode>,
37        width: impl ::core::convert::Into<f32>,
38        height: impl ::core::convert::Into<f32>,
39    ) -> f32 {
40        unsafe {
41            let __receiver = <BaselineFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
42            {
43                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
44                let __vi = *__vt.get(13usize).unwrap_or_else(|| {
45                    panic!(
46                        "unity: virtual slot {}
47 out of range (vtable len {}
48) on the runtime class behind {}
49 (method `{}
50`)",
51                        13usize,
52                        __vt.len(),
53                        <BaselineFunction as ::unity::ClassIdentity>::NAME,
54                        "Invoke",
55                    )
56                });
57                let __inner: extern "C" fn(
58                    BaselineFunction,
59                    crate::unity_engine::yoga::yoganode::YogaNode,
60                    f32,
61                    f32,
62                    ::unity::OptionalMethod,
63                ) -> f32 = ::core::mem::transmute(__vi.method_ptr);
64                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
65                __inner(
66                    __receiver,
67                    ::core::convert::Into::into(node),
68                    ::core::convert::Into::into(width),
69                    ::core::convert::Into::into(height),
70                    __mi,
71                )
72            }
73        }
74    }
75}
76
77#[cfg(feature = "unity_engine-yoga-baselinefunction")]
78impl<__T: IBaselineFunction> IBaselineFunctionMethods for __T {}
79
80#[cfg(feature = "unity_engine-yoga-baselinefunction")]
81impl BaselineFunction {
82    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
83        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
84    }
85
86    pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
87        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
88    }
89}
90
91#[cfg(feature = "unity_engine-yoga-baselinefunction")]
92impl BaselineFunction {
93    #[doc = "Direct (non-virtual) call to `BaselineFunction`'s own `Invoke`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
94    pub unsafe fn invoke(
95        this: impl ::core::convert::Into<::unity::IlInstance>,
96        node: crate::unity_engine::yoga::yoganode::YogaNode,
97        width: f32,
98        height: f32,
99    ) -> f32 {
100        let __mi = Self::invoke_method_info();
101        let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::yoga::yoganode::YogaNode, f32, f32, ::unity::OptionalMethod) -> f32 =
102            ::core::mem::transmute(__mi.method_ptr);
103        __inner(this.into(), node, width, height, ::core::option::Option::None)
104    }
105}
106
107#[cfg(feature = "unity_engine-yoga-baselinefunction")]
108impl BaselineFunction {
109    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` — overload selector"]
110    pub fn new(object: crate::system::object::Object, method: ::unity::IntPtr) -> Self {
111        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
112            panic!(
113                "{}
114::{}
115 failed to instantiate",
116                ::core::stringify!(BaselineFunction),
117                ::core::stringify!(new),
118            )
119        });
120        <Self as IBaselineFunctionMethods>::ctor(this, object, method);
121        this
122    }
123}
124
125#[cfg(feature = "unity_engine-yoga-baselinefunction")]
126#[doc(hidden)]
127pub mod prelude {
128    pub use super::{BaselineFunction, IBaselineFunction, IBaselineFunctionMethods};
129    #[cfg(feature = "system-delegate")]
130    pub use crate::system::delegate::IDelegateMethods;
131    #[cfg(feature = "system-multicastdelegate")]
132    pub use crate::system::multicastdelegate::IMulticastDelegateMethods;
133    #[cfg(feature = "system-object")]
134    pub use crate::system::object::IObjectMethods;
135    pub use crate::system::{delegate::IDelegate, multicastdelegate::IMulticastDelegate, object::IObject};
136}