engage/generated/nn/hid/
touchscreenstate2.rs1#[cfg(feature = "nn-hid-touchscreenstate2-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 object::{IObject, Object},
10 valuetype::{IValueType, ValueType},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/nn/hid/touchscreenstate2/TouchScreenState2.md"))]
14 #[repr(C)]
15 #[derive(::core::clone::Clone, ::core::marker::Copy)]
16 pub struct TouchScreenState2 {
17 pub sampling_number: i64,
18 pub count: i32,
19 pub reserved: i32,
20 pub touches: crate::nn::hid::touchscreenstate2::TouchScreenState2_TouchStateArray2,
21 }
22 impl ::unity::ClassIdentity for TouchScreenState2 {
23 const NAME: &'static str = "TouchScreenState2";
24 const NAMESPACE: &'static str = "nn.hid";
25
26 fn class() -> ::unity::Class {
27 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
28 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
29 }
30 }
31 impl ::unity::IlType for TouchScreenState2 {
32 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
33 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
34 }
35 }
36 impl TouchScreenState2 {
37 #[inline]
38 pub fn touch_count() -> i32 {
39 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
40 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "TouchCount");
41 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
42 }
43
44 #[inline]
45 pub fn set_touch_count(value: i32) {
46 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
47 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "TouchCount");
48 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
49 }
50 }
51
52 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/nn/hid/touchscreenstate2/TouchScreenState2_TouchStateArray2.md"))]
53 #[repr(C)]
54 #[derive(::core::clone::Clone, ::core::marker::Copy)]
55 pub struct TouchScreenState2_TouchStateArray2 {
56 pub value0: crate::nn::hid::touchstate::TouchState,
57 pub value1: crate::nn::hid::touchstate::TouchState,
58 }
59 impl ::unity::ClassIdentity for TouchScreenState2_TouchStateArray2 {
60 const NAME: &'static str = "TouchScreenState2.TouchStateArray2";
61 const NAMESPACE: &'static str = "nn.hid";
62
63 fn class() -> ::unity::Class {
64 static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
65 *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
66 }
67 }
68 impl ::unity::IlType for TouchScreenState2_TouchStateArray2 {
69 fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
70 &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
71 }
72 }
73 impl TouchScreenState2_TouchStateArray2 {
74 #[inline]
75 pub fn length() -> i32 {
76 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
77 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "_Length");
78 ::unity::static_field_get_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset)
79 }
80
81 #[inline]
82 pub fn set_length(value: i32) {
83 static OFFSET: ::std::sync::OnceLock<usize> = ::std::sync::OnceLock::new();
84 let __offset = ::unity::cached_field_offset_static::<Self>(&OFFSET, "_Length");
85 ::unity::static_field_set_value_at_offset(<Self as ::unity::ClassIdentity>::class(), __offset, value);
86 }
87 }
88}
89
90#[cfg(feature = "nn-hid-touchscreenstate2-types")]
91pub use __types::*;
92
93#[cfg(feature = "nn-hid-touchscreenstate2")]
94impl TouchScreenState2 {
95 #[doc = "`SetDefault()` overload"]
96 pub fn set_default(&mut self) -> () {
97 unsafe {
98 ::unity::il2cpp_call!((::unity::module_base()+0x229a980usize)as*mut u8,();
99(*mut TouchScreenState2)self as*mut TouchScreenState2)
100 }
101 }
102}
103
104#[cfg(feature = "nn-hid-touchscreenstate2")]
105impl TouchScreenState2 {
106 pub fn set_default_method_info() -> &'static ::unity::il2cpp::MethodInfo {
107 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
108 }
109}
110
111#[cfg(feature = "nn-hid-touchscreenstate2")]
112impl TouchScreenState2_TouchStateArray2 {
113 #[doc = "`get_Length()` overload"]
114 pub fn get_length(&mut self) -> i32 {
115 unsafe {
116 ::unity::il2cpp_call!((::unity::module_base()+0x2211560usize)as*mut u8,i32;
117(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2)
118 }
119 }
120
121 #[doc = "`get_Item(i32)` overload"]
122 pub fn get_item(&mut self, index: impl ::core::convert::Into<i32>) -> crate::nn::hid::touchstate::TouchState {
123 unsafe {
124 ::unity::il2cpp_call!((::unity::module_base()+0x2211570usize)as*mut u8,crate::nn::hid::touchstate::TouchState;
125(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2,(i32)::core::convert::Into::into(index))
126 }
127 }
128
129 #[doc = "`set_Item(i32, crate::nn::hid::touchstate::TouchState)` overload"]
130 pub fn set_item(
131 &mut self,
132 index: impl ::core::convert::Into<i32>,
133 value: impl ::core::convert::Into<crate::nn::hid::touchstate::TouchState>,
134 ) -> () {
135 unsafe {
136 ::unity::il2cpp_call!((::unity::module_base()+0x2211600usize)as*mut u8,();
137(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2,(i32)::core::convert::Into::into(index),(crate::nn::hid::touchstate::TouchState)::core::convert::Into::into(value))
138 }
139 }
140
141 #[doc = "`get_Count()` overload"]
142 pub fn get_count(&mut self) -> i32 {
143 unsafe {
144 ::unity::il2cpp_call!((::unity::module_base()+0x2211670usize)as*mut u8,i32;
145(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2)
146 }
147 }
148
149 #[doc = "`get_IsReadOnly()` overload"]
150 pub fn get_is_read_only(&mut self) -> bool {
151 unsafe {
152 ::unity::il2cpp_call!((::unity::module_base()+0x2211680usize)as*mut u8,bool;
153(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2)
154 }
155 }
156
157 #[doc = "`Contains(crate::nn::hid::touchstate::TouchState)` overload"]
158 pub fn contains(&mut self, item: impl ::core::convert::Into<crate::nn::hid::touchstate::TouchState>) -> bool {
159 unsafe {
160 ::unity::il2cpp_call!((::unity::module_base()+0x2211690usize)as*mut u8,bool;
161(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2,(crate::nn::hid::touchstate::TouchState)::core::convert::Into::into(item))
162 }
163 }
164
165 #[doc = "`IndexOf(crate::nn::hid::touchstate::TouchState)` overload"]
166 pub fn index_of(&mut self, item: impl ::core::convert::Into<crate::nn::hid::touchstate::TouchState>) -> i32 {
167 unsafe {
168 ::unity::il2cpp_call!((::unity::module_base()+0x2211770usize)as*mut u8,i32;
169(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2,(crate::nn::hid::touchstate::TouchState)::core::convert::Into::into(item))
170 }
171 }
172
173 #[doc = "`CopyTo(::unity::Array<crate::nn::hid::touchstate::TouchState>, i32)` overload"]
174 pub fn copy_to(
175 &mut self,
176 array: impl ::core::convert::Into<::unity::Array<crate::nn::hid::touchstate::TouchState>>,
177 array_index: impl ::core::convert::Into<i32>,
178 ) -> () {
179 unsafe {
180 ::unity::il2cpp_call!((::unity::module_base()+0x2211860usize)as*mut u8,();
181(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2,(::unity::Array<crate::nn::hid::touchstate::TouchState>)::core::convert::Into::into(array),(i32)::core::convert::Into::into(array_index))
182 }
183 }
184
185 #[doc = "`ToString()` overload"]
186 pub fn to_string(&mut self) -> ::unity::Il2CppString {
187 unsafe {
188 ::unity::il2cpp_call!((::unity::module_base()+0x22119c0usize)as*mut u8, ::unity::Il2CppString;
189(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2)
190 }
191 }
192
193 #[doc = "`GetEnumerator()` overload"]
194 pub fn get_enumerator(&mut self) -> crate::system::collections::generic::ienumerator_1::IEnumerator_1<crate::nn::hid::touchstate::TouchState> {
195 unsafe {
196 ::unity::il2cpp_call!((::unity::module_base()+0x2211a90usize)as*mut u8,crate::system::collections::generic::ienumerator_1::IEnumerator_1<crate::nn::hid::touchstate::TouchState> ;
197(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2)
198 }
199 }
200
201 #[doc = "`System.Collections.IEnumerable.GetEnumerator()` overload"]
202 pub fn system_collections_i_enumerable_get_enumerator(&mut self) -> crate::system::collections::ienumerator::IEnumerator {
203 unsafe {
204 ::unity::il2cpp_call!((::unity::module_base()+0x2211b10usize)as*mut u8,crate::system::collections::ienumerator::IEnumerator;
205(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2)
206 }
207 }
208
209 #[doc = "`Add(crate::nn::hid::touchstate::TouchState)` overload"]
210 pub fn add(&mut self, item: impl ::core::convert::Into<crate::nn::hid::touchstate::TouchState>) -> () {
211 unsafe {
212 ::unity::il2cpp_call!((::unity::module_base()+0x2211b90usize)as*mut u8,();
213(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2,(crate::nn::hid::touchstate::TouchState)::core::convert::Into::into(item))
214 }
215 }
216
217 #[doc = "`Clear()` overload"]
218 pub fn clear(&mut self) -> () {
219 unsafe {
220 ::unity::il2cpp_call!((::unity::module_base()+0x2211bd0usize)as*mut u8,();
221(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2)
222 }
223 }
224
225 #[doc = "`Insert(i32, crate::nn::hid::touchstate::TouchState)` overload"]
226 pub fn insert(&mut self, index: impl ::core::convert::Into<i32>, item: impl ::core::convert::Into<crate::nn::hid::touchstate::TouchState>) -> () {
227 unsafe {
228 ::unity::il2cpp_call!((::unity::module_base()+0x2211c10usize)as*mut u8,();
229(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2,(i32)::core::convert::Into::into(index),(crate::nn::hid::touchstate::TouchState)::core::convert::Into::into(item))
230 }
231 }
232
233 #[doc = "`Remove(crate::nn::hid::touchstate::TouchState)` overload"]
234 pub fn remove(&mut self, item: impl ::core::convert::Into<crate::nn::hid::touchstate::TouchState>) -> bool {
235 unsafe {
236 ::unity::il2cpp_call!((::unity::module_base()+0x2211c50usize)as*mut u8,bool;
237(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2,(crate::nn::hid::touchstate::TouchState)::core::convert::Into::into(item))
238 }
239 }
240
241 #[doc = "`RemoveAt(i32)` overload"]
242 pub fn remove_at(&mut self, index: impl ::core::convert::Into<i32>) -> () {
243 unsafe {
244 ::unity::il2cpp_call!((::unity::module_base()+0x2211c90usize)as*mut u8,();
245(*mut TouchScreenState2_TouchStateArray2)self as*mut TouchScreenState2_TouchStateArray2,(i32)::core::convert::Into::into(index))
246 }
247 }
248}
249
250#[cfg(feature = "nn-hid-touchscreenstate2")]
251impl TouchScreenState2_TouchStateArray2 {
252 pub fn get_length_method_info() -> &'static ::unity::il2cpp::MethodInfo {
253 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
254 }
255
256 pub fn get_item_method_info() -> &'static ::unity::il2cpp::MethodInfo {
257 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
258 }
259
260 pub fn set_item_method_info() -> &'static ::unity::il2cpp::MethodInfo {
261 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
262 }
263
264 pub fn get_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
265 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
266 }
267
268 pub fn get_is_read_only_method_info() -> &'static ::unity::il2cpp::MethodInfo {
269 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
270 }
271
272 pub fn contains_method_info() -> &'static ::unity::il2cpp::MethodInfo {
273 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
274 }
275
276 pub fn index_of_method_info() -> &'static ::unity::il2cpp::MethodInfo {
277 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
278 }
279
280 pub fn copy_to_method_info() -> &'static ::unity::il2cpp::MethodInfo {
281 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
282 }
283
284 pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
285 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
286 }
287
288 pub fn get_enumerator_method_info() -> &'static ::unity::il2cpp::MethodInfo {
289 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
290 }
291
292 pub fn system_collections_i_enumerable_get_enumerator_method_info() -> &'static ::unity::il2cpp::MethodInfo {
293 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
294 }
295
296 pub fn add_method_info() -> &'static ::unity::il2cpp::MethodInfo {
297 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
298 }
299
300 pub fn clear_method_info() -> &'static ::unity::il2cpp::MethodInfo {
301 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
302 }
303
304 pub fn insert_method_info() -> &'static ::unity::il2cpp::MethodInfo {
305 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
306 }
307
308 pub fn remove_method_info() -> &'static ::unity::il2cpp::MethodInfo {
309 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
310 }
311
312 pub fn remove_at_method_info() -> &'static ::unity::il2cpp::MethodInfo {
313 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
314 }
315}
316
317#[cfg(feature = "nn-hid-touchscreenstate2")]
318#[doc(hidden)]
319pub mod prelude {
320 pub use super::{TouchScreenState2, TouchScreenState2_TouchStateArray2};
321 #[cfg(feature = "system-object")]
322 pub use crate::system::object::IObjectMethods;
323 #[cfg(feature = "system-valuetype")]
324 pub use crate::system::valuetype::IValueTypeMethods;
325 pub use crate::system::{object::IObject, valuetype::IValueType};
326}