Skip to main content

engage/generated/unity_engine/ui/
setpropertyutility.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-ui-setpropertyutility-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/ui/setpropertyutility/SetPropertyUtility.md"))]
11    #[::unity::class(namespace = "UnityEngine.UI", name = "SetPropertyUtility")]
12    #[parent(crate::system::object::Object)]
13    pub struct SetPropertyUtility {}
14}
15
16#[cfg(feature = "unity_engine-ui-setpropertyutility-types")]
17pub use __types::*;
18
19#[cfg(feature = "unity_engine-ui-setpropertyutility")]
20impl SetPropertyUtility {
21    #[doc = "`SetColor(*mutcrate::unity_engine::color::Color, crate::unity_engine::color::Color)` overload"]
22    pub fn set_color(new_value: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> (bool, crate::unity_engine::color::Color) {
23        unsafe {
24            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::color::Color>::uninit();
25            let __ret = {
26                ::unity::il2cpp_call!((::unity::module_base()+0x372e110usize)as*mut u8,bool;
27(*mut crate::unity_engine::color::Color)__out_0.as_mut_ptr(),(crate::unity_engine::color::Color)::core::convert::Into::into(new_value))
28            };
29            (__ret, __out_0.assume_init())
30        }
31    }
32
33    pub fn set_struct<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
34        current_value: impl ::core::convert::Into<*mut M0>,
35        new_value: impl ::core::convert::Into<M0>,
36    ) -> bool {
37        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
38            ::unity::lookup::method_info_on_class(<SetPropertyUtility as ::unity::ClassIdentity>::class(), "SetStruct", 2)
39        });
40        #[allow(clippy::type_complexity)]
41        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
42            ::std::sync::OnceLock::new();
43        let _ = true;
44        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
45            ::core::result::Result::Ok(mi) => *mi,
46            ::core::result::Result::Err(e) => {
47                panic!(
48                    "method lookup failed: {}
49::{}
50: {}
51",
52                    <SetPropertyUtility as ::unity::ClassIdentity>::NAME,
53                    "SetStruct",
54                    e
55                )
56            },
57        };
58        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
59        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
60        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
61            let mut __guard = __cache.lock().unwrap();
62            *__guard
63                .entry(__key)
64                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
65        };
66        unsafe {
67            let __f: extern "C" fn(*mut M0, M0, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__inflated.method_ptr);
68            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
69            __f(
70                ::core::convert::Into::into(current_value),
71                ::core::convert::Into::into(new_value),
72                ::core::option::Option::Some(__mi_opaque),
73            )
74        }
75    }
76
77    pub fn set_class<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
78        current_value: impl ::core::convert::Into<*mut M0>,
79        new_value: impl ::core::convert::Into<M0>,
80    ) -> bool {
81        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
82            ::unity::lookup::method_info_on_class(<SetPropertyUtility as ::unity::ClassIdentity>::class(), "SetClass", 2)
83        });
84        #[allow(clippy::type_complexity)]
85        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
86            ::std::sync::OnceLock::new();
87        let _ = true;
88        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
89            ::core::result::Result::Ok(mi) => *mi,
90            ::core::result::Result::Err(e) => {
91                panic!(
92                    "method lookup failed: {}
93::{}
94: {}
95",
96                    <SetPropertyUtility as ::unity::ClassIdentity>::NAME,
97                    "SetClass",
98                    e
99                )
100            },
101        };
102        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
103        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
104        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
105            let mut __guard = __cache.lock().unwrap();
106            *__guard
107                .entry(__key)
108                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
109        };
110        unsafe {
111            let __f: extern "C" fn(*mut M0, M0, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__inflated.method_ptr);
112            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
113            __f(
114                ::core::convert::Into::into(current_value),
115                ::core::convert::Into::into(new_value),
116                ::core::option::Option::Some(__mi_opaque),
117            )
118        }
119    }
120}
121
122#[cfg(feature = "unity_engine-ui-setpropertyutility")]
123impl SetPropertyUtility {
124    pub fn set_color_method_info() -> &'static ::unity::il2cpp::MethodInfo {
125        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
126    }
127}
128
129#[cfg(feature = "unity_engine-ui-setpropertyutility")]
130#[doc(hidden)]
131pub mod prelude {
132    pub use super::{ISetPropertyUtility, SetPropertyUtility};
133    pub use crate::system::object::IObject;
134    #[cfg(feature = "system-object")]
135    pub use crate::system::object::IObjectMethods;
136}