1 module java.c.jni; 2 extern (C): 3 4 import core.vararg; 5 6 7 alias int jint; 8 alias long jlong; 9 alias byte jbyte; 10 alias jint jsize; 11 alias ubyte jboolean; 12 alias ushort jchar; 13 alias short jshort; 14 alias float jfloat; 15 alias double jdouble; 16 17 struct _jobject; 18 alias _jobject* jobject; 19 alias jobject jclass; 20 alias jobject jthrowable; 21 alias jobject jstring; 22 alias jobject jarray; 23 alias jarray jbooleanArray; 24 alias jarray jbyteArray; 25 alias jarray jcharArray; 26 alias jarray jshortArray; 27 alias jarray jintArray; 28 alias jarray jlongArray; 29 alias jarray jfloatArray; 30 alias jarray jdoubleArray; 31 alias jarray jobjectArray; 32 alias jobject jweak; 33 34 union jvalue { 35 jboolean z; 36 jbyte b; 37 jchar c; 38 jshort s; 39 jint i; 40 jlong j; 41 jfloat f; 42 jdouble d; 43 jobject l; 44 } 45 46 struct _jfieldID; 47 alias _jfieldID *jfieldID; 48 49 struct _jmethodID; 50 alias _jmethodID *jmethodID; 51 52 enum jobjectRefType { 53 JNIInvalidRefType = 0, 54 JNILocalRefType = 1, 55 JNIGlobalRefType = 2, 56 JNIWeakGlobalRefType = 3 57 } 58 59 enum JNI_FALSE = 0; 60 enum JNI_TRUE = 1; 61 62 enum 63 { 64 JNI_OK = 0, 65 JNI_ERR = -1, 66 JNI_EDETACHED = -2, 67 JNI_EVERSION = -3, 68 JNI_ENOMEM = -4, 69 JNI_EEXIST = -5, 70 JNI_EINVAL = -6, 71 } 72 73 enum JNI_COMMIT = 1; 74 enum JNI_ABORT = 2; 75 76 struct JNINativeMethod { 77 char *name; 78 char *signature; 79 void *fnPtr; 80 } 81 82 alias JNINativeInterface_ *JNIEnv; 83 alias JNIInvokeInterface_ *JavaVM; 84 85 struct JNINativeInterface_ { 86 void *reserved0; 87 void *reserved1; 88 void *reserved2; 89 90 void *reserved3; 91 jint function(JNIEnv* env) GetVersion; 92 93 jclass function(JNIEnv *env, const(char)* name, jobject loader, const jbyte *buf, 94 jsize len) DefineClass; 95 jclass function(JNIEnv *env, const(char)* name) FindClass; 96 97 jmethodID function(JNIEnv *env, jobject method) FromReflectedMethod; 98 jfieldID function(JNIEnv *env, jobject field) FromReflectedField; 99 100 jobject function(JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic) ToReflectedMethod; 101 102 jclass function(JNIEnv *env, jclass sub) GetSuperclass; 103 jboolean function(JNIEnv *env, jclass sub, jclass sup) IsAssignableFrom; 104 105 jobject function(JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic) ToReflectedField; 106 107 jint function(JNIEnv *env, jthrowable obj) Throw; 108 jint function(JNIEnv *env, jclass clazz, const(char)* msg) ThrowNew; 109 jthrowable function(JNIEnv *env) ExceptionOccurred; 110 void function(JNIEnv *env) ExceptionDescribe; 111 void function(JNIEnv *env) ExceptionClear; 112 void function(JNIEnv *env, const(char)* msg) FatalError; 113 114 jint function(JNIEnv *env, jint capacity) PushLocalFrame; 115 jobject function(JNIEnv *env, jobject result) PopLocalFrame; 116 117 jobject function(JNIEnv *env, jobject lobj) NewGlobalRef; 118 void function(JNIEnv *env, jobject gref) DeleteGlobalRef; 119 void function(JNIEnv *env, jobject obj) DeleteLocalRef; 120 jboolean function(JNIEnv *env, jobject obj1, jobject obj2) IsSameObject; 121 jobject function(JNIEnv *env, jobject _ref) NewLocalRef; 122 jint function(JNIEnv *env, jint capacity) EnsureLocalCapacity; 123 124 jobject function(JNIEnv *env, jclass clazz) AllocObject; 125 jobject function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) NewObject; 126 jobject function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) NewObjectV; 127 jobject function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) NewObjectA; 128 129 jclass function(JNIEnv *env, jobject obj) GetObjectClass; 130 jboolean function(JNIEnv *env, jobject obj, jclass clazz) IsInstanceOf; 131 132 jmethodID function(JNIEnv *env, jclass clazz, const(char)* name, const(char)* sig) GetMethodID; 133 134 jobject function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallObjectMethod; 135 jobject function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallObjectMethodV; 136 jobject function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args) CallObjectMethodA; 137 138 jboolean function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallBooleanMethod; 139 jboolean function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallBooleanMethodV; 140 jboolean function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args) CallBooleanMethodA; 141 142 jbyte function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallByteMethod; 143 jbyte function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallByteMethodV; 144 jbyte function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) CallByteMethodA; 145 146 jchar function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallCharMethod; 147 jchar function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallCharMethodV; 148 jchar function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) CallCharMethodA; 149 150 jshort function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallShortMethod; 151 jshort function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallShortMethodV; 152 jshort function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) CallShortMethodA; 153 154 jint function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallIntMethod; 155 jint function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallIntMethodV; 156 jint function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) CallIntMethodA; 157 158 jlong function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallLongMethod; 159 jlong function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallLongMethodV; 160 jlong function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) CallLongMethodA; 161 162 jfloat function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallFloatMethod; 163 jfloat function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallFloatMethodV; 164 jfloat function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) CallFloatMethodA; 165 166 jdouble function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallDoubleMethod; 167 jdouble function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallDoubleMethodV; 168 jdouble function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) CallDoubleMethodA; 169 170 void function(JNIEnv *env, jobject obj, jmethodID methodID, ...) CallVoidMethod; 171 void function(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) CallVoidMethodV; 172 void function(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args) CallVoidMethodA; 173 174 jobject function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualObjectMethod; 175 jobject function 176 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 177 va_list args) CallNonvirtualObjectMethodV; 178 jobject function 179 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 180 const jvalue * args) CallNonvirtualObjectMethodA; 181 182 jboolean function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualBooleanMethod; 183 jboolean function 184 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 185 va_list args) CallNonvirtualBooleanMethodV; 186 jboolean function 187 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 188 const jvalue * args) CallNonvirtualBooleanMethodA; 189 190 jbyte function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualByteMethod; 191 jbyte function 192 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 193 va_list args) CallNonvirtualByteMethodV; 194 jbyte function 195 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 196 const jvalue *args) CallNonvirtualByteMethodA; 197 198 jchar function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualCharMethod; 199 jchar function 200 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 201 va_list args) CallNonvirtualCharMethodV; 202 jchar function 203 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 204 const jvalue *args) CallNonvirtualCharMethodA; 205 206 jshort function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualShortMethod; 207 jshort function 208 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 209 va_list args) CallNonvirtualShortMethodV; 210 jshort function 211 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 212 const jvalue *args) CallNonvirtualShortMethodA; 213 214 jint function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualIntMethod; 215 jint function 216 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 217 va_list args) CallNonvirtualIntMethodV; 218 jint function 219 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 220 const jvalue *args) CallNonvirtualIntMethodA; 221 222 jlong function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualLongMethod; 223 jlong function 224 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 225 va_list args) CallNonvirtualLongMethodV; 226 jlong function 227 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 228 const jvalue *args) CallNonvirtualLongMethodA; 229 230 jfloat function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualFloatMethod; 231 jfloat function 232 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 233 va_list args) CallNonvirtualFloatMethodV; 234 jfloat function 235 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 236 const jvalue *args) CallNonvirtualFloatMethodA; 237 238 jdouble function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualDoubleMethod; 239 jdouble function 240 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 241 va_list args) CallNonvirtualDoubleMethodV; 242 jdouble function 243 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 244 const jvalue *args) CallNonvirtualDoubleMethodA; 245 246 void function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) CallNonvirtualVoidMethod; 247 void 248 function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 249 va_list args) CallNonvirtualVoidMethodV; 250 void 251 function(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, 252 const(jvalue)* args) CallNonvirtualVoidMethodA; 253 254 jfieldID function(JNIEnv *env, jclass clazz, const(char)* name, const(char)* sig) GetFieldID; 255 256 jobject function(JNIEnv *env, jobject obj, jfieldID fieldID) GetObjectField; 257 jboolean function(JNIEnv *env, jobject obj, jfieldID fieldID) GetBooleanField; 258 jbyte function(JNIEnv *env, jobject obj, jfieldID fieldID) GetByteField; 259 jchar function(JNIEnv *env, jobject obj, jfieldID fieldID) GetCharField; 260 jshort function(JNIEnv *env, jobject obj, jfieldID fieldID) GetShortField; 261 jint function(JNIEnv *env, jobject obj, jfieldID fieldID) GetIntField; 262 jlong function(JNIEnv *env, jobject obj, jfieldID fieldID) GetLongField; 263 jfloat function(JNIEnv *env, jobject obj, jfieldID fieldID) GetFloatField; 264 jdouble function(JNIEnv *env, jobject obj, jfieldID fieldID) GetDoubleField; 265 266 void function(JNIEnv *env, jobject obj, jfieldID fieldID, jobject val) SetObjectField; 267 void function(JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val) SetBooleanField; 268 void function(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val) SetByteField; 269 void function(JNIEnv *env, jobject obj, jfieldID fieldID, jchar val) SetCharField; 270 void function(JNIEnv *env, jobject obj, jfieldID fieldID, jshort val) SetShortField; 271 void function(JNIEnv *env, jobject obj, jfieldID fieldID, jint val) SetIntField; 272 void function(JNIEnv *env, jobject obj, jfieldID fieldID, jlong val) SetLongField; 273 void function(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val) SetFloatField; 274 void function(JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val) SetDoubleField; 275 276 jmethodID function(JNIEnv *env, jclass clazz, const(char)* name, const(char)* sig) GetStaticMethodID; 277 278 jobject function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) CallStaticObjectMethod; 279 jobject function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) CallStaticObjectMethodV; 280 jobject function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) CallStaticObjectMethodA; 281 282 jboolean function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) CallStaticBooleanMethod; 283 jboolean function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) CallStaticBooleanMethodV; 284 jboolean function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) CallStaticBooleanMethodA; 285 286 jbyte function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) CallStaticByteMethod; 287 jbyte function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) CallStaticByteMethodV; 288 jbyte function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) CallStaticByteMethodA; 289 290 jchar function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) CallStaticCharMethod; 291 jchar function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) CallStaticCharMethodV; 292 jchar function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) CallStaticCharMethodA; 293 294 jshort function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) CallStaticShortMethod; 295 jshort function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) CallStaticShortMethodV; 296 jshort function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) CallStaticShortMethodA; 297 298 jint function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) CallStaticIntMethod; 299 jint function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) CallStaticIntMethodV; 300 jint function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) CallStaticIntMethodA; 301 302 jlong function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) CallStaticLongMethod; 303 jlong function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) CallStaticLongMethodV; 304 jlong function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) CallStaticLongMethodA; 305 306 jfloat function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) CallStaticFloatMethod; 307 jfloat function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) CallStaticFloatMethodV; 308 jfloat function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) CallStaticFloatMethodA; 309 310 jdouble function(JNIEnv *env, jclass clazz, jmethodID methodID, ...) CallStaticDoubleMethod; 311 jdouble function(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) CallStaticDoubleMethodV; 312 jdouble function(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) CallStaticDoubleMethodA; 313 314 void function(JNIEnv *env, jclass cls, jmethodID methodID, ...) CallStaticVoidMethod; 315 void function(JNIEnv *env, jclass cls, jmethodID methodID, va_list args) CallStaticVoidMethodV; 316 void function(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args) CallStaticVoidMethodA; 317 318 jfieldID function(JNIEnv *env, jclass clazz, const(char)* name, const(char)* sig) GetStaticFieldID; 319 jobject function(JNIEnv *env, jclass clazz, jfieldID fieldID) GetStaticObjectField; 320 jboolean function(JNIEnv *env, jclass clazz, jfieldID fieldID) GetStaticBooleanField; 321 jbyte function(JNIEnv *env, jclass clazz, jfieldID fieldID) GetStaticByteField; 322 jchar function(JNIEnv *env, jclass clazz, jfieldID fieldID) GetStaticCharField; 323 jshort function(JNIEnv *env, jclass clazz, jfieldID fieldID) GetStaticShortField; 324 jint function(JNIEnv *env, jclass clazz, jfieldID fieldID) GetStaticIntField; 325 jlong function(JNIEnv *env, jclass clazz, jfieldID fieldID) GetStaticLongField; 326 jfloat function(JNIEnv *env, jclass clazz, jfieldID fieldID) GetStaticFloatField; 327 jdouble function(JNIEnv *env, jclass clazz, jfieldID fieldID) GetStaticDoubleField; 328 329 void function(JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value) SetStaticObjectField; 330 void function(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value) SetStaticBooleanField; 331 void function(JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value) SetStaticByteField; 332 void function(JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value) SetStaticCharField; 333 void function(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value) SetStaticShortField; 334 void function(JNIEnv *env, jclass clazz, jfieldID fieldID, jint value) SetStaticIntField; 335 void function(JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value) SetStaticLongField; 336 void function(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value) SetStaticFloatField; 337 void function(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value) SetStaticDoubleField; 338 339 jstring function(JNIEnv *env, const(jchar)* unicode, jsize len) NewString; 340 jsize function(JNIEnv *env, jstring str) GetStringLength; 341 const(jchar)* function(JNIEnv *env, jstring str, jboolean *isCopy) GetStringChars; 342 void function(JNIEnv *env, jstring str, const(jchar)* chars) ReleaseStringChars; 343 344 jstring function(JNIEnv *env, const(char)* utf) NewStringUTF; 345 jsize function(JNIEnv *env, jstring str) GetStringUTFLength; 346 const(char)* function(JNIEnv *env, jstring str, jboolean *isCopy) GetStringUTFChars; 347 void function(JNIEnv *env, jstring str, const char* chars) ReleaseStringUTFChars; 348 349 350 jsize function(JNIEnv *env, jarray array) GetArrayLength; 351 352 jobjectArray function(JNIEnv *env, jsize len, jclass clazz, jobject init) NewObjectArray; 353 jobject function(JNIEnv *env, jobjectArray array, jsize index) GetObjectArrayElement; 354 void function(JNIEnv *env, jobjectArray array, jsize index, jobject val) SetObjectArrayElement; 355 356 jbooleanArray function(JNIEnv *env, jsize len) NewBooleanArray; 357 jbyteArray function(JNIEnv *env, jsize len) NewByteArray; 358 jcharArray function(JNIEnv *env, jsize len) NewCharArray; 359 jshortArray function(JNIEnv *env, jsize len) NewShortArray; 360 jintArray function(JNIEnv *env, jsize len) NewIntArray; 361 jlongArray function(JNIEnv *env, jsize len) NewLongArray; 362 jfloatArray function(JNIEnv *env, jsize len) NewFloatArray; 363 jdoubleArray function(JNIEnv *env, jsize len) NewDoubleArray; 364 365 jboolean function(JNIEnv *env, jbooleanArray array, jboolean *isCopy) GetBooleanArrayElements; 366 jbyte function(JNIEnv *env, jbyteArray array, jboolean *isCopy) GetByteArrayElements; 367 jchar function(JNIEnv *env, jcharArray array, jboolean *isCopy) GetCharArrayElements; 368 jshort function(JNIEnv *env, jshortArray array, jboolean *isCopy) GetShortArrayElements; 369 jint function(JNIEnv *env, jintArray array, jboolean *isCopy) GetIntArrayElements; 370 jlong function(JNIEnv *env, jlongArray array, jboolean *isCopy) GetLongArrayElements; 371 jfloat function(JNIEnv *env, jfloatArray array, jboolean *isCopy) GetFloatArrayElements; 372 jdouble function(JNIEnv *env, jdoubleArray array, jboolean *isCopy) GetDoubleArrayElements; 373 374 void function(JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode) ReleaseBooleanArrayElements; 375 void function(JNIEnv *env, jbyteArray array, jbyte *elems, jint mode) ReleaseByteArrayElements; 376 void function(JNIEnv *env, jcharArray array, jchar *elems, jint mode) ReleaseCharArrayElements; 377 void function(JNIEnv *env, jshortArray array, jshort *elems, jint mode) ReleaseShortArrayElements; 378 void function(JNIEnv *env, jintArray array, jint *elems, jint mode) ReleaseIntArrayElements; 379 void function(JNIEnv *env, jlongArray array, jlong *elems, jint mode) ReleaseLongArrayElements; 380 void function(JNIEnv *env, jfloatArray array, jfloat *elems, jint mode) ReleaseFloatArrayElements; 381 void function(JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode) ReleaseDoubleArrayElements; 382 383 void function(JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf) GetBooleanArrayRegion; 384 void function(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf) GetByteArrayRegion; 385 void function(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf) GetCharArrayRegion; 386 void function(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf) GetShortArrayRegion; 387 void function(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf) GetIntArrayRegion; 388 void function(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf) GetLongArrayRegion; 389 void function(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf) GetFloatArrayRegion; 390 void function(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf) GetDoubleArrayRegion; 391 392 void function(JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf) SetBooleanArrayRegion; 393 void function(JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf) SetByteArrayRegion; 394 void function(JNIEnv *env, jcharArray array, jsize start, jsize len, const(jchar)* buf) SetCharArrayRegion; 395 void function(JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf) SetShortArrayRegion; 396 void function(JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf) SetIntArrayRegion; 397 void function(JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf) SetLongArrayRegion; 398 void function(JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf) SetFloatArrayRegion; 399 void function(JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf) SetDoubleArrayRegion; 400 401 jint function(JNIEnv* env, jclass clazz, JNINativeMethod* methods, jint nMethods) RegisterNatives; 402 jint function(JNIEnv *env, jclass clazz) UnregisterNatives; 403 404 jint function(JNIEnv *env, jobject obj) MonitorEnter; 405 jint function(JNIEnv *env, jobject obj) MonitorExit; 406 407 jint function(JNIEnv *env, JavaVM **vm) GetJavaVM; 408 409 void function(JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf) GetStringRegion; 410 void function(JNIEnv *env, jstring str, jsize start, jsize len, char *buf) GetStringUTFRegion; 411 412 void function(JNIEnv *env, jarray array, jboolean *isCopy) GetPrimitiveArrayCritical; 413 void function(JNIEnv *env, jarray array, void *carray, jint mode) ReleasePrimitiveArrayCritical; 414 415 const jchar function(JNIEnv *env, jstring _string, jboolean *isCopy) GetStringCritical; 416 void function(JNIEnv *env, jstring _string, const(jchar)* cstring) ReleaseStringCritical; 417 418 jweak function(JNIEnv *env, jobject obj) NewWeakGlobalRef; 419 void function(JNIEnv *env, jweak _ref) DeleteWeakGlobalRef; 420 421 jboolean function(JNIEnv *env) ExceptionCheck; 422 423 jobject function(JNIEnv* env, void* address, jlong capacity) NewDirectByteBuffer; 424 void* function(JNIEnv* env, jobject buf) GetDirectBufferAddress; 425 jlong function(JNIEnv* env, jobject buf) GetDirectBufferCapacity; 426 427 jobjectRefType function(JNIEnv* env, jobject obj) GetObjectRefType; 428 } 429 430 struct JNIEnv_ { 431 JNINativeInterface_* functions; 432 } 433 434 struct JavaVMOption { 435 char *optionString; 436 void *extraInfo; 437 } 438 439 struct JavaVMInitArgs { 440 jint _version; 441 442 jint nOptions; 443 JavaVMOption *options; 444 jboolean ignoreUnrecognized; 445 } 446 447 struct JavaVMAttachArgs { 448 jint _version; 449 450 char *name; 451 jobject group; 452 } 453 454 struct JNIInvokeInterface_ { 455 void *reserved0; 456 void *reserved1; 457 void *reserved2; 458 459 jint function(JavaVM *vm) DestroyJavaVM; 460 461 jint function(JavaVM *vm, void **penv, void *args) AttachCurrentThread; 462 463 jint function(JavaVM *vm) DetachCurrentThread; 464 465 jint function(JavaVM *vm, void **penv, jint _version) GetEnv; 466 467 jint function(JavaVM *vm, void **penv, void *args) AttachCurrentThreadAsDaemon; 468 } 469 470 struct JavaVM_ { 471 JNIInvokeInterface_* functions; 472 } 473 474 jint 475 JNI_GetDefaultJavaVMInitArgs(void *args); 476 477 jint 478 JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args); 479 480 jint 481 JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); 482 483 jint JNI_OnLoad(JavaVM *vm, void *reserved); 484 485 void JNI_OnUnload(JavaVM *vm, void *reserved); 486 487 enum JNI_VERSION_1_1 = 0x00010001; 488 enum JNI_VERSION_1_2 = 0x00010002; 489 enum JNI_VERSION_1_4 = 0x00010004; 490 enum JNI_VERSION_1_6 = 0x00010006;