Skip to main content

engage/generated/tm_pro/
itextelement.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "tm_pro-itextelement-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8
9    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/tm_pro/itextelement/ITextElement.md"))]
10    #[::unity::class(namespace = "TMPro", name = "ITextElement")]
11    pub struct ITextElement {}
12}
13
14#[cfg(feature = "tm_pro-itextelement-types")]
15pub use __types::*;
16
17#[cfg(feature = "tm_pro-itextelement")]
18pub trait IITextElementMethods: IITextElement {
19    #[doc = "`get_sharedMaterial()` overload"]
20    fn get_shared_material(self) -> crate::unity_engine::material::Material {
21        unsafe {
22            let __receiver = <ITextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
23            {
24                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
25                let __vi = *__vt.get(0usize).unwrap_or_else(|| {
26                    panic!(
27                        "unity: virtual slot {}
28 out of range (vtable len {}
29) on the runtime class behind {}
30 (method `{}
31`)",
32                        0usize,
33                        __vt.len(),
34                        <ITextElement as ::unity::ClassIdentity>::NAME,
35                        "get_sharedMaterial",
36                    )
37                });
38                let __inner: extern "C" fn(ITextElement, ::unity::OptionalMethod) -> crate::unity_engine::material::Material =
39                    ::core::mem::transmute(__vi.method_ptr);
40                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
41                __inner(__receiver, __mi)
42            }
43        }
44    }
45    #[doc = "`Rebuild(crate::unity_engine::ui::canvasupdate::CanvasUpdate)` overload"]
46    fn rebuild(self, update: impl ::core::convert::Into<crate::unity_engine::ui::canvasupdate::CanvasUpdate>) -> () {
47        unsafe {
48            let __receiver = <ITextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
49            {
50                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
51                let __vi = *__vt.get(1usize).unwrap_or_else(|| {
52                    panic!(
53                        "unity: virtual slot {}
54 out of range (vtable len {}
55) on the runtime class behind {}
56 (method `{}
57`)",
58                        1usize,
59                        __vt.len(),
60                        <ITextElement as ::unity::ClassIdentity>::NAME,
61                        "Rebuild",
62                    )
63                });
64                let __inner: extern "C" fn(ITextElement, crate::unity_engine::ui::canvasupdate::CanvasUpdate, ::unity::OptionalMethod) -> () =
65                    ::core::mem::transmute(__vi.method_ptr);
66                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
67                __inner(__receiver, ::core::convert::Into::into(update), __mi)
68            }
69        }
70    }
71    #[doc = "`GetInstanceID()` overload"]
72    fn get_instance_id(self) -> i32 {
73        unsafe {
74            let __receiver = <ITextElement as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
75            {
76                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
77                let __vi = *__vt.get(2usize).unwrap_or_else(|| {
78                    panic!(
79                        "unity: virtual slot {}
80 out of range (vtable len {}
81) on the runtime class behind {}
82 (method `{}
83`)",
84                        2usize,
85                        __vt.len(),
86                        <ITextElement as ::unity::ClassIdentity>::NAME,
87                        "GetInstanceID",
88                    )
89                });
90                let __inner: extern "C" fn(ITextElement, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
91                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
92                __inner(__receiver, __mi)
93            }
94        }
95    }
96}
97
98#[cfg(feature = "tm_pro-itextelement")]
99impl<__T: IITextElement> IITextElementMethods for __T {}
100
101#[cfg(feature = "tm_pro-itextelement")]
102impl ITextElement {
103    pub fn get_shared_material_method_info() -> &'static ::unity::il2cpp::MethodInfo {
104        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
105    }
106
107    pub fn rebuild_method_info() -> &'static ::unity::il2cpp::MethodInfo {
108        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
109    }
110
111    pub fn get_instance_id_method_info() -> &'static ::unity::il2cpp::MethodInfo {
112        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
113    }
114}
115
116#[cfg(feature = "tm_pro-itextelement")]
117impl ITextElement {
118    #[doc = "Direct (non-virtual) call to `ITextElement`'s own `get_sharedMaterial`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
119    pub unsafe fn get_shared_material(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::unity_engine::material::Material {
120        let __mi = Self::get_shared_material_method_info();
121        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::material::Material =
122            ::core::mem::transmute(__mi.method_ptr);
123        __inner(this.into(), ::core::option::Option::None)
124    }
125
126    #[doc = "Direct (non-virtual) call to `ITextElement`'s own `Rebuild`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
127    pub unsafe fn rebuild(this: impl ::core::convert::Into<::unity::IlInstance>, update: crate::unity_engine::ui::canvasupdate::CanvasUpdate) -> () {
128        let __mi = Self::rebuild_method_info();
129        let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::ui::canvasupdate::CanvasUpdate, ::unity::OptionalMethod) -> () =
130            ::core::mem::transmute(__mi.method_ptr);
131        __inner(this.into(), update, ::core::option::Option::None)
132    }
133
134    #[doc = "Direct (non-virtual) call to `ITextElement`'s own `GetInstanceID`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
135    pub unsafe fn get_instance_id(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
136        let __mi = Self::get_instance_id_method_info();
137        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
138        __inner(this.into(), ::core::option::Option::None)
139    }
140}
141
142#[cfg(feature = "tm_pro-itextelement")]
143#[doc(hidden)]
144pub mod prelude {
145    pub use super::{IITextElement, IITextElementMethods, ITextElement};
146}