Skip to main content

engage/generated/app/
funcitem.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-funcitem-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        app::{
10            menuitem::{IMenuItem, MenuItem},
11            stringitem::{IStringItem, StringItem},
12        },
13        system::{
14            delegate::{Delegate, IDelegate},
15            multicastdelegate::{IMulticastDelegate, MulticastDelegate},
16            object::{IObject, Object},
17        },
18    };
19
20    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/funcitem/FuncItem_Func.md"))]
21    #[::unity::class(namespace = "App", name = "FuncItem.Func")]
22    #[parent(crate::system::multicastdelegate::MulticastDelegate)]
23    pub struct FuncItem_Func {}
24
25    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/funcitem/FuncItem.md"))]
26    #[::unity::class(namespace = "App", name = "FuncItem")]
27    #[parent(crate::app::stringitem::StringItem)]
28    pub struct FuncItem {
29        #[offset(48)]
30        #[rename(name = "m_Func")]
31        pub m_func: crate::app::funcitem::FuncItem_Func,
32    }
33}
34
35#[cfg(feature = "app-funcitem-types")]
36pub use __types::*;
37
38#[cfg(feature = "app-funcitem")]
39pub trait IFuncItem_FuncMethods: IFuncItem_Func {
40    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` overload"]
41    fn ctor(self, object: impl ::core::convert::Into<crate::system::object::Object>, method: impl ::core::convert::Into<::unity::IntPtr>) -> () {
42        unsafe {
43            let __receiver = <FuncItem_Func as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
44            ::unity::il2cpp_call!((::unity::module_base()+0x1e66190usize)as*mut u8,();
45(FuncItem_Func)__receiver,(crate::system::object::Object)::core::convert::Into::into(object),(::unity::IntPtr)::core::convert::Into::into(method))
46        }
47    }
48    #[doc = "`Invoke(crate::app::menuitem::MenuItem)` overload"]
49    fn invoke(self, item: impl ::core::convert::Into<crate::app::menuitem::MenuItem>) -> crate::app::menuitem::MenuItem_Result {
50        unsafe {
51            let __receiver = <FuncItem_Func as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
52            {
53                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
54                let __vi = *__vt.get(13usize).unwrap_or_else(|| {
55                    panic!(
56                        "unity: virtual slot {}
57 out of range (vtable len {}
58) on the runtime class behind {}
59 (method `{}
60`)",
61                        13usize,
62                        __vt.len(),
63                        <FuncItem_Func as ::unity::ClassIdentity>::NAME,
64                        "Invoke",
65                    )
66                });
67                let __inner: extern "C" fn(
68                    FuncItem_Func,
69                    crate::app::menuitem::MenuItem,
70                    ::unity::OptionalMethod,
71                ) -> crate::app::menuitem::MenuItem_Result = ::core::mem::transmute(__vi.method_ptr);
72                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
73                __inner(__receiver, ::core::convert::Into::into(item), __mi)
74            }
75        }
76    }
77}
78
79#[cfg(feature = "app-funcitem")]
80impl<__T: IFuncItem_Func> IFuncItem_FuncMethods for __T {}
81
82#[cfg(feature = "app-funcitem")]
83impl FuncItem_Func {
84    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
85        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
86    }
87
88    pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
89        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
90    }
91}
92
93#[cfg(feature = "app-funcitem")]
94impl FuncItem_Func {
95    #[doc = "Direct (non-virtual) call to `FuncItem_Func`'s own `Invoke`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
96    pub unsafe fn invoke(
97        this: impl ::core::convert::Into<::unity::IlInstance>,
98        item: crate::app::menuitem::MenuItem,
99    ) -> crate::app::menuitem::MenuItem_Result {
100        let __mi = Self::invoke_method_info();
101        let __inner: extern "C" fn(
102            ::unity::IlInstance,
103            crate::app::menuitem::MenuItem,
104            ::unity::OptionalMethod,
105        ) -> crate::app::menuitem::MenuItem_Result = ::core::mem::transmute(__mi.method_ptr);
106        __inner(this.into(), item, ::core::option::Option::None)
107    }
108}
109
110#[cfg(feature = "app-funcitem")]
111impl FuncItem_Func {
112    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` — overload selector"]
113    pub fn new(object: crate::system::object::Object, method: ::unity::IntPtr) -> Self {
114        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
115            panic!(
116                "{}
117::{}
118 failed to instantiate",
119                ::core::stringify!(FuncItem_Func),
120                ::core::stringify!(new),
121            )
122        });
123        <Self as IFuncItem_FuncMethods>::ctor(this, object, method);
124        this
125    }
126}
127
128#[cfg(feature = "app-funcitem")]
129pub trait IFuncItemMethods: IFuncItem {
130    #[doc = "`.ctor(::unity::Il2CppString, crate::app::funcitem::FuncItem_Func)` overload"]
131    fn ctor(
132        self,
133        name: impl ::core::convert::Into<::unity::Il2CppString>,
134        func: impl ::core::convert::Into<crate::app::funcitem::FuncItem_Func>,
135    ) -> () {
136        unsafe {
137            let __receiver = <FuncItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
138            ::unity::il2cpp_call!((::unity::module_base()+0x22767a0usize)as*mut u8,();
139(FuncItem)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name),(crate::app::funcitem::FuncItem_Func)::core::convert::Into::into(func))
140        }
141    }
142    #[doc = "`ACall()` overload"]
143    fn a_call(self) -> crate::app::menuitem::MenuItem_Result {
144        unsafe {
145            let __receiver = <FuncItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
146            {
147                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
148                let __vi = *__vt.get(12usize).unwrap_or_else(|| {
149                    panic!(
150                        "unity: virtual slot {}
151 out of range (vtable len {}
152) on the runtime class behind {}
153 (method `{}
154`)",
155                        12usize,
156                        __vt.len(),
157                        <FuncItem as ::unity::ClassIdentity>::NAME,
158                        "ACall",
159                    )
160                });
161                let __inner: extern "C" fn(FuncItem, ::unity::OptionalMethod) -> crate::app::menuitem::MenuItem_Result =
162                    ::core::mem::transmute(__vi.method_ptr);
163                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
164                __inner(__receiver, __mi)
165            }
166        }
167    }
168}
169
170#[cfg(feature = "app-funcitem")]
171impl<__T: IFuncItem> IFuncItemMethods for __T {}
172
173#[cfg(feature = "app-funcitem")]
174impl FuncItem {
175    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
176        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
177    }
178
179    pub fn a_call_method_info() -> &'static ::unity::il2cpp::MethodInfo {
180        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
181    }
182}
183
184#[cfg(feature = "app-funcitem")]
185impl FuncItem {
186    #[doc = "Direct (non-virtual) call to `FuncItem`'s own `ACall`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
187    pub unsafe fn a_call(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::app::menuitem::MenuItem_Result {
188        let __mi = Self::a_call_method_info();
189        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::app::menuitem::MenuItem_Result =
190            ::core::mem::transmute(__mi.method_ptr);
191        __inner(this.into(), ::core::option::Option::None)
192    }
193}
194
195#[cfg(feature = "app-funcitem")]
196impl FuncItem {
197    #[doc = "`.ctor(::unity::Il2CppString, crate::app::funcitem::FuncItem_Func)` — overload selector"]
198    pub fn new(name: ::unity::Il2CppString, func: crate::app::funcitem::FuncItem_Func) -> Self {
199        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
200            panic!(
201                "{}
202::{}
203 failed to instantiate",
204                ::core::stringify!(FuncItem),
205                ::core::stringify!(new),
206            )
207        });
208        <Self as IFuncItemMethods>::ctor(this, name, func);
209        this
210    }
211}
212
213#[cfg(feature = "app-funcitem")]
214#[doc(hidden)]
215pub mod prelude {
216    pub use super::{FuncItem, FuncItem_Func, IFuncItem, IFuncItemMethods, IFuncItem_Func, IFuncItem_FuncMethods};
217    #[cfg(feature = "app-menuitem")]
218    pub use crate::app::menuitem::IMenuItemMethods;
219    #[cfg(feature = "app-stringitem")]
220    pub use crate::app::stringitem::IStringItemMethods;
221    #[cfg(feature = "system-delegate")]
222    pub use crate::system::delegate::IDelegateMethods;
223    #[cfg(feature = "system-multicastdelegate")]
224    pub use crate::system::multicastdelegate::IMulticastDelegateMethods;
225    #[cfg(feature = "system-object")]
226    pub use crate::system::object::IObjectMethods;
227    pub use crate::{
228        app::{menuitem::IMenuItem, stringitem::IStringItem},
229        system::{delegate::IDelegate, multicastdelegate::IMulticastDelegate, object::IObject},
230    };
231}