Skip to main content

engage/generated/unity_engine/
guiutility.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-guiutility-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/guiutility/GUIUtility.md"))]
11    #[::unity::class(namespace = "UnityEngine", name = "GUIUtility")]
12    #[parent(crate::system::object::Object)]
13    pub struct GUIUtility {
14        #[static_field]
15        #[rename(name = "s_SkinMode")]
16        pub s_skin_mode: i32,
17        #[static_field]
18        #[rename(name = "s_OriginalID")]
19        pub s_original_id: i32,
20        #[static_field]
21        #[rename(name = "takeCapture")]
22        pub take_capture_field: crate::system::action::Action,
23        #[static_field]
24        #[rename(name = "releaseCapture")]
25        pub release_capture: crate::system::action::Action,
26        #[static_field]
27        #[rename(name = "processEvent")]
28        pub process_event_field: crate::system::func_3::Func_3<i32, ::unity::IntPtr, bool>,
29        #[static_field]
30        #[rename(name = "endContainerGUIFromException")]
31        pub end_container_gui_from_exception_field: ::unity::IlInstance,
32        #[static_field]
33        #[rename(name = "guiChanged")]
34        pub gui_changed: crate::system::action::Action,
35        #[static_field]
36        #[rename(name = "s_HasCurrentWindowKeyFocusFunc")]
37        pub s_has_current_window_key_focus_func: crate::system::func_1::Func_1<bool>,
38    }
39}
40
41#[cfg(feature = "unity_engine-guiutility-types")]
42pub use __types::*;
43
44#[cfg(feature = "unity_engine-guiutility")]
45impl GUIUtility {
46    #[doc = "`get_pixelsPerPoint()` overload"]
47    pub fn get_pixels_per_point() -> f32 {
48        unsafe {
49            ::unity::il2cpp_call!((::unity::module_base()+0x3c49db0usize)as*mut u8,f32;
50            )
51        }
52    }
53
54    #[doc = "`get_guiDepth()` overload"]
55    pub fn get_gui_depth() -> i32 {
56        unsafe {
57            ::unity::il2cpp_call!((::unity::module_base()+0x3c50890usize)as*mut u8,i32;
58            )
59        }
60    }
61
62    #[doc = "`set_mouseUsed(bool)` overload"]
63    pub fn set_mouse_used(value: impl ::core::convert::Into<bool>) -> () {
64        unsafe {
65            ::unity::il2cpp_call!((::unity::module_base()+0x3c3f700usize)as*mut u8,();
66(bool)::core::convert::Into::into(value))
67        }
68    }
69
70    #[doc = "`get_systemCopyBuffer()` overload"]
71    pub fn get_system_copy_buffer() -> ::unity::Il2CppString {
72        unsafe {
73            ::unity::il2cpp_call!((::unity::module_base()+0x3c508d0usize)as*mut u8, ::unity::Il2CppString;
74            )
75        }
76    }
77
78    #[doc = "`set_systemCopyBuffer(::unity::Il2CppString)` overload"]
79    pub fn set_system_copy_buffer(value: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
80        unsafe {
81            ::unity::il2cpp_call!((::unity::module_base()+0x3c50910usize)as*mut u8,();
82(::unity::Il2CppString)::core::convert::Into::into(value))
83        }
84    }
85
86    #[doc = "`GetControlID(i32, crate::unity_engine::focustype::FocusType, crate::unity_engine::rect::Rect)` overload"]
87    pub fn get_control_id(
88        hint: impl ::core::convert::Into<i32>,
89        focus_type: impl ::core::convert::Into<crate::unity_engine::focustype::FocusType>,
90        rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
91    ) -> i32 {
92        unsafe {
93            ::unity::il2cpp_call!((::unity::module_base()+0x3c3c6a0usize)as*mut u8,i32;
94(i32)::core::convert::Into::into(hint),(crate::unity_engine::focustype::FocusType)::core::convert::Into::into(focus_type),(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect))
95        }
96    }
97
98    #[doc = "`Internal_GetHotControl()` overload"]
99    pub fn internal_get_hot_control() -> i32 {
100        unsafe {
101            ::unity::il2cpp_call!((::unity::module_base()+0x3c509c0usize)as*mut u8,i32;
102            )
103        }
104    }
105
106    #[doc = "`Internal_GetKeyboardControl()` overload"]
107    pub fn internal_get_keyboard_control() -> i32 {
108        unsafe {
109            ::unity::il2cpp_call!((::unity::module_base()+0x3c50a00usize)as*mut u8,i32;
110            )
111        }
112    }
113
114    #[doc = "`Internal_SetHotControl(i32)` overload"]
115    pub fn internal_set_hot_control(value: impl ::core::convert::Into<i32>) -> () {
116        unsafe {
117            ::unity::il2cpp_call!((::unity::module_base()+0x3c50a40usize)as*mut u8,();
118(i32)::core::convert::Into::into(value))
119        }
120    }
121
122    #[doc = "`Internal_GetDefaultSkin(i32)` overload"]
123    pub fn internal_get_default_skin(skin_mode: impl ::core::convert::Into<i32>) -> crate::system::object::Object {
124        unsafe {
125            ::unity::il2cpp_call!((::unity::module_base()+0x3c50a90usize)as*mut u8,crate::system::object::Object;
126(i32)::core::convert::Into::into(skin_mode))
127        }
128    }
129
130    #[doc = "`Internal_ExitGUI()` overload"]
131    pub fn internal_exit_gui() -> () {
132        unsafe {
133            ::unity::il2cpp_call!((::unity::module_base()+0x3c50ae0usize)as*mut u8,();
134            )
135        }
136    }
137
138    #[doc = "`MarkGUIChanged()` overload"]
139    pub fn mark_gui_changed() -> () {
140        unsafe {
141            ::unity::il2cpp_call!((::unity::module_base()+0x3c50b20usize)as*mut u8,();
142            )
143        }
144    }
145
146    #[doc = "`GetControlID(i32, crate::unity_engine::focustype::FocusType)` overload"]
147    pub fn get_control_id_2(
148        hint: impl ::core::convert::Into<i32>,
149        focus: impl ::core::convert::Into<crate::unity_engine::focustype::FocusType>,
150    ) -> i32 {
151        unsafe {
152            ::unity::il2cpp_call!((::unity::module_base()+0x3c3c210usize)as*mut u8,i32;
153(i32)::core::convert::Into::into(hint),(crate::unity_engine::focustype::FocusType)::core::convert::Into::into(focus))
154        }
155    }
156
157    #[doc = "`GetStateObject(::unity::SystemType, i32)` overload"]
158    pub fn get_state_object(
159        t: impl ::core::convert::Into<::unity::SystemType>,
160        control_id: impl ::core::convert::Into<i32>,
161    ) -> crate::system::object::Object {
162        unsafe {
163            ::unity::il2cpp_call!((::unity::module_base()+0x3c40f40usize)as*mut u8,crate::system::object::Object;
164(::unity::SystemType)::core::convert::Into::into(t),(i32)::core::convert::Into::into(control_id))
165        }
166    }
167
168    #[doc = "`get_guiIsExiting()` overload"]
169    pub fn get_gui_is_exiting() -> bool {
170        unsafe {
171            ::unity::il2cpp_call!((::unity::module_base()+0x3c50b80usize)as*mut u8,bool;
172            )
173        }
174    }
175
176    #[doc = "`set_guiIsExiting(bool)` overload"]
177    pub fn set_gui_is_exiting(value: impl ::core::convert::Into<bool>) -> () {
178        unsafe {
179            ::unity::il2cpp_call!((::unity::module_base()+0x3c50bd0usize)as*mut u8,();
180(bool)::core::convert::Into::into(value))
181        }
182    }
183
184    #[doc = "`get_hotControl()` overload"]
185    pub fn get_hot_control() -> i32 {
186        unsafe {
187            ::unity::il2cpp_call!((::unity::module_base()+0x3c3cdd0usize)as*mut u8,i32;
188            )
189        }
190    }
191
192    #[doc = "`set_hotControl(i32)` overload"]
193    pub fn set_hot_control(value: impl ::core::convert::Into<i32>) -> () {
194        unsafe {
195            ::unity::il2cpp_call!((::unity::module_base()+0x3c3cd80usize)as*mut u8,();
196(i32)::core::convert::Into::into(value))
197        }
198    }
199
200    #[doc = "`TakeCapture()` overload"]
201    pub fn take_capture_fn() -> () {
202        unsafe {
203            ::unity::il2cpp_call!((::unity::module_base()+0x3c50c30usize)as*mut u8,();
204            )
205        }
206    }
207
208    #[doc = "`RemoveCapture()` overload"]
209    pub fn remove_capture() -> () {
210        unsafe {
211            ::unity::il2cpp_call!((::unity::module_base()+0x3c50c90usize)as*mut u8,();
212            )
213        }
214    }
215
216    #[doc = "`get_keyboardControl()` overload"]
217    pub fn get_keyboard_control() -> i32 {
218        unsafe {
219            ::unity::il2cpp_call!((::unity::module_base()+0x3c3d430usize)as*mut u8,i32;
220            )
221        }
222    }
223
224    #[doc = "`HasKeyFocus(i32)` overload"]
225    pub fn has_key_focus(control_id: impl ::core::convert::Into<i32>) -> bool {
226        unsafe {
227            ::unity::il2cpp_call!((::unity::module_base()+0x3c50160usize)as*mut u8,bool;
228(i32)::core::convert::Into::into(control_id))
229        }
230    }
231
232    #[doc = "`GetDefaultSkin()` overload"]
233    pub fn get_default_skin() -> crate::unity_engine::guiskin::GUISkin {
234        unsafe {
235            ::unity::il2cpp_call!((::unity::module_base()+0x3c3a3f0usize)as*mut u8,crate::unity_engine::guiskin::GUISkin;
236            )
237        }
238    }
239
240    #[doc = "`ProcessEvent(i32, ::unity::IntPtr, *mutbool)` overload"]
241    pub fn process_event_fn(instance_id: impl ::core::convert::Into<i32>, native_event_ptr: impl ::core::convert::Into<::unity::IntPtr>) -> bool {
242        unsafe {
243            let mut __out_0 = ::core::mem::MaybeUninit::<bool>::uninit();
244            ::unity::il2cpp_call!((::unity::module_base()+0x3c50cf0usize)as*mut u8,();
245(i32)::core::convert::Into::into(instance_id),(::unity::IntPtr)::core::convert::Into::into(native_event_ptr),(*mut bool)__out_0.as_mut_ptr());
246            __out_0.assume_init()
247        }
248    }
249
250    #[doc = "`BeginGUI(i32, i32, i32)` overload"]
251    pub fn begin_gui(
252        skin_mode: impl ::core::convert::Into<i32>,
253        instance_id: impl ::core::convert::Into<i32>,
254        use_gui_layout: impl ::core::convert::Into<i32>,
255    ) -> () {
256        unsafe {
257            ::unity::il2cpp_call!((::unity::module_base()+0x3c50d90usize)as*mut u8,();
258(i32)::core::convert::Into::into(skin_mode),(i32)::core::convert::Into::into(instance_id),(i32)::core::convert::Into::into(use_gui_layout))
259        }
260    }
261
262    #[doc = "`EndGUI(i32)` overload"]
263    pub fn end_gui(layout_type: impl ::core::convert::Into<i32>) -> () {
264        unsafe {
265            ::unity::il2cpp_call!((::unity::module_base()+0x3c50fc0usize)as*mut u8,();
266(i32)::core::convert::Into::into(layout_type))
267        }
268    }
269
270    #[doc = "`ResetGlobalState()` overload"]
271    pub fn reset_global_state() -> () {
272        unsafe {
273            ::unity::il2cpp_call!((::unity::module_base()+0x3c50e50usize)as*mut u8,();
274            )
275        }
276    }
277
278    #[doc = "`CheckOnGUI()` overload"]
279    pub fn check_on_gui() -> () {
280        unsafe {
281            ::unity::il2cpp_call!((::unity::module_base()+0x3c3a190usize)as*mut u8,();
282            )
283        }
284    }
285
286    #[doc = "`HitTest(crate::unity_engine::rect::Rect, crate::unity_engine::vector2::Vector2, i32)` overload"]
287    pub fn hit_test(
288        rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
289        point: impl ::core::convert::Into<crate::unity_engine::vector2::Vector2>,
290        offset: impl ::core::convert::Into<i32>,
291    ) -> bool {
292        unsafe {
293            ::unity::il2cpp_call!((::unity::module_base()+0x3c51460usize)as*mut u8,bool;
294(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect),(crate::unity_engine::vector2::Vector2)::core::convert::Into::into(point),(i32)::core::convert::Into::into(offset))
295        }
296    }
297
298    #[doc = "`HitTest(crate::unity_engine::rect::Rect, crate::unity_engine::vector2::Vector2, bool)` overload"]
299    pub fn hit_test_2(
300        rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
301        point: impl ::core::convert::Into<crate::unity_engine::vector2::Vector2>,
302        is_direct_manipulation_device: impl ::core::convert::Into<bool>,
303    ) -> bool {
304        unsafe {
305            ::unity::il2cpp_call!((::unity::module_base()+0x3c51510usize)as*mut u8,bool;
306(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect),(crate::unity_engine::vector2::Vector2)::core::convert::Into::into(point),(bool)::core::convert::Into::into(is_direct_manipulation_device))
307        }
308    }
309
310    #[doc = "`HitTest(crate::unity_engine::rect::Rect, crate::unity_engine::event::Event)` overload"]
311    pub fn hit_test_3(
312        rect: impl ::core::convert::Into<crate::unity_engine::rect::Rect>,
313        evt: impl ::core::convert::Into<crate::unity_engine::event::Event>,
314    ) -> bool {
315        unsafe {
316            ::unity::il2cpp_call!((::unity::module_base()+0x3c3d2d0usize)as*mut u8,bool;
317(crate::unity_engine::rect::Rect)::core::convert::Into::into(rect),(crate::unity_engine::event::Event)::core::convert::Into::into(evt))
318        }
319    }
320
321    #[doc = "`GetControlID_Injected(i32, crate::unity_engine::focustype::FocusType, *mutcrate::unity_engine::rect::Rect)` overload"]
322    pub fn get_control_id_injected(
323        hint: impl ::core::convert::Into<i32>,
324        focus_type: impl ::core::convert::Into<crate::unity_engine::focustype::FocusType>,
325    ) -> (i32, crate::unity_engine::rect::Rect) {
326        unsafe {
327            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::rect::Rect>::uninit();
328            let __ret = {
329                ::unity::il2cpp_call!((::unity::module_base()+0x3c50960usize)as*mut u8,i32;
330(i32)::core::convert::Into::into(hint),(crate::unity_engine::focustype::FocusType)::core::convert::Into::into(focus_type),(*mut crate::unity_engine::rect::Rect)__out_0.as_mut_ptr())
331            };
332            (__ret, __out_0.assume_init())
333        }
334    }
335}
336
337#[cfg(feature = "unity_engine-guiutility")]
338impl GUIUtility {
339    pub fn get_pixels_per_point_method_info() -> &'static ::unity::il2cpp::MethodInfo {
340        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
341    }
342
343    pub fn get_gui_depth_method_info() -> &'static ::unity::il2cpp::MethodInfo {
344        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
345    }
346
347    pub fn set_mouse_used_method_info() -> &'static ::unity::il2cpp::MethodInfo {
348        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
349    }
350
351    pub fn get_system_copy_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
352        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
353    }
354
355    pub fn set_system_copy_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
356        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
357    }
358
359    pub fn get_control_id_method_info() -> &'static ::unity::il2cpp::MethodInfo {
360        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
361    }
362
363    pub fn internal_get_hot_control_method_info() -> &'static ::unity::il2cpp::MethodInfo {
364        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
365    }
366
367    pub fn internal_get_keyboard_control_method_info() -> &'static ::unity::il2cpp::MethodInfo {
368        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
369    }
370
371    pub fn internal_set_hot_control_method_info() -> &'static ::unity::il2cpp::MethodInfo {
372        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
373    }
374
375    pub fn internal_get_default_skin_method_info() -> &'static ::unity::il2cpp::MethodInfo {
376        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
377    }
378
379    pub fn internal_exit_gui_method_info() -> &'static ::unity::il2cpp::MethodInfo {
380        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
381    }
382
383    pub fn mark_gui_changed_method_info() -> &'static ::unity::il2cpp::MethodInfo {
384        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
385    }
386
387    pub fn get_control_id_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
388        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
389    }
390
391    pub fn get_state_object_method_info() -> &'static ::unity::il2cpp::MethodInfo {
392        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
393    }
394
395    pub fn get_gui_is_exiting_method_info() -> &'static ::unity::il2cpp::MethodInfo {
396        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
397    }
398
399    pub fn set_gui_is_exiting_method_info() -> &'static ::unity::il2cpp::MethodInfo {
400        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
401    }
402
403    pub fn get_hot_control_method_info() -> &'static ::unity::il2cpp::MethodInfo {
404        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
405    }
406
407    pub fn set_hot_control_method_info() -> &'static ::unity::il2cpp::MethodInfo {
408        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
409    }
410
411    pub fn take_capture_fn_method_info() -> &'static ::unity::il2cpp::MethodInfo {
412        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
413    }
414
415    pub fn remove_capture_method_info() -> &'static ::unity::il2cpp::MethodInfo {
416        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
417    }
418
419    pub fn get_keyboard_control_method_info() -> &'static ::unity::il2cpp::MethodInfo {
420        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
421    }
422
423    pub fn has_key_focus_method_info() -> &'static ::unity::il2cpp::MethodInfo {
424        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
425    }
426
427    pub fn get_default_skin_method_info() -> &'static ::unity::il2cpp::MethodInfo {
428        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
429    }
430
431    pub fn process_event_fn_method_info() -> &'static ::unity::il2cpp::MethodInfo {
432        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
433    }
434
435    pub fn begin_gui_method_info() -> &'static ::unity::il2cpp::MethodInfo {
436        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
437    }
438
439    pub fn end_gui_method_info() -> &'static ::unity::il2cpp::MethodInfo {
440        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
441    }
442
443    pub fn reset_global_state_method_info() -> &'static ::unity::il2cpp::MethodInfo {
444        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[28]
445    }
446
447    pub fn check_on_gui_method_info() -> &'static ::unity::il2cpp::MethodInfo {
448        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[31]
449    }
450
451    pub fn hit_test_method_info() -> &'static ::unity::il2cpp::MethodInfo {
452        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[32]
453    }
454
455    pub fn hit_test_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
456        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[33]
457    }
458
459    pub fn hit_test_3_method_info() -> &'static ::unity::il2cpp::MethodInfo {
460        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[34]
461    }
462
463    pub fn get_control_id_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
464        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[35]
465    }
466}
467
468#[cfg(feature = "unity_engine-guiutility")]
469#[doc(hidden)]
470pub mod prelude {
471    pub use super::{GUIUtility, IGUIUtility};
472    pub use crate::system::object::IObject;
473    #[cfg(feature = "system-object")]
474    pub use crate::system::object::IObjectMethods;
475}