Skip to main content

engage/generated/unity_engine/
input.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-input-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/input/Input.md"))]
11    #[::unity::class(namespace = "UnityEngine", name = "Input")]
12    #[parent(crate::system::object::Object)]
13    pub struct Input {}
14}
15
16#[cfg(feature = "unity_engine-input-types")]
17pub use __types::*;
18
19#[cfg(feature = "unity_engine-input")]
20impl Input {
21    #[doc = "`GetKeyInt(crate::unity_engine::keycode::KeyCode)` overload"]
22    pub fn get_key_int(key: impl ::core::convert::Into<crate::unity_engine::keycode::KeyCode>) -> bool {
23        unsafe {
24            ::unity::il2cpp_call!((::unity::module_base()+0x3f38980usize)as*mut u8,bool;
25(crate::unity_engine::keycode::KeyCode)::core::convert::Into::into(key))
26        }
27    }
28
29    #[doc = "`GetKeyUpInt(crate::unity_engine::keycode::KeyCode)` overload"]
30    pub fn get_key_up_int(key: impl ::core::convert::Into<crate::unity_engine::keycode::KeyCode>) -> bool {
31        unsafe {
32            ::unity::il2cpp_call!((::unity::module_base()+0x3f389d0usize)as*mut u8,bool;
33(crate::unity_engine::keycode::KeyCode)::core::convert::Into::into(key))
34        }
35    }
36
37    #[doc = "`GetKeyDownInt(crate::unity_engine::keycode::KeyCode)` overload"]
38    pub fn get_key_down_int(key: impl ::core::convert::Into<crate::unity_engine::keycode::KeyCode>) -> bool {
39        unsafe {
40            ::unity::il2cpp_call!((::unity::module_base()+0x3f38a20usize)as*mut u8,bool;
41(crate::unity_engine::keycode::KeyCode)::core::convert::Into::into(key))
42        }
43    }
44
45    #[doc = "`GetAxis(::unity::Il2CppString)` overload"]
46    pub fn get_axis(axis_name: impl ::core::convert::Into<::unity::Il2CppString>) -> f32 {
47        unsafe {
48            ::unity::il2cpp_call!((::unity::module_base()+0x3f38a70usize)as*mut u8,f32;
49(::unity::Il2CppString)::core::convert::Into::into(axis_name))
50        }
51    }
52
53    #[doc = "`GetAxisRaw(::unity::Il2CppString)` overload"]
54    pub fn get_axis_raw(axis_name: impl ::core::convert::Into<::unity::Il2CppString>) -> f32 {
55        unsafe {
56            ::unity::il2cpp_call!((::unity::module_base()+0x3f38ac0usize)as*mut u8,f32;
57(::unity::Il2CppString)::core::convert::Into::into(axis_name))
58        }
59    }
60
61    #[doc = "`GetButton(::unity::Il2CppString)` overload"]
62    pub fn get_button(button_name: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
63        unsafe {
64            ::unity::il2cpp_call!((::unity::module_base()+0x3f38b10usize)as*mut u8,bool;
65(::unity::Il2CppString)::core::convert::Into::into(button_name))
66        }
67    }
68
69    #[doc = "`GetButtonDown(::unity::Il2CppString)` overload"]
70    pub fn get_button_down(button_name: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
71        unsafe {
72            ::unity::il2cpp_call!((::unity::module_base()+0x3f38b60usize)as*mut u8,bool;
73(::unity::Il2CppString)::core::convert::Into::into(button_name))
74        }
75    }
76
77    #[doc = "`GetButtonUp(::unity::Il2CppString)` overload"]
78    pub fn get_button_up(button_name: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
79        unsafe {
80            ::unity::il2cpp_call!((::unity::module_base()+0x3f38bb0usize)as*mut u8,bool;
81(::unity::Il2CppString)::core::convert::Into::into(button_name))
82        }
83    }
84
85    #[doc = "`GetMouseButton(i32)` overload"]
86    pub fn get_mouse_button(button: impl ::core::convert::Into<i32>) -> bool {
87        unsafe {
88            ::unity::il2cpp_call!((::unity::module_base()+0x3f38c00usize)as*mut u8,bool;
89(i32)::core::convert::Into::into(button))
90        }
91    }
92
93    #[doc = "`GetMouseButtonDown(i32)` overload"]
94    pub fn get_mouse_button_down(button: impl ::core::convert::Into<i32>) -> bool {
95        unsafe {
96            ::unity::il2cpp_call!((::unity::module_base()+0x3f38c50usize)as*mut u8,bool;
97(i32)::core::convert::Into::into(button))
98        }
99    }
100
101    #[doc = "`GetMouseButtonUp(i32)` overload"]
102    pub fn get_mouse_button_up(button: impl ::core::convert::Into<i32>) -> bool {
103        unsafe {
104            ::unity::il2cpp_call!((::unity::module_base()+0x3f38ca0usize)as*mut u8,bool;
105(i32)::core::convert::Into::into(button))
106        }
107    }
108
109    #[doc = "`GetTouch(i32)` overload"]
110    pub fn get_touch(index: impl ::core::convert::Into<i32>) -> crate::unity_engine::touch::Touch {
111        unsafe {
112            ::unity::il2cpp_call!((::unity::module_base()+0x3f38cf0usize)as*mut u8,crate::unity_engine::touch::Touch;
113(i32)::core::convert::Into::into(index))
114        }
115    }
116
117    #[doc = "`GetKey(crate::unity_engine::keycode::KeyCode)` overload"]
118    pub fn get_key(key: impl ::core::convert::Into<crate::unity_engine::keycode::KeyCode>) -> bool {
119        unsafe {
120            ::unity::il2cpp_call!((::unity::module_base()+0x3f38de0usize)as*mut u8,bool;
121(crate::unity_engine::keycode::KeyCode)::core::convert::Into::into(key))
122        }
123    }
124
125    #[doc = "`GetKeyUp(crate::unity_engine::keycode::KeyCode)` overload"]
126    pub fn get_key_up(key: impl ::core::convert::Into<crate::unity_engine::keycode::KeyCode>) -> bool {
127        unsafe {
128            ::unity::il2cpp_call!((::unity::module_base()+0x3f38e30usize)as*mut u8,bool;
129(crate::unity_engine::keycode::KeyCode)::core::convert::Into::into(key))
130        }
131    }
132
133    #[doc = "`GetKeyDown(crate::unity_engine::keycode::KeyCode)` overload"]
134    pub fn get_key_down(key: impl ::core::convert::Into<crate::unity_engine::keycode::KeyCode>) -> bool {
135        unsafe {
136            ::unity::il2cpp_call!((::unity::module_base()+0x3f38e80usize)as*mut u8,bool;
137(crate::unity_engine::keycode::KeyCode)::core::convert::Into::into(key))
138        }
139    }
140
141    #[doc = "`get_mousePosition()` overload"]
142    pub fn get_mouse_position() -> crate::unity_engine::vector3::Vector3 {
143        unsafe {
144            ::unity::il2cpp_call!((::unity::module_base()+0x3f38ed0usize)as*mut u8,crate::unity_engine::vector3::Vector3;
145            )
146        }
147    }
148
149    #[doc = "`get_mouseScrollDelta()` overload"]
150    pub fn get_mouse_scroll_delta() -> crate::unity_engine::vector2::Vector2 {
151        unsafe {
152            ::unity::il2cpp_call!((::unity::module_base()+0x3f38f80usize)as*mut u8,crate::unity_engine::vector2::Vector2;
153            )
154        }
155    }
156
157    #[doc = "`get_imeCompositionMode()` overload"]
158    pub fn get_ime_composition_mode() -> crate::unity_engine::imecompositionmode::IMECompositionMode {
159        unsafe {
160            ::unity::il2cpp_call!((::unity::module_base()+0x3f39020usize)as*mut u8,crate::unity_engine::imecompositionmode::IMECompositionMode;
161            )
162        }
163    }
164
165    #[doc = "`set_imeCompositionMode(crate::unity_engine::imecompositionmode::IMECompositionMode)` overload"]
166    pub fn set_ime_composition_mode(value: impl ::core::convert::Into<crate::unity_engine::imecompositionmode::IMECompositionMode>) -> () {
167        unsafe {
168            ::unity::il2cpp_call!((::unity::module_base()+0x3f39060usize)as*mut u8,();
169(crate::unity_engine::imecompositionmode::IMECompositionMode)::core::convert::Into::into(value))
170        }
171    }
172
173    #[doc = "`get_compositionString()` overload"]
174    pub fn get_composition_string() -> ::unity::Il2CppString {
175        unsafe {
176            ::unity::il2cpp_call!((::unity::module_base()+0x3f390b0usize)as*mut u8, ::unity::Il2CppString;
177            )
178        }
179    }
180
181    #[doc = "`get_compositionCursorPos()` overload"]
182    pub fn get_composition_cursor_pos() -> crate::unity_engine::vector2::Vector2 {
183        unsafe {
184            ::unity::il2cpp_call!((::unity::module_base()+0x3f390f0usize)as*mut u8,crate::unity_engine::vector2::Vector2;
185            )
186        }
187    }
188
189    #[doc = "`set_compositionCursorPos(crate::unity_engine::vector2::Vector2)` overload"]
190    pub fn set_composition_cursor_pos(value: impl ::core::convert::Into<crate::unity_engine::vector2::Vector2>) -> () {
191        unsafe {
192            ::unity::il2cpp_call!((::unity::module_base()+0x3f39190usize)as*mut u8,();
193(crate::unity_engine::vector2::Vector2)::core::convert::Into::into(value))
194        }
195    }
196
197    #[doc = "`get_mousePresent()` overload"]
198    pub fn get_mouse_present() -> bool {
199        unsafe {
200            ::unity::il2cpp_call!((::unity::module_base()+0x3f39230usize)as*mut u8,bool;
201            )
202        }
203    }
204
205    #[doc = "`get_touchCount()` overload"]
206    pub fn get_touch_count() -> i32 {
207        unsafe {
208            ::unity::il2cpp_call!((::unity::module_base()+0x3f39270usize)as*mut u8,i32;
209            )
210        }
211    }
212
213    #[doc = "`get_touchSupported()` overload"]
214    pub fn get_touch_supported() -> bool {
215        unsafe {
216            ::unity::il2cpp_call!((::unity::module_base()+0x3f392b0usize)as*mut u8,bool;
217            )
218        }
219    }
220
221    #[doc = "`get_touches()` overload"]
222    pub fn get_touches() -> ::unity::Array<crate::unity_engine::touch::Touch> {
223        unsafe {
224            ::unity::il2cpp_call!((::unity::module_base()+0x3f392f0usize)as*mut u8, ::unity::Array<crate::unity_engine::touch::Touch> ;
225            )
226        }
227    }
228
229    #[doc = "`GetTouch_Injected(i32, *mutcrate::unity_engine::touch::Touch)` overload"]
230    pub fn get_touch_injected(index: impl ::core::convert::Into<i32>) -> crate::unity_engine::touch::Touch {
231        unsafe {
232            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::touch::Touch>::uninit();
233            ::unity::il2cpp_call!((::unity::module_base()+0x3f38d90usize)as*mut u8,();
234(i32)::core::convert::Into::into(index),(*mut crate::unity_engine::touch::Touch)__out_0.as_mut_ptr());
235            __out_0.assume_init()
236        }
237    }
238
239    #[doc = "`get_mousePosition_Injected(*mutcrate::unity_engine::vector3::Vector3)` overload"]
240    pub fn get_mouse_position_injected() -> crate::unity_engine::vector3::Vector3 {
241        unsafe {
242            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::vector3::Vector3>::uninit();
243            ::unity::il2cpp_call!((::unity::module_base()+0x3f38f30usize)as*mut u8,();
244(*mut crate::unity_engine::vector3::Vector3)__out_0.as_mut_ptr());
245            __out_0.assume_init()
246        }
247    }
248
249    #[doc = "`get_mouseScrollDelta_Injected(*mutcrate::unity_engine::vector2::Vector2)` overload"]
250    pub fn get_mouse_scroll_delta_injected() -> crate::unity_engine::vector2::Vector2 {
251        unsafe {
252            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::vector2::Vector2>::uninit();
253            ::unity::il2cpp_call!((::unity::module_base()+0x3f38fd0usize)as*mut u8,();
254(*mut crate::unity_engine::vector2::Vector2)__out_0.as_mut_ptr());
255            __out_0.assume_init()
256        }
257    }
258
259    #[doc = "`get_compositionCursorPos_Injected(*mutcrate::unity_engine::vector2::Vector2)` overload"]
260    pub fn get_composition_cursor_pos_injected() -> crate::unity_engine::vector2::Vector2 {
261        unsafe {
262            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::vector2::Vector2>::uninit();
263            ::unity::il2cpp_call!((::unity::module_base()+0x3f39140usize)as*mut u8,();
264(*mut crate::unity_engine::vector2::Vector2)__out_0.as_mut_ptr());
265            __out_0.assume_init()
266        }
267    }
268
269    #[doc = "`set_compositionCursorPos_Injected(*mutcrate::unity_engine::vector2::Vector2)` overload"]
270    pub fn set_composition_cursor_pos_injected() -> crate::unity_engine::vector2::Vector2 {
271        unsafe {
272            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::vector2::Vector2>::uninit();
273            ::unity::il2cpp_call!((::unity::module_base()+0x3f391e0usize)as*mut u8,();
274(*mut crate::unity_engine::vector2::Vector2)__out_0.as_mut_ptr());
275            __out_0.assume_init()
276        }
277    }
278}
279
280#[cfg(feature = "unity_engine-input")]
281impl Input {
282    pub fn get_key_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
283        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
284    }
285
286    pub fn get_key_up_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
287        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
288    }
289
290    pub fn get_key_down_int_method_info() -> &'static ::unity::il2cpp::MethodInfo {
291        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
292    }
293
294    pub fn get_axis_method_info() -> &'static ::unity::il2cpp::MethodInfo {
295        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
296    }
297
298    pub fn get_axis_raw_method_info() -> &'static ::unity::il2cpp::MethodInfo {
299        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
300    }
301
302    pub fn get_button_method_info() -> &'static ::unity::il2cpp::MethodInfo {
303        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
304    }
305
306    pub fn get_button_down_method_info() -> &'static ::unity::il2cpp::MethodInfo {
307        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
308    }
309
310    pub fn get_button_up_method_info() -> &'static ::unity::il2cpp::MethodInfo {
311        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
312    }
313
314    pub fn get_mouse_button_method_info() -> &'static ::unity::il2cpp::MethodInfo {
315        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
316    }
317
318    pub fn get_mouse_button_down_method_info() -> &'static ::unity::il2cpp::MethodInfo {
319        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
320    }
321
322    pub fn get_mouse_button_up_method_info() -> &'static ::unity::il2cpp::MethodInfo {
323        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
324    }
325
326    pub fn get_touch_method_info() -> &'static ::unity::il2cpp::MethodInfo {
327        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
328    }
329
330    pub fn get_key_method_info() -> &'static ::unity::il2cpp::MethodInfo {
331        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
332    }
333
334    pub fn get_key_up_method_info() -> &'static ::unity::il2cpp::MethodInfo {
335        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
336    }
337
338    pub fn get_key_down_method_info() -> &'static ::unity::il2cpp::MethodInfo {
339        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
340    }
341
342    pub fn get_mouse_position_method_info() -> &'static ::unity::il2cpp::MethodInfo {
343        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
344    }
345
346    pub fn get_mouse_scroll_delta_method_info() -> &'static ::unity::il2cpp::MethodInfo {
347        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
348    }
349
350    pub fn get_ime_composition_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
351        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
352    }
353
354    pub fn set_ime_composition_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
355        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
356    }
357
358    pub fn get_composition_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
359        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[19]
360    }
361
362    pub fn get_composition_cursor_pos_method_info() -> &'static ::unity::il2cpp::MethodInfo {
363        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[20]
364    }
365
366    pub fn set_composition_cursor_pos_method_info() -> &'static ::unity::il2cpp::MethodInfo {
367        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[21]
368    }
369
370    pub fn get_mouse_present_method_info() -> &'static ::unity::il2cpp::MethodInfo {
371        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[22]
372    }
373
374    pub fn get_touch_count_method_info() -> &'static ::unity::il2cpp::MethodInfo {
375        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[23]
376    }
377
378    pub fn get_touch_supported_method_info() -> &'static ::unity::il2cpp::MethodInfo {
379        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[24]
380    }
381
382    pub fn get_touches_method_info() -> &'static ::unity::il2cpp::MethodInfo {
383        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[25]
384    }
385
386    pub fn get_touch_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
387        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[26]
388    }
389
390    pub fn get_mouse_position_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
391        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[27]
392    }
393
394    pub fn get_mouse_scroll_delta_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
395        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[28]
396    }
397
398    pub fn get_composition_cursor_pos_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
399        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[29]
400    }
401
402    pub fn set_composition_cursor_pos_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
403        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[30]
404    }
405}
406
407#[cfg(feature = "unity_engine-input")]
408#[doc(hidden)]
409pub mod prelude {
410    pub use super::{IInput, Input};
411    pub use crate::system::object::IObject;
412    #[cfg(feature = "system-object")]
413    pub use crate::system::object::IObjectMethods;
414}