engage/generated/unity_engine/yoga/
measurefunction.rs1#[cfg(feature = "unity_engine-yoga-measurefunction-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/measurefunction/MeasureFunction.md"))]
15 #[::unity::class(namespace = "UnityEngine.Yoga", name = "MeasureFunction")]
16 #[parent(crate::system::multicastdelegate::MulticastDelegate)]
17 pub struct MeasureFunction {}
18}
19
20#[cfg(feature = "unity_engine-yoga-measurefunction-types")]
21pub use __types::*;
22
23#[cfg(feature = "unity_engine-yoga-measurefunction")]
24pub trait IMeasureFunctionMethods: IMeasureFunction {
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 = <MeasureFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
29 ::unity::il2cpp_call!((::unity::module_base()+0x3f3fb60usize)as*mut u8,();
30(MeasureFunction)__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, crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode, f32, crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode)` 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 width_mode: impl ::core::convert::Into<crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode>,
39 height: impl ::core::convert::Into<f32>,
40 height_mode: impl ::core::convert::Into<crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode>,
41 ) -> crate::unity_engine::yoga::yogasize::YogaSize {
42 unsafe {
43 let __receiver = <MeasureFunction as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
44 {
45 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
46 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
47 panic!(
48 "unity: virtual slot {}
49 out of range (vtable len {}
50) on the runtime class behind {}
51 (method `{}
52`)",
53 13usize,
54 __vt.len(),
55 <MeasureFunction as ::unity::ClassIdentity>::NAME,
56 "Invoke",
57 )
58 });
59 let __inner: extern "C" fn(
60 MeasureFunction,
61 crate::unity_engine::yoga::yoganode::YogaNode,
62 f32,
63 crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode,
64 f32,
65 crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode,
66 ::unity::OptionalMethod,
67 ) -> crate::unity_engine::yoga::yogasize::YogaSize = ::core::mem::transmute(__vi.method_ptr);
68 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
69 __inner(
70 __receiver,
71 ::core::convert::Into::into(node),
72 ::core::convert::Into::into(width),
73 ::core::convert::Into::into(width_mode),
74 ::core::convert::Into::into(height),
75 ::core::convert::Into::into(height_mode),
76 __mi,
77 )
78 }
79 }
80 }
81}
82
83#[cfg(feature = "unity_engine-yoga-measurefunction")]
84impl<__T: IMeasureFunction> IMeasureFunctionMethods for __T {}
85
86#[cfg(feature = "unity_engine-yoga-measurefunction")]
87impl MeasureFunction {
88 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
89 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
90 }
91
92 pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
93 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
94 }
95}
96
97#[cfg(feature = "unity_engine-yoga-measurefunction")]
98impl MeasureFunction {
99 #[doc = "Direct (non-virtual) call to `MeasureFunction`'s own `Invoke`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
100 pub unsafe fn invoke(
101 this: impl ::core::convert::Into<::unity::IlInstance>,
102 node: crate::unity_engine::yoga::yoganode::YogaNode,
103 width: f32,
104 width_mode: crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode,
105 height: f32,
106 height_mode: crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode,
107 ) -> crate::unity_engine::yoga::yogasize::YogaSize {
108 let __mi = Self::invoke_method_info();
109 let __inner: extern "C" fn(
110 ::unity::IlInstance,
111 crate::unity_engine::yoga::yoganode::YogaNode,
112 f32,
113 crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode,
114 f32,
115 crate::unity_engine::yoga::yogameasuremode::YogaMeasureMode,
116 ::unity::OptionalMethod,
117 ) -> crate::unity_engine::yoga::yogasize::YogaSize = ::core::mem::transmute(__mi.method_ptr);
118 __inner(this.into(), node, width, width_mode, height, height_mode, ::core::option::Option::None)
119 }
120}
121
122#[cfg(feature = "unity_engine-yoga-measurefunction")]
123impl MeasureFunction {
124 #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` — overload selector"]
125 pub fn new(object: crate::system::object::Object, method: ::unity::IntPtr) -> Self {
126 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
127 panic!(
128 "{}
129::{}
130 failed to instantiate",
131 ::core::stringify!(MeasureFunction),
132 ::core::stringify!(new),
133 )
134 });
135 <Self as IMeasureFunctionMethods>::ctor(this, object, method);
136 this
137 }
138}
139
140#[cfg(feature = "unity_engine-yoga-measurefunction")]
141#[doc(hidden)]
142pub mod prelude {
143 pub use super::{IMeasureFunction, IMeasureFunctionMethods, MeasureFunction};
144 #[cfg(feature = "system-delegate")]
145 pub use crate::system::delegate::IDelegateMethods;
146 #[cfg(feature = "system-multicastdelegate")]
147 pub use crate::system::multicastdelegate::IMulticastDelegateMethods;
148 #[cfg(feature = "system-object")]
149 pub use crate::system::object::IObjectMethods;
150 pub use crate::system::{delegate::IDelegate, multicastdelegate::IMulticastDelegate, object::IObject};
151}