1 /*
2                                     __
3                                    / _|
4   __ _ _   _ _ __ ___  _ __ __ _  | |_ ___  ___ ___
5  / _` | | | | '__/ _ \| '__/ _` | |  _/ _ \/ __/ __|
6 | (_| | |_| | | | (_) | | | (_| | | || (_) \__ \__ \
7  \__,_|\__,_|_|  \___/|_|  \__,_| |_| \___/|___/___/
8 
9 Copyright (C) 1996 Netscape Communications Corporation.
10 Copyright (C) 1996, 2013, Oracle and/or its affiliates.
11 Copyright (C) 2006 The Android Open Source Project.
12 Copyright (C) 2018-2019 Aurora Free Open Source Software.
13 
14 This file is part of the Aurora Free Open Source Software. This
15 organization promote free and open source software that you can
16 redistribute and/or modify under the terms of the GNU Lesser General
17 Public License Version 3 as published by the Free Software Foundation or
18 (at your option) any later version approved by the Aurora Free Open Source
19 Software Organization. The license is available in the package root path
20 as 'LICENSE' file. Please review the following information to ensure the
21 GNU Lesser General Public License version 3 requirements will be met:
22 https://www.gnu.org/licenses/lgpl.html .
23 
24 Alternatively, this file may be used under the terms of the GNU General
25 Public License version 3 or later as published by the Free Software
26 Foundation. Please review the following information to ensure the GNU
27 General Public License requirements will be met:
28 https://www.gnu.org/licenses/gpl-3.0.html.
29 
30 NOTE: All products, services or anything associated to trademarks and
31 service marks used or referenced on this file are the property of their
32 respective companies/owners or its subsidiaries. Other names and brands
33 may be claimed as the property of others.
34 
35 For more info about intellectual property visit: aurorafoss.org or
36 directly send an email to: contact (at) aurorafoss.org .
37 
38 This file has bindings for an existing code, part of Netscape's Java Runtime
39 Interface implementation, Java Native Interface implementation, from Oracle
40 Corporation and/or The Android Open Source Project implementation.
41 
42 More information about The Android Open Source Project at
43 android.googlesource.com .
44 */
45 
46 module aurorafw.jni.platform.jni;
47 
48 /// TODO: add documentation from android source
49 
50 import core.stdc.stdarg;
51 
52 extern (C):
53 @system:
54 nothrow:
55 @nogc:
56 
57 /*
58  * JNI Types
59  */
60 
61 alias int jint;
62 alias byte jbyte;
63 alias long jlong;
64 
65 alias ubyte jboolean;
66 alias ushort jchar;
67 alias short jshort;
68 alias float jfloat;
69 alias double jdouble;
70 
71 alias jint jsize;
72 
73 class _jobject {}
74 class _jclass : _jobject {}
75 class _jthrowable : _jobject {}
76 class _jstring : _jobject {}
77 class _jarray : _jobject {}
78 class _jbooleanArray : _jarray {}
79 class _jbyteArray : _jarray {}
80 class _jcharArray : _jarray {}
81 class _jshortArray : _jarray {}
82 class _jintArray : _jarray {}
83 class _jlongArray : _jarray {}
84 class _jfloatArray : _jarray {}
85 class _jdoubleArray : _jarray {}
86 class _jobjectArray : _jarray {}
87 
88 alias _jobject jobject;
89 alias _jclass jclass;
90 alias _jthrowable jthrowable;
91 alias _jstring jstring;
92 alias _jarray jarray;
93 alias _jbooleanArray jbooleanArray;
94 alias _jbyteArray jbyteArray;
95 alias _jcharArray jcharArray;
96 alias _jshortArray jshortArray;
97 alias _jintArray jintArray;
98 alias _jlongArray jlongArray;
99 alias _jfloatArray jfloatArray;
100 alias _jdoubleArray jdoubleArray;
101 alias _jobjectArray jobjectArray;
102 
103 alias jobject jweak;
104 
105 union jvalue
106 {
107 	jboolean z;
108 	jbyte b;
109 	jchar c;
110 	jshort s;
111 	jint i;
112 	jlong j;
113 	jfloat f;
114 	jdouble d;
115 	jobject l;
116 }
117 
118 struct _jfieldID;
119 alias _jfieldID* jfieldID;
120 
121 struct _jmethodID;
122 alias _jmethodID* jmethodID;
123 
124 /* Return values from jobjectRefType */
125 enum _jobjectType
126 {
127 	JNIInvalidRefType,
128 	JNILocalRefType,
129 	JNIGlobalRefType,
130 	JNIWeakGlobalRefType
131 }
132 
133 alias _jobjectType jobjectRefType;
134 
135 /*
136  * jboolean constants
137  */
138 
139 enum
140 {
141 	JNI_FALSE,
142 	JNI_TRUE
143 }
144 
145 /*
146  * possible return values for JNI functions.
147  */
148 
149 enum JNI_OK = 0; /* success */
150 enum JNI_ERR = -1; /* unknown error */
151 enum JNI_EDETACHED = -2; /* thread detached from the VM */
152 enum JNI_EVERSION = -3; /* JNI version error */
153 enum JNI_ENOMEM = -4; /* not enough memory */
154 enum JNI_EEXIST = -5; /* VM already created */
155 enum JNI_EINVAL = -6; /* invalid arguments */
156 
157 /*
158  * used in ReleaseScalarArrayElements
159  */
160 enum JNI_COMMIT = 1; /* copy content, do not free buffer */
161 enum JNI_ABORT = 2; /* free buffer w/o copying back */
162 
163 /*
164  * used in RegisterNatives to describe native method name, signature,
165  * and function pointer.
166  */
167 
168 struct JNINativeMethod
169 {
170 	const(char)* name;
171 	const(char)* signature;
172 	void* fnPtr;
173 }
174 
175 /*
176  * JNI Native Method Interface.
177  */
178 
179 alias JNIEnv_ JNIEnv;
180 alias JavaVM_ JavaVM;
181 
182 struct JNINativeInterface_
183 {
184 	void* reserved0;
185 	void* reserved1;
186 	void* reserved2;
187 	void* reserved3;
188 	jint function(JNIEnv*) GetVersion;
189 	jclass function(JNIEnv*, const(char)*, jobject, const(jbyte)*, jsize) DefineClass;
190 	jclass function(JNIEnv*, const(char)*) FindClass;
191 	jmethodID function(JNIEnv*, jobject) FromReflectedMethod;
192 	jfieldID function(JNIEnv*, jobject) FromReflectedField;
193 	jobject function(JNIEnv*, jclass, jmethodID, jboolean) ToReflectedMethod;
194 	jclass function(JNIEnv*, jclass) GetSuperclass;
195 	jboolean function(JNIEnv*, jclass, jclass) IsAssignableFrom;
196 	jobject function(JNIEnv*, jclass, jfieldID, jboolean) ToReflectedField;
197 	jint function(JNIEnv*, jthrowable) Throw;
198 	jint function(JNIEnv*, jclass, const(char)*) ThrowNew;
199 	jthrowable function(JNIEnv*) ExceptionOccurred;
200 	void function(JNIEnv*) ExceptionDescribe;
201 	void function(JNIEnv*) ExceptionClear;
202 	void function(JNIEnv*, const(char)*) FatalError;
203 	jint function(JNIEnv*, jint) PushLocalFrame;
204 	jobject function(JNIEnv*, jobject) PopLocalFrame;
205 	jobject function(JNIEnv*, jobject) NewGlobalRef;
206 	void function(JNIEnv*, jobject) DeleteGlobalRef;
207 	void function(JNIEnv*, jobject) DeleteLocalRef;
208 	jboolean function(JNIEnv*, jobject, jobject) IsSameObject;
209 	jobject function(JNIEnv*, jobject) NewLocalRef;
210 	jint function(JNIEnv*, jint) EnsureLocalCapacity;
211 	jobject function(JNIEnv*, jclass) AllocObject;
212 	jobject function(JNIEnv*, jclass, jmethodID, ...) NewObject;
213 	jobject function(JNIEnv*, jclass, jmethodID, va_list) NewObjectV;
214 	jobject function(JNIEnv*, jclass, jmethodID, const(jvalue*)) NewObjectA;
215 	jclass function(JNIEnv*, jobject) GetObjectClass;
216 	jboolean function(JNIEnv*, jobject, jclass) IsInstanceOf;
217 	jmethodID function(JNIEnv*, jclass, const(char)*, const(char)*) GetMethodID;
218 	jobject function(JNIEnv*, jobject, jmethodID, ...) CallObjectMethod;
219 	jobject function(JNIEnv*, jobject, jmethodID, va_list) CallObjectMethodV;
220 	jobject function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallObjectMethodA;
221 	jboolean function(JNIEnv*, jobject, jmethodID, ...) CallBooleanMethod;
222 	jboolean function(JNIEnv*, jobject, jmethodID, va_list) CallBooleanMethodV;
223 	jboolean function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallBooleanMethodA;
224 	jbyte function(JNIEnv*, jobject, jmethodID, ...) CallByteMethod;
225 	jbyte function(JNIEnv*, jobject, jmethodID, va_list) CallByteMethodV;
226 	jbyte function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallByteMethodA;
227 	jchar function(JNIEnv*, jobject, jmethodID, ...) CallCharMethod;
228 	jchar function(JNIEnv*, jobject, jmethodID, va_list) CallCharMethodV;
229 	jchar function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallCharMethodA;
230 	jshort function(JNIEnv*, jobject, jmethodID, ...) CallShortMethod;
231 	jshort function(JNIEnv*, jobject, jmethodID, va_list) CallShortMethodV;
232 	jshort function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallShortMethodA;
233 	jint function(JNIEnv*, jobject, jmethodID, ...) CallIntMethod;
234 	jint function(JNIEnv*, jobject, jmethodID, va_list) CallIntMethodV;
235 	jint function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallIntMethodA;
236 	jlong function(JNIEnv*, jobject, jmethodID, ...) CallLongMethod;
237 	jlong function(JNIEnv*, jobject, jmethodID, va_list) CallLongMethodV;
238 	jlong function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallLongMethodA;
239 	jfloat function(JNIEnv*, jobject, jmethodID, ...) CallFloatMethod;
240 	jfloat function(JNIEnv*, jobject, jmethodID, va_list) CallFloatMethodV;
241 	jfloat function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallFloatMethodA;
242 	jdouble function(JNIEnv*, jobject, jmethodID, ...) CallDoubleMethod;
243 	jdouble function(JNIEnv*, jobject, jmethodID, va_list) CallDoubleMethodV;
244 	jdouble function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallDoubleMethodA;
245 	void function(JNIEnv*, jobject, jmethodID, ...) CallVoidMethod;
246 	void function(JNIEnv*, jobject, jmethodID, va_list) CallVoidMethodV;
247 	void function(JNIEnv*, jobject, jmethodID, const(jvalue*)) CallVoidMethodA;
248 	jobject function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualObjectMethod;
249 	jobject function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualObjectMethodV;
250 	jobject function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualObjectMethodA;
251 	jboolean function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualBooleanMethod;
252 	jboolean function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualBooleanMethodV;
253 	jboolean function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualBooleanMethodA;
254 	jbyte function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualByteMethod;
255 	jbyte function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualByteMethodV;
256 	jbyte function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualByteMethodA;
257 	jchar function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualCharMethod;
258 	jchar function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualCharMethodV;
259 	jchar function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualCharMethodA;
260 	jshort function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualShortMethod;
261 	jshort function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualShortMethodV;
262 	jshort function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualShortMethodA;
263 	jint function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualIntMethod;
264 	jint function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualIntMethodV;
265 	jint function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualIntMethodA;
266 	jlong function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualLongMethod;
267 	jlong function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualLongMethodV;
268 	jlong function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualLongMethodA;
269 	jfloat function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualFloatMethod;
270 	jfloat function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualFloatMethodV;
271 	jfloat function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualFloatMethodA;
272 	jdouble function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualDoubleMethod;
273 	jdouble function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualDoubleMethodV;
274 	jdouble function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualDoubleMethodA;
275 	void function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualVoidMethod;
276 	void function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualVoidMethodV;
277 	void function(JNIEnv*, jobject, jclass, jmethodID, const(jvalue*)) CallNonvirtualVoidMethodA;
278 	jfieldID function(JNIEnv*, jclass, const(char)*, const(char)*) GetFieldID;
279 	jobject function(JNIEnv*, jobject, jfieldID) GetObjectField;
280 	jboolean function(JNIEnv*, jobject, jfieldID) GetBooleanField;
281 	jbyte function(JNIEnv*, jobject, jfieldID) GetByteField;
282 	jchar function(JNIEnv*, jobject, jfieldID) GetCharField;
283 	jshort function(JNIEnv*, jobject, jfieldID) GetShortField;
284 	jint function(JNIEnv*, jobject, jfieldID) GetIntField;
285 	jlong function(JNIEnv*, jobject, jfieldID) GetLongField;
286 	jfloat function(JNIEnv*, jobject, jfieldID) GetFloatField;
287 	jdouble function(JNIEnv*, jobject, jfieldID) GetDoubleField;
288 	void function(JNIEnv*, jobject, jfieldID, jobject) SetObjectField;
289 	void function(JNIEnv*, jobject, jfieldID, jboolean) SetBooleanField;
290 	void function(JNIEnv*, jobject, jfieldID, jbyte) SetByteField;
291 	void function(JNIEnv*, jobject, jfieldID, jchar) SetCharField;
292 	void function(JNIEnv*, jobject, jfieldID, jshort) SetShortField;
293 	void function(JNIEnv*, jobject, jfieldID, jint) SetIntField;
294 	void function(JNIEnv*, jobject, jfieldID, jlong) SetLongField;
295 	void function(JNIEnv*, jobject, jfieldID, jfloat) SetFloatField;
296 	void function(JNIEnv*, jobject, jfieldID, jdouble) SetDoubleField;
297 	jmethodID function(JNIEnv*, jclass, const(char)*, const(char)*) GetStaticMethodID;
298 	jobject function(JNIEnv*, jclass, jmethodID, ...) CallStaticObjectMethod;
299 	jobject function(JNIEnv*, jclass, jmethodID, va_list) CallStaticObjectMethodV;
300 	jobject function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticObjectMethodA;
301 	jboolean function(JNIEnv*, jclass, jmethodID, ...) CallStaticBooleanMethod;
302 	jboolean function(JNIEnv*, jclass, jmethodID, va_list) CallStaticBooleanMethodV;
303 	jboolean function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticBooleanMethodA;
304 	jbyte function(JNIEnv*, jclass, jmethodID, ...) CallStaticByteMethod;
305 	jbyte function(JNIEnv*, jclass, jmethodID, va_list) CallStaticByteMethodV;
306 	jbyte function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticByteMethodA;
307 	jchar function(JNIEnv*, jclass, jmethodID, ...) CallStaticCharMethod;
308 	jchar function(JNIEnv*, jclass, jmethodID, va_list) CallStaticCharMethodV;
309 	jchar function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticCharMethodA;
310 	jshort function(JNIEnv*, jclass, jmethodID, ...) CallStaticShortMethod;
311 	jshort function(JNIEnv*, jclass, jmethodID, va_list) CallStaticShortMethodV;
312 	jshort function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticShortMethodA;
313 	jint function(JNIEnv*, jclass, jmethodID, ...) CallStaticIntMethod;
314 	jint function(JNIEnv*, jclass, jmethodID, va_list) CallStaticIntMethodV;
315 	jint function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticIntMethodA;
316 	jlong function(JNIEnv*, jclass, jmethodID, ...) CallStaticLongMethod;
317 	jlong function(JNIEnv*, jclass, jmethodID, va_list) CallStaticLongMethodV;
318 	jlong function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticLongMethodA;
319 	jfloat function(JNIEnv*, jclass, jmethodID, ...) CallStaticFloatMethod;
320 	jfloat function(JNIEnv*, jclass, jmethodID, va_list) CallStaticFloatMethodV;
321 	jfloat function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticFloatMethodA;
322 	jdouble function(JNIEnv*, jclass, jmethodID, ...) CallStaticDoubleMethod;
323 	jdouble function(JNIEnv*, jclass, jmethodID, va_list) CallStaticDoubleMethodV;
324 	jdouble function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticDoubleMethodA;
325 	void function(JNIEnv*, jclass, jmethodID, ...) CallStaticVoidMethod;
326 	void function(JNIEnv*, jclass, jmethodID, va_list) CallStaticVoidMethodV;
327 	void function(JNIEnv*, jclass, jmethodID, const(jvalue*)) CallStaticVoidMethodA;
328 	jfieldID function(JNIEnv*, jclass, const(char)*, const(char)*) GetStaticFieldID;
329 	jobject function(JNIEnv*, jclass, jfieldID) GetStaticObjectField;
330 	jboolean function(JNIEnv*, jclass, jfieldID) GetStaticBooleanField;
331 	jbyte function(JNIEnv*, jclass, jfieldID) GetStaticByteField;
332 	jchar function(JNIEnv*, jclass, jfieldID) GetStaticCharField;
333 	jshort function(JNIEnv*, jclass, jfieldID) GetStaticShortField;
334 	jint function(JNIEnv*, jclass, jfieldID) GetStaticIntField;
335 	jlong function(JNIEnv*, jclass, jfieldID) GetStaticLongField;
336 	jfloat function(JNIEnv*, jclass, jfieldID) GetStaticFloatField;
337 	jdouble function(JNIEnv*, jclass, jfieldID) GetStaticDoubleField;
338 	void function(JNIEnv*, jclass, jfieldID, jobject) SetStaticObjectField;
339 	void function(JNIEnv*, jclass, jfieldID, jboolean) SetStaticBooleanField;
340 	void function(JNIEnv*, jclass, jfieldID, jbyte) SetStaticByteField;
341 	void function(JNIEnv*, jclass, jfieldID, jchar) SetStaticCharField;
342 	void function(JNIEnv*, jclass, jfieldID, jshort) SetStaticShortField;
343 	void function(JNIEnv*, jclass, jfieldID, jint) SetStaticIntField;
344 	void function(JNIEnv*, jclass, jfieldID, jlong) SetStaticLongField;
345 	void function(JNIEnv*, jclass, jfieldID, jfloat) SetStaticFloatField;
346 	void function(JNIEnv*, jclass, jfieldID, jdouble) SetStaticDoubleField;
347 	jstring function(JNIEnv*, const(jchar)*, jsize) NewString;
348 	jsize function(JNIEnv*, jstring) GetStringLength;
349 	const(jchar)* function(JNIEnv*, jstring, jboolean*) GetStringChars;
350 	void function(JNIEnv*, jstring, const(jchar)*) ReleaseStringChars;
351 	jstring function(JNIEnv*, const(char)*) NewStringUTF;
352 	jsize function(JNIEnv*, jstring) GetStringUTFLength;
353 	const(char)* function(JNIEnv*, jstring, jboolean*) GetStringUTFChars;
354 	void function(JNIEnv*, jstring, const(char)*) ReleaseStringUTFChars;
355 	jsize function(JNIEnv*, jarray) GetArrayLength;
356 	jobjectArray function(JNIEnv*, jsize, jclass, jobject) NewObjectArray;
357 	jobject function(JNIEnv*, jobjectArray, jsize) GetObjectArrayElement;
358 	void function(JNIEnv*, jobjectArray, jsize, jobject) SetObjectArrayElement;
359 	jbooleanArray function(JNIEnv*, jsize) NewBooleanArray;
360 	jbyteArray function(JNIEnv*, jsize) NewByteArray;
361 	jcharArray function(JNIEnv*, jsize) NewCharArray;
362 	jshortArray function(JNIEnv*, jsize) NewShortArray;
363 	jintArray function(JNIEnv*, jsize) NewIntArray;
364 	jlongArray function(JNIEnv*, jsize) NewLongArray;
365 	jfloatArray function(JNIEnv*, jsize) NewFloatArray;
366 	jdoubleArray function(JNIEnv*, jsize) NewDoubleArray;
367 	jboolean* function(JNIEnv*, jbooleanArray, jboolean*) GetBooleanArrayElements;
368 	jbyte* function(JNIEnv*, jbyteArray, jboolean*) GetByteArrayElements;
369 	jchar* function(JNIEnv*, jcharArray, jboolean*) GetCharArrayElements;
370 	jshort* function(JNIEnv*, jshortArray, jboolean*) GetShortArrayElements;
371 	jint* function(JNIEnv*, jintArray, jboolean*) GetIntArrayElements;
372 	jlong* function(JNIEnv*, jlongArray, jboolean*) GetLongArrayElements;
373 	jfloat* function(JNIEnv*, jfloatArray, jboolean*) GetFloatArrayElements;
374 	jdouble* function(JNIEnv*, jdoubleArray, jboolean*) GetDoubleArrayElements;
375 	void function(JNIEnv*, jbooleanArray, jboolean*, jint) ReleaseBooleanArrayElements;
376 	void function(JNIEnv*, jbyteArray, jbyte*, jint) ReleaseByteArrayElements;
377 	void function(JNIEnv*, jcharArray, jchar*, jint) ReleaseCharArrayElements;
378 	void function(JNIEnv*, jshortArray, jshort*, jint) ReleaseShortArrayElements;
379 	void function(JNIEnv*, jintArray, jint*, jint) ReleaseIntArrayElements;
380 	void function(JNIEnv*, jlongArray, jlong*, jint) ReleaseLongArrayElements;
381 	void function(JNIEnv*, jfloatArray, jfloat*, jint) ReleaseFloatArrayElements;
382 	void function(JNIEnv*, jdoubleArray, jdouble*, jint) ReleaseDoubleArrayElements;
383 	void function(JNIEnv*, jbooleanArray, jsize, jsize, jboolean*) GetBooleanArrayRegion;
384 	void function(JNIEnv*, jbyteArray, jsize, jsize, jbyte*) GetByteArrayRegion;
385 	void function(JNIEnv*, jcharArray, jsize, jsize, jchar*) GetCharArrayRegion;
386 	void function(JNIEnv*, jshortArray, jsize, jsize, jshort*) GetShortArrayRegion;
387 	void function(JNIEnv*, jintArray, jsize, jsize, jint*) GetIntArrayRegion;
388 	void function(JNIEnv*, jlongArray, jsize, jsize, jlong*) GetLongArrayRegion;
389 	void function(JNIEnv*, jfloatArray, jsize, jsize, jfloat*) GetFloatArrayRegion;
390 	void function(JNIEnv*, jdoubleArray, jsize, jsize, jdouble*) GetDoubleArrayRegion;
391 	void function(JNIEnv*, jbooleanArray, jsize, jsize, const(jboolean)*) SetBooleanArrayRegion;
392 	void function(JNIEnv*, jbyteArray, jsize, jsize, const(jbyte)*) SetByteArrayRegion;
393 	void function(JNIEnv*, jcharArray, jsize, jsize, const(jchar)*) SetCharArrayRegion;
394 	void function(JNIEnv*, jshortArray, jsize, jsize, const(jshort)*) SetShortArrayRegion;
395 	void function(JNIEnv*, jintArray, jsize, jsize, const(jint)*) SetIntArrayRegion;
396 	void function(JNIEnv*, jlongArray, jsize, jsize, const(jlong)*) SetLongArrayRegion;
397 	void function(JNIEnv*, jfloatArray, jsize, jsize, const(jfloat)*) SetFloatArrayRegion;
398 	void function(JNIEnv*, jdoubleArray, jsize, jsize, const(jdouble)*) SetDoubleArrayRegion;
399 	jint function(JNIEnv*, jclass, const(JNINativeMethod)*, jint) RegisterNatives;
400 	jint function(JNIEnv*, jclass) UnregisterNatives;
401 	jint function(JNIEnv*, jobject) MonitorEnter;
402 	jint function(JNIEnv*, jobject) MonitorExit;
403 	jint function(JNIEnv*, JavaVM**) GetJavaVM;
404 	void function(JNIEnv*, jstring, jsize, jsize, jchar*) GetStringRegion;
405 	void function(JNIEnv*, jstring, jsize, jsize, char*) GetStringUTFRegion;
406 	void* function(JNIEnv*, jarray, jboolean*) GetPrimitiveArrayCritical;
407 	void function(JNIEnv*, jarray, void*, jint) ReleasePrimitiveArrayCritical;
408 	const(jchar)* function(JNIEnv*, jstring, jboolean*) GetStringCritical;
409 	void function(JNIEnv*, jstring, const(jchar)*) ReleaseStringCritical;
410 	jweak function(JNIEnv*, jobject) NewWeakGlobalRef;
411 	void function(JNIEnv*, jweak) DeleteWeakGlobalRef;
412 	jboolean function(JNIEnv*) ExceptionCheck;
413 	jobject function(JNIEnv*, void*, jlong) NewDirectByteBuffer;
414 	void* function(JNIEnv*, jobject) GetDirectBufferAddress;
415 	jlong function(JNIEnv*, jobject) GetDirectBufferCapacity;
416 
417 	/* New JNI 1.6 Features */
418 	jobjectRefType function(JNIEnv*, jobject) GetObjectRefType;
419 }
420 
421 struct JNIEnv_
422 {
423 	const(JNINativeInterface_)* functions;
424 
425 	jint GetVersion()
426 	{
427 		return functions.GetVersion(&this);
428 	}
429 
430 	jclass DefineClass(const(char)* name, jobject loader, const(jbyte)* buf, jsize len)
431 	{
432 		return functions.DefineClass(&this, name, loader, buf, len);
433 	}
434 
435 	jclass FindClass(const(char)* name)
436 	{
437 		return functions.FindClass(&this, name);
438 	}
439 
440 	jmethodID FromReflectedMethod(jobject method)
441 	{
442 		return functions.FromReflectedMethod(&this, method);
443 	}
444 
445 	jfieldID FromReflectedField(jobject field)
446 	{
447 		return functions.FromReflectedField(&this, field);
448 	}
449 
450 	jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic)
451 	{
452 		return functions.ToReflectedMethod(&this, cls, methodID, isStatic);
453 	}
454 
455 	jclass GetSuperclass(jclass sub)
456 	{
457 		return functions.GetSuperclass(&this, sub);
458 	}
459 
460 	jboolean IsAssignableFrom(jclass sub, jclass sup)
461 	{
462 		return functions.IsAssignableFrom(&this, sub, sup);
463 	}
464 
465 	jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic)
466 	{
467 		return functions.ToReflectedField(&this, cls, fieldID, isStatic);
468 	}
469 
470 	jint Throw(jthrowable obj)
471 	{
472 		return functions.Throw(&this, obj);
473 	}
474 
475 	jint ThrowNew(jclass clazz, const(char)* msg)
476 	{
477 		return functions.ThrowNew(&this, clazz, msg);
478 	}
479 
480 	jthrowable ExceptionOccurred()
481 	{
482 		return functions.ExceptionOccurred(&this);
483 	}
484 
485 	void ExceptionDescribe()
486 	{
487 		functions.ExceptionDescribe(&this);
488 	}
489 
490 	void ExceptionClear()
491 	{
492 		functions.ExceptionClear(&this);
493 	}
494 
495 	void FatalError(const(char)* msg)
496 	{
497 		functions.FatalError(&this, msg);
498 	}
499 
500 	jint PushLocalFrame(jint capacity)
501 	{
502 		return functions.PushLocalFrame(&this, capacity);
503 	}
504 
505 	jobject PopLocalFrame(jobject result)
506 	{
507 		return functions.PopLocalFrame(&this, result);
508 	}
509 
510 	jobject NewGlobalRef(jobject lobj)
511 	{
512 		return functions.NewGlobalRef(&this, lobj);
513 	}
514 
515 	void DeleteGlobalRef(jobject gref)
516 	{
517 		functions.DeleteGlobalRef(&this, gref);
518 	}
519 
520 	void DeleteLocalRef(jobject obj)
521 	{
522 		functions.DeleteLocalRef(&this, obj);
523 	}
524 
525 	jboolean IsSameObject(jobject obj1, jobject obj2)
526 	{
527 		return functions.IsSameObject(&this, obj1, obj2);
528 	}
529 
530 	jobject NewLocalRef(jobject _ref)
531 	{
532 		return functions.NewLocalRef(&this, _ref);
533 	}
534 
535 	jint EnsureLocalCapacity(jint capacity)
536 	{
537 		return functions.EnsureLocalCapacity(&this, capacity);
538 	}
539 
540 	jobject AllocObject(jclass clazz)
541 	{
542 		return functions.AllocObject(&this, clazz);
543 	}
544 
545 	jobject NewObject(jclass clazz, jmethodID methodID, ...)
546 	{
547 		va_list args;
548 		jobject result;
549 		va_start(args, methodID);
550 		result = functions.NewObjectV(&this, clazz, methodID, args);
551 		va_end(args);
552 		return result;
553 	}
554 
555 	jobject NewObjectV(jclass clazz, jmethodID methodID, va_list args)
556 	{
557 		return functions.NewObjectV(&this, clazz, methodID, args);
558 	}
559 
560 	jobject NewObjectA(jclass clazz, jmethodID methodID, const(jvalue)* args)
561 	{
562 		return functions.NewObjectA(&this, clazz, methodID, args);
563 	}
564 
565 	jclass GetObjectClass(jobject obj)
566 	{
567 		return functions.GetObjectClass(&this, obj);
568 	}
569 
570 	jboolean IsInstanceOf(jobject obj, jclass clazz)
571 	{
572 		return functions.IsInstanceOf(&this, obj, clazz);
573 	}
574 
575 	jmethodID GetMethodID(jclass clazz, const(char)* name, const(char)* sig)
576 	{
577 		return functions.GetMethodID(&this, clazz, name, sig);
578 	}
579 
580 	jobject CallObjectMethod(jobject obj, jmethodID methodID, ...)
581 	{
582 		va_list args;
583 		jobject result;
584 		va_start(args, methodID);
585 		result = functions.CallObjectMethodV(&this, obj, methodID, args);
586 		va_end(args);
587 		return result;
588 	}
589 
590 	jobject CallObjectMethodV(jobject obj, jmethodID methodID, va_list args)
591 	{
592 		return functions.CallObjectMethodV(&this, obj, methodID, args);
593 	}
594 
595 	jobject CallObjectMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
596 	{
597 		return functions.CallObjectMethodA(&this, obj, methodID, args);
598 	}
599 
600 	jboolean CallBooleanMethod(jobject obj, jmethodID methodID, ...)
601 	{
602 		va_list args;
603 		jboolean result;
604 		va_start(args, methodID);
605 		result = functions.CallBooleanMethodV(&this, obj, methodID, args);
606 		va_end(args);
607 		return result;
608 	}
609 
610 	jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, va_list args)
611 	{
612 		return functions.CallBooleanMethodV(&this, obj, methodID, args);
613 	}
614 
615 	jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
616 	{
617 		return functions.CallBooleanMethodA(&this, obj, methodID, args);
618 	}
619 
620 	jbyte CallByteMethod(jobject obj, jmethodID methodID, ...)
621 	{
622 		va_list args;
623 		jbyte result;
624 		va_start(args, methodID);
625 		result = functions.CallByteMethodV(&this, obj, methodID, args);
626 		va_end(args);
627 		return result;
628 	}
629 
630 	jbyte CallByteMethodV(jobject obj, jmethodID methodID, va_list args)
631 	{
632 		return functions.CallByteMethodV(&this, obj, methodID, args);
633 	}
634 
635 	jbyte CallByteMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
636 	{
637 		return functions.CallByteMethodA(&this, obj, methodID, args);
638 	}
639 
640 	jchar CallCharMethod(jobject obj, jmethodID methodID, ...)
641 	{
642 		va_list args;
643 		jchar result;
644 		va_start(args, methodID);
645 		result = functions.CallCharMethodV(&this, obj, methodID, args);
646 		va_end(args);
647 		return result;
648 	}
649 
650 	jchar CallCharMethodV(jobject obj, jmethodID methodID, va_list args)
651 	{
652 		return functions.CallCharMethodV(&this, obj, methodID, args);
653 	}
654 
655 	jchar CallCharMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
656 	{
657 		return functions.CallCharMethodA(&this, obj, methodID, args);
658 	}
659 
660 	jshort CallShortMethod(jobject obj, jmethodID methodID, ...)
661 	{
662 		va_list args;
663 		jshort result;
664 		va_start(args, methodID);
665 		result = functions.CallShortMethodV(&this, obj, methodID, args);
666 		va_end(args);
667 		return result;
668 	}
669 
670 	jshort CallShortMethodV(jobject obj, jmethodID methodID, va_list args)
671 	{
672 		return functions.CallShortMethodV(&this, obj, methodID, args);
673 	}
674 
675 	jshort CallShortMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
676 	{
677 		return functions.CallShortMethodA(&this, obj, methodID, args);
678 	}
679 
680 	jint CallIntMethod(jobject obj, jmethodID methodID, ...)
681 	{
682 		va_list args;
683 		jint result;
684 		va_start(args, methodID);
685 		result = functions.CallIntMethodV(&this, obj, methodID, args);
686 		va_end(args);
687 		return result;
688 	}
689 
690 	jint CallIntMethodV(jobject obj, jmethodID methodID, va_list args)
691 	{
692 		return functions.CallIntMethodV(&this, obj, methodID, args);
693 	}
694 
695 	jint CallIntMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
696 	{
697 		return functions.CallIntMethodA(&this, obj, methodID, args);
698 	}
699 
700 	jlong CallLongMethod(jobject obj, jmethodID methodID, ...)
701 	{
702 		va_list args;
703 		jlong result;
704 		va_start(args, methodID);
705 		result = functions.CallLongMethodV(&this, obj, methodID, args);
706 		va_end(args);
707 		return result;
708 	}
709 
710 	jlong CallLongMethodV(jobject obj, jmethodID methodID, va_list args)
711 	{
712 		return functions.CallLongMethodV(&this, obj, methodID, args);
713 	}
714 
715 	jlong CallLongMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
716 	{
717 		return functions.CallLongMethodA(&this, obj, methodID, args);
718 	}
719 
720 	jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...)
721 	{
722 		va_list args;
723 		jfloat result;
724 		va_start(args, methodID);
725 		result = functions.CallFloatMethodV(&this, obj, methodID, args);
726 		va_end(args);
727 		return result;
728 	}
729 
730 	jfloat CallFloatMethodV(jobject obj, jmethodID methodID, va_list args)
731 	{
732 		return functions.CallFloatMethodV(&this, obj, methodID, args);
733 	}
734 
735 	jfloat CallFloatMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
736 	{
737 		return functions.CallFloatMethodA(&this, obj, methodID, args);
738 	}
739 
740 	jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...)
741 	{
742 		va_list args;
743 		jdouble result;
744 		va_start(args, methodID);
745 		result = functions.CallDoubleMethodV(&this, obj, methodID, args);
746 		va_end(args);
747 		return result;
748 	}
749 
750 	jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, va_list args)
751 	{
752 		return functions.CallDoubleMethodV(&this, obj, methodID, args);
753 	}
754 
755 	jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
756 	{
757 		return functions.CallDoubleMethodA(&this, obj, methodID, args);
758 	}
759 
760 	void CallVoidMethod(jobject obj, jmethodID methodID, ...)
761 	{
762 		va_list args;
763 		va_start(args, methodID);
764 		functions.CallVoidMethodV(&this, obj, methodID, args);
765 		va_end(args);
766 	}
767 
768 	void CallVoidMethodV(jobject obj, jmethodID methodID, va_list args)
769 	{
770 		functions.CallVoidMethodV(&this, obj, methodID, args);
771 	}
772 
773 	void CallVoidMethodA(jobject obj, jmethodID methodID, const(jvalue)* args)
774 	{
775 		functions.CallVoidMethodA(&this, obj, methodID, args);
776 	}
777 
778 	jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
779 	{
780 		va_list args;
781 		jobject result;
782 		va_start(args, methodID);
783 		result = functions.CallNonvirtualObjectMethodV(&this, obj, clazz, methodID, args);
784 		va_end(args);
785 		return result;
786 	}
787 
788 	jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args)
789 	{
790 		return functions.CallNonvirtualObjectMethodV(&this, obj, clazz, methodID, args);
791 	}
792 
793 	jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
794 			jmethodID methodID, const(jvalue)* args)
795 	{
796 		return functions.CallNonvirtualObjectMethodA(&this, obj, clazz, methodID, args);
797 	}
798 
799 	jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
800 	{
801 		va_list args;
802 		jboolean result;
803 		va_start(args, methodID);
804 		result = functions.CallNonvirtualBooleanMethodV(&this, obj, clazz, methodID, args);
805 		va_end(args);
806 		return result;
807 	}
808 
809 	jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
810 			jmethodID methodID, va_list args)
811 	{
812 		return functions.CallNonvirtualBooleanMethodV(&this, obj, clazz, methodID, args);
813 	}
814 
815 	jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
816 			jmethodID methodID, const(jvalue)* args)
817 	{
818 		return functions.CallNonvirtualBooleanMethodA(&this, obj, clazz, methodID, args);
819 	}
820 
821 	jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
822 	{
823 		va_list args;
824 		jbyte result;
825 		va_start(args, methodID);
826 		result = functions.CallNonvirtualByteMethodV(&this, obj, clazz, methodID, args);
827 		va_end(args);
828 		return result;
829 	}
830 
831 	jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args)
832 	{
833 		return functions.CallNonvirtualByteMethodV(&this, obj, clazz, methodID, args);
834 	}
835 
836 	jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
837 			jmethodID methodID, const(jvalue)* args)
838 	{
839 		return functions.CallNonvirtualByteMethodA(&this, obj, clazz, methodID, args);
840 	}
841 
842 	jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
843 	{
844 		va_list args;
845 		jchar result;
846 		va_start(args, methodID);
847 		result = functions.CallNonvirtualCharMethodV(&this, obj, clazz, methodID, args);
848 		va_end(args);
849 		return result;
850 	}
851 
852 	jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args)
853 	{
854 		return functions.CallNonvirtualCharMethodV(&this, obj, clazz, methodID, args);
855 	}
856 
857 	jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
858 			jmethodID methodID, const(jvalue)* args)
859 	{
860 		return functions.CallNonvirtualCharMethodA(&this, obj, clazz, methodID, args);
861 	}
862 
863 	jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
864 	{
865 		va_list args;
866 		jshort result;
867 		va_start(args, methodID);
868 		result = functions.CallNonvirtualShortMethodV(&this, obj, clazz, methodID, args);
869 		va_end(args);
870 		return result;
871 	}
872 
873 	jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args)
874 	{
875 		return functions.CallNonvirtualShortMethodV(&this, obj, clazz, methodID, args);
876 	}
877 
878 	jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
879 			jmethodID methodID, const(jvalue)* args)
880 	{
881 		return functions.CallNonvirtualShortMethodA(&this, obj, clazz, methodID, args);
882 	}
883 
884 	jint CallNonvirtualIntMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
885 	{
886 		va_list args;
887 		jint result;
888 		va_start(args, methodID);
889 		result = functions.CallNonvirtualIntMethodV(&this, obj, clazz, methodID, args);
890 		va_end(args);
891 		return result;
892 	}
893 
894 	jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args)
895 	{
896 		return functions.CallNonvirtualIntMethodV(&this, obj, clazz, methodID, args);
897 	}
898 
899 	jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
900 			jmethodID methodID, const(jvalue)* args)
901 	{
902 		return functions.CallNonvirtualIntMethodA(&this, obj, clazz, methodID, args);
903 	}
904 
905 	jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
906 	{
907 		va_list args;
908 		jlong result;
909 		va_start(args, methodID);
910 		result = functions.CallNonvirtualLongMethodV(&this, obj, clazz, methodID, args);
911 		va_end(args);
912 		return result;
913 	}
914 
915 	jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args)
916 	{
917 		return functions.CallNonvirtualLongMethodV(&this, obj, clazz, methodID, args);
918 	}
919 
920 	jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
921 			jmethodID methodID, const(jvalue)* args)
922 	{
923 		return functions.CallNonvirtualLongMethodA(&this, obj, clazz, methodID, args);
924 	}
925 
926 	jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
927 	{
928 		va_list args;
929 		jfloat result;
930 		va_start(args, methodID);
931 		result = functions.CallNonvirtualFloatMethodV(&this, obj, clazz, methodID, args);
932 		va_end(args);
933 		return result;
934 	}
935 
936 	jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args)
937 	{
938 		return functions.CallNonvirtualFloatMethodV(&this, obj, clazz, methodID, args);
939 	}
940 
941 	jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
942 			jmethodID methodID, const(jvalue)* args)
943 	{
944 		return functions.CallNonvirtualFloatMethodA(&this, obj, clazz, methodID, args);
945 	}
946 
947 	jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
948 	{
949 		va_list args;
950 		jdouble result;
951 		va_start(args, methodID);
952 		result = functions.CallNonvirtualDoubleMethodV(&this, obj, clazz, methodID, args);
953 		va_end(args);
954 		return result;
955 	}
956 
957 	jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args)
958 	{
959 		return functions.CallNonvirtualDoubleMethodV(&this, obj, clazz, methodID, args);
960 	}
961 
962 	jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
963 			jmethodID methodID, const(jvalue)* args)
964 	{
965 		return functions.CallNonvirtualDoubleMethodA(&this, obj, clazz, methodID, args);
966 	}
967 
968 	void CallNonvirtualVoidMethod(jobject obj, jclass clazz, jmethodID methodID, ...)
969 	{
970 		va_list args;
971 		va_start(args, methodID);
972 		functions.CallNonvirtualVoidMethodV(&this, obj, clazz, methodID, args);
973 		va_end(args);
974 	}
975 
976 	void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, jmethodID methodID, va_list args)
977 	{
978 		functions.CallNonvirtualVoidMethodV(&this, obj, clazz, methodID, args);
979 	}
980 
981 	void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
982 			jmethodID methodID, const(jvalue)* args)
983 	{
984 		functions.CallNonvirtualVoidMethodA(&this, obj, clazz, methodID, args);
985 	}
986 
987 	jfieldID GetFieldID(jclass clazz, const(char)* name, const(char)* sig)
988 	{
989 		return functions.GetFieldID(&this, clazz, name, sig);
990 	}
991 
992 	jobject GetObjectField(jobject obj, jfieldID fieldID)
993 	{
994 		return functions.GetObjectField(&this, obj, fieldID);
995 	}
996 
997 	jboolean GetBooleanField(jobject obj, jfieldID fieldID)
998 	{
999 		return functions.GetBooleanField(&this, obj, fieldID);
1000 	}
1001 
1002 	jbyte GetByteField(jobject obj, jfieldID fieldID)
1003 	{
1004 		return functions.GetByteField(&this, obj, fieldID);
1005 	}
1006 
1007 	jchar GetCharField(jobject obj, jfieldID fieldID)
1008 	{
1009 		return functions.GetCharField(&this, obj, fieldID);
1010 	}
1011 
1012 	jshort GetShortField(jobject obj, jfieldID fieldID)
1013 	{
1014 		return functions.GetShortField(&this, obj, fieldID);
1015 	}
1016 
1017 	jint GetIntField(jobject obj, jfieldID fieldID)
1018 	{
1019 		return functions.GetIntField(&this, obj, fieldID);
1020 	}
1021 
1022 	jlong GetLongField(jobject obj, jfieldID fieldID)
1023 	{
1024 		return functions.GetLongField(&this, obj, fieldID);
1025 	}
1026 
1027 	jfloat GetFloatField(jobject obj, jfieldID fieldID)
1028 	{
1029 		return functions.GetFloatField(&this, obj, fieldID);
1030 	}
1031 
1032 	jdouble GetDoubleField(jobject obj, jfieldID fieldID)
1033 	{
1034 		return functions.GetDoubleField(&this, obj, fieldID);
1035 	}
1036 
1037 	void SetObjectField(jobject obj, jfieldID fieldID, jobject val)
1038 	{
1039 		functions.SetObjectField(&this, obj, fieldID, val);
1040 	}
1041 
1042 	void SetBooleanField(jobject obj, jfieldID fieldID, jboolean val)
1043 	{
1044 		functions.SetBooleanField(&this, obj, fieldID, val);
1045 	}
1046 
1047 	void SetByteField(jobject obj, jfieldID fieldID, jbyte val)
1048 	{
1049 		functions.SetByteField(&this, obj, fieldID, val);
1050 	}
1051 
1052 	void SetCharField(jobject obj, jfieldID fieldID, jchar val)
1053 	{
1054 		functions.SetCharField(&this, obj, fieldID, val);
1055 	}
1056 
1057 	void SetShortField(jobject obj, jfieldID fieldID, jshort val)
1058 	{
1059 		functions.SetShortField(&this, obj, fieldID, val);
1060 	}
1061 
1062 	void SetIntField(jobject obj, jfieldID fieldID, jint val)
1063 	{
1064 		functions.SetIntField(&this, obj, fieldID, val);
1065 	}
1066 
1067 	void SetLongField(jobject obj, jfieldID fieldID, jlong val)
1068 	{
1069 		functions.SetLongField(&this, obj, fieldID, val);
1070 	}
1071 
1072 	void SetFloatField(jobject obj, jfieldID fieldID, jfloat val)
1073 	{
1074 		functions.SetFloatField(&this, obj, fieldID, val);
1075 	}
1076 
1077 	void SetDoubleField(jobject obj, jfieldID fieldID, jdouble val)
1078 	{
1079 		functions.SetDoubleField(&this, obj, fieldID, val);
1080 	}
1081 
1082 	jmethodID GetStaticMethodID(jclass clazz, const(char)* name, const(char)* sig)
1083 	{
1084 		return functions.GetStaticMethodID(&this, clazz, name, sig);
1085 	}
1086 
1087 	jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, ...)
1088 	{
1089 		va_list args;
1090 		jobject result;
1091 		va_start(args, methodID);
1092 		result = functions.CallStaticObjectMethodV(&this, clazz, methodID, args);
1093 		va_end(args);
1094 		return result;
1095 	}
1096 
1097 	jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, va_list args)
1098 	{
1099 		return functions.CallStaticObjectMethodV(&this, clazz, methodID, args);
1100 	}
1101 
1102 	jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, const(jvalue)* args)
1103 	{
1104 		return functions.CallStaticObjectMethodA(&this, clazz, methodID, args);
1105 	}
1106 
1107 	jboolean CallStaticBooleanMethod(jclass clazz, jmethodID methodID, ...)
1108 	{
1109 		va_list args;
1110 		jboolean result;
1111 		va_start(args, methodID);
1112 		result = functions.CallStaticBooleanMethodV(&this, clazz, methodID, args);
1113 		va_end(args);
1114 		return result;
1115 	}
1116 
1117 	jboolean CallStaticBooleanMethodV(jclass clazz, jmethodID methodID, va_list args)
1118 	{
1119 		return functions.CallStaticBooleanMethodV(&this, clazz, methodID, args);
1120 	}
1121 
1122 	jboolean CallStaticBooleanMethodA(jclass clazz, jmethodID methodID, const(jvalue)* args)
1123 	{
1124 		return functions.CallStaticBooleanMethodA(&this, clazz, methodID, args);
1125 	}
1126 
1127 	jbyte CallStaticByteMethod(jclass clazz, jmethodID methodID, ...)
1128 	{
1129 		va_list args;
1130 		jbyte result;
1131 		va_start(args, methodID);
1132 		result = functions.CallStaticByteMethodV(&this, clazz, methodID, args);
1133 		va_end(args);
1134 		return result;
1135 	}
1136 
1137 	jbyte CallStaticByteMethodV(jclass clazz, jmethodID methodID, va_list args)
1138 	{
1139 		return functions.CallStaticByteMethodV(&this, clazz, methodID, args);
1140 	}
1141 
1142 	jbyte CallStaticByteMethodA(jclass clazz, jmethodID methodID, const(jvalue)* args)
1143 	{
1144 		return functions.CallStaticByteMethodA(&this, clazz, methodID, args);
1145 	}
1146 
1147 	jchar CallStaticCharMethod(jclass clazz, jmethodID methodID, ...)
1148 	{
1149 		va_list args;
1150 		jchar result;
1151 		va_start(args, methodID);
1152 		result = functions.CallStaticCharMethodV(&this, clazz, methodID, args);
1153 		va_end(args);
1154 		return result;
1155 	}
1156 
1157 	jchar CallStaticCharMethodV(jclass clazz, jmethodID methodID, va_list args)
1158 	{
1159 		return functions.CallStaticCharMethodV(&this, clazz, methodID, args);
1160 	}
1161 
1162 	jchar CallStaticCharMethodA(jclass clazz, jmethodID methodID, const(jvalue)* args)
1163 	{
1164 		return functions.CallStaticCharMethodA(&this, clazz, methodID, args);
1165 	}
1166 
1167 	jshort CallStaticShortMethod(jclass clazz, jmethodID methodID, ...)
1168 	{
1169 		va_list args;
1170 		jshort result;
1171 		va_start(args, methodID);
1172 		result = functions.CallStaticShortMethodV(&this, clazz, methodID, args);
1173 		va_end(args);
1174 		return result;
1175 	}
1176 
1177 	jshort CallStaticShortMethodV(jclass clazz, jmethodID methodID, va_list args)
1178 	{
1179 		return functions.CallStaticShortMethodV(&this, clazz, methodID, args);
1180 	}
1181 
1182 	jshort CallStaticShortMethodA(jclass clazz, jmethodID methodID, const(jvalue)* args)
1183 	{
1184 		return functions.CallStaticShortMethodA(&this, clazz, methodID, args);
1185 	}
1186 
1187 	jint CallStaticIntMethod(jclass clazz, jmethodID methodID, ...)
1188 	{
1189 		va_list args;
1190 		jint result;
1191 		va_start(args, methodID);
1192 		result = functions.CallStaticIntMethodV(&this, clazz, methodID, args);
1193 		va_end(args);
1194 		return result;
1195 	}
1196 
1197 	jint CallStaticIntMethodV(jclass clazz, jmethodID methodID, va_list args)
1198 	{
1199 		return functions.CallStaticIntMethodV(&this, clazz, methodID, args);
1200 	}
1201 
1202 	jint CallStaticIntMethodA(jclass clazz, jmethodID methodID, const(jvalue)* args)
1203 	{
1204 		return functions.CallStaticIntMethodA(&this, clazz, methodID, args);
1205 	}
1206 
1207 	jlong CallStaticLongMethod(jclass clazz, jmethodID methodID, ...)
1208 	{
1209 		va_list args;
1210 		jlong result;
1211 		va_start(args, methodID);
1212 		result = functions.CallStaticLongMethodV(&this, clazz, methodID, args);
1213 		va_end(args);
1214 		return result;
1215 	}
1216 
1217 	jlong CallStaticLongMethodV(jclass clazz, jmethodID methodID, va_list args)
1218 	{
1219 		return functions.CallStaticLongMethodV(&this, clazz, methodID, args);
1220 	}
1221 
1222 	jlong CallStaticLongMethodA(jclass clazz, jmethodID methodID, const(jvalue)* args)
1223 	{
1224 		return functions.CallStaticLongMethodA(&this, clazz, methodID, args);
1225 	}
1226 
1227 	jfloat CallStaticFloatMethod(jclass clazz, jmethodID methodID, ...)
1228 	{
1229 		va_list args;
1230 		jfloat result;
1231 		va_start(args, methodID);
1232 		result = functions.CallStaticFloatMethodV(&this, clazz, methodID, args);
1233 		va_end(args);
1234 		return result;
1235 	}
1236 
1237 	jfloat CallStaticFloatMethodV(jclass clazz, jmethodID methodID, va_list args)
1238 	{
1239 		return functions.CallStaticFloatMethodV(&this, clazz, methodID, args);
1240 	}
1241 
1242 	jfloat CallStaticFloatMethodA(jclass clazz, jmethodID methodID, const(jvalue)* args)
1243 	{
1244 		return functions.CallStaticFloatMethodA(&this, clazz, methodID, args);
1245 	}
1246 
1247 	jdouble CallStaticDoubleMethod(jclass clazz, jmethodID methodID, ...)
1248 	{
1249 		va_list args;
1250 		jdouble result;
1251 		va_start(args, methodID);
1252 		result = functions.CallStaticDoubleMethodV(&this, clazz, methodID, args);
1253 		va_end(args);
1254 		return result;
1255 	}
1256 
1257 	jdouble CallStaticDoubleMethodV(jclass clazz, jmethodID methodID, va_list args)
1258 	{
1259 		return functions.CallStaticDoubleMethodV(&this, clazz, methodID, args);
1260 	}
1261 
1262 	jdouble CallStaticDoubleMethodA(jclass clazz, jmethodID methodID, const(jvalue)* args)
1263 	{
1264 		return functions.CallStaticDoubleMethodA(&this, clazz, methodID, args);
1265 	}
1266 
1267 	void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...)
1268 	{
1269 		va_list args;
1270 		va_start(args, methodID);
1271 		functions.CallStaticVoidMethodV(&this, cls, methodID, args);
1272 		va_end(args);
1273 	}
1274 
1275 	void CallStaticVoidMethodV(jclass cls, jmethodID methodID, va_list args)
1276 	{
1277 		functions.CallStaticVoidMethodV(&this, cls, methodID, args);
1278 	}
1279 
1280 	void CallStaticVoidMethodA(jclass cls, jmethodID methodID, const(jvalue)* args)
1281 	{
1282 		functions.CallStaticVoidMethodA(&this, cls, methodID, args);
1283 	}
1284 
1285 	jfieldID GetStaticFieldID(jclass clazz, const(char)* name, const(char)* sig)
1286 	{
1287 		return functions.GetStaticFieldID(&this, clazz, name, sig);
1288 	}
1289 
1290 	jobject GetStaticObjectField(jclass clazz, jfieldID fieldID)
1291 	{
1292 		return functions.GetStaticObjectField(&this, clazz, fieldID);
1293 	}
1294 
1295 	jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID)
1296 	{
1297 		return functions.GetStaticBooleanField(&this, clazz, fieldID);
1298 	}
1299 
1300 	jbyte GetStaticByteField(jclass clazz, jfieldID fieldID)
1301 	{
1302 		return functions.GetStaticByteField(&this, clazz, fieldID);
1303 	}
1304 
1305 	jchar GetStaticCharField(jclass clazz, jfieldID fieldID)
1306 	{
1307 		return functions.GetStaticCharField(&this, clazz, fieldID);
1308 	}
1309 
1310 	jshort GetStaticShortField(jclass clazz, jfieldID fieldID)
1311 	{
1312 		return functions.GetStaticShortField(&this, clazz, fieldID);
1313 	}
1314 
1315 	jint GetStaticIntField(jclass clazz, jfieldID fieldID)
1316 	{
1317 		return functions.GetStaticIntField(&this, clazz, fieldID);
1318 	}
1319 
1320 	jlong GetStaticLongField(jclass clazz, jfieldID fieldID)
1321 	{
1322 		return functions.GetStaticLongField(&this, clazz, fieldID);
1323 	}
1324 
1325 	jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID)
1326 	{
1327 		return functions.GetStaticFloatField(&this, clazz, fieldID);
1328 	}
1329 
1330 	jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID)
1331 	{
1332 		return functions.GetStaticDoubleField(&this, clazz, fieldID);
1333 	}
1334 
1335 	void SetStaticObjectField(jclass clazz, jfieldID fieldID, jobject value)
1336 	{
1337 		functions.SetStaticObjectField(&this, clazz, fieldID, value);
1338 	}
1339 
1340 	void SetStaticBooleanField(jclass clazz, jfieldID fieldID, jboolean value)
1341 	{
1342 		functions.SetStaticBooleanField(&this, clazz, fieldID, value);
1343 	}
1344 
1345 	void SetStaticByteField(jclass clazz, jfieldID fieldID, jbyte value)
1346 	{
1347 		functions.SetStaticByteField(&this, clazz, fieldID, value);
1348 	}
1349 
1350 	void SetStaticCharField(jclass clazz, jfieldID fieldID, jchar value)
1351 	{
1352 		functions.SetStaticCharField(&this, clazz, fieldID, value);
1353 	}
1354 
1355 	void SetStaticShortField(jclass clazz, jfieldID fieldID, jshort value)
1356 	{
1357 		functions.SetStaticShortField(&this, clazz, fieldID, value);
1358 	}
1359 
1360 	void SetStaticIntField(jclass clazz, jfieldID fieldID, jint value)
1361 	{
1362 		functions.SetStaticIntField(&this, clazz, fieldID, value);
1363 	}
1364 
1365 	void SetStaticLongField(jclass clazz, jfieldID fieldID, jlong value)
1366 	{
1367 		functions.SetStaticLongField(&this, clazz, fieldID, value);
1368 	}
1369 
1370 	void SetStaticFloatField(jclass clazz, jfieldID fieldID, jfloat value)
1371 	{
1372 		functions.SetStaticFloatField(&this, clazz, fieldID, value);
1373 	}
1374 
1375 	void SetStaticDoubleField(jclass clazz, jfieldID fieldID, jdouble value)
1376 	{
1377 		functions.SetStaticDoubleField(&this, clazz, fieldID, value);
1378 	}
1379 
1380 	jstring NewString(const(jchar)* unicode, jsize len)
1381 	{
1382 		return functions.NewString(&this, unicode, len);
1383 	}
1384 
1385 	jsize GetStringLength(jstring str)
1386 	{
1387 		return functions.GetStringLength(&this, str);
1388 	}
1389 
1390 	const(jchar)* GetStringChars(jstring str, jboolean* isCopy)
1391 	{
1392 		return functions.GetStringChars(&this, str, isCopy);
1393 	}
1394 
1395 	void ReleaseStringChars(jstring str, const(jchar)* chars)
1396 	{
1397 		functions.ReleaseStringChars(&this, str, chars);
1398 	}
1399 
1400 	jstring NewStringUTF(const(char)* utf)
1401 	{
1402 		return functions.NewStringUTF(&this, utf);
1403 	}
1404 
1405 	jsize GetStringUTFLength(jstring str)
1406 	{
1407 		return functions.GetStringUTFLength(&this, str);
1408 	}
1409 
1410 	const(char)* GetStringUTFChars(jstring str, jboolean* isCopy)
1411 	{
1412 		return functions.GetStringUTFChars(&this, str, isCopy);
1413 	}
1414 
1415 	void ReleaseStringUTFChars(jstring str, const(char)* chars)
1416 	{
1417 		functions.ReleaseStringUTFChars(&this, str, chars);
1418 	}
1419 
1420 	jsize GetArrayLength(jarray array)
1421 	{
1422 		return functions.GetArrayLength(&this, array);
1423 	}
1424 
1425 	jobjectArray NewObjectArray(jsize len, jclass clazz, jobject init)
1426 	{
1427 		return functions.NewObjectArray(&this, len, clazz, init);
1428 	}
1429 
1430 	jobject GetObjectArrayElement(jobjectArray array, jsize index)
1431 	{
1432 		return functions.GetObjectArrayElement(&this, array, index);
1433 	}
1434 
1435 	void SetObjectArrayElement(jobjectArray array, jsize index, jobject val)
1436 	{
1437 		functions.SetObjectArrayElement(&this, array, index, val);
1438 	}
1439 
1440 	jbooleanArray NewBooleanArray(jsize len)
1441 	{
1442 		return functions.NewBooleanArray(&this, len);
1443 	}
1444 
1445 	jbyteArray NewByteArray(jsize len)
1446 	{
1447 		return functions.NewByteArray(&this, len);
1448 	}
1449 
1450 	jcharArray NewCharArray(jsize len)
1451 	{
1452 		return functions.NewCharArray(&this, len);
1453 	}
1454 
1455 	jshortArray NewShortArray(jsize len)
1456 	{
1457 		return functions.NewShortArray(&this, len);
1458 	}
1459 
1460 	jintArray NewIntArray(jsize len)
1461 	{
1462 		return functions.NewIntArray(&this, len);
1463 	}
1464 
1465 	jlongArray NewLongArray(jsize len)
1466 	{
1467 		return functions.NewLongArray(&this, len);
1468 	}
1469 
1470 	jfloatArray NewFloatArray(jsize len)
1471 	{
1472 		return functions.NewFloatArray(&this, len);
1473 	}
1474 
1475 	jdoubleArray NewDoubleArray(jsize len)
1476 	{
1477 		return functions.NewDoubleArray(&this, len);
1478 	}
1479 
1480 	jboolean* GetBooleanArrayElements(jbooleanArray array, jboolean* isCopy)
1481 	{
1482 		return functions.GetBooleanArrayElements(&this, array, isCopy);
1483 	}
1484 
1485 	jbyte* GetByteArrayElements(jbyteArray array, jboolean* isCopy)
1486 	{
1487 		return functions.GetByteArrayElements(&this, array, isCopy);
1488 	}
1489 
1490 	jchar* GetCharArrayElements(jcharArray array, jboolean* isCopy)
1491 	{
1492 		return functions.GetCharArrayElements(&this, array, isCopy);
1493 	}
1494 
1495 	jshort* GetShortArrayElements(jshortArray array, jboolean* isCopy)
1496 	{
1497 		return functions.GetShortArrayElements(&this, array, isCopy);
1498 	}
1499 
1500 	jint* GetIntArrayElements(jintArray array, jboolean* isCopy)
1501 	{
1502 		return functions.GetIntArrayElements(&this, array, isCopy);
1503 	}
1504 
1505 	jlong* GetLongArrayElements(jlongArray array, jboolean* isCopy)
1506 	{
1507 		return functions.GetLongArrayElements(&this, array, isCopy);
1508 	}
1509 
1510 	jfloat* GetFloatArrayElements(jfloatArray array, jboolean* isCopy)
1511 	{
1512 		return functions.GetFloatArrayElements(&this, array, isCopy);
1513 	}
1514 
1515 	jdouble* GetDoubleArrayElements(jdoubleArray array, jboolean* isCopy)
1516 	{
1517 		return functions.GetDoubleArrayElements(&this, array, isCopy);
1518 	}
1519 
1520 	void ReleaseBooleanArrayElements(jbooleanArray array, jboolean* elems, jint mode)
1521 	{
1522 		functions.ReleaseBooleanArrayElements(&this, array, elems, mode);
1523 	}
1524 
1525 	void ReleaseByteArrayElements(jbyteArray array, jbyte* elems, jint mode)
1526 	{
1527 		functions.ReleaseByteArrayElements(&this, array, elems, mode);
1528 	}
1529 
1530 	void ReleaseCharArrayElements(jcharArray array, jchar* elems, jint mode)
1531 	{
1532 		functions.ReleaseCharArrayElements(&this, array, elems, mode);
1533 	}
1534 
1535 	void ReleaseShortArrayElements(jshortArray array, jshort* elems, jint mode)
1536 	{
1537 		functions.ReleaseShortArrayElements(&this, array, elems, mode);
1538 	}
1539 
1540 	void ReleaseIntArrayElements(jintArray array, jint* elems, jint mode)
1541 	{
1542 		functions.ReleaseIntArrayElements(&this, array, elems, mode);
1543 	}
1544 
1545 	void ReleaseLongArrayElements(jlongArray array, jlong* elems, jint mode)
1546 	{
1547 		functions.ReleaseLongArrayElements(&this, array, elems, mode);
1548 	}
1549 
1550 	void ReleaseFloatArrayElements(jfloatArray array, jfloat* elems, jint mode)
1551 	{
1552 		functions.ReleaseFloatArrayElements(&this, array, elems, mode);
1553 	}
1554 
1555 	void ReleaseDoubleArrayElements(jdoubleArray array, jdouble* elems, jint mode)
1556 	{
1557 		functions.ReleaseDoubleArrayElements(&this, array, elems, mode);
1558 	}
1559 
1560 	void GetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, jboolean* buf)
1561 	{
1562 		functions.GetBooleanArrayRegion(&this, array, start, len, buf);
1563 	}
1564 
1565 	void GetByteArrayRegion(jbyteArray array, jsize start, jsize len, jbyte* buf)
1566 	{
1567 		functions.GetByteArrayRegion(&this, array, start, len, buf);
1568 	}
1569 
1570 	void GetCharArrayRegion(jcharArray array, jsize start, jsize len, jchar* buf)
1571 	{
1572 		functions.GetCharArrayRegion(&this, array, start, len, buf);
1573 	}
1574 
1575 	void GetShortArrayRegion(jshortArray array, jsize start, jsize len, jshort* buf)
1576 	{
1577 		functions.GetShortArrayRegion(&this, array, start, len, buf);
1578 	}
1579 
1580 	void GetIntArrayRegion(jintArray array, jsize start, jsize len, jint* buf)
1581 	{
1582 		functions.GetIntArrayRegion(&this, array, start, len, buf);
1583 	}
1584 
1585 	void GetLongArrayRegion(jlongArray array, jsize start, jsize len, jlong* buf)
1586 	{
1587 		functions.GetLongArrayRegion(&this, array, start, len, buf);
1588 	}
1589 
1590 	void GetFloatArrayRegion(jfloatArray array, jsize start, jsize len, jfloat* buf)
1591 	{
1592 		functions.GetFloatArrayRegion(&this, array, start, len, buf);
1593 	}
1594 
1595 	void GetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, jdouble* buf)
1596 	{
1597 		functions.GetDoubleArrayRegion(&this, array, start, len, buf);
1598 	}
1599 
1600 	void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, const(jboolean)* buf)
1601 	{
1602 		functions.SetBooleanArrayRegion(&this, array, start, len, buf);
1603 	}
1604 
1605 	void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, const(jbyte)* buf)
1606 	{
1607 		functions.SetByteArrayRegion(&this, array, start, len, buf);
1608 	}
1609 
1610 	void SetCharArrayRegion(jcharArray array, jsize start, jsize len, const(jchar)* buf)
1611 	{
1612 		functions.SetCharArrayRegion(&this, array, start, len, buf);
1613 	}
1614 
1615 	void SetShortArrayRegion(jshortArray array, jsize start, jsize len, const(jshort)* buf)
1616 	{
1617 		functions.SetShortArrayRegion(&this, array, start, len, buf);
1618 	}
1619 
1620 	void SetIntArrayRegion(jintArray array, jsize start, jsize len, const(jint)* buf)
1621 	{
1622 		functions.SetIntArrayRegion(&this, array, start, len, buf);
1623 	}
1624 
1625 	void SetLongArrayRegion(jlongArray array, jsize start, jsize len, const(jlong)* buf)
1626 	{
1627 		functions.SetLongArrayRegion(&this, array, start, len, buf);
1628 	}
1629 
1630 	void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, const(jfloat)* buf)
1631 	{
1632 		functions.SetFloatArrayRegion(&this, array, start, len, buf);
1633 	}
1634 
1635 	void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, const(jdouble)* buf)
1636 	{
1637 		functions.SetDoubleArrayRegion(&this, array, start, len, buf);
1638 	}
1639 
1640 	jint RegisterNatives(jclass clazz, const(JNINativeMethod)* methods, jint nMethods)
1641 	{
1642 		return functions.RegisterNatives(&this, clazz, methods, nMethods);
1643 	}
1644 
1645 	jint UnregisterNatives(jclass clazz)
1646 	{
1647 		return functions.UnregisterNatives(&this, clazz);
1648 	}
1649 
1650 	jint MonitorEnter(jobject obj)
1651 	{
1652 		return functions.MonitorEnter(&this, obj);
1653 	}
1654 
1655 	jint MonitorExit(jobject obj)
1656 	{
1657 		return functions.MonitorExit(&this, obj);
1658 	}
1659 
1660 	jint GetJavaVM(JavaVM** vm)
1661 	{
1662 		return functions.GetJavaVM(&this, vm);
1663 	}
1664 
1665 	void GetStringRegion(jstring str, jsize start, jsize len, jchar* buf)
1666 	{
1667 		functions.GetStringRegion(&this, str, start, len, buf);
1668 	}
1669 
1670 	void GetStringUTFRegion(jstring str, jsize start, jsize len, char* buf)
1671 	{
1672 		functions.GetStringUTFRegion(&this, str, start, len, buf);
1673 	}
1674 
1675 	void* GetPrimitiveArrayCritical(jarray array, jboolean* isCopy)
1676 	{
1677 		return functions.GetPrimitiveArrayCritical(&this, array, isCopy);
1678 	}
1679 
1680 	void ReleasePrimitiveArrayCritical(jarray array, void* carray, jint mode)
1681 	{
1682 		functions.ReleasePrimitiveArrayCritical(&this, array, carray, mode);
1683 	}
1684 
1685 	const(jchar)* GetStringCritical(jstring string, jboolean* isCopy)
1686 	{
1687 		return functions.GetStringCritical(&this, string, isCopy);
1688 	}
1689 
1690 	void ReleaseStringCritical(jstring string, const(jchar)* cstring)
1691 	{
1692 		functions.ReleaseStringCritical(&this, string, cstring);
1693 	}
1694 
1695 	jweak NewWeakGlobalRef(jobject obj)
1696 	{
1697 		return functions.NewWeakGlobalRef(&this, obj);
1698 	}
1699 
1700 	void DeleteWeakGlobalRef(jweak _ref)
1701 	{
1702 		functions.DeleteWeakGlobalRef(&this, _ref);
1703 	}
1704 
1705 	jboolean ExceptionCheck()
1706 	{
1707 		return functions.ExceptionCheck(&this);
1708 	}
1709 
1710 	jobject NewDirectByteBuffer(void* address, jlong capacity)
1711 	{
1712 		return functions.NewDirectByteBuffer(&this, address, capacity);
1713 	}
1714 
1715 	void* GetDirectBufferAddress(jobject buf)
1716 	{
1717 		return functions.GetDirectBufferAddress(&this, buf);
1718 	}
1719 
1720 	jlong GetDirectBufferCapacity(jobject buf)
1721 	{
1722 		return functions.GetDirectBufferCapacity(&this, buf);
1723 	}
1724 
1725 	jobjectRefType GetObjectRefType(jobject obj)
1726 	{
1727 		return functions.GetObjectRefType(&this, obj);
1728 	}
1729 
1730 }
1731 
1732 struct JavaVMOption
1733 {
1734 	char* optionString;
1735 	void* extraInfo;
1736 }
1737 
1738 struct JavaVMInitArgs
1739 {
1740 	jint _version;
1741 	jint nOptions;
1742 	JavaVMOption* options;
1743 	jboolean ignoreUnrecognized;
1744 }
1745 
1746 struct JavaVMAttachArgs
1747 {
1748 	jint _version;
1749 	char* name;
1750 	jobject group;
1751 }
1752 
1753 struct JNIInvokeInterface_
1754 {
1755 	void* reserved0;
1756 	void* reserved1;
1757 	void* reserved2;
1758 	jint function(JavaVM* vm) DestroyJavaVM;
1759 	jint function(JavaVM* vm, void** penv, void* args) AttachCurrentThread;
1760 	jint function(JavaVM* vm) DetachCurrentThread;
1761 	jint function(JavaVM* vm, void** penv, jint _version) GetEnv;
1762 	jint function(JavaVM* vm, void** penv, void* args) AttachCurrentThreadAsDaemon;
1763 }
1764 
1765 struct JavaVM_
1766 {
1767 	const(JNIInvokeInterface_)* functions;
1768 
1769 	jint DestroyJavaVM()
1770 	{
1771 		return functions.DestroyJavaVM(&this);
1772 	}
1773 
1774 	jint AttachCurrentThread(void** penv, void* args)
1775 	{
1776 		return functions.AttachCurrentThread(&this, penv, args);
1777 	}
1778 
1779 	jint DetachCurrentThread()
1780 	{
1781 		return functions.DetachCurrentThread(&this);
1782 	}
1783 
1784 	jint GetEnv(void** penv, jint _version)
1785 	{
1786 		return functions.GetEnv(&this, penv, _version);
1787 	}
1788 
1789 	jint AttachCurrentThreadAsDaemon(void** penv, void* args)
1790 	{
1791 		return functions.AttachCurrentThreadAsDaemon(&this, penv, args);
1792 	}
1793 }
1794 
1795 /* In practice, these are not exported by the NDK so don't declare them */
1796 //jint JNI_GetDefaultJavaVMInitArgs(void* args);
1797 //jint JNI_CreateJavaVM(JavaVM** pvm, void** penv, void* args);
1798 //jint JNI_GetCreatedJavaVMs(JavaVM**, jsize, jsize*);
1799 
1800 /* Defined by native libraries. */
1801 
1802 /*
1803  * Prototypes for functions exported by loadable shared libs. These are
1804  * called by JNI, not provided by JNI.
1805  */
1806 jint JNI_OnLoad(JavaVM* vm, void* reserved);
1807 void JNI_OnUnload(JavaVM* vm, void* reserved);
1808 
1809 /*
1810  * Manifest constants.
1811  */
1812 enum JNI_VERSION_1_1 = 0x00010001;
1813 enum JNI_VERSION_1_2 = 0x00010002;
1814 enum JNI_VERSION_1_4 = 0x00010004;
1815 enum JNI_VERSION_1_6 = 0x00010006;
1816 enum JNI_VERSION_1_8 = 0x00010008;