Skip to main content

engage/generated/app/
disableitem.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "app-disableitem-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::object::{IObject, Object},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/app/disableitem/DisableItem.md"))]
17    #[::unity::class(namespace = "App", name = "DisableItem")]
18    #[parent(crate::app::stringitem::StringItem)]
19    pub struct DisableItem {}
20}
21
22#[cfg(feature = "app-disableitem-types")]
23pub use __types::*;
24
25#[cfg(feature = "app-disableitem")]
26pub trait IDisableItemMethods: IDisableItem {
27    #[doc = "`.ctor(::unity::Il2CppString)` overload"]
28    fn ctor(self, name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
29        unsafe {
30            let __receiver = <DisableItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
31            ::unity::il2cpp_call!((::unity::module_base()+0x1ceea30usize)as*mut u8,();
32(DisableItem)__receiver,(::unity::Il2CppString)::core::convert::Into::into(name))
33        }
34    }
35    #[doc = "`IsEnable()` overload"]
36    fn is_enable(self) -> bool {
37        unsafe {
38            let __receiver = <DisableItem as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
39            {
40                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
41                let __vi = *__vt.get(22usize).unwrap_or_else(|| {
42                    panic!(
43                        "unity: virtual slot {}
44 out of range (vtable len {}
45) on the runtime class behind {}
46 (method `{}
47`)",
48                        22usize,
49                        __vt.len(),
50                        <DisableItem as ::unity::ClassIdentity>::NAME,
51                        "IsEnable",
52                    )
53                });
54                let __inner: extern "C" fn(DisableItem, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
55                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
56                __inner(__receiver, __mi)
57            }
58        }
59    }
60}
61
62#[cfg(feature = "app-disableitem")]
63impl<__T: IDisableItem> IDisableItemMethods for __T {}
64
65#[cfg(feature = "app-disableitem")]
66impl DisableItem {
67    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
68        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
69    }
70
71    pub fn is_enable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
72        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
73    }
74}
75
76#[cfg(feature = "app-disableitem")]
77impl DisableItem {
78    #[doc = "Direct (non-virtual) call to `DisableItem`'s own `IsEnable`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
79    pub unsafe fn is_enable(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
80        let __mi = Self::is_enable_method_info();
81        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
82        __inner(this.into(), ::core::option::Option::None)
83    }
84}
85
86#[cfg(feature = "app-disableitem")]
87impl DisableItem {
88    #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
89    pub fn new(name: ::unity::Il2CppString) -> Self {
90        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
91            panic!(
92                "{}
93::{}
94 failed to instantiate",
95                ::core::stringify!(DisableItem),
96                ::core::stringify!(new),
97            )
98        });
99        <Self as IDisableItemMethods>::ctor(this, name);
100        this
101    }
102}
103
104#[cfg(feature = "app-disableitem")]
105#[doc(hidden)]
106pub mod prelude {
107    pub use super::{DisableItem, IDisableItem, IDisableItemMethods};
108    #[cfg(feature = "app-menuitem")]
109    pub use crate::app::menuitem::IMenuItemMethods;
110    #[cfg(feature = "app-stringitem")]
111    pub use crate::app::stringitem::IStringItemMethods;
112    #[cfg(feature = "system-object")]
113    pub use crate::system::object::IObjectMethods;
114    pub use crate::{
115        app::{menuitem::IMenuItem, stringitem::IStringItem},
116        system::object::IObject,
117    };
118}