Skip to main content

engage/generated/unity_engine/
androidjnihelper.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-androidjnihelper-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/androidjnihelper/AndroidJNIHelper.md"))]
11    #[::unity::class(namespace = "UnityEngine", name = "AndroidJNIHelper")]
12    #[parent(crate::system::object::Object)]
13    pub struct AndroidJNIHelper {}
14}
15
16#[cfg(feature = "unity_engine-androidjnihelper-types")]
17pub use __types::*;
18
19#[cfg(feature = "unity_engine-androidjnihelper")]
20impl AndroidJNIHelper {
21    #[doc = "`GetConstructorID(::unity::IntPtr, ::unity::Il2CppString)` overload"]
22    pub fn get_constructor_id(
23        java_class: impl ::core::convert::Into<::unity::IntPtr>,
24        signature: impl ::core::convert::Into<::unity::Il2CppString>,
25    ) -> ::unity::IntPtr {
26        unsafe {
27            ::unity::il2cpp_call!((::unity::module_base()+0x3f0e570usize)as*mut u8, ::unity::IntPtr;
28(::unity::IntPtr)::core::convert::Into::into(java_class),(::unity::Il2CppString)::core::convert::Into::into(signature))
29        }
30    }
31
32    #[doc = "`GetMethodID(::unity::IntPtr, ::unity::Il2CppString, ::unity::Il2CppString, bool)` overload"]
33    pub fn get_method_id(
34        java_class: impl ::core::convert::Into<::unity::IntPtr>,
35        method_name: impl ::core::convert::Into<::unity::Il2CppString>,
36        signature: impl ::core::convert::Into<::unity::Il2CppString>,
37        is_static: impl ::core::convert::Into<bool>,
38    ) -> ::unity::IntPtr {
39        unsafe {
40            ::unity::il2cpp_call!((::unity::module_base()+0x3f0e7e0usize)as*mut u8, ::unity::IntPtr;
41(::unity::IntPtr)::core::convert::Into::into(java_class),(::unity::Il2CppString)::core::convert::Into::into(method_name),(::unity::Il2CppString)::core::convert::Into::into(signature),(bool)::core::convert::Into::into(is_static))
42        }
43    }
44
45    #[doc = "`CreateJavaRunnable(crate::unity_engine::androidjavarunnable::AndroidJavaRunnable)` overload"]
46    pub fn create_java_runnable(
47        jrunnable: impl ::core::convert::Into<crate::unity_engine::androidjavarunnable::AndroidJavaRunnable>,
48    ) -> ::unity::IntPtr {
49        unsafe {
50            ::unity::il2cpp_call!((::unity::module_base()+0x3f0ea60usize)as*mut u8, ::unity::IntPtr;
51(crate::unity_engine::androidjavarunnable::AndroidJavaRunnable)::core::convert::Into::into(jrunnable))
52        }
53    }
54
55    #[doc = "`CreateJavaProxy(crate::unity_engine::androidjavaproxy::AndroidJavaProxy)` overload"]
56    pub fn create_java_proxy(proxy: impl ::core::convert::Into<crate::unity_engine::androidjavaproxy::AndroidJavaProxy>) -> ::unity::IntPtr {
57        unsafe {
58            ::unity::il2cpp_call!((::unity::module_base()+0x3f0eb40usize)as*mut u8, ::unity::IntPtr;
59(crate::unity_engine::androidjavaproxy::AndroidJavaProxy)::core::convert::Into::into(proxy))
60        }
61    }
62
63    #[doc = "`CreateJNIArgArray(::unity::Array<crate::system::object::Object>)` overload"]
64    pub fn create_jni_arg_array(
65        args: impl ::core::convert::Into<::unity::Array<crate::system::object::Object>>,
66    ) -> ::unity::Array<crate::unity_engine::jvalue::jvalue> {
67        unsafe {
68            ::unity::il2cpp_call!((::unity::module_base()+0x3f0ecf0usize)as*mut u8, ::unity::Array<crate::unity_engine::jvalue::jvalue> ;
69(::unity::Array<crate::system::object::Object>)::core::convert::Into::into(args))
70        }
71    }
72
73    #[doc = "`DeleteJNIArgArray(::unity::Array<crate::system::object::Object>, ::unity::Array<crate::unity_engine::jvalue::jvalue>)` overload"]
74    pub fn delete_jni_arg_array(
75        args: impl ::core::convert::Into<::unity::Array<crate::system::object::Object>>,
76        jni_args: impl ::core::convert::Into<::unity::Array<crate::unity_engine::jvalue::jvalue>>,
77    ) -> () {
78        unsafe {
79            ::unity::il2cpp_call!((::unity::module_base()+0x3f0f2c0usize)as*mut u8,();
80(::unity::Array<crate::system::object::Object>)::core::convert::Into::into(args),(::unity::Array<crate::unity_engine::jvalue::jvalue>)::core::convert::Into::into(jni_args))
81        }
82    }
83
84    #[doc = "`GetConstructorID(::unity::IntPtr, ::unity::Array<crate::system::object::Object>)` overload"]
85    pub fn get_constructor_id_2(
86        jclass: impl ::core::convert::Into<::unity::IntPtr>,
87        args: impl ::core::convert::Into<::unity::Array<crate::system::object::Object>>,
88    ) -> ::unity::IntPtr {
89        unsafe {
90            ::unity::il2cpp_call!((::unity::module_base()+0x3f0f470usize)as*mut u8, ::unity::IntPtr;
91(::unity::IntPtr)::core::convert::Into::into(jclass),(::unity::Array<crate::system::object::Object>)::core::convert::Into::into(args))
92        }
93    }
94
95    pub fn convert_from_jni_array<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
96        array: impl ::core::convert::Into<::unity::IntPtr>,
97    ) -> M0 {
98        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
99            ::unity::lookup::method_info_on_class(<AndroidJNIHelper as ::unity::ClassIdentity>::class(), "ConvertFromJNIArray", 1)
100        });
101        #[allow(clippy::type_complexity)]
102        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
103            ::std::sync::OnceLock::new();
104        let _ = true;
105        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
106            ::core::result::Result::Ok(mi) => *mi,
107            ::core::result::Result::Err(e) => {
108                panic!(
109                    "method lookup failed: {}
110::{}
111: {}
112",
113                    <AndroidJNIHelper as ::unity::ClassIdentity>::NAME,
114                    "ConvertFromJNIArray",
115                    e
116                )
117            },
118        };
119        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
120        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
121        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
122            let mut __guard = __cache.lock().unwrap();
123            *__guard
124                .entry(__key)
125                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
126        };
127        unsafe {
128            let __f: extern "C" fn(::unity::IntPtr, ::unity::OptionalMethod) -> M0 = ::core::mem::transmute(__inflated.method_ptr);
129            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
130            __f(::core::convert::Into::into(array), ::core::option::Option::Some(__mi_opaque))
131        }
132    }
133
134    pub fn get_method_id_2<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
135        jclass: impl ::core::convert::Into<::unity::IntPtr>,
136        method_name: impl ::core::convert::Into<::unity::Il2CppString>,
137        args: impl ::core::convert::Into<::unity::Array<crate::system::object::Object>>,
138        is_static: impl ::core::convert::Into<bool>,
139    ) -> ::unity::IntPtr {
140        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
141            ::unity::lookup::method_info_on_class(<AndroidJNIHelper as ::unity::ClassIdentity>::class(), "GetMethodID", 4)
142        });
143        #[allow(clippy::type_complexity)]
144        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
145            ::std::sync::OnceLock::new();
146        let _ = true;
147        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
148            ::core::result::Result::Ok(mi) => *mi,
149            ::core::result::Result::Err(e) => {
150                panic!(
151                    "method lookup failed: {}
152::{}
153: {}
154",
155                    <AndroidJNIHelper as ::unity::ClassIdentity>::NAME,
156                    "GetMethodID",
157                    e
158                )
159            },
160        };
161        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
162        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
163        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
164            let mut __guard = __cache.lock().unwrap();
165            *__guard
166                .entry(__key)
167                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
168        };
169        unsafe {
170            let __f: extern "C" fn(
171                ::unity::IntPtr,
172                ::unity::Il2CppString,
173                ::unity::Array<crate::system::object::Object>,
174                bool,
175                ::unity::OptionalMethod,
176            ) -> ::unity::IntPtr = ::core::mem::transmute(__inflated.method_ptr);
177            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
178            __f(
179                ::core::convert::Into::into(jclass),
180                ::core::convert::Into::into(method_name),
181                ::core::convert::Into::into(args),
182                ::core::convert::Into::into(is_static),
183                ::core::option::Option::Some(__mi_opaque),
184            )
185        }
186    }
187}
188
189#[cfg(feature = "unity_engine-androidjnihelper")]
190impl AndroidJNIHelper {
191    pub fn get_constructor_id_method_info() -> &'static ::unity::il2cpp::MethodInfo {
192        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
193    }
194
195    pub fn get_method_id_method_info() -> &'static ::unity::il2cpp::MethodInfo {
196        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
197    }
198
199    pub fn create_java_runnable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
200        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
201    }
202
203    pub fn create_java_proxy_method_info() -> &'static ::unity::il2cpp::MethodInfo {
204        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
205    }
206
207    pub fn create_jni_arg_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
208        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
209    }
210
211    pub fn delete_jni_arg_array_method_info() -> &'static ::unity::il2cpp::MethodInfo {
212        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
213    }
214
215    pub fn get_constructor_id_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
216        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
217    }
218}
219
220#[cfg(feature = "unity_engine-androidjnihelper")]
221#[doc(hidden)]
222pub mod prelude {
223    pub use super::{AndroidJNIHelper, IAndroidJNIHelper};
224    pub use crate::system::object::IObject;
225    #[cfg(feature = "system-object")]
226    pub use crate::system::object::IObjectMethods;
227}