\ $Id: jni.h.f,v 1.1 2002/08/29 16:00:57 anfilat Exp $ \ JNI header for SPForth \ Translation from c to forth - Andrey Filatkin, af@forth.org.ru \ * @(#)jni.h 1.48 00/02/02 \ * \ * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved. \ * \ * This software is the proprietary information of Sun Microsystems, Inc. \ * Use is subject to license terms. \ * We used part of Netscape's Java Runtime Interface (JRI) as the starting \ * point of our design and implementation. \ /****************************************************************************** \ * Java Runtime Interface \ * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. \ *****************************************************************************/ REQUIRE f: devel\~af\lib\struct.f \ jboolean constants 0 CONSTANT JNI_FALSE 1 CONSTANT JNI_TRUE \ possible return values for JNI functions. 0 CONSTANT JNI_OK \ success -1 CONSTANT JNI_ERR \ unknown error -2 CONSTANT JNI_EDETACHED \ thread detached from the VM -3 CONSTANT JNI_EVERSION \ JNI version error -4 CONSTANT JNI_ENOMEM \ not enough memory -5 CONSTANT JNI_EEXIST \ VM already created -6 CONSTANT JNI_EINVAL \ invalid arguments \ used in ReleaseScalarArrayElements 1 CONSTANT JNI_COMMIT 2 CONSTANT JNI_ABORT \ used in RegisterNatives to describe native method name, signature, \ and function pointer. STRUCT: JNINativeMethod CELL -- name CELL -- signature CELL -- fnPtr ;STRUCT \ JNI Invocation Interface. \ typedef const struct JNIInvokeInterface_ *JavaVM; \ JNI Native Method Interface. STRUCT: JNIEnv CELL -- reserved0 CELL -- reserved1 CELL -- reserved2 CELL -- reserved3 f: GetVersion f: DefineClass f: FindClass f: FromReflectedMethod f: FromReflectedField f: ToReflectedMethod f: GetSuperclass f: IsAssignableFrom f: ToReflectedField f: Throw f: ThrowNew f: ExceptionOccurred f: ExceptionDescribe f: ExceptionClear f: FatalError f: PushLocalFrame f: PopLocalFrame f: NewGlobalRef f: DeleteGlobalRef f: DeleteLocalRef f: IsSameObject f: NewLocalRef f: EnsureLocalCapacity f: AllocObject f: NewObject f: NewObjectV f: NewObjectA f: GetObjectClass f: IsInstanceOf f: GetMethodID f: CallObjectMethod f: CallObjectMethodV f: CallObjectMethodA f: CallBooleanMethod f: CallBooleanMethodV f: CallBooleanMethodA f: CallByteMethod f: CallByteMethodV f: CallByteMethodA f: CallCharMethod f: CallCharMethodV f: CallCharMethodA f: CallShortMethod f: CallShortMethodV f: CallShortMethodA f: CallIntMethod f: CallIntMethodV f: CallIntMethodA f: CallLongMethod f: CallLongMethodV f: CallLongMethodA f: CallFloatMethod f: CallFloatMethodV f: CallFloatMethodA f: CallDoubleMethod f: CallDoubleMethodV f: CallDoubleMethodA f: CallVoidMethod f: CallVoidMethodV f: CallVoidMethodA f: CallNonvirtualObjectMethod f: CallNonvirtualObjectMethodV f: CallNonvirtualObjectMethodA f: CallNonvirtualBooleanMethod f: CallNonvirtualBooleanMethodV f: CallNonvirtualBooleanMethodA f: CallNonvirtualByteMethod f: CallNonvirtualByteMethodV f: CallNonvirtualByteMethodA f: CallNonvirtualCharMethod f: CallNonvirtualCharMethodV f: CallNonvirtualCharMethodA f: CallNonvirtualShortMethod f: CallNonvirtualShortMethodV f: CallNonvirtualShortMethodA f: CallNonvirtualIntMethod f: CallNonvirtualIntMethodV f: CallNonvirtualIntMethodA f: CallNonvirtualLongMethod f: CallNonvirtualLongMethodV f: CallNonvirtualLongMethodA f: CallNonvirtualFloatMethod f: CallNonvirtualFloatMethodV f: CallNonvirtualFloatMethodA f: CallNonvirtualDoubleMethod f: CallNonvirtualDoubleMethodV f: CallNonvirtualDoubleMethodA f: CallNonvirtualVoidMethod f: CallNonvirtualVoidMethodV f: CallNonvirtualVoidMethodA f: GetFieldID f: GetObjectField f: GetBooleanField f: GetByteField f: GetCharField f: GetShortField f: GetIntField f: GetLongField f: GetFloatField f: GetDoubleField f: SetObjectField f: SetBooleanField f: SetByteField f: SetCharField f: SetShortField f: SetIntField f: SetLongField f: SetFloatField f: SetDoubleField f: GetStaticMethodID f: CallStaticObjectMethod f: CallStaticObjectMethodV f: CallStaticObjectMethodA f: CallStaticBooleanMethod f: CallStaticBooleanMethodV f: CallStaticBooleanMethodA f: CallStaticByteMethod f: CallStaticByteMethodV f: CallStaticByteMethodA f: CallStaticCharMethod f: CallStaticCharMethodV f: CallStaticCharMethodA f: CallStaticShortMethod f: CallStaticShortMethodV f: CallStaticShortMethodA f: CallStaticIntMethod f: CallStaticIntMethodV f: CallStaticIntMethodA f: CallStaticLongMethod f: CallStaticLongMethodV f: CallStaticLongMethodA f: CallStaticFloatMethod f: CallStaticFloatMethodV f: CallStaticFloatMethodA f: CallStaticDoubleMethod f: CallStaticDoubleMethodV f: CallStaticDoubleMethodA f: CallStaticVoidMethod f: CallStaticVoidMethodV f: CallStaticVoidMethodA f: GetStaticFieldID f: GetStaticObjectField f: GetStaticBooleanField f: GetStaticByteField f: GetStaticCharField f: GetStaticShortField f: GetStaticIntField f: GetStaticLongField f: GetStaticFloatField f: GetStaticDoubleField f: SetStaticObjectField f: SetStaticBooleanField f: SetStaticByteField f: SetStaticCharField f: SetStaticShortField f: SetStaticIntField f: SetStaticLongField f: SetStaticFloatField f: SetStaticDoubleField f: NewString f: GetStringLength f: GetStringChars f: ReleaseStringChars f: NewStringUTF f: GetStringUTFLength f: GetStringUTFChars f: ReleaseStringUTFChars f: GetArrayLength f: NewObjectArray f: GetObjectArrayElement f: SetObjectArrayElement f: NewBooleanArray f: NewByteArray f: NewCharArray f: NewShortArray f: NewIntArray f: NewLongArray f: NewFloatArray f: NewDoubleArray f: GetBooleanArrayElements f: GetByteArrayElements f: GetCharArrayElements f: GetShortArrayElements f: GetIntArrayElements f: GetLongArrayElements f: GetFloatArrayElements f: GetDoubleArrayElements f: ReleaseBooleanArrayElements f: ReleaseByteArrayElements f: ReleaseCharArrayElements f: ReleaseShortArrayElements f: ReleaseIntArrayElements f: ReleaseLongArrayElements f: ReleaseFloatArrayElements f: ReleaseDoubleArrayElements f: GetBooleanArrayRegion f: GetByteArrayRegion f: GetCharArrayRegion f: GetShortArrayRegion f: GetIntArrayRegion f: GetLongArrayRegion f: GetFloatArrayRegion f: GetDoubleArrayRegion f: SetBooleanArrayRegion f: SetByteArrayRegion f: SetCharArrayRegion f: SetShortArrayRegion f: SetIntArrayRegion f: SetLongArrayRegion f: SetFloatArrayRegion f: SetDoubleArrayRegion f: RegisterNatives f: UnregisterNatives f: MonitorEnter f: MonitorExit f: GetJavaVM f: GetStringRegion f: GetStringUTFRegion f: GetPrimitiveArrayCritical f: ReleasePrimitiveArrayCritical f: GetStringCritical f: ReleaseStringCritical f: NewWeakGlobalRef f: DeleteWeakGlobalRef f: ExceptionCheck ;STRUCT STRUCT: JavaVMOption CELL -- optionString CELL -- extraInfo ;STRUCT STRUCT: JavaVMInitArgs CELL -- version CELL -- nOptions CELL -- options CELL -- ignoreUnrecognized ;STRUCT STRUCT: JavaVMAttachArgs CELL -- version CELL -- name CELL -- group ;STRUCT STRUCT: JavaVM CELL -- reserved0 CELL -- reserved1 CELL -- reserved2 f: DestroyJavaVM f: AttachCurrentThread f: DetachCurrentThread f: GetEnv ;STRUCT 0x00010001 CONSTANT JNI_VERSION_1_1 0x00010002 CONSTANT JNI_VERSION_1_2