engage/generated/unity_engine/ui/
rawimage.rs1#[cfg(feature = "unity_engine-ui-rawimage-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 system::object::{IObject, Object},
10 unity_engine::{
11 behaviour::{Behaviour, IBehaviour},
12 component::{Component, IComponent},
13 event_systems::uibehaviour::{IUIBehaviour, UIBehaviour},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 ui::{
17 graphic::{Graphic, IGraphic},
18 maskablegraphic::{IMaskableGraphic, MaskableGraphic},
19 },
20 },
21 };
22
23 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/ui/rawimage/RawImage.md"))]
24 #[::unity::class(namespace = "UnityEngine.UI", name = "RawImage")]
25 #[parent(crate::unity_engine::ui::maskablegraphic::MaskableGraphic)]
26 pub struct RawImage {
27 #[offset(208)]
28 #[rename(name = "m_Texture")]
29 pub m_texture: crate::unity_engine::texture::Texture,
30 #[offset(216)]
31 #[rename(name = "m_UVRect")]
32 pub m_uv_rect: crate::unity_engine::rect::Rect,
33 }
34}
35
36#[cfg(feature = "unity_engine-ui-rawimage-types")]
37pub use __types::*;
38
39#[cfg(feature = "unity_engine-ui-rawimage")]
40pub trait IRawImageMethods: IRawImage {
41 #[doc = "`.ctor()` overload"]
42 fn ctor(self) -> () {
43 unsafe {
44 let __receiver = <RawImage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
45 ::unity::il2cpp_call!((::unity::module_base()+0x3721960usize)as*mut u8,();
46(RawImage)__receiver)
47 }
48 }
49 #[doc = "`get_mainTexture()` overload"]
50 fn get_main_texture(self) -> crate::unity_engine::texture::Texture {
51 unsafe {
52 let __receiver = <RawImage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
53 {
54 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
55 let __vi = *__vt.get(35usize).unwrap_or_else(|| {
56 panic!(
57 "unity: virtual slot {}
58 out of range (vtable len {}
59) on the runtime class behind {}
60 (method `{}
61`)",
62 35usize,
63 __vt.len(),
64 <RawImage as ::unity::ClassIdentity>::NAME,
65 "get_mainTexture",
66 )
67 });
68 let __inner: extern "C" fn(RawImage, ::unity::OptionalMethod) -> crate::unity_engine::texture::Texture =
69 ::core::mem::transmute(__vi.method_ptr);
70 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
71 __inner(__receiver, __mi)
72 }
73 }
74 }
75 #[doc = "`get_texture()` overload"]
76 fn get_texture(self) -> crate::unity_engine::texture::Texture {
77 unsafe {
78 let __receiver = <RawImage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
79 ::unity::il2cpp_call!((::unity::module_base()+0x3721b40usize)as*mut u8,crate::unity_engine::texture::Texture;
80(RawImage)__receiver)
81 }
82 }
83 #[doc = "`set_texture(crate::unity_engine::texture::Texture)` overload"]
84 fn set_texture(self, value: impl ::core::convert::Into<crate::unity_engine::texture::Texture>) -> () {
85 unsafe {
86 let __receiver = <RawImage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
87 ::unity::il2cpp_call!((::unity::module_base()+0x3721b50usize)as*mut u8,();
88(RawImage)__receiver,(crate::unity_engine::texture::Texture)::core::convert::Into::into(value))
89 }
90 }
91 #[doc = "`get_uvRect()` overload"]
92 fn get_uv_rect(self) -> crate::unity_engine::rect::Rect {
93 unsafe {
94 let __receiver = <RawImage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
95 ::unity::il2cpp_call!((::unity::module_base()+0x3721c30usize)as*mut u8,crate::unity_engine::rect::Rect;
96(RawImage)__receiver)
97 }
98 }
99 #[doc = "`set_uvRect(crate::unity_engine::rect::Rect)` overload"]
100 fn set_uv_rect(self, value: impl ::core::convert::Into<crate::unity_engine::rect::Rect>) -> () {
101 unsafe {
102 let __receiver = <RawImage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
103 ::unity::il2cpp_call!((::unity::module_base()+0x3721c40usize)as*mut u8,();
104(RawImage)__receiver,(crate::unity_engine::rect::Rect)::core::convert::Into::into(value))
105 }
106 }
107 #[doc = "`SetNativeSize()` overload"]
108 fn set_native_size(self) -> () {
109 unsafe {
110 let __receiver = <RawImage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
111 {
112 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
113 let __vi = *__vt.get(45usize).unwrap_or_else(|| {
114 panic!(
115 "unity: virtual slot {}
116 out of range (vtable len {}
117) on the runtime class behind {}
118 (method `{}
119`)",
120 45usize,
121 __vt.len(),
122 <RawImage as ::unity::ClassIdentity>::NAME,
123 "SetNativeSize",
124 )
125 });
126 let __inner: extern "C" fn(RawImage, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
127 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
128 __inner(__receiver, __mi)
129 }
130 }
131 }
132 #[doc = "`OnPopulateMesh(crate::unity_engine::ui::vertexhelper::VertexHelper)` overload"]
133 fn on_populate_mesh(self, vh: impl ::core::convert::Into<crate::unity_engine::ui::vertexhelper::VertexHelper>) -> () {
134 unsafe {
135 let __receiver = <RawImage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
136 {
137 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
138 let __vi = *__vt.get(44usize).unwrap_or_else(|| {
139 panic!(
140 "unity: virtual slot {}
141 out of range (vtable len {}
142) on the runtime class behind {}
143 (method `{}
144`)",
145 44usize,
146 __vt.len(),
147 <RawImage as ::unity::ClassIdentity>::NAME,
148 "OnPopulateMesh",
149 )
150 });
151 let __inner: extern "C" fn(RawImage, crate::unity_engine::ui::vertexhelper::VertexHelper, ::unity::OptionalMethod) -> () =
152 ::core::mem::transmute(__vi.method_ptr);
153 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
154 __inner(__receiver, ::core::convert::Into::into(vh), __mi)
155 }
156 }
157 }
158 #[doc = "`OnDidApplyAnimationProperties()` overload"]
159 fn on_did_apply_animation_properties(self) -> () {
160 unsafe {
161 let __receiver = <RawImage as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
162 {
163 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
164 let __vi = *__vt.get(13usize).unwrap_or_else(|| {
165 panic!(
166 "unity: virtual slot {}
167 out of range (vtable len {}
168) on the runtime class behind {}
169 (method `{}
170`)",
171 13usize,
172 __vt.len(),
173 <RawImage as ::unity::ClassIdentity>::NAME,
174 "OnDidApplyAnimationProperties",
175 )
176 });
177 let __inner: extern "C" fn(RawImage, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
178 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
179 __inner(__receiver, __mi)
180 }
181 }
182 }
183}
184
185#[cfg(feature = "unity_engine-ui-rawimage")]
186impl<__T: IRawImage> IRawImageMethods for __T {}
187
188#[cfg(feature = "unity_engine-ui-rawimage")]
189impl RawImage {
190 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
191 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
192 }
193
194 pub fn get_main_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
195 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
196 }
197
198 pub fn get_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
199 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
200 }
201
202 pub fn set_texture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
203 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
204 }
205
206 pub fn get_uv_rect_method_info() -> &'static ::unity::il2cpp::MethodInfo {
207 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
208 }
209
210 pub fn set_uv_rect_method_info() -> &'static ::unity::il2cpp::MethodInfo {
211 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
212 }
213
214 pub fn set_native_size_method_info() -> &'static ::unity::il2cpp::MethodInfo {
215 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
216 }
217
218 pub fn on_populate_mesh_method_info() -> &'static ::unity::il2cpp::MethodInfo {
219 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
220 }
221
222 pub fn on_did_apply_animation_properties_method_info() -> &'static ::unity::il2cpp::MethodInfo {
223 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
224 }
225}
226
227#[cfg(feature = "unity_engine-ui-rawimage")]
228impl RawImage {
229 #[doc = "Direct (non-virtual) call to `RawImage`'s own `get_mainTexture`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
230 pub unsafe fn get_main_texture(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::unity_engine::texture::Texture {
231 let __mi = Self::get_main_texture_method_info();
232 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::texture::Texture =
233 ::core::mem::transmute(__mi.method_ptr);
234 __inner(this.into(), ::core::option::Option::None)
235 }
236
237 #[doc = "Direct (non-virtual) call to `RawImage`'s own `SetNativeSize`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
238 pub unsafe fn set_native_size(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
239 let __mi = Self::set_native_size_method_info();
240 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
241 __inner(this.into(), ::core::option::Option::None)
242 }
243
244 #[doc = "Direct (non-virtual) call to `RawImage`'s own `OnPopulateMesh`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
245 pub unsafe fn on_populate_mesh(
246 this: impl ::core::convert::Into<::unity::IlInstance>,
247 vh: crate::unity_engine::ui::vertexhelper::VertexHelper,
248 ) -> () {
249 let __mi = Self::on_populate_mesh_method_info();
250 let __inner: extern "C" fn(::unity::IlInstance, crate::unity_engine::ui::vertexhelper::VertexHelper, ::unity::OptionalMethod) -> () =
251 ::core::mem::transmute(__mi.method_ptr);
252 __inner(this.into(), vh, ::core::option::Option::None)
253 }
254
255 #[doc = "Direct (non-virtual) call to `RawImage`'s own `OnDidApplyAnimationProperties`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
256 pub unsafe fn on_did_apply_animation_properties(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
257 let __mi = Self::on_did_apply_animation_properties_method_info();
258 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
259 __inner(this.into(), ::core::option::Option::None)
260 }
261}
262
263#[cfg(feature = "unity_engine-ui-rawimage")]
264impl RawImage {
265 #[doc = "`.ctor()` — no args"]
266 pub fn new() -> Self {
267 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
268 panic!(
269 "{}
270::{}
271 failed to instantiate",
272 ::core::stringify!(RawImage),
273 ::core::stringify!(new),
274 )
275 });
276 <Self as IRawImageMethods>::ctor(this);
277 this
278 }
279}
280
281#[cfg(feature = "unity_engine-ui-rawimage")]
282#[doc(hidden)]
283pub mod prelude {
284 pub use super::{IRawImage, IRawImageMethods, RawImage};
285 #[cfg(feature = "system-object")]
286 pub use crate::system::object::IObjectMethods;
287 #[cfg(feature = "unity_engine-behaviour")]
288 pub use crate::unity_engine::behaviour::IBehaviourMethods;
289 #[cfg(feature = "unity_engine-component")]
290 pub use crate::unity_engine::component::IComponentMethods;
291 #[cfg(feature = "unity_engine-event_systems-uibehaviour")]
292 pub use crate::unity_engine::event_systems::uibehaviour::IUIBehaviourMethods;
293 #[cfg(feature = "unity_engine-monobehaviour")]
294 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
295 #[cfg(feature = "unity_engine-object_2")]
296 pub use crate::unity_engine::object_2::IObject_2Methods;
297 #[cfg(feature = "unity_engine-ui-graphic")]
298 pub use crate::unity_engine::ui::graphic::IGraphicMethods;
299 #[cfg(feature = "unity_engine-ui-maskablegraphic")]
300 pub use crate::unity_engine::ui::maskablegraphic::IMaskableGraphicMethods;
301 pub use crate::{
302 system::object::IObject,
303 unity_engine::{
304 behaviour::IBehaviour,
305 component::IComponent,
306 event_systems::uibehaviour::IUIBehaviour,
307 monobehaviour::IMonoBehaviour,
308 object_2::IObject_2,
309 ui::{graphic::IGraphic, maskablegraphic::IMaskableGraphic},
310 },
311 };
312}