Skip to main content

engage/generated/unity_engine/
guistylestate.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-guistylestate-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/guistylestate/GUIStyleState.md"))]
11    #[::unity::class(namespace = "UnityEngine", name = "GUIStyleState")]
12    #[parent(crate::system::object::Object)]
13    pub struct GUIStyleState {
14        #[offset(16)]
15        #[rename(name = "m_Ptr")]
16        pub m_ptr: ::unity::IntPtr,
17        #[offset(24)]
18        #[rename(name = "m_SourceStyle")]
19        pub m_source_style: crate::unity_engine::guistyle::GUIStyle,
20    }
21}
22
23#[cfg(feature = "unity_engine-guistylestate-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-guistylestate")]
27impl GUIStyleState {
28    #[doc = "`Init()` overload"]
29    pub fn init() -> ::unity::IntPtr {
30        unsafe {
31            ::unity::il2cpp_call!((::unity::module_base()+0x3c50520usize)as*mut u8, ::unity::IntPtr;
32            )
33        }
34    }
35
36    #[doc = "`GetGUIStyleState(crate::unity_engine::guistyle::GUIStyle, ::unity::IntPtr)` overload"]
37    pub fn get_gui_style_state(
38        source_style: impl ::core::convert::Into<crate::unity_engine::guistyle::GUIStyle>,
39        source: impl ::core::convert::Into<::unity::IntPtr>,
40    ) -> crate::unity_engine::guistylestate::GUIStyleState {
41        unsafe {
42            ::unity::il2cpp_call!((::unity::module_base()+0x3c4ff90usize)as*mut u8,crate::unity_engine::guistylestate::GUIStyleState;
43(crate::unity_engine::guistyle::GUIStyle)::core::convert::Into::into(source_style),(::unity::IntPtr)::core::convert::Into::into(source))
44        }
45    }
46}
47
48#[cfg(feature = "unity_engine-guistylestate")]
49pub trait IGUIStyleStateMethods: IGUIStyleState {
50    #[doc = "`set_textColor(crate::unity_engine::color::Color)` overload"]
51    fn set_text_color(self, value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> () {
52        unsafe {
53            let __receiver = <GUIStyleState as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
54            ::unity::il2cpp_call!((::unity::module_base()+0x3c4ee60usize)as*mut u8,();
55(GUIStyleState)__receiver,(crate::unity_engine::color::Color)::core::convert::Into::into(value))
56        }
57    }
58    #[doc = "`Cleanup()` overload"]
59    fn cleanup(self) -> () {
60        unsafe {
61            let __receiver = <GUIStyleState as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
62            ::unity::il2cpp_call!((::unity::module_base()+0x3c50560usize)as*mut u8,();
63(GUIStyleState)__receiver)
64        }
65    }
66    #[doc = "`.ctor()` overload"]
67    fn ctor(self) -> () {
68        unsafe {
69            let __receiver = <GUIStyleState as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
70            ::unity::il2cpp_call!((::unity::module_base()+0x3c505b0usize)as*mut u8,();
71(GUIStyleState)__receiver)
72        }
73    }
74    #[doc = "`.ctor(crate::unity_engine::guistyle::GUIStyle, ::unity::IntPtr)` overload"]
75    fn ctor_2(
76        self,
77        source_style: impl ::core::convert::Into<crate::unity_engine::guistyle::GUIStyle>,
78        source: impl ::core::convert::Into<::unity::IntPtr>,
79    ) -> () {
80        unsafe {
81            let __receiver = <GUIStyleState as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
82            ::unity::il2cpp_call!((::unity::module_base()+0x3c50600usize)as*mut u8,();
83(GUIStyleState)__receiver,(crate::unity_engine::guistyle::GUIStyle)::core::convert::Into::into(source_style),(::unity::IntPtr)::core::convert::Into::into(source))
84        }
85    }
86    #[doc = "`Finalize()` overload"]
87    fn finalize(self) -> () {
88        unsafe {
89            let __receiver = <GUIStyleState as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
90            {
91                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
92                let __vi = *__vt.get(1usize).unwrap_or_else(|| {
93                    panic!(
94                        "unity: virtual slot {}
95 out of range (vtable len {}
96) on the runtime class behind {}
97 (method `{}
98`)",
99                        1usize,
100                        __vt.len(),
101                        <GUIStyleState as ::unity::ClassIdentity>::NAME,
102                        "Finalize",
103                    )
104                });
105                let __inner: extern "C" fn(GUIStyleState, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
106                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
107                __inner(__receiver, __mi)
108            }
109        }
110    }
111    #[doc = "`set_textColor_Injected(*mutcrate::unity_engine::color::Color)` overload"]
112    fn set_text_color_injected(self) -> crate::unity_engine::color::Color {
113        unsafe {
114            let __receiver = <GUIStyleState as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
115            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::color::Color>::uninit();
116            ::unity::il2cpp_call!((::unity::module_base()+0x3c504d0usize)as*mut u8,();
117(GUIStyleState)__receiver,(*mut crate::unity_engine::color::Color)__out_0.as_mut_ptr());
118            __out_0.assume_init()
119        }
120    }
121}
122
123#[cfg(feature = "unity_engine-guistylestate")]
124impl<__T: IGUIStyleState> IGUIStyleStateMethods for __T {}
125
126#[cfg(feature = "unity_engine-guistylestate")]
127impl GUIStyleState {
128    pub fn set_text_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
129        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
130    }
131
132    pub fn init_method_info() -> &'static ::unity::il2cpp::MethodInfo {
133        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
134    }
135
136    pub fn cleanup_method_info() -> &'static ::unity::il2cpp::MethodInfo {
137        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
138    }
139
140    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
141        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
142    }
143
144    pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
145        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
146    }
147
148    pub fn get_gui_style_state_method_info() -> &'static ::unity::il2cpp::MethodInfo {
149        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
150    }
151
152    pub fn finalize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
153        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
154    }
155
156    pub fn set_text_color_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
157        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
158    }
159}
160
161#[cfg(feature = "unity_engine-guistylestate")]
162impl GUIStyleState {
163    #[doc = "Direct (non-virtual) call to `GUIStyleState`'s own `Finalize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
164    pub unsafe fn finalize(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
165        let __mi = Self::finalize_method_info();
166        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
167        __inner(this.into(), ::core::option::Option::None)
168    }
169}
170
171#[cfg(feature = "unity_engine-guistylestate")]
172impl GUIStyleState {
173    #[doc = "`.ctor()` — no args"]
174    pub fn new() -> Self {
175        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
176            panic!(
177                "{}
178::{}
179 failed to instantiate",
180                ::core::stringify!(GUIStyleState),
181                ::core::stringify!(new),
182            )
183        });
184        <Self as IGUIStyleStateMethods>::ctor(this);
185        this
186    }
187
188    #[doc = "`.ctor(crate::unity_engine::guistyle::GUIStyle, ::unity::IntPtr)` — overload selector"]
189    pub fn new_2(source_style: crate::unity_engine::guistyle::GUIStyle, source: ::unity::IntPtr) -> Self {
190        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
191            panic!(
192                "{}
193::{}
194 failed to instantiate",
195                ::core::stringify!(GUIStyleState),
196                ::core::stringify!(new_2),
197            )
198        });
199        <Self as IGUIStyleStateMethods>::ctor_2(this, source_style, source);
200        this
201    }
202}
203
204#[cfg(feature = "unity_engine-guistylestate")]
205#[doc(hidden)]
206pub mod prelude {
207    pub use super::{GUIStyleState, IGUIStyleState, IGUIStyleStateMethods};
208    pub use crate::system::object::IObject;
209    #[cfg(feature = "system-object")]
210    pub use crate::system::object::IObjectMethods;
211}