jni_sys_new/
lib.rs

1#![doc(html_root_url="https://docs.rs/jni-sys/0.3.0")]
2#![allow(non_snake_case, non_camel_case_types)]
3
4use std::os::raw::c_void;
5use std::os::raw::c_char;
6
7// FIXME is this sufficiently correct?
8pub type va_list = *mut c_void;
9
10pub type jint = i32;
11pub type jlong = i64;
12pub type jbyte = i8;
13pub type jboolean = u8;
14pub type jchar = u16;
15pub type jshort = i16;
16pub type jfloat = f32;
17pub type jdouble = f64;
18pub type jsize = jint;
19
20pub enum _jobject {}
21pub type jobject = *mut _jobject;
22pub type jclass = jobject;
23pub type jthrowable = jobject;
24pub type jstring = jobject;
25pub type jarray = jobject;
26pub type jbooleanArray = jarray;
27pub type jbyteArray = jarray;
28pub type jcharArray = jarray;
29pub type jshortArray = jarray;
30pub type jintArray = jarray;
31pub type jlongArray = jarray;
32pub type jfloatArray = jarray;
33pub type jdoubleArray = jarray;
34pub type jobjectArray = jarray;
35pub type jweak = jobject;
36
37#[repr(C)]
38#[derive(Copy)]
39pub union jvalue {
40    pub z: jboolean,
41    pub b: jbyte,
42    pub c: jchar,
43    pub s: jshort,
44    pub i: jint,
45    pub j: jlong,
46    pub f: jfloat,
47    pub d: jdouble,
48    pub l: jobject,
49}
50
51impl Clone for jvalue {
52    fn clone(&self) -> Self {
53        *self
54    }
55}
56
57pub enum _jfieldID {}
58pub type jfieldID = *mut _jfieldID;
59pub enum _jmethodID {}
60pub type jmethodID = *mut _jmethodID;
61
62#[derive(Clone, Copy)]
63#[repr(C)]
64pub enum jobjectRefType {
65    JNIInvalidRefType = 0,
66    JNILocalRefType = 1,
67    JNIGlobalRefType = 2,
68    JNIWeakGlobalRefType = 3,
69}
70
71pub const JNI_FALSE: jboolean = 0;
72pub const JNI_TRUE: jboolean = 1;
73
74pub const JNI_OK: jint = 0;
75pub const JNI_ERR: jint = -1;
76pub const JNI_EDETACHED: jint = -2;
77pub const JNI_EVERSION: jint = -3;
78pub const JNI_ENOMEM: jint = -4;
79pub const JNI_EEXIST: jint = -5;
80pub const JNI_EINVAL: jint = -6;
81
82pub const JNI_COMMIT: jint = 1;
83pub const JNI_ABORT: jint = 2;
84
85pub const JNI_VERSION_1_1: jint = 0x00010001;
86pub const JNI_VERSION_1_2: jint = 0x00010002;
87pub const JNI_VERSION_1_4: jint = 0x00010004;
88pub const JNI_VERSION_1_6: jint = 0x00010006;
89pub const JNI_VERSION_1_8: jint = 0x00010008;
90pub const JNI_VERSION_9: jint = 0x00090000;
91pub const JNI_VERSION_10: jint = 0x000a0000;
92
93#[repr(C)]
94#[derive(Copy)]
95pub struct JNINativeMethod {
96    pub name: *mut c_char,
97    pub signature: *mut c_char,
98    pub fnPtr: *mut c_void,
99}
100
101impl Clone for JNINativeMethod {
102    fn clone(&self) -> Self {
103        *self
104    }
105}
106
107pub type JNIEnv = *const JNINativeInterface_;
108pub type JavaVM = *const JNIInvokeInterface_;
109
110#[repr(C)]
111#[derive(Copy)]
112pub struct JNINativeInterface_ {
113    pub reserved0: *mut c_void,
114    pub reserved1: *mut c_void,
115    pub reserved2: *mut c_void,
116    pub reserved3: *mut c_void,
117    pub GetVersion: Option<unsafe extern "system" fn(env: *mut JNIEnv) -> jint>,
118    pub DefineClass: Option<
119        unsafe extern "system" fn(env: *mut JNIEnv,
120                                  name: *const c_char,
121                                  loader: jobject,
122                                  buf: *const jbyte,
123                                  len: jsize)
124                                  -> jclass,
125    >,
126    pub FindClass:
127        Option<unsafe extern "system" fn(env: *mut JNIEnv, name: *const c_char) -> jclass>,
128    pub FromReflectedMethod:
129        Option<unsafe extern "system" fn(env: *mut JNIEnv, method: jobject) -> jmethodID>,
130    pub FromReflectedField:
131        Option<unsafe extern "system" fn(env: *mut JNIEnv, field: jobject) -> jfieldID>,
132    pub ToReflectedMethod: Option<
133        unsafe extern "system" fn(env: *mut JNIEnv,
134                                  cls: jclass,
135                                  methodID: jmethodID,
136                                  isStatic: jboolean)
137                                  -> jobject,
138    >,
139    pub GetSuperclass: Option<unsafe extern "system" fn(env: *mut JNIEnv, sub: jclass) -> jclass>,
140    pub IsAssignableFrom:
141        Option<unsafe extern "system" fn(env: *mut JNIEnv, sub: jclass, sup: jclass) -> jboolean>,
142    pub ToReflectedField: Option<
143        unsafe extern "system" fn(env: *mut JNIEnv,
144                                  cls: jclass,
145                                  fieldID: jfieldID,
146                                  isStatic: jboolean)
147                                  -> jobject,
148    >,
149    pub Throw: Option<unsafe extern "system" fn(env: *mut JNIEnv, obj: jthrowable) -> jint>,
150    pub ThrowNew: Option<
151        unsafe extern "system" fn(env: *mut JNIEnv,
152                                  clazz: jclass,
153                                  msg: *const c_char)
154                                  -> jint,
155    >,
156    pub ExceptionOccurred: Option<unsafe extern "system" fn(env: *mut JNIEnv) -> jthrowable>,
157    pub ExceptionDescribe: Option<unsafe extern "system" fn(env: *mut JNIEnv)>,
158    pub ExceptionClear: Option<unsafe extern "system" fn(env: *mut JNIEnv)>,
159    pub FatalError: Option<unsafe extern "system" fn(env: *mut JNIEnv, msg: *const c_char) -> !>,
160    pub PushLocalFrame: Option<unsafe extern "system" fn(env: *mut JNIEnv, capacity: jint) -> jint>,
161    pub PopLocalFrame:
162        Option<unsafe extern "system" fn(env: *mut JNIEnv, result: jobject) -> jobject>,
163    pub NewGlobalRef: Option<unsafe extern "system" fn(env: *mut JNIEnv, lobj: jobject) -> jobject>,
164    pub DeleteGlobalRef: Option<unsafe extern "system" fn(env: *mut JNIEnv, gref: jobject)>,
165    pub DeleteLocalRef: Option<unsafe extern "system" fn(env: *mut JNIEnv, obj: jobject)>,
166    pub IsSameObject: Option<
167        unsafe extern "system" fn(env: *mut JNIEnv,
168                                  obj1: jobject,
169                                  obj2: jobject)
170                                  -> jboolean,
171    >,
172    pub NewLocalRef: Option<unsafe extern "system" fn(env: *mut JNIEnv, ref_: jobject) -> jobject>,
173    pub EnsureLocalCapacity:
174        Option<unsafe extern "system" fn(env: *mut JNIEnv, capacity: jint) -> jint>,
175    pub AllocObject: Option<unsafe extern "system" fn(env: *mut JNIEnv, clazz: jclass) -> jobject>,
176    pub NewObject: Option<
177        unsafe extern "C" fn(env: *mut JNIEnv,
178                             clazz: jclass,
179                             methodID: jmethodID,
180                             ...)
181                             -> jobject,
182    >,
183    pub NewObjectV: Option<
184        unsafe extern "system" fn(env: *mut JNIEnv,
185                                  clazz: jclass,
186                                  methodID: jmethodID,
187                                  args: va_list)
188                                  -> jobject,
189    >,
190    pub NewObjectA: Option<
191        unsafe extern "system" fn(env: *mut JNIEnv,
192                                  clazz: jclass,
193                                  methodID: jmethodID,
194                                  args: *const jvalue)
195                                  -> jobject,
196    >,
197    pub GetObjectClass: Option<unsafe extern "system" fn(env: *mut JNIEnv, obj: jobject) -> jclass>,
198    pub IsInstanceOf:
199        Option<unsafe extern "system" fn(env: *mut JNIEnv, obj: jobject, clazz: jclass) -> jboolean>,
200    pub GetMethodID: Option<
201        unsafe extern "system" fn(env: *mut JNIEnv,
202                                  clazz: jclass,
203                                  name: *const c_char,
204                                  sig: *const c_char)
205                                  -> jmethodID,
206    >,
207    pub CallObjectMethod: Option<
208        unsafe extern "C" fn(env: *mut JNIEnv,
209                             obj: jobject,
210                             methodID: jmethodID,
211                             ...)
212                             -> jobject,
213    >,
214    pub CallObjectMethodV: Option<
215        unsafe extern "system" fn(env: *mut JNIEnv,
216                                  obj: jobject,
217                                  methodID: jmethodID,
218                                  args: va_list)
219                                  -> jobject,
220    >,
221    pub CallObjectMethodA: Option<
222        unsafe extern "system" fn(env: *mut JNIEnv,
223                                  obj: jobject,
224                                  methodID: jmethodID,
225                                  args: *const jvalue)
226                                  -> jobject,
227    >,
228    pub CallBooleanMethod: Option<
229        unsafe extern "C" fn(env: *mut JNIEnv,
230                             obj: jobject,
231                             methodID: jmethodID,
232                             ...)
233                             -> jboolean,
234    >,
235    pub CallBooleanMethodV: Option<
236        unsafe extern "system" fn(env: *mut JNIEnv,
237                                  obj: jobject,
238                                  methodID: jmethodID,
239                                  args: va_list)
240                                  -> jboolean,
241    >,
242    pub CallBooleanMethodA: Option<
243        unsafe extern "system" fn(env: *mut JNIEnv,
244                                  obj: jobject,
245                                  methodID: jmethodID,
246                                  args: *const jvalue)
247                                  -> jboolean,
248    >,
249    pub CallByteMethod: Option<
250        unsafe extern "C" fn(env: *mut JNIEnv,
251                             obj: jobject,
252                             methodID: jmethodID,
253                             ...)
254                             -> jbyte,
255    >,
256    pub CallByteMethodV: Option<
257        unsafe extern "system" fn(env: *mut JNIEnv,
258                                  obj: jobject,
259                                  methodID: jmethodID,
260                                  args: va_list)
261                                  -> jbyte,
262    >,
263    pub CallByteMethodA: Option<
264        unsafe extern "system" fn(env: *mut JNIEnv,
265                                  obj: jobject,
266                                  methodID: jmethodID,
267                                  args: *const jvalue)
268                                  -> jbyte,
269    >,
270    pub CallCharMethod: Option<
271        unsafe extern "C" fn(env: *mut JNIEnv,
272                             obj: jobject,
273                             methodID: jmethodID,
274                             ...)
275                             -> jchar,
276    >,
277    pub CallCharMethodV: Option<
278        unsafe extern "system" fn(env: *mut JNIEnv,
279                                  obj: jobject,
280                                  methodID: jmethodID,
281                                  args: va_list)
282                                  -> jchar,
283    >,
284    pub CallCharMethodA: Option<
285        unsafe extern "system" fn(env: *mut JNIEnv,
286                                  obj: jobject,
287                                  methodID: jmethodID,
288                                  args: *const jvalue)
289                                  -> jchar,
290    >,
291    pub CallShortMethod: Option<
292        unsafe extern "C" fn(env: *mut JNIEnv,
293                             obj: jobject,
294                             methodID: jmethodID,
295                             ...)
296                             -> jshort,
297    >,
298    pub CallShortMethodV: Option<
299        unsafe extern "system" fn(env: *mut JNIEnv,
300                                  obj: jobject,
301                                  methodID: jmethodID,
302                                  args: va_list)
303                                  -> jshort,
304    >,
305    pub CallShortMethodA: Option<
306        unsafe extern "system" fn(env: *mut JNIEnv,
307                                  obj: jobject,
308                                  methodID: jmethodID,
309                                  args: *const jvalue)
310                                  -> jshort,
311    >,
312    pub CallIntMethod: Option<
313        unsafe extern "C" fn(env: *mut JNIEnv,
314                             obj: jobject,
315                             methodID: jmethodID,
316                             ...)
317                             -> jint,
318    >,
319    pub CallIntMethodV: Option<
320        unsafe extern "system" fn(env: *mut JNIEnv,
321                                  obj: jobject,
322                                  methodID: jmethodID,
323                                  args: va_list)
324                                  -> jint,
325    >,
326    pub CallIntMethodA: Option<
327        unsafe extern "system" fn(env: *mut JNIEnv,
328                                  obj: jobject,
329                                  methodID: jmethodID,
330                                  args: *const jvalue)
331                                  -> jint,
332    >,
333    pub CallLongMethod: Option<
334        unsafe extern "C" fn(env: *mut JNIEnv,
335                             obj: jobject,
336                             methodID: jmethodID,
337                             ...)
338                             -> jlong,
339    >,
340    pub CallLongMethodV: Option<
341        unsafe extern "system" fn(env: *mut JNIEnv,
342                                  obj: jobject,
343                                  methodID: jmethodID,
344                                  args: va_list)
345                                  -> jlong,
346    >,
347    pub CallLongMethodA: Option<
348        unsafe extern "system" fn(env: *mut JNIEnv,
349                                  obj: jobject,
350                                  methodID: jmethodID,
351                                  args: *const jvalue)
352                                  -> jlong,
353    >,
354    pub CallFloatMethod: Option<
355        unsafe extern "C" fn(env: *mut JNIEnv,
356                             obj: jobject,
357                             methodID: jmethodID,
358                             ...)
359                             -> jfloat,
360    >,
361    pub CallFloatMethodV: Option<
362        unsafe extern "system" fn(env: *mut JNIEnv,
363                                  obj: jobject,
364                                  methodID: jmethodID,
365                                  args: va_list)
366                                  -> jfloat,
367    >,
368    pub CallFloatMethodA: Option<
369        unsafe extern "system" fn(env: *mut JNIEnv,
370                                  obj: jobject,
371                                  methodID: jmethodID,
372                                  args: *const jvalue)
373                                  -> jfloat,
374    >,
375    pub CallDoubleMethod: Option<
376        unsafe extern "C" fn(env: *mut JNIEnv,
377                             obj: jobject,
378                             methodID: jmethodID,
379                             ...)
380                             -> jdouble,
381    >,
382    pub CallDoubleMethodV: Option<
383        unsafe extern "system" fn(env: *mut JNIEnv,
384                                  obj: jobject,
385                                  methodID: jmethodID,
386                                  args: va_list)
387                                  -> jdouble,
388    >,
389    pub CallDoubleMethodA: Option<
390        unsafe extern "system" fn(env: *mut JNIEnv,
391                                  obj: jobject,
392                                  methodID: jmethodID,
393                                  args: *const jvalue)
394                                  -> jdouble,
395    >,
396    pub CallVoidMethod:
397        Option<unsafe extern "C" fn(env: *mut JNIEnv, obj: jobject, methodID: jmethodID, ...)>,
398    pub CallVoidMethodV: Option<
399        unsafe extern "system" fn(env: *mut JNIEnv,
400                                  obj: jobject,
401                                  methodID: jmethodID,
402                                  args: va_list),
403    >,
404    pub CallVoidMethodA: Option<
405        unsafe extern "system" fn(env: *mut JNIEnv,
406                                  obj: jobject,
407                                  methodID: jmethodID,
408                                  args: *const jvalue),
409    >,
410    pub CallNonvirtualObjectMethod: Option<
411        unsafe extern "C" fn(env: *mut JNIEnv,
412                             obj: jobject,
413                             clazz: jclass,
414                             methodID: jmethodID,
415                             ...)
416                             -> jobject,
417    >,
418    pub CallNonvirtualObjectMethodV: Option<
419        unsafe extern "system" fn(env: *mut JNIEnv,
420                                  obj: jobject,
421                                  clazz: jclass,
422                                  methodID: jmethodID,
423                                  args: va_list)
424                                  -> jobject,
425    >,
426    pub CallNonvirtualObjectMethodA: Option<
427        unsafe extern "system" fn(env: *mut JNIEnv,
428                                  obj: jobject,
429                                  clazz: jclass,
430                                  methodID: jmethodID,
431                                  args: *const jvalue)
432                                  -> jobject,
433    >,
434    pub CallNonvirtualBooleanMethod: Option<
435        unsafe extern "C" fn(env: *mut JNIEnv,
436                             obj: jobject,
437                             clazz: jclass,
438                             methodID: jmethodID,
439                             ...)
440                             -> jboolean,
441    >,
442    pub CallNonvirtualBooleanMethodV: Option<
443        unsafe extern "system" fn(env: *mut JNIEnv,
444                                  obj: jobject,
445                                  clazz: jclass,
446                                  methodID: jmethodID,
447                                  args: va_list)
448                                  -> jboolean,
449    >,
450    pub CallNonvirtualBooleanMethodA: Option<
451        unsafe extern "system" fn(env: *mut JNIEnv,
452                                  obj: jobject,
453                                  clazz: jclass,
454                                  methodID: jmethodID,
455                                  args: *const jvalue)
456                                  -> jboolean,
457    >,
458    pub CallNonvirtualByteMethod: Option<
459        unsafe extern "C" fn(env: *mut JNIEnv,
460                             obj: jobject,
461                             clazz: jclass,
462                             methodID: jmethodID,
463                             ...)
464                             -> jbyte,
465    >,
466    pub CallNonvirtualByteMethodV: Option<
467        unsafe extern "system" fn(env: *mut JNIEnv,
468                                  obj: jobject,
469                                  clazz: jclass,
470                                  methodID: jmethodID,
471                                  args: va_list)
472                                  -> jbyte,
473    >,
474    pub CallNonvirtualByteMethodA: Option<
475        unsafe extern "system" fn(env: *mut JNIEnv,
476                                  obj: jobject,
477                                  clazz: jclass,
478                                  methodID: jmethodID,
479                                  args: *const jvalue)
480                                  -> jbyte,
481    >,
482    pub CallNonvirtualCharMethod: Option<
483        unsafe extern "C" fn(env: *mut JNIEnv,
484                             obj: jobject,
485                             clazz: jclass,
486                             methodID: jmethodID,
487                             ...)
488                             -> jchar,
489    >,
490    pub CallNonvirtualCharMethodV: Option<
491        unsafe extern "system" fn(env: *mut JNIEnv,
492                                  obj: jobject,
493                                  clazz: jclass,
494                                  methodID: jmethodID,
495                                  args: va_list)
496                                  -> jchar,
497    >,
498    pub CallNonvirtualCharMethodA: Option<
499        unsafe extern "system" fn(env: *mut JNIEnv,
500                                  obj: jobject,
501                                  clazz: jclass,
502                                  methodID: jmethodID,
503                                  args: *const jvalue)
504                                  -> jchar,
505    >,
506    pub CallNonvirtualShortMethod: Option<
507        unsafe extern "C" fn(env: *mut JNIEnv,
508                             obj: jobject,
509                             clazz: jclass,
510                             methodID: jmethodID,
511                             ...)
512                             -> jshort,
513    >,
514    pub CallNonvirtualShortMethodV: Option<
515        unsafe extern "system" fn(env: *mut JNIEnv,
516                                  obj: jobject,
517                                  clazz: jclass,
518                                  methodID: jmethodID,
519                                  args: va_list)
520                                  -> jshort,
521    >,
522    pub CallNonvirtualShortMethodA: Option<
523        unsafe extern "system" fn(env: *mut JNIEnv,
524                                  obj: jobject,
525                                  clazz: jclass,
526                                  methodID: jmethodID,
527                                  args: *const jvalue)
528                                  -> jshort,
529    >,
530    pub CallNonvirtualIntMethod: Option<
531        unsafe extern "C" fn(env: *mut JNIEnv,
532                             obj: jobject,
533                             clazz: jclass,
534                             methodID: jmethodID,
535                             ...)
536                             -> jint,
537    >,
538    pub CallNonvirtualIntMethodV: Option<
539        unsafe extern "system" fn(env: *mut JNIEnv,
540                                  obj: jobject,
541                                  clazz: jclass,
542                                  methodID: jmethodID,
543                                  args: va_list)
544                                  -> jint,
545    >,
546    pub CallNonvirtualIntMethodA: Option<
547        unsafe extern "system" fn(env: *mut JNIEnv,
548                                  obj: jobject,
549                                  clazz: jclass,
550                                  methodID: jmethodID,
551                                  args: *const jvalue)
552                                  -> jint,
553    >,
554    pub CallNonvirtualLongMethod: Option<
555        unsafe extern "C" fn(env: *mut JNIEnv,
556                             obj: jobject,
557                             clazz: jclass,
558                             methodID: jmethodID,
559                             ...)
560                             -> jlong,
561    >,
562    pub CallNonvirtualLongMethodV: Option<
563        unsafe extern "system" fn(env: *mut JNIEnv,
564                                  obj: jobject,
565                                  clazz: jclass,
566                                  methodID: jmethodID,
567                                  args: va_list)
568                                  -> jlong,
569    >,
570    pub CallNonvirtualLongMethodA: Option<
571        unsafe extern "system" fn(env: *mut JNIEnv,
572                                  obj: jobject,
573                                  clazz: jclass,
574                                  methodID: jmethodID,
575                                  args: *const jvalue)
576                                  -> jlong,
577    >,
578    pub CallNonvirtualFloatMethod: Option<
579        unsafe extern "C" fn(env: *mut JNIEnv,
580                             obj: jobject,
581                             clazz: jclass,
582                             methodID: jmethodID,
583                             ...)
584                             -> jfloat,
585    >,
586    pub CallNonvirtualFloatMethodV: Option<
587        unsafe extern "system" fn(env: *mut JNIEnv,
588                                  obj: jobject,
589                                  clazz: jclass,
590                                  methodID: jmethodID,
591                                  args: va_list)
592                                  -> jfloat,
593    >,
594    pub CallNonvirtualFloatMethodA: Option<
595        unsafe extern "system" fn(env: *mut JNIEnv,
596                                  obj: jobject,
597                                  clazz: jclass,
598                                  methodID: jmethodID,
599                                  args: *const jvalue)
600                                  -> jfloat,
601    >,
602    pub CallNonvirtualDoubleMethod: Option<
603        unsafe extern "C" fn(env: *mut JNIEnv,
604                             obj: jobject,
605                             clazz: jclass,
606                             methodID: jmethodID,
607                             ...)
608                             -> jdouble,
609    >,
610    pub CallNonvirtualDoubleMethodV: Option<
611        unsafe extern "system" fn(env: *mut JNIEnv,
612                                  obj: jobject,
613                                  clazz: jclass,
614                                  methodID: jmethodID,
615                                  args: va_list)
616                                  -> jdouble,
617    >,
618    pub CallNonvirtualDoubleMethodA: Option<
619        unsafe extern "system" fn(env: *mut JNIEnv,
620                                  obj: jobject,
621                                  clazz: jclass,
622                                  methodID: jmethodID,
623                                  args: *const jvalue)
624                                  -> jdouble,
625    >,
626    pub CallNonvirtualVoidMethod: Option<
627        unsafe extern "C" fn(env: *mut JNIEnv,
628                             obj: jobject,
629                             clazz: jclass,
630                             methodID: jmethodID,
631                             ...),
632    >,
633    pub CallNonvirtualVoidMethodV: Option<
634        unsafe extern "system" fn(env: *mut JNIEnv,
635                                  obj: jobject,
636                                  clazz: jclass,
637                                  methodID: jmethodID,
638                                  args: va_list),
639    >,
640    pub CallNonvirtualVoidMethodA: Option<
641        unsafe extern "system" fn(env: *mut JNIEnv,
642                                  obj: jobject,
643                                  clazz: jclass,
644                                  methodID: jmethodID,
645                                  args: *const jvalue),
646    >,
647    pub GetFieldID: Option<
648        unsafe extern "system" fn(env: *mut JNIEnv,
649                                  clazz: jclass,
650                                  name: *const c_char,
651                                  sig: *const c_char)
652                                  -> jfieldID,
653    >,
654    pub GetObjectField: Option<
655        unsafe extern "system" fn(env: *mut JNIEnv,
656                                  obj: jobject,
657                                  fieldID: jfieldID)
658                                  -> jobject,
659    >,
660    pub GetBooleanField: Option<
661        unsafe extern "system" fn(env: *mut JNIEnv,
662                                  obj: jobject,
663                                  fieldID: jfieldID)
664                                  -> jboolean,
665    >,
666    pub GetByteField: Option<
667        unsafe extern "system" fn(env: *mut JNIEnv,
668                                  obj: jobject,
669                                  fieldID: jfieldID)
670                                  -> jbyte,
671    >,
672    pub GetCharField: Option<
673        unsafe extern "system" fn(env: *mut JNIEnv,
674                                  obj: jobject,
675                                  fieldID: jfieldID)
676                                  -> jchar,
677    >,
678    pub GetShortField: Option<
679        unsafe extern "system" fn(env: *mut JNIEnv,
680                                  obj: jobject,
681                                  fieldID: jfieldID)
682                                  -> jshort,
683    >,
684    pub GetIntField:
685        Option<unsafe extern "system" fn(env: *mut JNIEnv, obj: jobject, fieldID: jfieldID) -> jint>,
686    pub GetLongField: Option<
687        unsafe extern "system" fn(env: *mut JNIEnv,
688                                  obj: jobject,
689                                  fieldID: jfieldID)
690                                  -> jlong,
691    >,
692    pub GetFloatField: Option<
693        unsafe extern "system" fn(env: *mut JNIEnv,
694                                  obj: jobject,
695                                  fieldID: jfieldID)
696                                  -> jfloat,
697    >,
698    pub GetDoubleField: Option<
699        unsafe extern "system" fn(env: *mut JNIEnv,
700                                  obj: jobject,
701                                  fieldID: jfieldID)
702                                  -> jdouble,
703    >,
704    pub SetObjectField: Option<
705        unsafe extern "system" fn(env: *mut JNIEnv,
706                                  obj: jobject,
707                                  fieldID: jfieldID,
708                                  val: jobject),
709    >,
710    pub SetBooleanField: Option<
711        unsafe extern "system" fn(env: *mut JNIEnv,
712                                  obj: jobject,
713                                  fieldID: jfieldID,
714                                  val: jboolean),
715    >,
716    pub SetByteField: Option<
717        unsafe extern "system" fn(env: *mut JNIEnv,
718                                  obj: jobject,
719                                  fieldID: jfieldID,
720                                  val: jbyte),
721    >,
722    pub SetCharField: Option<
723        unsafe extern "system" fn(env: *mut JNIEnv,
724                                  obj: jobject,
725                                  fieldID: jfieldID,
726                                  val: jchar),
727    >,
728    pub SetShortField: Option<
729        unsafe extern "system" fn(env: *mut JNIEnv,
730                                  obj: jobject,
731                                  fieldID: jfieldID,
732                                  val: jshort),
733    >,
734    pub SetIntField: Option<
735        unsafe extern "system" fn(env: *mut JNIEnv,
736                                  obj: jobject,
737                                  fieldID: jfieldID,
738                                  val: jint),
739    >,
740    pub SetLongField: Option<
741        unsafe extern "system" fn(env: *mut JNIEnv,
742                                  obj: jobject,
743                                  fieldID: jfieldID,
744                                  val: jlong),
745    >,
746    pub SetFloatField: Option<
747        unsafe extern "system" fn(env: *mut JNIEnv,
748                                  obj: jobject,
749                                  fieldID: jfieldID,
750                                  val: jfloat),
751    >,
752    pub SetDoubleField: Option<
753        unsafe extern "system" fn(env: *mut JNIEnv,
754                                  obj: jobject,
755                                  fieldID: jfieldID,
756                                  val: jdouble),
757    >,
758    pub GetStaticMethodID: Option<
759        unsafe extern "system" fn(env: *mut JNIEnv,
760                                  clazz: jclass,
761                                  name: *const c_char,
762                                  sig: *const c_char)
763                                  -> jmethodID,
764    >,
765    pub CallStaticObjectMethod: Option<
766        unsafe extern "C" fn(env: *mut JNIEnv,
767                             clazz: jclass,
768                             methodID: jmethodID,
769                             ...)
770                             -> jobject,
771    >,
772    pub CallStaticObjectMethodV: Option<
773        unsafe extern "system" fn(env: *mut JNIEnv,
774                                  clazz: jclass,
775                                  methodID: jmethodID,
776                                  args: va_list)
777                                  -> jobject,
778    >,
779    pub CallStaticObjectMethodA: Option<
780        unsafe extern "system" fn(env: *mut JNIEnv,
781                                  clazz: jclass,
782                                  methodID: jmethodID,
783                                  args: *const jvalue)
784                                  -> jobject,
785    >,
786    pub CallStaticBooleanMethod: Option<
787        unsafe extern "C" fn(env: *mut JNIEnv,
788                             clazz: jclass,
789                             methodID: jmethodID,
790                             ...)
791                             -> jboolean,
792    >,
793    pub CallStaticBooleanMethodV: Option<
794        unsafe extern "system" fn(env: *mut JNIEnv,
795                                  clazz: jclass,
796                                  methodID: jmethodID,
797                                  args: va_list)
798                                  -> jboolean,
799    >,
800    pub CallStaticBooleanMethodA: Option<
801        unsafe extern "system" fn(env: *mut JNIEnv,
802                                  clazz: jclass,
803                                  methodID: jmethodID,
804                                  args: *const jvalue)
805                                  -> jboolean,
806    >,
807    pub CallStaticByteMethod: Option<
808        unsafe extern "C" fn(env: *mut JNIEnv,
809                             clazz: jclass,
810                             methodID: jmethodID,
811                             ...)
812                             -> jbyte,
813    >,
814    pub CallStaticByteMethodV: Option<
815        unsafe extern "system" fn(env: *mut JNIEnv,
816                                  clazz: jclass,
817                                  methodID: jmethodID,
818                                  args: va_list)
819                                  -> jbyte,
820    >,
821    pub CallStaticByteMethodA: Option<
822        unsafe extern "system" fn(env: *mut JNIEnv,
823                                  clazz: jclass,
824                                  methodID: jmethodID,
825                                  args: *const jvalue)
826                                  -> jbyte,
827    >,
828    pub CallStaticCharMethod: Option<
829        unsafe extern "C" fn(env: *mut JNIEnv,
830                             clazz: jclass,
831                             methodID: jmethodID,
832                             ...)
833                             -> jchar,
834    >,
835    pub CallStaticCharMethodV: Option<
836        unsafe extern "system" fn(env: *mut JNIEnv,
837                                  clazz: jclass,
838                                  methodID: jmethodID,
839                                  args: va_list)
840                                  -> jchar,
841    >,
842    pub CallStaticCharMethodA: Option<
843        unsafe extern "system" fn(env: *mut JNIEnv,
844                                  clazz: jclass,
845                                  methodID: jmethodID,
846                                  args: *const jvalue)
847                                  -> jchar,
848    >,
849    pub CallStaticShortMethod: Option<
850        unsafe extern "C" fn(env: *mut JNIEnv,
851                             clazz: jclass,
852                             methodID: jmethodID,
853                             ...)
854                             -> jshort,
855    >,
856    pub CallStaticShortMethodV: Option<
857        unsafe extern "system" fn(env: *mut JNIEnv,
858                                  clazz: jclass,
859                                  methodID: jmethodID,
860                                  args: va_list)
861                                  -> jshort,
862    >,
863    pub CallStaticShortMethodA: Option<
864        unsafe extern "system" fn(env: *mut JNIEnv,
865                                  clazz: jclass,
866                                  methodID: jmethodID,
867                                  args: *const jvalue)
868                                  -> jshort,
869    >,
870    pub CallStaticIntMethod: Option<
871        unsafe extern "C" fn(env: *mut JNIEnv,
872                             clazz: jclass,
873                             methodID: jmethodID,
874                             ...)
875                             -> jint,
876    >,
877    pub CallStaticIntMethodV: Option<
878        unsafe extern "system" fn(env: *mut JNIEnv,
879                                  clazz: jclass,
880                                  methodID: jmethodID,
881                                  args: va_list)
882                                  -> jint,
883    >,
884    pub CallStaticIntMethodA: Option<
885        unsafe extern "system" fn(env: *mut JNIEnv,
886                                  clazz: jclass,
887                                  methodID: jmethodID,
888                                  args: *const jvalue)
889                                  -> jint,
890    >,
891    pub CallStaticLongMethod: Option<
892        unsafe extern "C" fn(env: *mut JNIEnv,
893                             clazz: jclass,
894                             methodID: jmethodID,
895                             ...)
896                             -> jlong,
897    >,
898    pub CallStaticLongMethodV: Option<
899        unsafe extern "system" fn(env: *mut JNIEnv,
900                                  clazz: jclass,
901                                  methodID: jmethodID,
902                                  args: va_list)
903                                  -> jlong,
904    >,
905    pub CallStaticLongMethodA: Option<
906        unsafe extern "system" fn(env: *mut JNIEnv,
907                                  clazz: jclass,
908                                  methodID: jmethodID,
909                                  args: *const jvalue)
910                                  -> jlong,
911    >,
912    pub CallStaticFloatMethod: Option<
913        unsafe extern "C" fn(env: *mut JNIEnv,
914                             clazz: jclass,
915                             methodID: jmethodID,
916                             ...)
917                             -> jfloat,
918    >,
919    pub CallStaticFloatMethodV: Option<
920        unsafe extern "system" fn(env: *mut JNIEnv,
921                                  clazz: jclass,
922                                  methodID: jmethodID,
923                                  args: va_list)
924                                  -> jfloat,
925    >,
926    pub CallStaticFloatMethodA: Option<
927        unsafe extern "system" fn(env: *mut JNIEnv,
928                                  clazz: jclass,
929                                  methodID: jmethodID,
930                                  args: *const jvalue)
931                                  -> jfloat,
932    >,
933    pub CallStaticDoubleMethod: Option<
934        unsafe extern "C" fn(env: *mut JNIEnv,
935                             clazz: jclass,
936                             methodID: jmethodID,
937                             ...)
938                             -> jdouble,
939    >,
940    pub CallStaticDoubleMethodV: Option<
941        unsafe extern "system" fn(env: *mut JNIEnv,
942                                  clazz: jclass,
943                                  methodID: jmethodID,
944                                  args: va_list)
945                                  -> jdouble,
946    >,
947    pub CallStaticDoubleMethodA: Option<
948        unsafe extern "system" fn(env: *mut JNIEnv,
949                                  clazz: jclass,
950                                  methodID: jmethodID,
951                                  args: *const jvalue)
952                                  -> jdouble,
953    >,
954    pub CallStaticVoidMethod:
955        Option<unsafe extern "C" fn(env: *mut JNIEnv, cls: jclass, methodID: jmethodID, ...)>,
956    pub CallStaticVoidMethodV: Option<
957        unsafe extern "system" fn(env: *mut JNIEnv,
958                                  cls: jclass,
959                                  methodID: jmethodID,
960                                  args: va_list),
961    >,
962    pub CallStaticVoidMethodA: Option<
963        unsafe extern "system" fn(env: *mut JNIEnv,
964                                  cls: jclass,
965                                  methodID: jmethodID,
966                                  args: *const jvalue),
967    >,
968    pub GetStaticFieldID: Option<
969        unsafe extern "system" fn(env: *mut JNIEnv,
970                                  clazz: jclass,
971                                  name: *const c_char,
972                                  sig: *const c_char)
973                                  -> jfieldID,
974    >,
975    pub GetStaticObjectField: Option<
976        unsafe extern "system" fn(env: *mut JNIEnv,
977                                  clazz: jclass,
978                                  fieldID: jfieldID)
979                                  -> jobject,
980    >,
981    pub GetStaticBooleanField: Option<
982        unsafe extern "system" fn(env: *mut JNIEnv,
983                                  clazz: jclass,
984                                  fieldID: jfieldID)
985                                  -> jboolean,
986    >,
987    pub GetStaticByteField: Option<
988        unsafe extern "system" fn(env: *mut JNIEnv,
989                                  clazz: jclass,
990                                  fieldID: jfieldID)
991                                  -> jbyte,
992    >,
993    pub GetStaticCharField: Option<
994        unsafe extern "system" fn(env: *mut JNIEnv,
995                                  clazz: jclass,
996                                  fieldID: jfieldID)
997                                  -> jchar,
998    >,
999    pub GetStaticShortField: Option<
1000        unsafe extern "system" fn(env: *mut JNIEnv,
1001                                  clazz: jclass,
1002                                  fieldID: jfieldID)
1003                                  -> jshort,
1004    >,
1005    pub GetStaticIntField: Option<
1006        unsafe extern "system" fn(env: *mut JNIEnv,
1007                                  clazz: jclass,
1008                                  fieldID: jfieldID)
1009                                  -> jint,
1010    >,
1011    pub GetStaticLongField: Option<
1012        unsafe extern "system" fn(env: *mut JNIEnv,
1013                                  clazz: jclass,
1014                                  fieldID: jfieldID)
1015                                  -> jlong,
1016    >,
1017    pub GetStaticFloatField: Option<
1018        unsafe extern "system" fn(env: *mut JNIEnv,
1019                                  clazz: jclass,
1020                                  fieldID: jfieldID)
1021                                  -> jfloat,
1022    >,
1023    pub GetStaticDoubleField: Option<
1024        unsafe extern "system" fn(env: *mut JNIEnv,
1025                                  clazz: jclass,
1026                                  fieldID: jfieldID)
1027                                  -> jdouble,
1028    >,
1029    pub SetStaticObjectField: Option<
1030        unsafe extern "system" fn(env: *mut JNIEnv,
1031                                  clazz: jclass,
1032                                  fieldID: jfieldID,
1033                                  value: jobject),
1034    >,
1035    pub SetStaticBooleanField: Option<
1036        unsafe extern "system" fn(env: *mut JNIEnv,
1037                                  clazz: jclass,
1038                                  fieldID: jfieldID,
1039                                  value: jboolean),
1040    >,
1041    pub SetStaticByteField: Option<
1042        unsafe extern "system" fn(env: *mut JNIEnv,
1043                                  clazz: jclass,
1044                                  fieldID: jfieldID,
1045                                  value: jbyte),
1046    >,
1047    pub SetStaticCharField: Option<
1048        unsafe extern "system" fn(env: *mut JNIEnv,
1049                                  clazz: jclass,
1050                                  fieldID: jfieldID,
1051                                  value: jchar),
1052    >,
1053    pub SetStaticShortField: Option<
1054        unsafe extern "system" fn(env: *mut JNIEnv,
1055                                  clazz: jclass,
1056                                  fieldID: jfieldID,
1057                                  value: jshort),
1058    >,
1059    pub SetStaticIntField: Option<
1060        unsafe extern "system" fn(env: *mut JNIEnv,
1061                                  clazz: jclass,
1062                                  fieldID: jfieldID,
1063                                  value: jint),
1064    >,
1065    pub SetStaticLongField: Option<
1066        unsafe extern "system" fn(env: *mut JNIEnv,
1067                                  clazz: jclass,
1068                                  fieldID: jfieldID,
1069                                  value: jlong),
1070    >,
1071    pub SetStaticFloatField: Option<
1072        unsafe extern "system" fn(env: *mut JNIEnv,
1073                                  clazz: jclass,
1074                                  fieldID: jfieldID,
1075                                  value: jfloat),
1076    >,
1077    pub SetStaticDoubleField: Option<
1078        unsafe extern "system" fn(env: *mut JNIEnv,
1079                                  clazz: jclass,
1080                                  fieldID: jfieldID,
1081                                  value: jdouble),
1082    >,
1083    pub NewString: Option<
1084        unsafe extern "system" fn(env: *mut JNIEnv,
1085                                  unicode: *const jchar,
1086                                  len: jsize)
1087                                  -> jstring,
1088    >,
1089    pub GetStringLength: Option<unsafe extern "system" fn(env: *mut JNIEnv, str: jstring) -> jsize>,
1090    pub GetStringChars: Option<
1091        unsafe extern "system" fn(env: *mut JNIEnv,
1092                                  str: jstring,
1093                                  isCopy: *mut jboolean)
1094                                  -> *const jchar,
1095    >,
1096    pub ReleaseStringChars:
1097        Option<unsafe extern "system" fn(env: *mut JNIEnv, str: jstring, chars: *const jchar)>,
1098    pub NewStringUTF:
1099        Option<unsafe extern "system" fn(env: *mut JNIEnv, utf: *const c_char) -> jstring>,
1100    pub GetStringUTFLength:
1101        Option<unsafe extern "system" fn(env: *mut JNIEnv, str: jstring) -> jsize>,
1102    pub GetStringUTFChars: Option<
1103        unsafe extern "system" fn(env: *mut JNIEnv,
1104                                  str: jstring,
1105                                  isCopy: *mut jboolean)
1106                                  -> *const c_char,
1107    >,
1108    pub ReleaseStringUTFChars:
1109        Option<unsafe extern "system" fn(env: *mut JNIEnv, str: jstring, chars: *const c_char)>,
1110    pub GetArrayLength: Option<unsafe extern "system" fn(env: *mut JNIEnv, array: jarray) -> jsize>,
1111    pub NewObjectArray: Option<
1112        unsafe extern "system" fn(env: *mut JNIEnv,
1113                                  len: jsize,
1114                                  clazz: jclass,
1115                                  init: jobject)
1116                                  -> jobjectArray,
1117    >,
1118    pub GetObjectArrayElement: Option<
1119        unsafe extern "system" fn(env: *mut JNIEnv,
1120                                  array: jobjectArray,
1121                                  index: jsize)
1122                                  -> jobject,
1123    >,
1124    pub SetObjectArrayElement: Option<
1125        unsafe extern "system" fn(env: *mut JNIEnv,
1126                                  array: jobjectArray,
1127                                  index: jsize,
1128                                  val: jobject),
1129    >,
1130    pub NewBooleanArray:
1131        Option<unsafe extern "system" fn(env: *mut JNIEnv, len: jsize) -> jbooleanArray>,
1132    pub NewByteArray: Option<unsafe extern "system" fn(env: *mut JNIEnv, len: jsize) -> jbyteArray>,
1133    pub NewCharArray: Option<unsafe extern "system" fn(env: *mut JNIEnv, len: jsize) -> jcharArray>,
1134    pub NewShortArray:
1135        Option<unsafe extern "system" fn(env: *mut JNIEnv, len: jsize) -> jshortArray>,
1136    pub NewIntArray: Option<unsafe extern "system" fn(env: *mut JNIEnv, len: jsize) -> jintArray>,
1137    pub NewLongArray: Option<unsafe extern "system" fn(env: *mut JNIEnv, len: jsize) -> jlongArray>,
1138    pub NewFloatArray:
1139        Option<unsafe extern "system" fn(env: *mut JNIEnv, len: jsize) -> jfloatArray>,
1140    pub NewDoubleArray:
1141        Option<unsafe extern "system" fn(env: *mut JNIEnv, len: jsize) -> jdoubleArray>,
1142    pub GetBooleanArrayElements: Option<
1143        unsafe extern "system" fn(env: *mut JNIEnv,
1144                                  array: jbooleanArray,
1145                                  isCopy: *mut jboolean)
1146                                  -> *mut jboolean,
1147    >,
1148    pub GetByteArrayElements: Option<
1149        unsafe extern "system" fn(env: *mut JNIEnv,
1150                                  array: jbyteArray,
1151                                  isCopy: *mut jboolean)
1152                                  -> *mut jbyte,
1153    >,
1154    pub GetCharArrayElements: Option<
1155        unsafe extern "system" fn(env: *mut JNIEnv,
1156                                  array: jcharArray,
1157                                  isCopy: *mut jboolean)
1158                                  -> *mut jchar,
1159    >,
1160    pub GetShortArrayElements: Option<
1161        unsafe extern "system" fn(env: *mut JNIEnv,
1162                                  array: jshortArray,
1163                                  isCopy: *mut jboolean)
1164                                  -> *mut jshort,
1165    >,
1166    pub GetIntArrayElements: Option<
1167        unsafe extern "system" fn(env: *mut JNIEnv,
1168                                  array: jintArray,
1169                                  isCopy: *mut jboolean)
1170                                  -> *mut jint,
1171    >,
1172    pub GetLongArrayElements: Option<
1173        unsafe extern "system" fn(env: *mut JNIEnv,
1174                                  array: jlongArray,
1175                                  isCopy: *mut jboolean)
1176                                  -> *mut jlong,
1177    >,
1178    pub GetFloatArrayElements: Option<
1179        unsafe extern "system" fn(env: *mut JNIEnv,
1180                                  array: jfloatArray,
1181                                  isCopy: *mut jboolean)
1182                                  -> *mut jfloat,
1183    >,
1184    pub GetDoubleArrayElements: Option<
1185        unsafe extern "system" fn(env: *mut JNIEnv,
1186                                  array: jdoubleArray,
1187                                  isCopy: *mut jboolean)
1188                                  -> *mut jdouble,
1189    >,
1190    pub ReleaseBooleanArrayElements: Option<
1191        unsafe extern "system" fn(env: *mut JNIEnv,
1192                                  array: jbooleanArray,
1193                                  elems: *mut jboolean,
1194                                  mode: jint),
1195    >,
1196    pub ReleaseByteArrayElements: Option<
1197        unsafe extern "system" fn(env: *mut JNIEnv,
1198                                  array: jbyteArray,
1199                                  elems: *mut jbyte,
1200                                  mode: jint),
1201    >,
1202    pub ReleaseCharArrayElements: Option<
1203        unsafe extern "system" fn(env: *mut JNIEnv,
1204                                  array: jcharArray,
1205                                  elems: *mut jchar,
1206                                  mode: jint),
1207    >,
1208    pub ReleaseShortArrayElements: Option<
1209        unsafe extern "system" fn(env: *mut JNIEnv,
1210                                  array: jshortArray,
1211                                  elems: *mut jshort,
1212                                  mode: jint),
1213    >,
1214    pub ReleaseIntArrayElements: Option<
1215        unsafe extern "system" fn(env: *mut JNIEnv,
1216                                  array: jintArray,
1217                                  elems: *mut jint,
1218                                  mode: jint),
1219    >,
1220    pub ReleaseLongArrayElements: Option<
1221        unsafe extern "system" fn(env: *mut JNIEnv,
1222                                  array: jlongArray,
1223                                  elems: *mut jlong,
1224                                  mode: jint),
1225    >,
1226    pub ReleaseFloatArrayElements: Option<
1227        unsafe extern "system" fn(env: *mut JNIEnv,
1228                                  array: jfloatArray,
1229                                  elems: *mut jfloat,
1230                                  mode: jint),
1231    >,
1232    pub ReleaseDoubleArrayElements: Option<
1233        unsafe extern "system" fn(env: *mut JNIEnv,
1234                                  array: jdoubleArray,
1235                                  elems: *mut jdouble,
1236                                  mode: jint),
1237    >,
1238    pub GetBooleanArrayRegion: Option<
1239        unsafe extern "system" fn(env: *mut JNIEnv,
1240                                  array: jbooleanArray,
1241                                  start: jsize,
1242                                  l: jsize,
1243                                  buf: *mut jboolean),
1244    >,
1245    pub GetByteArrayRegion: Option<
1246        unsafe extern "system" fn(env: *mut JNIEnv,
1247                                  array: jbyteArray,
1248                                  start: jsize,
1249                                  len: jsize,
1250                                  buf: *mut jbyte),
1251    >,
1252    pub GetCharArrayRegion: Option<
1253        unsafe extern "system" fn(env: *mut JNIEnv,
1254                                  array: jcharArray,
1255                                  start: jsize,
1256                                  len: jsize,
1257                                  buf: *mut jchar),
1258    >,
1259    pub GetShortArrayRegion: Option<
1260        unsafe extern "system" fn(env: *mut JNIEnv,
1261                                  array: jshortArray,
1262                                  start: jsize,
1263                                  len: jsize,
1264                                  buf: *mut jshort),
1265    >,
1266    pub GetIntArrayRegion: Option<
1267        unsafe extern "system" fn(env: *mut JNIEnv,
1268                                  array: jintArray,
1269                                  start: jsize,
1270                                  len: jsize,
1271                                  buf: *mut jint),
1272    >,
1273    pub GetLongArrayRegion: Option<
1274        unsafe extern "system" fn(env: *mut JNIEnv,
1275                                  array: jlongArray,
1276                                  start: jsize,
1277                                  len: jsize,
1278                                  buf: *mut jlong),
1279    >,
1280    pub GetFloatArrayRegion: Option<
1281        unsafe extern "system" fn(env: *mut JNIEnv,
1282                                  array: jfloatArray,
1283                                  start: jsize,
1284                                  len: jsize,
1285                                  buf: *mut jfloat),
1286    >,
1287    pub GetDoubleArrayRegion: Option<
1288        unsafe extern "system" fn(env: *mut JNIEnv,
1289                                  array: jdoubleArray,
1290                                  start: jsize,
1291                                  len: jsize,
1292                                  buf: *mut jdouble),
1293    >,
1294    pub SetBooleanArrayRegion: Option<
1295        unsafe extern "system" fn(env: *mut JNIEnv,
1296                                  array: jbooleanArray,
1297                                  start: jsize,
1298                                  l: jsize,
1299                                  buf: *const jboolean),
1300    >,
1301    pub SetByteArrayRegion: Option<
1302        unsafe extern "system" fn(env: *mut JNIEnv,
1303                                  array: jbyteArray,
1304                                  start: jsize,
1305                                  len: jsize,
1306                                  buf: *const jbyte),
1307    >,
1308    pub SetCharArrayRegion: Option<
1309        unsafe extern "system" fn(env: *mut JNIEnv,
1310                                  array: jcharArray,
1311                                  start: jsize,
1312                                  len: jsize,
1313                                  buf: *const jchar),
1314    >,
1315    pub SetShortArrayRegion: Option<
1316        unsafe extern "system" fn(env: *mut JNIEnv,
1317                                  array: jshortArray,
1318                                  start: jsize,
1319                                  len: jsize,
1320                                  buf: *const jshort),
1321    >,
1322    pub SetIntArrayRegion: Option<
1323        unsafe extern "system" fn(env: *mut JNIEnv,
1324                                  array: jintArray,
1325                                  start: jsize,
1326                                  len: jsize,
1327                                  buf: *const jint),
1328    >,
1329    pub SetLongArrayRegion: Option<
1330        unsafe extern "system" fn(env: *mut JNIEnv,
1331                                  array: jlongArray,
1332                                  start: jsize,
1333                                  len: jsize,
1334                                  buf: *const jlong),
1335    >,
1336    pub SetFloatArrayRegion: Option<
1337        unsafe extern "system" fn(env: *mut JNIEnv,
1338                                  array: jfloatArray,
1339                                  start: jsize,
1340                                  len: jsize,
1341                                  buf: *const jfloat),
1342    >,
1343    pub SetDoubleArrayRegion: Option<
1344        unsafe extern "system" fn(env: *mut JNIEnv,
1345                                  array: jdoubleArray,
1346                                  start: jsize,
1347                                  len: jsize,
1348                                  buf: *const jdouble),
1349    >,
1350    pub RegisterNatives: Option<
1351        unsafe extern "system" fn(env: *mut JNIEnv,
1352                                  clazz: jclass,
1353                                  methods: *const JNINativeMethod,
1354                                  nMethods: jint)
1355                                  -> jint,
1356    >,
1357    pub UnregisterNatives:
1358        Option<unsafe extern "system" fn(env: *mut JNIEnv, clazz: jclass) -> jint>,
1359    pub MonitorEnter: Option<unsafe extern "system" fn(env: *mut JNIEnv, obj: jobject) -> jint>,
1360    pub MonitorExit: Option<unsafe extern "system" fn(env: *mut JNIEnv, obj: jobject) -> jint>,
1361    pub GetJavaVM:
1362        Option<unsafe extern "system" fn(env: *mut JNIEnv, vm: *mut *mut JavaVM) -> jint>,
1363    pub GetStringRegion: Option<
1364        unsafe extern "system" fn(env: *mut JNIEnv,
1365                                  str: jstring,
1366                                  start: jsize,
1367                                  len: jsize,
1368                                  buf: *mut jchar),
1369    >,
1370    pub GetStringUTFRegion: Option<
1371        unsafe extern "system" fn(env: *mut JNIEnv,
1372                                  str: jstring,
1373                                  start: jsize,
1374                                  len: jsize,
1375                                  buf: *mut c_char),
1376    >,
1377    pub GetPrimitiveArrayCritical: Option<
1378        unsafe extern "system" fn(env: *mut JNIEnv,
1379                                  array: jarray,
1380                                  isCopy: *mut jboolean)
1381                                  -> *mut c_void,
1382    >,
1383    pub ReleasePrimitiveArrayCritical: Option<
1384        unsafe extern "system" fn(env: *mut JNIEnv,
1385                                  array: jarray,
1386                                  carray: *mut c_void,
1387                                  mode: jint),
1388    >,
1389    pub GetStringCritical: Option<
1390        unsafe extern "system" fn(env: *mut JNIEnv,
1391                                  string: jstring,
1392                                  isCopy: *mut jboolean)
1393                                  -> *const jchar,
1394    >,
1395    pub ReleaseStringCritical:
1396        Option<unsafe extern "system" fn(env: *mut JNIEnv, string: jstring, cstring: *const jchar)>,
1397    pub NewWeakGlobalRef:
1398        Option<unsafe extern "system" fn(env: *mut JNIEnv, obj: jobject) -> jweak>,
1399    pub DeleteWeakGlobalRef: Option<unsafe extern "system" fn(env: *mut JNIEnv, ref_: jweak)>,
1400    pub ExceptionCheck: Option<unsafe extern "system" fn(env: *mut JNIEnv) -> jboolean>,
1401    pub NewDirectByteBuffer: Option<
1402        unsafe extern "system" fn(env: *mut JNIEnv,
1403                                  address: *mut c_void,
1404                                  capacity: jlong)
1405                                  -> jobject,
1406    >,
1407    pub GetDirectBufferAddress:
1408        Option<unsafe extern "system" fn(env: *mut JNIEnv, buf: jobject) -> *mut c_void>,
1409    pub GetDirectBufferCapacity:
1410        Option<unsafe extern "system" fn(env: *mut JNIEnv, buf: jobject) -> jlong>,
1411    pub GetObjectRefType:
1412        Option<unsafe extern "system" fn(env: *mut JNIEnv, obj: jobject) -> jobjectRefType>,
1413    pub GetModule:
1414        Option<unsafe extern "system" fn(env: *mut JNIEnv, class: jclass) -> jobject>,
1415}
1416
1417impl Clone for JNINativeInterface_ {
1418    fn clone(&self) -> Self {
1419        *self
1420    }
1421}
1422
1423#[repr(C)]
1424#[derive(Copy)]
1425pub struct JNIEnv_ {
1426    pub functions: *const JNINativeInterface_,
1427}
1428
1429impl Clone for JNIEnv_ {
1430    fn clone(&self) -> Self {
1431        *self
1432    }
1433}
1434
1435#[repr(C)]
1436#[derive(Copy)]
1437pub struct JavaVMOption {
1438    pub optionString: *mut c_char,
1439    pub extraInfo: *mut c_void,
1440}
1441
1442impl Clone for JavaVMOption {
1443    fn clone(&self) -> Self {
1444        *self
1445    }
1446}
1447
1448#[repr(C)]
1449#[derive(Copy)]
1450pub struct JavaVMInitArgs {
1451    pub version: jint,
1452    pub nOptions: jint,
1453    pub options: *mut JavaVMOption,
1454    pub ignoreUnrecognized: jboolean,
1455}
1456
1457impl Clone for JavaVMInitArgs {
1458    fn clone(&self) -> Self {
1459        *self
1460    }
1461}
1462
1463#[repr(C)]
1464#[derive(Copy)]
1465pub struct JavaVMAttachArgs {
1466    pub version: jint,
1467    pub name: *mut c_char,
1468    pub group: jobject,
1469}
1470
1471impl Clone for JavaVMAttachArgs {
1472    fn clone(&self) -> Self {
1473        *self
1474    }
1475}
1476
1477#[repr(C)]
1478#[derive(Copy)]
1479pub struct JNIInvokeInterface_ {
1480    pub reserved0: *mut c_void,
1481    pub reserved1: *mut c_void,
1482    pub reserved2: *mut c_void,
1483    pub DestroyJavaVM: Option<unsafe extern "system" fn(vm: *mut JavaVM) -> jint>,
1484    pub AttachCurrentThread: Option<
1485        unsafe extern "system" fn(vm: *mut JavaVM,
1486                                  penv: *mut *mut c_void,
1487                                  args: *mut c_void)
1488                                  -> jint,
1489    >,
1490    pub DetachCurrentThread: Option<unsafe extern "system" fn(vm: *mut JavaVM) -> jint>,
1491    pub GetEnv: Option<
1492        unsafe extern "system" fn(vm: *mut JavaVM,
1493                                  penv: *mut *mut c_void,
1494                                  version: jint)
1495                                  -> jint,
1496    >,
1497    pub AttachCurrentThreadAsDaemon: Option<
1498        unsafe extern "system" fn(vm: *mut JavaVM,
1499                                  penv: *mut *mut c_void,
1500                                  args: *mut c_void)
1501                                  -> jint,
1502    >,
1503}
1504
1505impl Clone for JNIInvokeInterface_ {
1506    fn clone(&self) -> Self {
1507        *self
1508    }
1509}
1510
1511extern "system" {
1512    pub fn JNI_GetDefaultJavaVMInitArgs(args: *mut c_void) -> jint;
1513    pub fn JNI_CreateJavaVM(
1514        pvm: *mut *mut JavaVM,
1515        penv: *mut *mut c_void,
1516        args: *mut c_void,
1517    ) -> jint;
1518    pub fn JNI_GetCreatedJavaVMs(vmBuf: *mut *mut JavaVM, bufLen: jsize, nVMs: *mut jsize) -> jint;
1519}