1 /* dstep -I/path/to/ndk-r9d/platforms/android-9/arch-x86/usr/include -I/path/to/ndk-r9d/toolchains/llvm-3.4/prebuilt/linux-x86/lib/clang/3.4/include /path/to/ndk-r9d/platforms/android-9/arch-x86/usr/include/jni.h -o jni.d*/
2 
3 module jni;
4 
5 version (Android):
6 extern (C):
7 @system:
8 nothrow:
9 @nogc:
10 
11 import core.stdc.stdarg;
12 
13 alias ubyte jboolean;
14 alias byte jbyte;
15 alias ushort jchar;
16 alias short jshort;
17 alias int jint;
18 alias long jlong;
19 alias float jfloat;
20 alias double jdouble;
21 alias jint jsize;
22 alias void* jobject;
23 alias jobject jclass;
24 alias jobject jstring;
25 alias jobject jarray;
26 alias jarray jobjectArray;
27 alias jarray jbooleanArray;
28 alias jarray jbyteArray;
29 alias jarray jcharArray;
30 alias jarray jshortArray;
31 alias jarray jintArray;
32 alias jarray jlongArray;
33 alias jarray jfloatArray;
34 alias jarray jdoubleArray;
35 alias jobject jthrowable;
36 alias jobject jweak;
37 alias _jfieldID* jfieldID;
38 alias _jmethodID* jmethodID;
39 alias const(JNINativeInterface)* C_JNIEnv;
40 alias const(JNINativeInterface)* JNIEnv;
41 alias const(JNIInvokeInterface)* JavaVM;
42 
43 enum jobjectRefType
44 {
45     JNIInvalidRefType = 0,
46     JNILocalRefType = 1,
47     JNIGlobalRefType = 2,
48     JNIWeakGlobalRefType = 3
49 }
50 
51 enum JNI_FALSE = 0;
52 enum JNI_TRUE = 1;
53 enum JNI_VERSION_1_1 = 0x00010001;
54 enum JNI_VERSION_1_2 = 0x00010002;
55 enum JNI_VERSION_1_4 = 0x00010004;
56 enum JNI_VERSION_1_6 = 0x00010006;
57 enum JNI_OK = 0;
58 enum JNI_ERR = -1;
59 enum JNI_EDETACHED = -2;
60 enum JNI_EVERSION = -3;
61 enum JNI_COMMIT = 1;
62 enum JNI_ABORT = 2;
63 
64 struct JNINativeMethod
65 {
66     const(char)* name;
67     const(char)* signature;
68     void* fnPtr;
69 }
70 
71 struct JNINativeInterface
72 {
73     void* reserved0;
74     void* reserved1;
75     void* reserved2;
76     void* reserved3;
77     jint function(JNIEnv*) GetVersion;
78     jclass function(JNIEnv*, const(char)*, jobject, const(jbyte)*, jsize) DefineClass;
79     jclass function(JNIEnv*, const(char)*) FindClass;
80     jmethodID function(JNIEnv*, jobject) FromReflectedMethod;
81     jfieldID function(JNIEnv*, jobject) FromReflectedField;
82     jobject function(JNIEnv*, jclass, jmethodID, jboolean) ToReflectedMethod;
83     jclass function(JNIEnv*, jclass) GetSuperclass;
84     jboolean function(JNIEnv*, jclass, jclass) IsAssignableFrom;
85     jobject function(JNIEnv*, jclass, jfieldID, jboolean) ToReflectedField;
86     jint function(JNIEnv*, jthrowable) Throw;
87     jint function(JNIEnv*, jclass, const(char)*) ThrowNew;
88     jthrowable function(JNIEnv*) ExceptionOccurred;
89     void function(JNIEnv*) ExceptionDescribe;
90     void function(JNIEnv*) ExceptionClear;
91     void function(JNIEnv*, const(char)*) FatalError;
92     jint function(JNIEnv*, jint) PushLocalFrame;
93     jobject function(JNIEnv*, jobject) PopLocalFrame;
94     jobject function(JNIEnv*, jobject) NewGlobalRef;
95     void function(JNIEnv*, jobject) DeleteGlobalRef;
96     void function(JNIEnv*, jobject) DeleteLocalRef;
97     jboolean function(JNIEnv*, jobject, jobject) IsSameObject;
98     jobject function(JNIEnv*, jobject) NewLocalRef;
99     jint function(JNIEnv*, jint) EnsureLocalCapacity;
100     jobject function(JNIEnv*, jclass) AllocObject;
101     jobject function(JNIEnv*, jclass, jmethodID, ...) NewObject;
102     jobject function(JNIEnv*, jclass, jmethodID, va_list) NewObjectV;
103     jobject function(JNIEnv*, jclass, jmethodID, jvalue*) NewObjectA;
104     jclass function(JNIEnv*, jobject) GetObjectClass;
105     jboolean function(JNIEnv*, jobject, jclass) IsInstanceOf;
106     jmethodID function(JNIEnv*, jclass, const(char)*, const(char)*) GetMethodID;
107     jobject function(JNIEnv*, jobject, jmethodID, ...) CallObjectMethod;
108     jobject function(JNIEnv*, jobject, jmethodID, va_list) CallObjectMethodV;
109     jobject function(JNIEnv*, jobject, jmethodID, jvalue*) CallObjectMethodA;
110     jboolean function(JNIEnv*, jobject, jmethodID, ...) CallBooleanMethod;
111     jboolean function(JNIEnv*, jobject, jmethodID, va_list) CallBooleanMethodV;
112     jboolean function(JNIEnv*, jobject, jmethodID, jvalue*) CallBooleanMethodA;
113     jbyte function(JNIEnv*, jobject, jmethodID, ...) CallByteMethod;
114     jbyte function(JNIEnv*, jobject, jmethodID, va_list) CallByteMethodV;
115     jbyte function(JNIEnv*, jobject, jmethodID, jvalue*) CallByteMethodA;
116     jchar function(JNIEnv*, jobject, jmethodID, ...) CallCharMethod;
117     jchar function(JNIEnv*, jobject, jmethodID, va_list) CallCharMethodV;
118     jchar function(JNIEnv*, jobject, jmethodID, jvalue*) CallCharMethodA;
119     jshort function(JNIEnv*, jobject, jmethodID, ...) CallShortMethod;
120     jshort function(JNIEnv*, jobject, jmethodID, va_list) CallShortMethodV;
121     jshort function(JNIEnv*, jobject, jmethodID, jvalue*) CallShortMethodA;
122     jint function(JNIEnv*, jobject, jmethodID, ...) CallIntMethod;
123     jint function(JNIEnv*, jobject, jmethodID, va_list) CallIntMethodV;
124     jint function(JNIEnv*, jobject, jmethodID, jvalue*) CallIntMethodA;
125     jlong function(JNIEnv*, jobject, jmethodID, ...) CallLongMethod;
126     jlong function(JNIEnv*, jobject, jmethodID, va_list) CallLongMethodV;
127     jlong function(JNIEnv*, jobject, jmethodID, jvalue*) CallLongMethodA;
128     jfloat function(JNIEnv*, jobject, jmethodID, ...) CallFloatMethod;
129     jfloat function(JNIEnv*, jobject, jmethodID, va_list) CallFloatMethodV;
130     jfloat function(JNIEnv*, jobject, jmethodID, jvalue*) CallFloatMethodA;
131     jdouble function(JNIEnv*, jobject, jmethodID, ...) CallDoubleMethod;
132     jdouble function(JNIEnv*, jobject, jmethodID, va_list) CallDoubleMethodV;
133     jdouble function(JNIEnv*, jobject, jmethodID, jvalue*) CallDoubleMethodA;
134     void function(JNIEnv*, jobject, jmethodID, ...) CallVoidMethod;
135     void function(JNIEnv*, jobject, jmethodID, va_list) CallVoidMethodV;
136     void function(JNIEnv*, jobject, jmethodID, jvalue*) CallVoidMethodA;
137     jobject function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualObjectMethod;
138     jobject function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualObjectMethodV;
139     jobject function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualObjectMethodA;
140     jboolean function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualBooleanMethod;
141     jboolean function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualBooleanMethodV;
142     jboolean function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualBooleanMethodA;
143     jbyte function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualByteMethod;
144     jbyte function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualByteMethodV;
145     jbyte function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualByteMethodA;
146     jchar function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualCharMethod;
147     jchar function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualCharMethodV;
148     jchar function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualCharMethodA;
149     jshort function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualShortMethod;
150     jshort function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualShortMethodV;
151     jshort function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualShortMethodA;
152     jint function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualIntMethod;
153     jint function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualIntMethodV;
154     jint function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualIntMethodA;
155     jlong function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualLongMethod;
156     jlong function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualLongMethodV;
157     jlong function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualLongMethodA;
158     jfloat function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualFloatMethod;
159     jfloat function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualFloatMethodV;
160     jfloat function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualFloatMethodA;
161     jdouble function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualDoubleMethod;
162     jdouble function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualDoubleMethodV;
163     jdouble function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualDoubleMethodA;
164     void function(JNIEnv*, jobject, jclass, jmethodID, ...) CallNonvirtualVoidMethod;
165     void function(JNIEnv*, jobject, jclass, jmethodID, va_list) CallNonvirtualVoidMethodV;
166     void function(JNIEnv*, jobject, jclass, jmethodID, jvalue*) CallNonvirtualVoidMethodA;
167     jfieldID function(JNIEnv*, jclass, const(char)*, const(char)*) GetFieldID;
168     jobject function(JNIEnv*, jobject, jfieldID) GetObjectField;
169     jboolean function(JNIEnv*, jobject, jfieldID) GetBooleanField;
170     jbyte function(JNIEnv*, jobject, jfieldID) GetByteField;
171     jchar function(JNIEnv*, jobject, jfieldID) GetCharField;
172     jshort function(JNIEnv*, jobject, jfieldID) GetShortField;
173     jint function(JNIEnv*, jobject, jfieldID) GetIntField;
174     jlong function(JNIEnv*, jobject, jfieldID) GetLongField;
175     jfloat function(JNIEnv*, jobject, jfieldID) GetFloatField;
176     jdouble function(JNIEnv*, jobject, jfieldID) GetDoubleField;
177     void function(JNIEnv*, jobject, jfieldID, jobject) SetObjectField;
178     void function(JNIEnv*, jobject, jfieldID, jboolean) SetBooleanField;
179     void function(JNIEnv*, jobject, jfieldID, jbyte) SetByteField;
180     void function(JNIEnv*, jobject, jfieldID, jchar) SetCharField;
181     void function(JNIEnv*, jobject, jfieldID, jshort) SetShortField;
182     void function(JNIEnv*, jobject, jfieldID, jint) SetIntField;
183     void function(JNIEnv*, jobject, jfieldID, jlong) SetLongField;
184     void function(JNIEnv*, jobject, jfieldID, jfloat) SetFloatField;
185     void function(JNIEnv*, jobject, jfieldID, jdouble) SetDoubleField;
186     jmethodID function(JNIEnv*, jclass, const(char)*, const(char)*) GetStaticMethodID;
187     jobject function(JNIEnv*, jclass, jmethodID, ...) CallStaticObjectMethod;
188     jobject function(JNIEnv*, jclass, jmethodID, va_list) CallStaticObjectMethodV;
189     jobject function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticObjectMethodA;
190     jboolean function(JNIEnv*, jclass, jmethodID, ...) CallStaticBooleanMethod;
191     jboolean function(JNIEnv*, jclass, jmethodID, va_list) CallStaticBooleanMethodV;
192     jboolean function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticBooleanMethodA;
193     jbyte function(JNIEnv*, jclass, jmethodID, ...) CallStaticByteMethod;
194     jbyte function(JNIEnv*, jclass, jmethodID, va_list) CallStaticByteMethodV;
195     jbyte function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticByteMethodA;
196     jchar function(JNIEnv*, jclass, jmethodID, ...) CallStaticCharMethod;
197     jchar function(JNIEnv*, jclass, jmethodID, va_list) CallStaticCharMethodV;
198     jchar function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticCharMethodA;
199     jshort function(JNIEnv*, jclass, jmethodID, ...) CallStaticShortMethod;
200     jshort function(JNIEnv*, jclass, jmethodID, va_list) CallStaticShortMethodV;
201     jshort function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticShortMethodA;
202     jint function(JNIEnv*, jclass, jmethodID, ...) CallStaticIntMethod;
203     jint function(JNIEnv*, jclass, jmethodID, va_list) CallStaticIntMethodV;
204     jint function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticIntMethodA;
205     jlong function(JNIEnv*, jclass, jmethodID, ...) CallStaticLongMethod;
206     jlong function(JNIEnv*, jclass, jmethodID, va_list) CallStaticLongMethodV;
207     jlong function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticLongMethodA;
208     jfloat function(JNIEnv*, jclass, jmethodID, ...) CallStaticFloatMethod;
209     jfloat function(JNIEnv*, jclass, jmethodID, va_list) CallStaticFloatMethodV;
210     jfloat function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticFloatMethodA;
211     jdouble function(JNIEnv*, jclass, jmethodID, ...) CallStaticDoubleMethod;
212     jdouble function(JNIEnv*, jclass, jmethodID, va_list) CallStaticDoubleMethodV;
213     jdouble function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticDoubleMethodA;
214     void function(JNIEnv*, jclass, jmethodID, ...) CallStaticVoidMethod;
215     void function(JNIEnv*, jclass, jmethodID, va_list) CallStaticVoidMethodV;
216     void function(JNIEnv*, jclass, jmethodID, jvalue*) CallStaticVoidMethodA;
217     jfieldID function(JNIEnv*, jclass, const(char)*, const(char)*) GetStaticFieldID;
218     jobject function(JNIEnv*, jclass, jfieldID) GetStaticObjectField;
219     jboolean function(JNIEnv*, jclass, jfieldID) GetStaticBooleanField;
220     jbyte function(JNIEnv*, jclass, jfieldID) GetStaticByteField;
221     jchar function(JNIEnv*, jclass, jfieldID) GetStaticCharField;
222     jshort function(JNIEnv*, jclass, jfieldID) GetStaticShortField;
223     jint function(JNIEnv*, jclass, jfieldID) GetStaticIntField;
224     jlong function(JNIEnv*, jclass, jfieldID) GetStaticLongField;
225     jfloat function(JNIEnv*, jclass, jfieldID) GetStaticFloatField;
226     jdouble function(JNIEnv*, jclass, jfieldID) GetStaticDoubleField;
227     void function(JNIEnv*, jclass, jfieldID, jobject) SetStaticObjectField;
228     void function(JNIEnv*, jclass, jfieldID, jboolean) SetStaticBooleanField;
229     void function(JNIEnv*, jclass, jfieldID, jbyte) SetStaticByteField;
230     void function(JNIEnv*, jclass, jfieldID, jchar) SetStaticCharField;
231     void function(JNIEnv*, jclass, jfieldID, jshort) SetStaticShortField;
232     void function(JNIEnv*, jclass, jfieldID, jint) SetStaticIntField;
233     void function(JNIEnv*, jclass, jfieldID, jlong) SetStaticLongField;
234     void function(JNIEnv*, jclass, jfieldID, jfloat) SetStaticFloatField;
235     void function(JNIEnv*, jclass, jfieldID, jdouble) SetStaticDoubleField;
236     jstring function(JNIEnv*, const(jchar)*, jsize) NewString;
237     jsize function(JNIEnv*, jstring) GetStringLength;
238     const(jchar)* function(JNIEnv*, jstring, jboolean*) GetStringChars;
239     void function(JNIEnv*, jstring, const(jchar)*) ReleaseStringChars;
240     jstring function(JNIEnv*, const(char)*) NewStringUTF;
241     jsize function(JNIEnv*, jstring) GetStringUTFLength;
242     const(char)* function(JNIEnv*, jstring, jboolean*) GetStringUTFChars;
243     void function(JNIEnv*, jstring, const(char)*) ReleaseStringUTFChars;
244     jsize function(JNIEnv*, jarray) GetArrayLength;
245     jobjectArray function(JNIEnv*, jsize, jclass, jobject) NewObjectArray;
246     jobject function(JNIEnv*, jobjectArray, jsize) GetObjectArrayElement;
247     void function(JNIEnv*, jobjectArray, jsize, jobject) SetObjectArrayElement;
248     jbooleanArray function(JNIEnv*, jsize) NewBooleanArray;
249     jbyteArray function(JNIEnv*, jsize) NewByteArray;
250     jcharArray function(JNIEnv*, jsize) NewCharArray;
251     jshortArray function(JNIEnv*, jsize) NewShortArray;
252     jintArray function(JNIEnv*, jsize) NewIntArray;
253     jlongArray function(JNIEnv*, jsize) NewLongArray;
254     jfloatArray function(JNIEnv*, jsize) NewFloatArray;
255     jdoubleArray function(JNIEnv*, jsize) NewDoubleArray;
256     jboolean* function(JNIEnv*, jbooleanArray, jboolean*) GetBooleanArrayElements;
257     jbyte* function(JNIEnv*, jbyteArray, jboolean*) GetByteArrayElements;
258     jchar* function(JNIEnv*, jcharArray, jboolean*) GetCharArrayElements;
259     jshort* function(JNIEnv*, jshortArray, jboolean*) GetShortArrayElements;
260     jint* function(JNIEnv*, jintArray, jboolean*) GetIntArrayElements;
261     jlong* function(JNIEnv*, jlongArray, jboolean*) GetLongArrayElements;
262     jfloat* function(JNIEnv*, jfloatArray, jboolean*) GetFloatArrayElements;
263     jdouble* function(JNIEnv*, jdoubleArray, jboolean*) GetDoubleArrayElements;
264     void function(JNIEnv*, jbooleanArray, jboolean*, jint) ReleaseBooleanArrayElements;
265     void function(JNIEnv*, jbyteArray, jbyte*, jint) ReleaseByteArrayElements;
266     void function(JNIEnv*, jcharArray, jchar*, jint) ReleaseCharArrayElements;
267     void function(JNIEnv*, jshortArray, jshort*, jint) ReleaseShortArrayElements;
268     void function(JNIEnv*, jintArray, jint*, jint) ReleaseIntArrayElements;
269     void function(JNIEnv*, jlongArray, jlong*, jint) ReleaseLongArrayElements;
270     void function(JNIEnv*, jfloatArray, jfloat*, jint) ReleaseFloatArrayElements;
271     void function(JNIEnv*, jdoubleArray, jdouble*, jint) ReleaseDoubleArrayElements;
272     void function(JNIEnv*, jbooleanArray, jsize, jsize, jboolean*) GetBooleanArrayRegion;
273     void function(JNIEnv*, jbyteArray, jsize, jsize, jbyte*) GetByteArrayRegion;
274     void function(JNIEnv*, jcharArray, jsize, jsize, jchar*) GetCharArrayRegion;
275     void function(JNIEnv*, jshortArray, jsize, jsize, jshort*) GetShortArrayRegion;
276     void function(JNIEnv*, jintArray, jsize, jsize, jint*) GetIntArrayRegion;
277     void function(JNIEnv*, jlongArray, jsize, jsize, jlong*) GetLongArrayRegion;
278     void function(JNIEnv*, jfloatArray, jsize, jsize, jfloat*) GetFloatArrayRegion;
279     void function(JNIEnv*, jdoubleArray, jsize, jsize, jdouble*) GetDoubleArrayRegion;
280     void function(JNIEnv*, jbooleanArray, jsize, jsize, const(jboolean)*) SetBooleanArrayRegion;
281     void function(JNIEnv*, jbyteArray, jsize, jsize, const(jbyte)*) SetByteArrayRegion;
282     void function(JNIEnv*, jcharArray, jsize, jsize, const(jchar)*) SetCharArrayRegion;
283     void function(JNIEnv*, jshortArray, jsize, jsize, const(jshort)*) SetShortArrayRegion;
284     void function(JNIEnv*, jintArray, jsize, jsize, const(jint)*) SetIntArrayRegion;
285     void function(JNIEnv*, jlongArray, jsize, jsize, const(jlong)*) SetLongArrayRegion;
286     void function(JNIEnv*, jfloatArray, jsize, jsize, const(jfloat)*) SetFloatArrayRegion;
287     void function(JNIEnv*, jdoubleArray, jsize, jsize, const(jdouble)*) SetDoubleArrayRegion;
288     jint function(JNIEnv*, jclass, const(JNINativeMethod)*, jint) RegisterNatives;
289     jint function(JNIEnv*, jclass) UnregisterNatives;
290     jint function(JNIEnv*, jobject) MonitorEnter;
291     jint function(JNIEnv*, jobject) MonitorExit;
292     jint function(JNIEnv*, JavaVM**) GetJavaVM;
293     void function(JNIEnv*, jstring, jsize, jsize, jchar*) GetStringRegion;
294     void function(JNIEnv*, jstring, jsize, jsize, char*) GetStringUTFRegion;
295     void* function(JNIEnv*, jarray, jboolean*) GetPrimitiveArrayCritical;
296     void function(JNIEnv*, jarray, void*, jint) ReleasePrimitiveArrayCritical;
297     const(jchar)* function(JNIEnv*, jstring, jboolean*) GetStringCritical;
298     void function(JNIEnv*, jstring, const(jchar)*) ReleaseStringCritical;
299     jweak function(JNIEnv*, jobject) NewWeakGlobalRef;
300     void function(JNIEnv*, jweak) DeleteWeakGlobalRef;
301     jboolean function(JNIEnv*) ExceptionCheck;
302     jobject function(JNIEnv*, void*, jlong) NewDirectByteBuffer;
303     void* function(JNIEnv*, jobject) GetDirectBufferAddress;
304     jlong function(JNIEnv*, jobject) GetDirectBufferCapacity;
305     jobjectRefType function(JNIEnv*, jobject) GetObjectRefType;
306 }
307 
308 struct _JNIEnv
309 {
310     const(JNINativeInterface)* functions;
311 }
312 
313 struct JNIInvokeInterface
314 {
315     void* reserved0;
316     void* reserved1;
317     void* reserved2;
318     jint function(JavaVM*) DestroyJavaVM;
319     jint function(JavaVM*, JNIEnv**, void*) AttachCurrentThread;
320     jint function(JavaVM*) DetachCurrentThread;
321     jint function(JavaVM*, void**, jint) GetEnv;
322     jint function(JavaVM*, JNIEnv**, void*) AttachCurrentThreadAsDaemon;
323 }
324 
325 struct _JavaVM
326 {
327     const(JNIInvokeInterface)* functions;
328 }
329 
330 struct JavaVMAttachArgs
331 {
332     jint version_;
333     const(char)* name;
334     jobject group;
335 }
336 
337 struct JavaVMOption
338 {
339     const(char)* optionString;
340     void* extraInfo;
341 }
342 
343 struct JavaVMInitArgs
344 {
345     jint version_;
346     jint nOptions;
347     JavaVMOption* options;
348     jboolean ignoreUnrecognized;
349 }
350 
351 struct _jfieldID;
352 struct _jmethodID;
353 
354 union jvalue
355 {
356     jboolean z;
357     jbyte b;
358     jchar c;
359     jshort s;
360     jint i;
361     jlong j;
362     jfloat f;
363     jdouble d;
364     jobject l;
365 }
366 
367 jint JNI_OnLoad(JavaVM* vm, void* reserved);
368 void JNI_OnUnload(JavaVM* vm, void* reserved);