Comparar commits
48 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 202cd0d45e | |||
| 1502db6095 | |||
| e8eea9e68e | |||
| 396eb9f283 | |||
| 378f400226 | |||
| 37e02dfbd5 | |||
| dce66ec8ec | |||
| 2fef67a08d | |||
| 50a17583c7 | |||
| bfe2c7df83 | |||
| b3186dde12 | |||
| 628a33eb76 | |||
| 4373e66b1e | |||
| 2e67b0ad9f | |||
| a4cbe0635f | |||
| 8563419280 | |||
| 0974bd4a90 | |||
| e1d47adc99 | |||
| e5e171d913 | |||
| 1e313227b8 | |||
| 8d45a9e0cd | |||
| 95568d76d3 | |||
| d4a3442468 | |||
| e262de22ea | |||
| 49243f1891 | |||
| 1a099ba549 | |||
| 2367133b4f | |||
| c648a1933d | |||
| 598acf08da | |||
| 208a8dee90 | |||
| e9fb299565 | |||
| 17a514ecd0 | |||
| 38ac62cedd | |||
| ce280731af | |||
| 751fb57f71 | |||
| be7d90abbf | |||
| d59585dd4f | |||
| 7a695707a2 | |||
| 4e590c9450 | |||
| b069d1c9e9 | |||
| 9fa1f7b981 | |||
| 4a68e4cd9d | |||
| 8320b6fd7c | |||
| e40cf0a1c4 | |||
| 19106985d7 | |||
| 3d817c54da | |||
| ca31877107 | |||
| f5f9afefb0 |
+20
-16
@@ -18,10 +18,12 @@
|
||||
* get system process information, basic process control
|
||||
* additional file utilities (meta info, free space, etc)
|
||||
* enforce window minimum/maximum size (workaround java bug)
|
||||
* OSX ObjC access (see rococoa)
|
||||
|
||||
# TODO
|
||||
|
||||
* fix setFieldOrder to *always* apply if used
|
||||
* cache structure information
|
||||
|
||||
* make direct calls call back *once* to Java where conversion is required,
|
||||
and process all arguments from there (instead of potentially swapping back
|
||||
and forth multipel times). This also makes it easer to perform conversions
|
||||
@@ -39,11 +41,7 @@
|
||||
* make native dll extraction from jar public, to use with user dlls packaged
|
||||
in a jar
|
||||
|
||||
* Callback.PostCallWrite.write() cf PostCallRead; do Structure.write for any
|
||||
arguments as well
|
||||
|
||||
* pointer.setValue(), to handle NativeMapped types and move read/writeValue
|
||||
methods out of Structure, to be used by Function w/NativeMapped[] parameter
|
||||
* Callback.PostCallWrite.write() cf PostCallRead
|
||||
|
||||
* GetPrimitiveArrayCritical: use this if flagged (by annotation? method name?)
|
||||
|
||||
@@ -53,7 +51,7 @@
|
||||
|
||||
Requires separate compilation of annotation handling.
|
||||
|
||||
* ditch type conversion context.
|
||||
* ditch type conversion context (?)
|
||||
|
||||
* packaging: 'types', 'convert/marshal' subpackages?
|
||||
note: marshal/unmarshal vs to/fromnative: to/fromnative is more
|
||||
@@ -93,6 +91,21 @@
|
||||
"pointer-requiring-free" (which is just Memory). For now, leave it up to
|
||||
the user to manage the pointer, since they have to define the free method
|
||||
anyway. use could always put a finalizer on a PointerType-derived type.
|
||||
* universal GCC build w/cross-compile (needs cross compilers...)
|
||||
* return Pointer.SIZE/LONG_SIZE/WCHAR_SIZE in bits (for consistency with 1.5)
|
||||
Long.SIZE, Integer.SIZE, et al.
|
||||
* interface "lvalue", which can provide a pointer to itself (reference() or
|
||||
addressOf())?
|
||||
* bitfields for structs (how?)
|
||||
|
||||
|
||||
# DONE
|
||||
* check Structure "final" fields; should never write back to native memory
|
||||
* OSX ObjC access (see rococoa)
|
||||
* do Structure.write for any callback args
|
||||
* pointer.setValue(), to handle NativeMapped types and move read/writeValue
|
||||
methods out of Structure, to be used by Function w/NativeMapped[] parameter
|
||||
|
||||
* if method has "GetLastErrorException/ErrnoException" in its signature, use
|
||||
result codes + GetLastError/errno/errstr to auto-generate
|
||||
runtime exceptions? (cf P/Invoke; also useful for X11 return types)
|
||||
@@ -104,15 +117,6 @@
|
||||
if nonzero ?
|
||||
o otherwise, need an ExceptionOnZero, ExceptionOnNonZero runtime, from which
|
||||
derive GetLastError/ErrnoExceptionOnZero/NZ
|
||||
* universal GCC build w/cross-compile (needs cross compilers...)
|
||||
* return Pointer.SIZE/LONG_SIZE/WCHAR_SIZE in bits (for consistency with 1.5)
|
||||
Long.SIZE, Integer.SIZE, et al.
|
||||
* interface "lvalue", which can provide a pointer to itself (reference() or
|
||||
addressOf())?
|
||||
* bitfields for structs (how?)
|
||||
|
||||
|
||||
# DONE
|
||||
* verify get/set methods vs read/write for performance (Pointer)?
|
||||
(see RawTest for performance comparisons)
|
||||
* Allow Buffer in Structures (and callbacks) (auto-wrap in direct byte buffer)?
|
||||
|
||||
+14
-6
@@ -34,13 +34,13 @@
|
||||
<!-- JNA library release version -->
|
||||
<property name="jna.major" value="3"/>
|
||||
<property name="jna.minor" value="2"/>
|
||||
<property name="jna.revision" value="1"/>
|
||||
<property name="jna.revision" value="4"/>
|
||||
<property name="jna.build" value="${build.number}"/>
|
||||
<property name="jna.version" value="${jna.major}.${jna.minor}.${jna.revision}"/>
|
||||
<!-- jnidispatch library release version -->
|
||||
<property name="jni.major" value="3"/>
|
||||
<property name="jni.minor" value="2"/>
|
||||
<property name="jni.revision" value="0"/>
|
||||
<property name="jni.revision" value="1"/>
|
||||
<property name="jni.build" value="${build.number}"/>
|
||||
<property name="jni.version" value="${jni.major}.${jni.minor}.${jni.revision}"/>
|
||||
<property name="jni.md5" value="c870290c36c8d3fdf85db7c782febc3f"/>
|
||||
@@ -49,7 +49,7 @@
|
||||
<property name="spec.version" value="${jna.major}"/>
|
||||
<property name="impl.title" value="com.sun.jna"/>
|
||||
<property name="impl.vendor" value="${spec.vendor}"/>
|
||||
<property name="impl.version" value="${jna.version} b${jna.build}"/>
|
||||
<property name="impl.version" value="${jna.version} (b${jna.build})"/>
|
||||
|
||||
<property name="compatibility" value="1.4"/>
|
||||
<property name="test.compatibility" value="1.5"/>
|
||||
@@ -74,6 +74,9 @@
|
||||
<replaceregexp match="(<version>).*(</version>)"
|
||||
replace="\1${jna.version}\2"
|
||||
file="pom.xml"/>
|
||||
<replaceregexp match='VERSION = ".*";'
|
||||
replace='VERSION = "${jna.version}";'
|
||||
file="src/com/sun/jna/Native.java"/>
|
||||
|
||||
<condition property="jar.omitted" value="**/*jnidispatch*" else="jnilib-included">
|
||||
<isset property="omit-jnilib"/>
|
||||
@@ -272,6 +275,7 @@
|
||||
<copy file="${dist}/out-of-date.jar" tofile="${dist}/win32-amd64.jar" overwrite="true"/>
|
||||
<copy file="${dist}/out-of-date.jar" tofile="${dist}/linux-i386.jar" overwrite="true"/>
|
||||
<copy file="${dist}/out-of-date.jar" tofile="${dist}/linux-amd64.jar" overwrite="true"/>
|
||||
<copy file="${dist}/out-of-date.jar" tofile="${dist}/linux-ia64.jar" overwrite="true"/>
|
||||
<copy file="${dist}/out-of-date.jar" tofile="${dist}/freebsd-i386.jar" overwrite="true"/>
|
||||
<copy file="${dist}/out-of-date.jar" tofile="${dist}/freebsd-amd64.jar" overwrite="true"/>
|
||||
<copy file="${dist}/out-of-date.jar" tofile="${dist}/openbsd-i386.jar" overwrite="true"/>
|
||||
@@ -567,6 +571,9 @@
|
||||
<zipfileset src="${dist}/linux-amd64.jar"
|
||||
includes="*jnidispatch*"
|
||||
prefix="com/sun/jna/linux-amd64"/>
|
||||
<zipfileset src="${dist}/linux-ia64.jar"
|
||||
includes="*jnidispatch*"
|
||||
prefix="com/sun/jna/linux-ia64"/>
|
||||
<zipfileset src="${dist}/sunos-x86.jar"
|
||||
includes="*jnidispatch*"
|
||||
prefix="com/sun/jna/sunos-x86"/>
|
||||
@@ -601,7 +608,7 @@
|
||||
<zip zipfile="${dist}/doc.zip">
|
||||
<zipfileset dir="${javadoc}" prefix="javadoc"/>
|
||||
</zip>
|
||||
<!-- JNA sources only, for use in Linux build from source -->
|
||||
<!-- JNA sources only, for use in Linux build from source/shared libffi -->
|
||||
<zip zipfile="${dist}/src.zip">
|
||||
<zipfileset dir="." includes="build.xml,LICENSE.txt"/>
|
||||
<zipfileset dir="${src}" includes="**/*.java" prefix="src"/>
|
||||
@@ -611,14 +618,14 @@
|
||||
<!-- Full sources required to build and test everything -->
|
||||
<zip zipfile="${dist}/src-full.zip">
|
||||
<zipfileset src="${dist}/src.zip"/>
|
||||
<zipfileset dir="lib" includes="junit.jar" prefix="lib"/>
|
||||
<zipfileset dir="lib" includes="junit.jar,clover.jar" prefix="lib"/>
|
||||
<zipfileset dir="." includes=".classpath,.project"/>
|
||||
<zipfileset dir="nbproject" includes="**/*" prefix="nbproject"/>
|
||||
<zipfileset dir="${native}" includes="libffi,libffi/**/*" prefix="native"/>
|
||||
</zip>
|
||||
<!-- Sources package as required by maven -->
|
||||
<zip zipfile="${dist}/src-mvn.zip">
|
||||
<zipfileset dir="${src}" includes="**/*.jar,**/*.html,**/*.png"/>
|
||||
<zipfileset dir="${src}" includes="**/*.java,**/*.html,**/*.png"/>
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
@@ -627,6 +634,7 @@
|
||||
<fileset dir="${build}"/>
|
||||
</delete>
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir=".clover"/>
|
||||
<fileset dir="${javadoc}"/>
|
||||
<fileset dir="." includes="*~,**/*~"/>
|
||||
</delete>
|
||||
|
||||
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
@@ -27,7 +27,7 @@ OS=$(shell uname | sed -e 's/\(CYGWIN\|MINGW32\).*/win32/g' \
|
||||
-e 's/Darwin.*/darwin/g' \
|
||||
-e 's/Linux.*/linux/g')
|
||||
|
||||
VERSION=3.2.0 # auto-generated by ant
|
||||
VERSION=3.2.1 # auto-generated by ant
|
||||
CHECKSUM=c870290c36c8d3fdf85db7c782febc3f # auto-generated by ant
|
||||
|
||||
JAVA_INCLUDES=-I"$(JAVA_HOME)/include" \
|
||||
|
||||
+98
-93
@@ -1805,7 +1805,7 @@ getArrayComponentType(JNIEnv *env, jobject obj) {
|
||||
|
||||
static void*
|
||||
getBufferArray(JNIEnv* env, jobject buf,
|
||||
jobject* arrayp, void **elemp,
|
||||
jobject* arrayp, void **basep,
|
||||
void **releasep) {
|
||||
void *ptr = NULL;
|
||||
int offset = 0;
|
||||
@@ -1846,7 +1846,7 @@ do { \
|
||||
GET_ARRAY(Double, 8);
|
||||
}
|
||||
if (ptr != NULL) {
|
||||
if (elemp) *elemp = ptr;
|
||||
if (basep) *basep = ptr;
|
||||
if (arrayp) *arrayp = array;
|
||||
ptr = (char *)ptr + offset;
|
||||
}
|
||||
@@ -2581,106 +2581,111 @@ method_handler(ffi_cif* cif, void* volatile resp, void** argp, void *cdata) {
|
||||
|
||||
if (data->flags) {
|
||||
objects = alloca(data->cif.nargs * sizeof(void*));
|
||||
memset(objects, 0, data->cif.nargs * sizeof(void*));
|
||||
release = alloca(data->cif.nargs * sizeof(release_t));
|
||||
memset(release, 0, data->cif.nargs * sizeof(release_t));
|
||||
elems = alloca(data->cif.nargs * sizeof(void*));
|
||||
for (i=0;i < data->cif.nargs;i++) {
|
||||
if (data->flags[i] != CVT_DEFAULT) {
|
||||
if (data->arg_types[i]->type == FFI_TYPE_POINTER
|
||||
&& *(void **)args[i] == NULL) continue;
|
||||
switch(data->flags[i]) {
|
||||
case CVT_INTEGER_TYPE:
|
||||
{
|
||||
jlong value = getIntegerTypeValue(env, *(void **)args[i]);
|
||||
if (cif->arg_types[i+2]->size < data->cif.arg_types[i]->size) {
|
||||
args[i] = alloca(data->cif.arg_types[i]->size);
|
||||
}
|
||||
if (data->cif.arg_types[i]->size > sizeof(ffi_arg)) {
|
||||
*(jlong *)args[i] = value;
|
||||
}
|
||||
else {
|
||||
*(ffi_arg *)args[i] = (ffi_arg)value;
|
||||
if (data->flags[i] == CVT_DEFAULT) {
|
||||
continue;
|
||||
}
|
||||
if (data->arg_types[i]->type == FFI_TYPE_POINTER
|
||||
&& *(void **)args[i] == NULL) {
|
||||
continue;
|
||||
}
|
||||
switch(data->flags[i]) {
|
||||
case CVT_INTEGER_TYPE:
|
||||
{
|
||||
jlong value = getIntegerTypeValue(env, *(void **)args[i]);
|
||||
if (cif->arg_types[i+2]->size < data->cif.arg_types[i]->size) {
|
||||
args[i] = alloca(data->cif.arg_types[i]->size);
|
||||
}
|
||||
if (data->cif.arg_types[i]->size > sizeof(ffi_arg)) {
|
||||
*(jlong *)args[i] = value;
|
||||
}
|
||||
else {
|
||||
*(ffi_arg *)args[i] = (ffi_arg)value;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CVT_POINTER_TYPE:
|
||||
*(void **)args[i] = getPointerTypeAddress(env, *(void **)args[i]);
|
||||
break;
|
||||
case CVT_TYPE_MAPPER:
|
||||
{
|
||||
void* valuep = args[i];
|
||||
int jtype = get_jtype_from_ffi_type(data->closure_cif.arg_types[i+2]);
|
||||
jobject obj = jtype == '*'
|
||||
? *(void **)valuep
|
||||
: new_object(env, (char)jtype, valuep, JNI_FALSE);
|
||||
if (cif->arg_types[i+2]->size < data->cif.arg_types[i]->size) {
|
||||
args[i] = alloca(data->cif.arg_types[i]->size);
|
||||
}
|
||||
toNativeTypeMapped(env, obj, args[i],
|
||||
data->cif.arg_types[i]->size,
|
||||
data->to_native[i]);
|
||||
}
|
||||
break;
|
||||
case CVT_NATIVE_MAPPED:
|
||||
toNative(env, *(void **)args[i], args[i], data->cif.arg_types[i]->size, JNI_FALSE);
|
||||
break;
|
||||
case CVT_POINTER:
|
||||
*(void **)args[i] = getNativeAddress(env, *(void **)args[i]);
|
||||
break;
|
||||
case CVT_STRUCTURE:
|
||||
objects[i] = *(void **)args[i];
|
||||
writeStructure(env, *(void **)args[i]);
|
||||
*(void **)args[i] = getStructureAddress(env, *(void **)args[i]);
|
||||
break;
|
||||
case CVT_STRUCTURE_BYVAL:
|
||||
objects[i] = *(void **)args[i];
|
||||
writeStructure(env, objects[i]);
|
||||
args[i] = getStructureAddress(env, objects[i]);
|
||||
break;
|
||||
case CVT_STRING:
|
||||
*(void **)args[i] = newCStringEncoding(env, (jstring)*(void **)args[i], jna_encoding);
|
||||
break;
|
||||
case CVT_WSTRING:
|
||||
{
|
||||
jstring s = (*env)->CallObjectMethod(env, *(void **)args[i], MID_Object_toString);
|
||||
*(void **)args[i] = newWideCString(env, s);
|
||||
}
|
||||
break;
|
||||
case CVT_CALLBACK:
|
||||
*(void **)args[i] = getCallbackAddress(env, *(void **)args[i]);
|
||||
break;
|
||||
case CVT_BUFFER:
|
||||
{
|
||||
void *ptr = (*env)->GetDirectBufferAddress(env, *(void **)args[i]);
|
||||
if (ptr != NULL) {
|
||||
objects[i] = NULL;
|
||||
release[i] = NULL;
|
||||
}
|
||||
else {
|
||||
ptr = getBufferArray(env, *(jobject *)args[i], (jobject *)&objects[i], &elems[i], (void**)&release[i]);
|
||||
if (ptr == NULL) {
|
||||
throw_type = EIllegalArgument;
|
||||
throw_msg = "Buffer arguments must be direct or have a primitive backing array";
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CVT_POINTER_TYPE:
|
||||
*(void **)args[i] = getPointerTypeAddress(env, *(void **)args[i]);
|
||||
break;
|
||||
case CVT_TYPE_MAPPER:
|
||||
{
|
||||
void* valuep = args[i];
|
||||
int jtype = get_jtype_from_ffi_type(data->closure_cif.arg_types[i+2]);
|
||||
jobject obj = jtype == '*'
|
||||
? *(void **)valuep
|
||||
: new_object(env, (char)jtype, valuep, JNI_FALSE);
|
||||
if (cif->arg_types[i+2]->size < data->cif.arg_types[i]->size) {
|
||||
args[i] = alloca(data->cif.arg_types[i]->size);
|
||||
}
|
||||
toNativeTypeMapped(env, obj, args[i],
|
||||
data->cif.arg_types[i]->size,
|
||||
data->to_native[i]);
|
||||
}
|
||||
break;
|
||||
case CVT_NATIVE_MAPPED:
|
||||
toNative(env, *(void **)args[i], args[i], data->cif.arg_types[i]->size, JNI_FALSE);
|
||||
break;
|
||||
case CVT_POINTER:
|
||||
*(void **)args[i] = getNativeAddress(env, *(void **)args[i]);
|
||||
break;
|
||||
case CVT_STRUCTURE:
|
||||
objects[i] = *(void **)args[i];
|
||||
writeStructure(env, *(void **)args[i]);
|
||||
*(void **)args[i] = getStructureAddress(env, *(void **)args[i]);
|
||||
break;
|
||||
case CVT_STRUCTURE_BYVAL:
|
||||
objects[i] = *(void **)args[i];
|
||||
writeStructure(env, objects[i]);
|
||||
args[i] = getStructureAddress(env, objects[i]);
|
||||
break;
|
||||
case CVT_STRING:
|
||||
*(void **)args[i] = newCStringEncoding(env, (jstring)*(void **)args[i], jna_encoding);
|
||||
break;
|
||||
case CVT_WSTRING:
|
||||
{
|
||||
jstring s = (*env)->CallObjectMethod(env, *(void **)args[i], MID_Object_toString);
|
||||
*(void **)args[i] = newWideCString(env, s);
|
||||
}
|
||||
break;
|
||||
case CVT_CALLBACK:
|
||||
*(void **)args[i] = getCallbackAddress(env, *(void **)args[i]);
|
||||
break;
|
||||
case CVT_BUFFER:
|
||||
{
|
||||
void *ptr = (*env)->GetDirectBufferAddress(env, *(void **)args[i]);
|
||||
if (ptr != NULL) {
|
||||
objects[i] = NULL;
|
||||
release[i] = NULL;
|
||||
}
|
||||
else {
|
||||
ptr = getBufferArray(env, *(jobject *)args[i], (jobject *)&objects[i], &elems[i], (void**)&release[i]);
|
||||
if (ptr == NULL) {
|
||||
throw_type = EIllegalArgument;
|
||||
throw_msg = "Buffer arguments must be direct or have a primitive backing array";
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
*(void **)args[i] = ptr;
|
||||
}
|
||||
break;
|
||||
#define ARRAY(Type) \
|
||||
*(void **)args[i] = ptr;
|
||||
}
|
||||
break;
|
||||
#define ARRAY(Type) \
|
||||
do { \
|
||||
objects[i] = *(void **)args[i]; \
|
||||
release[i] = (void *)(*env)->Release##Type##ArrayElements; \
|
||||
elems[i] = *(void **)args[i] = (*env)->Get##Type##ArrayElements(env, objects[i], NULL); } while(0)
|
||||
case CVT_ARRAY_BYTE: ARRAY(Byte); break;
|
||||
case CVT_ARRAY_SHORT: ARRAY(Short); break;
|
||||
case CVT_ARRAY_CHAR: ARRAY(Char); break;
|
||||
case CVT_ARRAY_INT: ARRAY(Int); break;
|
||||
case CVT_ARRAY_LONG: ARRAY(Long); break;
|
||||
case CVT_ARRAY_FLOAT: ARRAY(Float); break;
|
||||
case CVT_ARRAY_DOUBLE: ARRAY(Double); break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
case CVT_ARRAY_BYTE: ARRAY(Byte); break;
|
||||
case CVT_ARRAY_SHORT: ARRAY(Short); break;
|
||||
case CVT_ARRAY_CHAR: ARRAY(Char); break;
|
||||
case CVT_ARRAY_INT: ARRAY(Int); break;
|
||||
case CVT_ARRAY_LONG: ARRAY(Long); break;
|
||||
case CVT_ARRAY_FLOAT: ARRAY(Float); break;
|
||||
case CVT_ARRAY_DOUBLE: ARRAY(Double); break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,6 +712,24 @@ fillInt64Buffer(int64_t *buf, int len, int64_t value) {
|
||||
return len;
|
||||
}
|
||||
|
||||
EXPORT int32_t
|
||||
fillFloatBuffer(float *buf, int len, float value) {
|
||||
int i;
|
||||
for (i=0;i < len;i++) {
|
||||
buf[i] = value;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
EXPORT int32_t
|
||||
fillDoubleBuffer(double *buf, int len, double value) {
|
||||
int i;
|
||||
for (i=0;i < len;i++) {
|
||||
buf[i] = value;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
EXPORT int32_t
|
||||
addInt32VarArgs(const char *fmt, ...) {
|
||||
va_list ap;
|
||||
|
||||
+700
-627
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,9 +1,9 @@
|
||||
build.xml.data.CRC32=c09e9b0e
|
||||
build.xml.script.CRC32=6f0d9f8d
|
||||
build.xml.stylesheet.CRC32=240b97a2
|
||||
nbproject/build-impl.xml.data.CRC32=c09e9b0e
|
||||
nbproject/build-impl.xml.script.CRC32=ee8cb023
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
|
||||
nbproject/profiler-build-impl.xml.data.CRC32=c09e9b0e
|
||||
nbproject/profiler-build-impl.xml.script.CRC32=abda56ed
|
||||
nbproject/profiler-build-impl.xml.stylesheet.CRC32=42cb6bcf
|
||||
build.xml.data.CRC32=c09e9b0e
|
||||
build.xml.script.CRC32=6f0d9f8d
|
||||
build.xml.stylesheet.CRC32=240b97a2
|
||||
nbproject/build-impl.xml.data.CRC32=c09e9b0e
|
||||
nbproject/build-impl.xml.script.CRC32=9f8ee9a2
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=5c621a33@1.26.1.45
|
||||
nbproject/profiler-build-impl.xml.data.CRC32=c09e9b0e
|
||||
nbproject/profiler-build-impl.xml.script.CRC32=abda56ed
|
||||
nbproject/profiler-build-impl.xml.stylesheet.CRC32=42cb6bcf
|
||||
|
||||
@@ -1,58 +1,67 @@
|
||||
application.args=
|
||||
build.classes.dir=${build.dir}/classes
|
||||
build.classes.excludes=**/*.java,**/*.form
|
||||
# This directory is removed when the project is cleaned:
|
||||
build.dir=build
|
||||
build.generated.dir=${build.dir}/generated
|
||||
# Only compile against the classpath explicitly listed here:
|
||||
build.sysclasspath=ignore
|
||||
build.test.classes.dir=${build.dir}/test/classes
|
||||
build.test.results.dir=${build.dir}/test/results
|
||||
debug.classpath=\
|
||||
${run.classpath}
|
||||
debug.test.classpath=\
|
||||
${run.test.classpath}
|
||||
# This directory is removed when the project is cleaned:
|
||||
dist.dir=dist
|
||||
dist.jar=${dist.dir}/jna.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
excludes=
|
||||
file.reference.jnalib-src=src
|
||||
includes=**
|
||||
jar.compress=false
|
||||
javac.classpath=
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=-Xlint:unchecked
|
||||
javac.deprecation=false
|
||||
javac.source=1.5
|
||||
javac.target=1.5
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}:\
|
||||
${libs.junit.classpath}}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
main.class=
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
# Space-separated list of JVM arguments used when running the project
|
||||
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
|
||||
# or test-sys-prop.name=value to set system properties for unit tests):
|
||||
run.jvmargs=-Djava.library.path=./native/testlib/Debug;./native/jnidispatch/Debug
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
src.dir=${file.reference.jnalib-src}
|
||||
test.src.dir=test
|
||||
application.args=
|
||||
application.title=JNA Library
|
||||
application.vendor=twall
|
||||
build.classes.dir=${build.dir}/classes
|
||||
build.classes.excludes=**/*.java,**/*.form
|
||||
# This directory is removed when the project is cleaned:
|
||||
build.dir=build
|
||||
build.generated.dir=${build.dir}/generated
|
||||
build.generated.sources.dir=${build.dir}/generated-sources
|
||||
# Only compile against the classpath explicitly listed here:
|
||||
build.sysclasspath=ignore
|
||||
build.test.classes.dir=${build.dir}/test/classes
|
||||
build.test.results.dir=${build.dir}/test/results
|
||||
debug.classpath=\
|
||||
${run.classpath}
|
||||
debug.test.classpath=\
|
||||
${run.test.classpath}
|
||||
# This directory is removed when the project is cleaned:
|
||||
dist.dir=dist
|
||||
dist.jar=${dist.dir}/jna.jar
|
||||
dist.javadoc.dir=${dist.dir}/javadoc
|
||||
excludes=
|
||||
file.reference.jnalib-src=src
|
||||
includes=**
|
||||
jar.compress=false
|
||||
javac.classpath=
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=-Xlint:unchecked
|
||||
javac.deprecation=false
|
||||
javac.source=1.5
|
||||
javac.target=1.5
|
||||
javac.test.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}:\
|
||||
${libs.junit.classpath}
|
||||
javadoc.additionalparam=
|
||||
javadoc.author=false
|
||||
javadoc.encoding=
|
||||
javadoc.noindex=false
|
||||
javadoc.nonavbar=false
|
||||
javadoc.notree=false
|
||||
javadoc.private=false
|
||||
javadoc.splitindex=true
|
||||
javadoc.use=true
|
||||
javadoc.version=false
|
||||
javadoc.windowtitle=
|
||||
jnlp.codebase.type=local
|
||||
jnlp.codebase.url=file:/Users/twall/ws/jna-release/dist/
|
||||
jnlp.descriptor=application
|
||||
jnlp.enabled=false
|
||||
jnlp.offline-allowed=false
|
||||
jnlp.signed=false
|
||||
main.class=
|
||||
meta.inf.dir=${src.dir}/META-INF
|
||||
platform.active=default_platform
|
||||
run.classpath=\
|
||||
${javac.classpath}:\
|
||||
${build.classes.dir}
|
||||
# Space-separated list of JVM arguments used when running the project
|
||||
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
|
||||
# or test-sys-prop.name=value to set system properties for unit tests):
|
||||
run.jvmargs=-Djna.library.path=./build/native
|
||||
run.test.classpath=\
|
||||
${javac.test.classpath}:\
|
||||
${build.test.classes.dir}
|
||||
src.dir=${file.reference.jnalib-src}
|
||||
test.src.dir=test
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.java.j2seproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>JNA Library</name>
|
||||
<minimum-ant-version>1.6.5</minimum-ant-version>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots>
|
||||
<root id="test.src.dir"/>
|
||||
</test-roots>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.java.j2seproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||
<name>JNA Library</name>
|
||||
<minimum-ant-version>1.6.5</minimum-ant-version>
|
||||
<source-roots>
|
||||
<root id="src.dir"/>
|
||||
</source-roots>
|
||||
<test-roots>
|
||||
<root id="test.src.dir"/>
|
||||
</test-roots>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
+1
-2
@@ -6,7 +6,7 @@
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>3.2.1</version>
|
||||
<version>3.2.4</version>
|
||||
<name>Java Native Access</name>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -33,7 +33,6 @@
|
||||
<tasks>
|
||||
<!--<ant dir="." target="dist" />-->
|
||||
<attachArtifact file="dist/jna.jar" />
|
||||
<attachArtifact file="dist/examples.jar" />
|
||||
<attachArtifact file="dist/src-mvn.zip" classifier="sources" type="jar"/>
|
||||
</tasks>
|
||||
</configuration>
|
||||
|
||||
@@ -1,4 +1,49 @@
|
||||
<a name="top"></a>
|
||||
<h2>Release 3.2.4</h2>
|
||||
<b>Features</b><br>
|
||||
<ul>
|
||||
<li>Make Pointer ctor public.
|
||||
<li>Provide access to Function objects for arbitrary Pointer values.
|
||||
<li>Add linux/ia64 binaries (bpiwowar). See <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=134">issue 134 patch</a>.
|
||||
</ul>
|
||||
<b>Bug Fixes</b><br>
|
||||
<ul>
|
||||
<li>Use a more robust method to decode a file-based URL (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=135">issue 135</a>).
|
||||
</ul>
|
||||
<h2>Release 3.2.3</h2>
|
||||
<b>Features</b><br>
|
||||
<ul>
|
||||
<li>Include version information in code in case package information lost.
|
||||
</ul>
|
||||
<b>Bug Fixes</b><br>
|
||||
<ul>
|
||||
<li>Fix WindowUtils exception on mouse over TrayIcon.
|
||||
<li>Fix bug toggling windows transparent/opaque (win32/OSX).
|
||||
<li>Avoid overwriting unchanged Pointer values in arrays (function calls with Pointer[] and Structure.read).
|
||||
<li>Ensure Structure fields marked <code>final</code> are never written.
|
||||
<li>Fix bug preventing proper population Structure.ByReference fields on Structure read.
|
||||
<li>Ensure double buffering is disabled in components added to a transparent window.
|
||||
<li>Fix UnsatisfiedLinkError attempting to load system libraries under Web Start.
|
||||
<li>Fix loading Web Start-provided libraries on OSX (libraries must have a .jnilib suffix under Web Start).
|
||||
<li>Properly include sources in Maven zip file (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=129">Issue 129</a>).
|
||||
</ul>
|
||||
<h2>Release 3.2.2</h2>
|
||||
<b>Features</b><br>
|
||||
<ul>
|
||||
<li>Provide length-specified Pointer.getStringArray()
|
||||
</ul>
|
||||
<b>Bug Fixes</b><br>
|
||||
<ul>
|
||||
<li>Fix crash with direct mapping if NULL struct* used (<a href="https://jna.dev.java.net/issues/show_bug.cgi?id=125">Issue 125</a>).
|
||||
<li>Fix case where null-valued Structure fields would get non-null values on
|
||||
write.
|
||||
<li>Synch callback Structure/Structure[] arguments on callback return.
|
||||
<li>Fix NPE when mapping an interface to the current process.
|
||||
<li>Automatically load proper C library version from current process on Linux
|
||||
(avoids crashing bug on Ubuntu with libc-i686 packages active).
|
||||
<li>Avoid scanning structure contents in Structure.toString if contents aren't
|
||||
actually used.
|
||||
</ul>
|
||||
<h2>Release 3.2.1</h2>
|
||||
<b>Features</b><br>
|
||||
<ul>
|
||||
|
||||
@@ -393,6 +393,14 @@ class CallbackReference extends WeakReference {
|
||||
Native.getCallbackExceptionHandler().uncaughtException(cb, e.getTargetException());
|
||||
}
|
||||
}
|
||||
// Synch any structure arguments back to native memory
|
||||
for (int i=0;i < callbackArgs.length;i++) {
|
||||
if (callbackArgs[i] instanceof Structure
|
||||
&& !(callbackArgs[i] instanceof Structure.ByValue)) {
|
||||
((Structure)callbackArgs[i]).autoWrite();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
/** Called from native code. All arguments are in an array of
|
||||
|
||||
@@ -19,10 +19,22 @@ import java.util.Map;
|
||||
* An abstraction for a native function pointer. An instance of
|
||||
* <code>Function</code> represents a pointer to some native function.
|
||||
* {@link #invoke(Class,Object[],Map)} is the primary means to call
|
||||
* the function.
|
||||
* the function. <p/>
|
||||
* <a name=callflags></a>
|
||||
* Function call behavior may be modified by passing one of the following call
|
||||
* flags:
|
||||
* <ul>
|
||||
* <li>{@link Function#C_CONVENTION} Use C calling convention (default)
|
||||
* <li>{@link Function#ALT_CONVENTION} Use alternate calling convention (e.g. stdcall)
|
||||
* <li>{@link Function#THROW_LAST_ERROR} Throw a {@link LastErrorException} if
|
||||
* the native function sets the system error to a non-zero value (errno or
|
||||
* GetLastError). Setting this flag will cause the system error to be cleared
|
||||
* prior to native function invocation.
|
||||
* </ul>
|
||||
*
|
||||
* @author Sheng Liang, originator
|
||||
* @author Todd Fast, suitability modifications
|
||||
* @author Timothy Wall
|
||||
* @see Pointer
|
||||
*/
|
||||
public class Function extends Pointer {
|
||||
@@ -73,18 +85,18 @@ public class Function extends Pointer {
|
||||
|
||||
/**
|
||||
* Obtain a <code>Function</code> representing a native
|
||||
* function that follows a given calling convention.
|
||||
* function.
|
||||
*
|
||||
* <p>The allocated instance represents a pointer to the named native
|
||||
* function from the named library, called with the named calling
|
||||
* convention.
|
||||
* function from the named library.
|
||||
*
|
||||
* @param libraryName
|
||||
* Library in which to find the function
|
||||
* @param functionName
|
||||
* Name of the native function to be linked with
|
||||
* @param callFlags
|
||||
* Call convention used by the native function
|
||||
* Function <a href="#callflags">call flags</a>
|
||||
*
|
||||
* @throws {@link UnsatisfiedLinkError} if the library is not found or
|
||||
* the given function name is not found within the library.
|
||||
*/
|
||||
@@ -92,8 +104,41 @@ public class Function extends Pointer {
|
||||
return NativeLibrary.getInstance(libraryName).getFunction(functionName, callFlags);
|
||||
}
|
||||
|
||||
// Keep a reference to the NativeLibrary so it does not get garbage collected
|
||||
// until the function is
|
||||
/**
|
||||
* Obtain a <code>Function</code> representing a native
|
||||
* function pointer. In general, this function should be used by dynamic
|
||||
* languages; Java code should allow JNA to bind to a specific Callback
|
||||
* interface instead by defining a return type or Structure field type.
|
||||
*
|
||||
* <p>The allocated instance represents a pointer to the native
|
||||
* function pointer.
|
||||
*
|
||||
* @param p Native function pointer
|
||||
*/
|
||||
public static Function getFunction(Pointer p) {
|
||||
return getFunction(p, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain a <code>Function</code> representing a native
|
||||
* function pointer. In general, this function should be used by dynamic
|
||||
* languages; Java code should allow JNA to bind to a specific Callback
|
||||
* interface instead by defining a return type or Structure field type.
|
||||
*
|
||||
* <p>The allocated instance represents a pointer to the native
|
||||
* function pointer.
|
||||
*
|
||||
* @param p
|
||||
* Native function pointer
|
||||
* @param callFlags
|
||||
* Function <a href="#callflags">call flags</a>
|
||||
*/
|
||||
public static Function getFunction(Pointer p, int callFlags) {
|
||||
return new Function(p, callFlags);
|
||||
}
|
||||
|
||||
// Keep a reference to the NativeLibrary so it does not get garbage
|
||||
// collected until the function is
|
||||
private NativeLibrary library;
|
||||
private final String functionName;
|
||||
int callFlags;
|
||||
@@ -115,7 +160,7 @@ public class Function extends Pointer {
|
||||
* @param functionName
|
||||
* Name of the native function to be linked with
|
||||
* @param callFlags
|
||||
* Calling convention used by the native function
|
||||
* Function <a href="#callflags">call flags</a>
|
||||
* @throws {@link UnsatisfiedLinkError} if the given function name is
|
||||
* not found within the library.
|
||||
*/
|
||||
@@ -148,7 +193,7 @@ public class Function extends Pointer {
|
||||
* @param functionAddress
|
||||
* Address of the native function
|
||||
* @param callFlags
|
||||
* Calling convention used by the native function
|
||||
* Function <a href="#callflags">call flags</a>
|
||||
*/
|
||||
Function(Pointer functionAddress, int callFlags) {
|
||||
checkCallingConvention(callFlags & MASK_CC);
|
||||
@@ -268,10 +313,7 @@ public class Function extends Pointer {
|
||||
}
|
||||
}
|
||||
else if (Structure[].class.isAssignableFrom(inArg.getClass())) {
|
||||
Structure[] ss = (Structure[])inArg;
|
||||
for (int si=0;si < ss.length;si++) {
|
||||
ss[si].autoRead();
|
||||
}
|
||||
Structure.autoRead((Structure[])inArg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -495,18 +537,8 @@ public class Function extends Pointer {
|
||||
return ss[0].getPointer();
|
||||
}
|
||||
else {
|
||||
Pointer base = ss[0].getPointer();
|
||||
int size = ss[0].size();
|
||||
ss[0].autoWrite();
|
||||
for (int si=1;si < ss.length;si++) {
|
||||
if (ss[si].getPointer().peer != base.peer + size*si) {
|
||||
String msg = "Structure array elements must use"
|
||||
+ " contiguous memory (at element index " + si + ")";
|
||||
throw new IllegalArgumentException(msg);
|
||||
}
|
||||
ss[si].autoWrite();
|
||||
}
|
||||
return base;
|
||||
Structure.autoWrite(ss);
|
||||
return ss[0].getPointer();
|
||||
}
|
||||
}
|
||||
else if (argClass.isArray()){
|
||||
@@ -797,9 +829,7 @@ public class Function extends Pointer {
|
||||
setPointer(Pointer.SIZE*arg.length, null);
|
||||
}
|
||||
public void read() {
|
||||
for (int i=0;i < original.length;i++) {
|
||||
original[i] = getPointer(i * Pointer.SIZE);
|
||||
}
|
||||
read(0, original, 0, original.length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ public interface Library {
|
||||
private final Map functions = new WeakHashMap();
|
||||
public Handler(String libname, Class interfaceClass, Map options) {
|
||||
|
||||
if ("".equals(libname.trim())) {
|
||||
if (libname != null && "".equals(libname.trim())) {
|
||||
throw new IllegalArgumentException("Invalid library name \""
|
||||
+ libname + "\"");
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URISyntaxException;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.security.AccessController;
|
||||
@@ -71,6 +71,8 @@ import com.sun.jna.Structure.FFIType;
|
||||
*/
|
||||
public final class Native {
|
||||
|
||||
private static final String VERSION = "3.2.4";
|
||||
|
||||
private static String nativeLibraryPath = null;
|
||||
private static boolean unpacked;
|
||||
private static Map typeMappers = new WeakHashMap();
|
||||
@@ -680,7 +682,8 @@ public final class Native {
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts and loads the JNA stub library from jna.jar
|
||||
* Attempts to load the native library resource from the filesystem,
|
||||
* extracting the JNA stub library from jna.jar if not already available.
|
||||
*/
|
||||
private static void loadNativeLibraryFromJar() {
|
||||
String libname = System.mapLibraryName("jnidispatch");
|
||||
@@ -689,8 +692,10 @@ public final class Native {
|
||||
String resourceName = getNativeLibraryResourcePath(Platform.getOSType(), arch, name) + "/" + libname;
|
||||
URL url = Native.class.getResource(resourceName);
|
||||
|
||||
// Add an ugly hack for OpenJDK (soylatte) - JNI libs use the usual .dylib extension
|
||||
if (url == null && Platform.isMac() && resourceName.endsWith(".dylib")) {
|
||||
// Add an ugly hack for OpenJDK (soylatte) - JNI libs use the usual
|
||||
// .dylib extension
|
||||
if (url == null && Platform.isMac()
|
||||
&& resourceName.endsWith(".dylib")) {
|
||||
resourceName = resourceName.substring(0, resourceName.lastIndexOf(".dylib")) + ".jnilib";
|
||||
url = Native.class.getResource(resourceName);
|
||||
}
|
||||
@@ -701,8 +706,15 @@ public final class Native {
|
||||
|
||||
File lib = null;
|
||||
if (url.getProtocol().toLowerCase().equals("file")) {
|
||||
// NOTE: use older API for 1.3 compatibility
|
||||
lib = new File(URLDecoder.decode(url.getPath()));
|
||||
try {
|
||||
lib = new File(url.toURI());
|
||||
}
|
||||
catch(URISyntaxException e) {
|
||||
lib = new File(url.getPath());
|
||||
}
|
||||
if (!lib.exists()) {
|
||||
throw new Error("File URL " + url + " could not be properly decoded");
|
||||
}
|
||||
}
|
||||
else {
|
||||
InputStream is = Native.class.getResourceAsStream(resourceName);
|
||||
@@ -853,9 +865,7 @@ public final class Native {
|
||||
if (libpath != null) {
|
||||
return new File(libpath).getParent();
|
||||
}
|
||||
String msg =
|
||||
"Library '" + libName + "' was not found by class loader " + cl;
|
||||
throw new UnsatisfiedLinkError(msg);
|
||||
return null;
|
||||
}
|
||||
catch (Exception e) {
|
||||
return null;
|
||||
@@ -1412,16 +1422,17 @@ public final class Native {
|
||||
/** Prints JNA library details to the console. */
|
||||
public static void main(String[] args) {
|
||||
final String DEFAULT_TITLE = "Java Native Access (JNA)";
|
||||
final String UNKNOWN_VERSION = "unknown - package information missing";
|
||||
final String DEFAULT_VERSION = VERSION;
|
||||
final String DEFAULT_BUILD = VERSION + " (package information missing)";
|
||||
Package pkg = Native.class.getPackage();
|
||||
String title = pkg.getSpecificationTitle();
|
||||
if (title == null) title = DEFAULT_TITLE;
|
||||
String version = pkg.getSpecificationVersion();
|
||||
if (version == null) version = UNKNOWN_VERSION;
|
||||
if (version == null) version = DEFAULT_VERSION;
|
||||
title += " API Version " + version;
|
||||
System.out.println(title);
|
||||
version = pkg.getImplementationVersion();
|
||||
if (version == null) version = UNKNOWN_VERSION;
|
||||
if (version == null) version = DEFAULT_BUILD;
|
||||
System.out.println("Version: " + version);
|
||||
System.out.println(" Native: " + getNativeVersion() + " ("
|
||||
+ getAPIChecksum() + ")");
|
||||
|
||||
@@ -137,7 +137,9 @@ public class NativeLibrary {
|
||||
//
|
||||
libraryPath = matchLibrary(libraryName, searchPath);
|
||||
if (libraryPath != null) {
|
||||
try { handle = open(libraryPath); }
|
||||
try {
|
||||
handle = open(libraryPath);
|
||||
}
|
||||
catch(UnsatisfiedLinkError e2) { e = e2; }
|
||||
}
|
||||
}
|
||||
@@ -146,7 +148,9 @@ public class NativeLibrary {
|
||||
libraryPath = "/System/Library/Frameworks/" + libraryName
|
||||
+ ".framework/" + libraryName;
|
||||
if (new File(libraryPath).exists()) {
|
||||
try { handle = open(libraryPath); }
|
||||
try {
|
||||
handle = open(libraryPath);
|
||||
}
|
||||
catch(UnsatisfiedLinkError e2) { e = e2; }
|
||||
}
|
||||
}
|
||||
@@ -216,6 +220,11 @@ public class NativeLibrary {
|
||||
options.put(Library.OPTION_CALLING_CONVENTION, new Integer(Function.C_CONVENTION));
|
||||
}
|
||||
|
||||
// Use current process to load libraries we know are already
|
||||
// loaded by the VM to ensure we get the correct version
|
||||
if (Platform.isLinux() && "c".equals(libraryName)) {
|
||||
libraryName = null;
|
||||
}
|
||||
synchronized (libraries) {
|
||||
WeakReference ref = (WeakReference)libraries.get(libraryName + options);
|
||||
NativeLibrary library = ref != null ? (NativeLibrary)ref.get() : null;
|
||||
@@ -442,10 +451,21 @@ public class NativeLibrary {
|
||||
|
||||
// Search in the JNA paths for it
|
||||
for (Iterator it = searchPath.iterator(); it.hasNext(); ) {
|
||||
File file = new File(new File((String) it.next()), name);
|
||||
String path = (String)it.next();
|
||||
File file = new File(path, name);
|
||||
if (file.exists()) {
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
if (Platform.isMac()) {
|
||||
// Native libraries delivered via JNLP class loader
|
||||
// may require a .jnilib extension to be found
|
||||
if (name.endsWith(".dylib")) {
|
||||
file = new File(path, name.substring(0, name.lastIndexOf(".dylib")) + ".jnilib");
|
||||
if (file.exists()) {
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -66,6 +66,12 @@ public class NativeMappedConverter implements TypeConverter {
|
||||
}
|
||||
|
||||
public Object toNative(Object value, ToNativeContext context) {
|
||||
return value == null ? defaultValue().toNative() : ((NativeMapped)value).toNative();
|
||||
if (value == null) {
|
||||
if (Pointer.class.isAssignableFrom(nativeType)) {
|
||||
return null;
|
||||
}
|
||||
value = defaultValue();
|
||||
}
|
||||
return ((NativeMapped)value).toNative();
|
||||
}
|
||||
}
|
||||
@@ -59,8 +59,10 @@ public class Pointer {
|
||||
/** Derived class must assign peer pointer value. */
|
||||
Pointer() { }
|
||||
|
||||
/** Create from native pointer. */
|
||||
Pointer(long peer) {
|
||||
/** Create from native pointer. Don't use this unless you know what
|
||||
* you're doing.
|
||||
*/
|
||||
public Pointer(long peer) {
|
||||
this.peer = peer;
|
||||
}
|
||||
|
||||
@@ -237,7 +239,12 @@ public class Pointer {
|
||||
*/
|
||||
public void read(long offset, Pointer[] buf, int index, int length) {
|
||||
for (int i=0;i < length;i++) {
|
||||
buf[i + index] = getPointer(offset + i*Pointer.SIZE);
|
||||
Pointer p = getPointer(offset + i*Pointer.SIZE);
|
||||
Pointer oldp = buf[i+index];
|
||||
// Avoid replacing the original pointer if it hasn't changed
|
||||
if (oldp == null || p == null || p.peer != oldp.peer) {
|
||||
buf[i+index] = p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,6 +384,7 @@ public class Pointer {
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Object getValue(long offset, Class type, Object currentValue) {
|
||||
|
||||
Object result = null;
|
||||
if (Structure.class.isAssignableFrom(type)) {
|
||||
Structure s = (Structure)currentValue;
|
||||
@@ -457,7 +465,7 @@ public class Pointer {
|
||||
Pointer oldbp = currentValue == null ? null
|
||||
: Native.getDirectBufferPointer((Buffer)currentValue);
|
||||
if (oldbp == null || !oldbp.equals(bp)) {
|
||||
throw new IllegalStateException("Can't autogenerate a direct buffers on memory read");
|
||||
throw new IllegalStateException("Can't autogenerate a direct buffer on memory read");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -465,7 +473,7 @@ public class Pointer {
|
||||
NativeMapped nm = (NativeMapped)currentValue;
|
||||
if (nm != null) {
|
||||
Object value = getValue(offset, nm.nativeType(), null);
|
||||
nm.fromNative(value, new FromNativeContext(type));
|
||||
result = nm.fromNative(value, new FromNativeContext(type));
|
||||
}
|
||||
else {
|
||||
NativeMappedConverter tc = NativeMappedConverter.getInstance(type);
|
||||
@@ -809,7 +817,14 @@ v * @param wide whether to convert from a wide or standard C string
|
||||
* NULL-valued terminating element.
|
||||
*/
|
||||
public String[] getStringArray(long base) {
|
||||
return getStringArray(base, false);
|
||||
return getStringArray(base, -1, false);
|
||||
}
|
||||
|
||||
/** Returns an array of <code>String</code> based on a native array
|
||||
* of <code>char *</code>, using the given array length.
|
||||
*/
|
||||
public String[] getStringArray(long base, int length) {
|
||||
return getStringArray(base, length, false);
|
||||
}
|
||||
|
||||
/** Returns an array of <code>String</code> based on a native array
|
||||
@@ -818,13 +833,32 @@ v * @param wide whether to convert from a wide or standard C string
|
||||
* NULL-valued terminating element.
|
||||
*/
|
||||
public String[] getStringArray(long base, boolean wide) {
|
||||
return getStringArray(base, -1, wide);
|
||||
}
|
||||
|
||||
/** Returns an array of <code>String</code> based on a native array
|
||||
* of <code>char*</code> or <code>wchar_t*</code> based on the
|
||||
* <code>wide</code> parameter, using the given array length.
|
||||
*/
|
||||
public String[] getStringArray(long base, int length, boolean wide) {
|
||||
|
||||
List strings = new ArrayList();
|
||||
int offset = 0;
|
||||
Pointer p = getPointer(base);
|
||||
while (p != null) {
|
||||
strings.add(p.getString(0, wide));
|
||||
offset += SIZE;
|
||||
p = getPointer(base + offset);
|
||||
if (length != -1) {
|
||||
int count = 0;
|
||||
while (count++ < length) {
|
||||
strings.add(p.getString(0, wide));
|
||||
offset += SIZE;
|
||||
p = getPointer(base + offset);
|
||||
}
|
||||
}
|
||||
else {
|
||||
while (p != null) {
|
||||
strings.add(p.getString(0, wide));
|
||||
offset += SIZE;
|
||||
p = getPointer(base + offset);
|
||||
}
|
||||
}
|
||||
return (String[])strings.toArray(new String[strings.size()]);
|
||||
}
|
||||
@@ -834,6 +868,7 @@ v * @param wide whether to convert from a wide or standard C string
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void setValue(long offset, Object value, Class type) {
|
||||
|
||||
// Set the value at the offset according to its type
|
||||
if (type == boolean.class || type == Boolean.class) {
|
||||
setInt(offset, Boolean.TRUE.equals(value) ? -1 : 0);
|
||||
|
||||
@@ -48,7 +48,9 @@ import java.util.WeakHashMap;
|
||||
* <li><code>volatile</code> JNA will not write the field unless specifically
|
||||
* instructed to do so via {@link #writeField(String)}.
|
||||
* <li><code>final</code> JNA will overwrite the field via {@link #read()},
|
||||
* but otherwise the field is not modifiable from Java.
|
||||
* but otherwise the field is not modifiable from Java. Take care when using
|
||||
* this option, since the compiler will usually assume <em>all</em> accesses
|
||||
* to the field (for a given Structure instance) have the same value.
|
||||
* </ul>
|
||||
* NOTE: Strings are used to represent native C strings because usage of
|
||||
* <code>char *</code> is generally more common than <code>wchar_t *</code>.
|
||||
@@ -220,6 +222,7 @@ public abstract class Structure {
|
||||
// from the ctor, to ensure fields are properly scanned and allocated
|
||||
try {
|
||||
this.memory = m.share(offset, size());
|
||||
this.array = null;
|
||||
}
|
||||
catch(IndexOutOfBoundsException e) {
|
||||
throw new IllegalArgumentException("Structure exceeds provided memory bounds");
|
||||
@@ -290,6 +293,14 @@ public abstract class Structure {
|
||||
// Data synchronization methods
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Keep track of ByReference reads to avoid creating multiple structures
|
||||
// mapped to the same address
|
||||
private static final ThreadLocal reads = new ThreadLocal() {
|
||||
protected synchronized Object initialValue() {
|
||||
return new HashMap();
|
||||
}
|
||||
};
|
||||
|
||||
// Keep track of what is currently being read/written to avoid redundant
|
||||
// reads (avoids problems with circular references).
|
||||
private static final ThreadLocal busy = new ThreadLocal() {
|
||||
@@ -297,29 +308,68 @@ public abstract class Structure {
|
||||
will change if structure field values change.
|
||||
*/
|
||||
class StructureSet extends AbstractCollection implements Set {
|
||||
private Collection list = new ArrayList();
|
||||
public int size() { return list.size(); }
|
||||
private Structure[] elements;
|
||||
private int count;
|
||||
private void ensureCapacity(int size) {
|
||||
if (elements == null) {
|
||||
elements = new Structure[size*3/2];
|
||||
}
|
||||
else if (elements.length < size) {
|
||||
Structure[] e = new Structure[size*3/2];
|
||||
System.arraycopy(elements, 0, e, 0, elements.length);
|
||||
elements = e;
|
||||
}
|
||||
}
|
||||
public int size() { return count; }
|
||||
public boolean contains(Object o) {
|
||||
for (Iterator i=iterator();i.hasNext();) {
|
||||
if (o == i.next())
|
||||
return true;
|
||||
return indexOf(o) != -1;
|
||||
}
|
||||
public boolean add(Object o) {
|
||||
if (!contains(o)) {
|
||||
ensureCapacity(count+1);
|
||||
elements[count++] = (Structure)o;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
private int indexOf(Object o) {
|
||||
Structure s1 = (Structure)o;
|
||||
for (int i=0;i < count;i++) {
|
||||
Structure s2 = (Structure)elements[i];
|
||||
if (s1 == s2
|
||||
|| (s1.getClass() == s2.getClass()
|
||||
&& s1.size() == s2.size()
|
||||
&& s1.getPointer().equals(s2.getPointer()))) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
public boolean remove(Object o) {
|
||||
int idx = indexOf(o);
|
||||
if (idx != -1) {
|
||||
if (--count > 0) {
|
||||
elements[idx] = elements[count];
|
||||
elements[count] = null;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public boolean add(Object o) {
|
||||
if (!contains(o))
|
||||
return list.add(o);
|
||||
return true;
|
||||
public Iterator iterator() {
|
||||
// never actually used
|
||||
return null;
|
||||
}
|
||||
public Iterator iterator() { return list.iterator(); }
|
||||
}
|
||||
protected synchronized Object initialValue() {
|
||||
return new StructureSet();
|
||||
}
|
||||
};
|
||||
Set busy() {
|
||||
static Set busy() {
|
||||
return (Set)busy.get();
|
||||
}
|
||||
static Map reading() {
|
||||
return (Map)reads.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the fields of the struct from native memory
|
||||
@@ -329,11 +379,14 @@ public abstract class Structure {
|
||||
// allows structures to do field-based initialization of arrays and not
|
||||
// have to explicitly call allocateMemory in a ctor
|
||||
ensureAllocated();
|
||||
// Avoid recursive reads
|
||||
// Avoid redundant reads
|
||||
if (busy().contains(this)) {
|
||||
return;
|
||||
}
|
||||
busy().add(this);
|
||||
if (this instanceof Structure.ByReference) {
|
||||
reading().put(getPointer(), this);
|
||||
}
|
||||
try {
|
||||
for (Iterator i=structFields.values().iterator();i.hasNext();) {
|
||||
readField((StructField)i.next());
|
||||
@@ -341,6 +394,9 @@ public abstract class Structure {
|
||||
}
|
||||
finally {
|
||||
busy().remove(this);
|
||||
if (reading().get(getPointer()) == this) {
|
||||
reading().remove(getPointer());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -395,8 +451,14 @@ public abstract class Structure {
|
||||
}
|
||||
else {
|
||||
if (s == null || !address.equals(s.getPointer())) {
|
||||
s = newInstance(type);
|
||||
s.useMemory(address);
|
||||
Structure s1 = (Structure)reading().get(address);
|
||||
if (s1 != null && type.equals(s1.getClass())) {
|
||||
s = s1;
|
||||
}
|
||||
else {
|
||||
s = newInstance(type);
|
||||
s.useMemory(address);
|
||||
}
|
||||
}
|
||||
s.autoRead();
|
||||
}
|
||||
@@ -451,6 +513,7 @@ public abstract class Structure {
|
||||
getTypeInfo();
|
||||
}
|
||||
|
||||
// Avoid redundant writes
|
||||
if (busy().contains(this)) {
|
||||
return;
|
||||
}
|
||||
@@ -496,6 +559,10 @@ public abstract class Structure {
|
||||
}
|
||||
|
||||
void writeField(StructField structField) {
|
||||
|
||||
if (structField.isReadOnly)
|
||||
return;
|
||||
|
||||
// Get the offset of the field
|
||||
int offset = structField.offset;
|
||||
|
||||
@@ -628,10 +695,11 @@ public abstract class Structure {
|
||||
Class type = field.getType();
|
||||
StructField structField = new StructField();
|
||||
structField.isVolatile = Modifier.isVolatile(modifiers);
|
||||
structField.field = field;
|
||||
structField.isReadOnly = Modifier.isFinal(modifiers);
|
||||
if (Modifier.isFinal(modifiers)) {
|
||||
field.setAccessible(true);
|
||||
}
|
||||
structField.field = field;
|
||||
structField.name = field.getName();
|
||||
structField.type = type;
|
||||
|
||||
@@ -820,7 +888,7 @@ public abstract class Structure {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return toString(0);
|
||||
return toString(0, true);
|
||||
}
|
||||
|
||||
private String format(Class type) {
|
||||
@@ -829,7 +897,7 @@ public abstract class Structure {
|
||||
return s.substring(dot + 1);
|
||||
}
|
||||
|
||||
private String toString(int indent) {
|
||||
private String toString(int indent, boolean showContents) {
|
||||
String LS = System.getProperty("line.separator");
|
||||
String name = format(getClass()) + "(" + getPointer() + ")";
|
||||
if (!(getPointer() instanceof Memory)) {
|
||||
@@ -839,9 +907,11 @@ public abstract class Structure {
|
||||
for (int idx=0;idx < indent;idx++) {
|
||||
prefix += " ";
|
||||
}
|
||||
String contents = "";
|
||||
// Write all fields
|
||||
for (Iterator i=structFields.values().iterator();i.hasNext();) {
|
||||
String contents = LS;
|
||||
if (!showContents) {
|
||||
contents = "...}";
|
||||
}
|
||||
else for (Iterator i=structFields.values().iterator();i.hasNext();) {
|
||||
StructField sf = (StructField)i.next();
|
||||
Object value = getField(sf);
|
||||
String type = format(sf.type);
|
||||
@@ -854,16 +924,7 @@ public abstract class Structure {
|
||||
contents += " " + type + " "
|
||||
+ sf.name + index + "@" + Integer.toHexString(sf.offset);
|
||||
if (value instanceof Structure) {
|
||||
if (value instanceof Structure.ByReference) {
|
||||
String v = value.toString();
|
||||
if (v.indexOf(LS) != -1) {
|
||||
v = v.substring(0, v.indexOf(LS));
|
||||
}
|
||||
value = v + "...}";
|
||||
}
|
||||
else {
|
||||
value = ((Structure)value).toString(indent + 1);
|
||||
}
|
||||
value = ((Structure)value).toString(indent + 1, !(value instanceof Structure.ByReference));
|
||||
}
|
||||
contents += "=";
|
||||
if (value instanceof Long) {
|
||||
@@ -899,13 +960,14 @@ public abstract class Structure {
|
||||
}
|
||||
contents += "]";
|
||||
}
|
||||
return name + " {" + LS + contents;
|
||||
return name + " {" + contents;
|
||||
}
|
||||
|
||||
/** Returns a view of this structure's memory as an array of structures.
|
||||
* Note that this <code>Structure</code> must have a public, no-arg
|
||||
* constructor. If the structure is currently using a {@link Memory}
|
||||
* backing, the memory will be resized to fit the entire array.
|
||||
* constructor. If the structure is currently using auto-allocated
|
||||
* {@link Memory} backing, the memory will be resized to fit the entire
|
||||
* array.
|
||||
*/
|
||||
public Structure[] toArray(Structure[] array) {
|
||||
ensureAllocated();
|
||||
@@ -927,7 +989,8 @@ public abstract class Structure {
|
||||
array[i].read();
|
||||
}
|
||||
|
||||
if (this instanceof ByReference) {
|
||||
if (!(this instanceof ByValue)) {
|
||||
// keep track for later auto-read/writes
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@@ -936,39 +999,34 @@ public abstract class Structure {
|
||||
|
||||
/** Returns a view of this structure's memory as an array of structures.
|
||||
* Note that this <code>Structure</code> must have a public, no-arg
|
||||
* constructor. If the structure is currently using a {@link Memory}
|
||||
* backing, the memory will be resized to fit the entire array.
|
||||
* constructor. If the structure is currently using auto-allocated
|
||||
* {@link Memory} backing, the memory will be resized to fit the entire
|
||||
* array.
|
||||
*/
|
||||
public Structure[] toArray(int size) {
|
||||
return toArray((Structure[])Array.newInstance(getClass(), size));
|
||||
}
|
||||
|
||||
/** This structure is only equal to another based on the same native
|
||||
* memory address and data type.
|
||||
private Class baseClass() {
|
||||
if ((this instanceof Structure.ByReference
|
||||
|| this instanceof Structure.ByValue)
|
||||
&& Structure.class.isAssignableFrom(getClass().getSuperclass())) {
|
||||
return getClass().getSuperclass();
|
||||
}
|
||||
return getClass();
|
||||
}
|
||||
|
||||
/** This structure is equal to another based on the same data type
|
||||
* and visible data fields.
|
||||
*/
|
||||
public boolean equals(Object o) {
|
||||
if (o == this)
|
||||
return true;
|
||||
if (o == null)
|
||||
return false;
|
||||
if (o.getClass() != getClass()) {
|
||||
// Only allow one class derived from the other and implementing
|
||||
// ByReference or ByValue, or both implementing
|
||||
// ByReference/ByValue on the same base class
|
||||
if (!((o.getClass().isAssignableFrom(getClass())
|
||||
&& (ByReference.class.isAssignableFrom(getClass())
|
||||
|| ByValue.class.isAssignableFrom(getClass())))
|
||||
|| (getClass().isAssignableFrom(o.getClass())
|
||||
&& (ByReference.class.isAssignableFrom(o.getClass())
|
||||
|| ByValue.class.isAssignableFrom(o.getClass())))
|
||||
|| ((ByReference.class.isAssignableFrom(o.getClass())
|
||||
|| ByValue.class.isAssignableFrom(o.getClass()))
|
||||
&& (ByReference.class.isAssignableFrom(getClass())
|
||||
|| ByValue.class.isAssignableFrom(getClass()))
|
||||
&& (o.getClass().getSuperclass()
|
||||
== getClass().getSuperclass())))) {
|
||||
return false;
|
||||
}
|
||||
if (o.getClass() != getClass()
|
||||
&& ((Structure)o).baseClass() != baseClass()) {
|
||||
return false;
|
||||
}
|
||||
Structure s = (Structure)o;
|
||||
if (s.size() == size()) {
|
||||
@@ -1077,6 +1135,7 @@ public abstract class Structure {
|
||||
public int size = -1;
|
||||
public int offset = -1;
|
||||
public boolean isVolatile;
|
||||
public boolean isReadOnly;
|
||||
public FromNativeConverter readConverter;
|
||||
public ToNativeConverter writeConverter;
|
||||
public FromNativeContext context;
|
||||
@@ -1092,8 +1151,8 @@ public abstract class Structure {
|
||||
}
|
||||
private static Map typeInfoMap = new WeakHashMap();
|
||||
// Native.initIDs initializes these fields to their appropriate
|
||||
// pointer values. These are in a separate class so that they may
|
||||
// be initialized prior to loading the FFIType class
|
||||
// pointer values. These are in a separate class from FFIType so that
|
||||
// they may be initialized prior to loading the FFIType class
|
||||
private static class FFITypes {
|
||||
private static Pointer ffi_type_void;
|
||||
private static Pointer ffi_type_float;
|
||||
@@ -1233,6 +1292,30 @@ public abstract class Structure {
|
||||
}
|
||||
}
|
||||
|
||||
private static void structureArrayCheck(Structure[] ss) {
|
||||
Pointer base = ss[0].getPointer();
|
||||
int size = ss[0].size();
|
||||
for (int si=1;si < ss.length;si++) {
|
||||
if (ss[si].getPointer().peer != base.peer + size*si) {
|
||||
String msg = "Structure array elements must use"
|
||||
+ " contiguous memory (bad backing address at Structure array index " + si + ")";
|
||||
throw new IllegalArgumentException(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void autoRead(Structure[] ss) {
|
||||
structureArrayCheck(ss);
|
||||
if (ss[0].array == ss) {
|
||||
ss[0].autoRead();
|
||||
}
|
||||
else {
|
||||
for (int si=0;si < ss.length;si++) {
|
||||
ss[si].autoRead();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void autoRead() {
|
||||
if (getAutoRead()) {
|
||||
read();
|
||||
@@ -1244,6 +1327,18 @@ public abstract class Structure {
|
||||
}
|
||||
}
|
||||
|
||||
public static void autoWrite(Structure[] ss) {
|
||||
structureArrayCheck(ss);
|
||||
if (ss[0].array == ss) {
|
||||
ss[0].autoWrite();
|
||||
}
|
||||
else {
|
||||
for (int si=0;si < ss.length;si++) {
|
||||
ss[si].autoWrite();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void autoWrite() {
|
||||
if (getAutoWrite()) {
|
||||
write();
|
||||
|
||||
@@ -32,6 +32,7 @@ import java.awt.Rectangle;
|
||||
import java.awt.Shape;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.AWTEventListener;
|
||||
import java.awt.event.ContainerEvent;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.AWTEvent;
|
||||
import java.awt.Window;
|
||||
@@ -200,13 +201,18 @@ public class WindowUtils {
|
||||
}
|
||||
|
||||
public void eventDispatched(AWTEvent e) {
|
||||
Component src = (Component)e.getSource();
|
||||
MouseEvent me = SwingUtilities.convertMouseEvent(src, (MouseEvent)e, content);
|
||||
Component c = SwingUtilities.getDeepestComponentAt(content, me.getX(), me.getY());
|
||||
if (c != null) {
|
||||
setCursor(c.getCursor());
|
||||
if (e instanceof MouseEvent) {
|
||||
Component src = ((MouseEvent)e).getComponent();
|
||||
if (src != null
|
||||
&& SwingUtilities.isDescendingFrom(src, content)) {
|
||||
MouseEvent me = SwingUtilities.convertMouseEvent(src, (MouseEvent)e, content);
|
||||
Component c = SwingUtilities.getDeepestComponentAt(content, me.getX(), me.getY());
|
||||
if (c != null) {
|
||||
setCursor(c.getCursor());
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private final Listener listener = createListener();
|
||||
@@ -257,9 +263,10 @@ public class WindowUtils {
|
||||
|
||||
/** Window utilities with differing native implementations. */
|
||||
public static abstract class NativeWindowUtils {
|
||||
protected abstract class TransparentContent extends JPanel {
|
||||
protected abstract class TransparentContentPane
|
||||
extends JPanel implements AWTEventListener {
|
||||
private boolean transparent;
|
||||
public TransparentContent(Container oldContent) {
|
||||
public TransparentContentPane(Container oldContent) {
|
||||
super(new BorderLayout());
|
||||
add(oldContent, BorderLayout.CENTER);
|
||||
setTransparent(true);
|
||||
@@ -267,12 +274,27 @@ public class WindowUtils {
|
||||
((JComponent)oldContent).setOpaque(false);
|
||||
}
|
||||
}
|
||||
public void addNotify() {
|
||||
super.addNotify();
|
||||
Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.CONTAINER_EVENT_MASK);
|
||||
}
|
||||
public void removeNotify() {
|
||||
Toolkit.getDefaultToolkit().removeAWTEventListener(this);
|
||||
super.removeNotify();
|
||||
}
|
||||
public void setTransparent(boolean transparent) {
|
||||
this.transparent = transparent;
|
||||
setOpaque(!transparent);
|
||||
setDoubleBuffered(!transparent);
|
||||
repaint();
|
||||
}
|
||||
public void eventDispatched(AWTEvent e) {
|
||||
if (e.getID() == ContainerEvent.COMPONENT_ADDED
|
||||
&& SwingUtilities.isDescendingFrom(((ContainerEvent)e).getChild(), this)) {
|
||||
Component child = ((ContainerEvent)e).getChild();
|
||||
NativeWindowUtils.this.setDoubleBuffered(child, false);
|
||||
}
|
||||
}
|
||||
public void paint(Graphics gr) {
|
||||
if (transparent) {
|
||||
Rectangle r = gr.getClipBounds();
|
||||
@@ -438,6 +460,7 @@ public class WindowUtils {
|
||||
}
|
||||
|
||||
protected void setLayersTransparent(Window w, boolean transparent) {
|
||||
|
||||
Color bg = transparent ? new Color(0, 0, 0, 0) : null;
|
||||
if (w instanceof RootPaneContainer) {
|
||||
RootPaneContainer rpc = (RootPaneContainer)w;
|
||||
@@ -463,11 +486,15 @@ public class WindowUtils {
|
||||
}
|
||||
else {
|
||||
lp.setOpaque(Boolean.TRUE.equals(lp.getClientProperty(TRANSPARENT_OLD_OPAQUE)));
|
||||
lp.putClientProperty(TRANSPARENT_OLD_OPAQUE, null);
|
||||
root.setOpaque(Boolean.TRUE.equals(root.getClientProperty(TRANSPARENT_OLD_OPAQUE)));
|
||||
root.putClientProperty(TRANSPARENT_OLD_OPAQUE, null);
|
||||
if (content != null) {
|
||||
content.setOpaque(Boolean.TRUE.equals(content.getClientProperty(TRANSPARENT_OLD_OPAQUE)));
|
||||
content.putClientProperty(TRANSPARENT_OLD_OPAQUE, null);
|
||||
}
|
||||
bg = (Color)root.getClientProperty(TRANSPARENT_OLD_BG);
|
||||
root.putClientProperty(TRANSPARENT_OLD_BG, null);
|
||||
}
|
||||
}
|
||||
w.setBackground(bg);
|
||||
@@ -645,12 +672,12 @@ public class WindowUtils {
|
||||
* window on any change. It also does not paint window decorations
|
||||
* when the window is transparent.
|
||||
*/
|
||||
private class W32TransparentContent extends TransparentContent {
|
||||
private class W32TransparentContentPane extends TransparentContentPane {
|
||||
private HDC memDC;
|
||||
private HBITMAP hBitmap;
|
||||
private Pointer pbits;
|
||||
private Dimension bitmapSize;
|
||||
public W32TransparentContent(Container content) {
|
||||
public W32TransparentContentPane(Container content) {
|
||||
super(content);
|
||||
}
|
||||
private void disposeBackingStore() {
|
||||
@@ -786,12 +813,12 @@ public class WindowUtils {
|
||||
JRootPane root = ((RootPaneContainer)w).getRootPane();
|
||||
JLayeredPane lp = root.getLayeredPane();
|
||||
Container content = root.getContentPane();
|
||||
if (content instanceof W32TransparentContent) {
|
||||
((W32TransparentContent)content).setTransparent(transparent);
|
||||
if (content instanceof W32TransparentContentPane) {
|
||||
((W32TransparentContentPane)content).setTransparent(transparent);
|
||||
}
|
||||
else if (transparent) {
|
||||
W32TransparentContent w32content =
|
||||
new W32TransparentContent(content);
|
||||
W32TransparentContentPane w32content =
|
||||
new W32TransparentContentPane(content);
|
||||
root.setContentPane(w32content);
|
||||
lp.add(new RepaintTrigger(w32content),
|
||||
JLayeredPane.DRAG_LAYER);
|
||||
@@ -908,28 +935,28 @@ public class WindowUtils {
|
||||
return true;
|
||||
}
|
||||
|
||||
private OSXTransparentContent installTransparentContent(Window w) {
|
||||
OSXTransparentContent content;
|
||||
private OSXMaskingContentPane installMaskingPane(Window w) {
|
||||
OSXMaskingContentPane content;
|
||||
if (w instanceof RootPaneContainer) {
|
||||
// TODO: replace layered pane instead?
|
||||
final RootPaneContainer rpc = (RootPaneContainer)w;
|
||||
Container oldContent = rpc.getContentPane();
|
||||
if (oldContent instanceof OSXTransparentContent) {
|
||||
content = (OSXTransparentContent)oldContent;
|
||||
if (oldContent instanceof OSXMaskingContentPane) {
|
||||
content = (OSXMaskingContentPane)oldContent;
|
||||
}
|
||||
else {
|
||||
content = new OSXTransparentContent(oldContent);
|
||||
content = new OSXMaskingContentPane(oldContent);
|
||||
// TODO: listen for content pane changes
|
||||
rpc.setContentPane(content);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Component oldContent = w.getComponentCount() > 0 ? w.getComponent(0) : null;
|
||||
if (oldContent instanceof OSXTransparentContent) {
|
||||
content = (OSXTransparentContent)oldContent;
|
||||
if (oldContent instanceof OSXMaskingContentPane) {
|
||||
content = (OSXMaskingContentPane)oldContent;
|
||||
}
|
||||
else {
|
||||
content = new OSXTransparentContent(oldContent);
|
||||
content = new OSXMaskingContentPane(oldContent);
|
||||
w.add(content);
|
||||
}
|
||||
}
|
||||
@@ -948,9 +975,7 @@ public class WindowUtils {
|
||||
boolean isTransparent = w.getBackground() != null
|
||||
&& w.getBackground().getAlpha() == 0;
|
||||
if (transparent != isTransparent) {
|
||||
installTransparentContent(w);
|
||||
setBackgroundTransparent(w, transparent, "setWindowTransparent");
|
||||
setLayersTransparent(w, transparent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1012,7 +1037,7 @@ public class WindowUtils {
|
||||
public void setWindowMask(Component c, final Shape shape) {
|
||||
if (c instanceof Window) {
|
||||
Window w = (Window)c;
|
||||
OSXTransparentContent content = installTransparentContent(w);
|
||||
OSXMaskingContentPane content = installMaskingPane(w);
|
||||
content.setMask(shape);
|
||||
setBackgroundTransparent(w, shape != MASK_NONE, "setWindowMask");
|
||||
}
|
||||
@@ -1024,10 +1049,10 @@ public class WindowUtils {
|
||||
/** Mask out unwanted pixels and ensure background gets cleared.
|
||||
* @author Olivier Chafik
|
||||
*/
|
||||
private static class OSXTransparentContent extends JPanel {
|
||||
private static class OSXMaskingContentPane extends JPanel {
|
||||
private Shape shape;
|
||||
|
||||
public OSXTransparentContent(Component oldContent) {
|
||||
public OSXMaskingContentPane(Component oldContent) {
|
||||
super(new BorderLayout());
|
||||
if (oldContent != null) {
|
||||
add(oldContent, BorderLayout.CENTER);
|
||||
@@ -1061,13 +1086,21 @@ public class WindowUtils {
|
||||
? ((RootPaneContainer)w).getRootPane() : null;
|
||||
if (transparent) {
|
||||
if (rp != null) {
|
||||
rp.putClientProperty("bg.old", w.getBackground());
|
||||
rp.putClientProperty(TRANSPARENT_OLD_BG, w.getBackground());
|
||||
}
|
||||
w.setBackground(new Color(0,0,0,0));
|
||||
}
|
||||
else {
|
||||
if (rp != null) {
|
||||
w.setBackground((Color)rp.getClientProperty("bg.old"));
|
||||
Color bg = (Color)rp.getClientProperty(TRANSPARENT_OLD_BG);
|
||||
// If the old bg is a
|
||||
// apple.laf.CColorPaintUIResource, the window's
|
||||
// transparent state will not change
|
||||
if (bg != null) {
|
||||
bg = new Color(bg.getRed(), bg.getGreen(), bg.getBlue(), bg.getAlpha());
|
||||
}
|
||||
w.setBackground(bg);
|
||||
rp.putClientProperty(TRANSPARENT_OLD_BG, null);
|
||||
}
|
||||
else {
|
||||
w.setBackground(null);
|
||||
@@ -1300,9 +1333,9 @@ public class WindowUtils {
|
||||
whenDisplayable(w, action);
|
||||
}
|
||||
|
||||
private class X11TransparentContent extends TransparentContent {
|
||||
private class X11TransparentContentPane extends TransparentContentPane {
|
||||
|
||||
public X11TransparentContent(Container oldContent) {
|
||||
public X11TransparentContentPane(Container oldContent) {
|
||||
super(oldContent);
|
||||
}
|
||||
|
||||
@@ -1377,12 +1410,12 @@ public class WindowUtils {
|
||||
JRootPane root = ((RootPaneContainer)w).getRootPane();
|
||||
JLayeredPane lp = root.getLayeredPane();
|
||||
Container content = root.getContentPane();
|
||||
if (content instanceof X11TransparentContent) {
|
||||
((X11TransparentContent)content).setTransparent(transparent);
|
||||
if (content instanceof X11TransparentContentPane) {
|
||||
((X11TransparentContentPane)content).setTransparent(transparent);
|
||||
}
|
||||
else if (transparent) {
|
||||
X11TransparentContent x11content =
|
||||
new X11TransparentContent(content);
|
||||
X11TransparentContentPane x11content =
|
||||
new X11TransparentContentPane(content);
|
||||
root.setContentPane(x11content);
|
||||
lp.add(new RepaintTrigger(x11content),
|
||||
JLayeredPane.DRAG_LAYER);
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.sun.jna.ptr.IntByReference;
|
||||
* Incomplete implementation to support demos.
|
||||
*
|
||||
* @author Todd Fast, todd.fast@sun.com
|
||||
* @author twall@users.sf.net
|
||||
* @author twalljava@dev.java.net
|
||||
*/
|
||||
public interface User32 extends W32API {
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ package com.sun.jna;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.DoubleBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.LongBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
@@ -81,17 +83,23 @@ public class ArgumentsMarshalTest extends TestCase {
|
||||
int fillInt16Buffer(short[] buf, int len, short value);
|
||||
int fillInt32Buffer(int[] buf, int len, int value);
|
||||
int fillInt64Buffer(long[] buf, int len, long value);
|
||||
int fillFloatBuffer(float[] buf, int len, float value);
|
||||
int fillDoubleBuffer(double[] buf, int len, double value);
|
||||
|
||||
// ByteBuffer alternative definitions
|
||||
int fillInt8Buffer(ByteBuffer buf, int len, byte value);
|
||||
int fillInt16Buffer(ByteBuffer buf, int len, short value);
|
||||
int fillInt32Buffer(ByteBuffer buf, int len, int value);
|
||||
int fillInt64Buffer(ByteBuffer buf, int len, long value);
|
||||
int fillFloatBuffer(ByteBuffer buf, int len, float value);
|
||||
int fillDoubleBuffer(ByteBuffer buf, int len, double value);
|
||||
|
||||
// {Short,Int,Long}Buffer alternative definitions
|
||||
// {Short|Int|Long|,Float|Double}Buffer alternative definitions
|
||||
int fillInt16Buffer(ShortBuffer buf, int len, short value);
|
||||
int fillInt32Buffer(IntBuffer buf, int len, int value);
|
||||
int fillInt64Buffer(LongBuffer buf, int len, long value);
|
||||
int fillFloatBuffer(FloatBuffer buf, int len, float value);
|
||||
int fillDoubleBuffer(DoubleBuffer buf, int len, double value);
|
||||
|
||||
// Nonexistent functions
|
||||
boolean returnBooleanArgument(Object arg);
|
||||
@@ -323,6 +331,10 @@ public class ArgumentsMarshalTest extends TestCase {
|
||||
+ "parameter type, not argument type",
|
||||
struct.getPointer(),
|
||||
lib.testStructurePointerArgument(struct));
|
||||
|
||||
struct = null;
|
||||
assertNull("Null argument should be returned",
|
||||
lib.testStructurePointerArgument(struct));
|
||||
}
|
||||
|
||||
public void testStructureByValueArgument() {
|
||||
@@ -353,7 +365,6 @@ public class ArgumentsMarshalTest extends TestCase {
|
||||
public void testWriteStructureArrayArgumentMemory() {
|
||||
final int LENGTH = 10;
|
||||
TestLibrary.CheckFieldAlignment block = new TestLibrary.CheckFieldAlignment();
|
||||
block.useMemory(new Memory(block.size() * LENGTH));
|
||||
TestLibrary.CheckFieldAlignment[] array =
|
||||
(TestLibrary.CheckFieldAlignment[])block.toArray(LENGTH);
|
||||
for (int i=0;i < array.length;i++) {
|
||||
@@ -508,6 +519,67 @@ public class ArgumentsMarshalTest extends TestCase {
|
||||
}
|
||||
}
|
||||
|
||||
public void testWrappedByteArrayArgument() {
|
||||
byte[] array = new byte[1024];
|
||||
ByteBuffer buf = ByteBuffer.wrap(array, 512, 512).slice();
|
||||
final byte MAGIC = (byte)0xAB;
|
||||
lib.fillInt8Buffer(buf, 512, MAGIC);
|
||||
for (int i=0;i < array.length;i++) {
|
||||
assertEquals("Bad value at index " + i,
|
||||
i < 512 ? 0 : MAGIC, array[i]);
|
||||
}
|
||||
}
|
||||
public void testWrappedShortArrayArgument() {
|
||||
short[] array = new short[1024];
|
||||
ShortBuffer buf = ShortBuffer.wrap(array, 512, 512).slice();
|
||||
final short MAGIC = (short)0xABED;
|
||||
lib.fillInt16Buffer(buf, 512, MAGIC);
|
||||
for (int i=0;i < array.length;i++) {
|
||||
assertEquals("Bad value at index " + i,
|
||||
i < 512 ? 0 : MAGIC, array[i]);
|
||||
}
|
||||
}
|
||||
public void testWrappedIntArrayArgument() {
|
||||
int[] array = new int[1024];
|
||||
IntBuffer buf = IntBuffer.wrap(array, 512, 512).slice();
|
||||
final int MAGIC = 0xABEDCF23;
|
||||
lib.fillInt32Buffer(buf, 512, MAGIC);
|
||||
for (int i=0;i < array.length;i++) {
|
||||
assertEquals("Bad value at index " + i,
|
||||
i < 512 ? 0 : MAGIC, array[i]);
|
||||
}
|
||||
}
|
||||
public void testWrappedLongArrayArguent() {
|
||||
long[] array = new long[1024];
|
||||
LongBuffer buf = LongBuffer.wrap(array, 512, 512).slice();
|
||||
final long MAGIC = 0x1234567887654321L;
|
||||
lib.fillInt64Buffer(buf, 512, MAGIC);
|
||||
for (int i=0;i < array.length;i++) {
|
||||
assertEquals("Bad value at index " + i,
|
||||
i < 512 ? 0 : MAGIC, array[i]);
|
||||
}
|
||||
}
|
||||
public void testWrappedFloatArrayArguent() {
|
||||
float[] array = new float[1024];
|
||||
FloatBuffer buf = FloatBuffer.wrap(array, 512, 512).slice();
|
||||
final float MAGIC = -118.625f;
|
||||
lib.fillFloatBuffer(buf, 512, MAGIC);
|
||||
for (int i=0;i < array.length;i++) {
|
||||
assertEquals("Bad value at index " + i,
|
||||
i < 512 ? 0 : MAGIC, array[i]);
|
||||
}
|
||||
}
|
||||
public void testWrappedDoubleArrayArguent() {
|
||||
double[] array = new double[1024];
|
||||
DoubleBuffer buf = DoubleBuffer.wrap(array, 512, 512).slice();
|
||||
final double MAGIC = -118.625;
|
||||
lib.fillDoubleBuffer(buf, 512, MAGIC);
|
||||
for (int i=0;i < array.length;i++) {
|
||||
assertEquals("Bad value at index " + i,
|
||||
i < 512 ? 0 : MAGIC, array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public void testInvalidArgument() {
|
||||
try {
|
||||
lib.returnBooleanArgument(this);
|
||||
@@ -537,10 +609,18 @@ public class ArgumentsMarshalTest extends TestCase {
|
||||
null,
|
||||
new NativeString(getName()+"2").getPointer(),
|
||||
};
|
||||
Pointer[] originals = new Pointer[args.length];
|
||||
System.arraycopy(args, 0, originals, 0, args.length);
|
||||
|
||||
assertEquals("Wrong value returned", args[0], lib.returnPointerArrayElement(args, 0));
|
||||
assertNull("Wrong value returned", lib.returnPointerArrayElement(args, 1));
|
||||
assertEquals("Wrong value returned", args[2], lib.returnPointerArrayElement(args, 2));
|
||||
assertNull("Native array should be null terminated", lib.returnPointerArrayElement(args, 3));
|
||||
|
||||
assertSame("Argument pointers should remain unmodified [0]",
|
||||
originals[0], args[0]);
|
||||
assertSame("Argument pointers should remain unmodified [2]",
|
||||
originals[2], args[2]);
|
||||
}
|
||||
|
||||
public void testNativeMappedArrayArgument() {
|
||||
|
||||
@@ -354,19 +354,45 @@ public class CallbacksTest extends TestCase {
|
||||
|
||||
public void testCallStructureCallback() {
|
||||
final boolean[] called = {false};
|
||||
final Structure[] cbarg = { null };
|
||||
final Pointer[] cbarg = { null };
|
||||
final SmallTestStructure s = new SmallTestStructure();
|
||||
final double MAGIC = 118.625;
|
||||
TestLibrary.StructureCallback cb = new TestLibrary.StructureCallback() {
|
||||
public SmallTestStructure callback(SmallTestStructure arg) {
|
||||
called[0] = true;
|
||||
cbarg[0] = arg;
|
||||
cbarg[0] = arg.getPointer();
|
||||
arg.value = MAGIC;
|
||||
return arg;
|
||||
}
|
||||
};
|
||||
SmallTestStructure value = lib.callStructureCallback(cb, s);
|
||||
assertTrue("Callback not called", called[0]);
|
||||
assertEquals("Wrong argument passed to callback", s, cbarg[0]);
|
||||
assertEquals("Wrong structure return", s, value);
|
||||
assertEquals("Wrong argument passed to callback", s.getPointer(), cbarg[0]);
|
||||
assertEquals("Structure argument not synched on callback return",
|
||||
MAGIC, s.value);
|
||||
assertEquals("Wrong structure return", s.getPointer(), value.getPointer());
|
||||
assertEquals("Structure return not synched",
|
||||
MAGIC, value.value);
|
||||
}
|
||||
|
||||
public void testCallStructureArrayCallback() {
|
||||
final SmallTestStructure s = new SmallTestStructure();
|
||||
final SmallTestStructure[] array = (SmallTestStructure[])s.toArray(2);
|
||||
final double MAGIC = 118.625;
|
||||
TestLibrary.StructureCallback cb = new TestLibrary.StructureCallback() {
|
||||
public SmallTestStructure callback(SmallTestStructure arg) {
|
||||
SmallTestStructure[] array =
|
||||
(SmallTestStructure[])arg.toArray(2);
|
||||
array[0].value = MAGIC;
|
||||
array[1].value = MAGIC*2;
|
||||
return arg;
|
||||
}
|
||||
};
|
||||
SmallTestStructure value = lib.callStructureCallback(cb, s);
|
||||
assertEquals("Structure array element 0 not synched on callback return",
|
||||
MAGIC, array[0].value);
|
||||
assertEquals("Structure array element 1 not synched on callback return",
|
||||
MAGIC*2, array[1].value);
|
||||
}
|
||||
|
||||
public void testCallBooleanCallback() {
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
package com.sun.jna;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.DoubleBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.LongBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
@@ -60,17 +62,23 @@ public class DirectArgumentsMarshalTest extends ArgumentsMarshalTest {
|
||||
public native int fillInt16Buffer(short[] buf, int len, short value);
|
||||
public native int fillInt32Buffer(int[] buf, int len, int value);
|
||||
public native int fillInt64Buffer(long[] buf, int len, long value);
|
||||
public native int fillFloatBuffer(float[] buf, int len, float value);
|
||||
public native int fillDoubleBuffer(double[] buf, int len, double value);
|
||||
|
||||
// ByteBuffer alternative definitions
|
||||
public native int fillInt8Buffer(ByteBuffer buf, int len, byte value);
|
||||
public native int fillInt16Buffer(ByteBuffer buf, int len, short value);
|
||||
public native int fillInt32Buffer(ByteBuffer buf, int len, int value);
|
||||
public native int fillInt64Buffer(ByteBuffer buf, int len, long value);
|
||||
public native int fillFloatBuffer(ByteBuffer buf, int len, float value);
|
||||
public native int fillDoubleBuffer(ByteBuffer buf, int len, double value);
|
||||
|
||||
// {Short,Int,Long}Buffer alternative definitions
|
||||
// {Short|Int|Long|Float|Double}Buffer alternative definitions
|
||||
public native int fillInt16Buffer(ShortBuffer buf, int len, short value);
|
||||
public native int fillInt32Buffer(IntBuffer buf, int len, int value);
|
||||
public native int fillInt64Buffer(LongBuffer buf, int len, long value);
|
||||
public native int fillFloatBuffer(FloatBuffer buf, int len, float value);
|
||||
public native int fillDoubleBuffer(DoubleBuffer buf, int len, double value);
|
||||
|
||||
// dummy to avoid causing Native.register to fail
|
||||
public boolean returnBooleanArgument(Object arg) {throw new IllegalArgumentException();}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* Copyright (c) 2009 Timothy Wall, All Rights Reserved
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
* <p/>
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*/
|
||||
package com.sun.jna;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Map;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/** General structure by value functionality tests. */
|
||||
public class DirectStructureByValueTest extends StructureByValueTest {
|
||||
|
||||
public static void main(java.lang.String[] argList) {
|
||||
junit.textui.TestRunner.run(DirectStructureByValueTest.class);
|
||||
}
|
||||
|
||||
public static class DirectTestLibrary implements TestLibrary {
|
||||
public native byte testStructureByValueArgument8(ByValue8 arg);
|
||||
public native short testStructureByValueArgument16(ByValue16 arg);
|
||||
public native int testStructureByValueArgument32(ByValue32 arg);
|
||||
public native long testStructureByValueArgument64(ByValue64 arg);
|
||||
public native long testStructureByValueArgument128(ByValue128 arg);
|
||||
static {
|
||||
Native.register("testlib");
|
||||
}
|
||||
}
|
||||
|
||||
protected void setUp() {
|
||||
lib = new DirectTestLibrary();
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,9 @@ public class LibraryLoadTest extends TestCase {
|
||||
int wcslen(WString wstr);
|
||||
int strlen(String str);
|
||||
int atol(String str);
|
||||
|
||||
Pointer getpwuid(int uid);
|
||||
int geteuid();
|
||||
}
|
||||
|
||||
public void testLoadAWTAfterJNA() {
|
||||
@@ -144,6 +147,16 @@ public class LibraryLoadTest extends TestCase {
|
||||
}
|
||||
}
|
||||
|
||||
// Ubuntu bug when arch-specific libc is active
|
||||
// Only fails on *some* functions
|
||||
public void testLoadProperCLibraryVersion() {
|
||||
if (Platform.isWindows()) return;
|
||||
|
||||
CLibrary lib = (CLibrary)Native.loadLibrary("c", CLibrary.class);
|
||||
assertNotNull("Couldn't get current user",
|
||||
lib.getpwuid(lib.geteuid()));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(LibraryLoadTest.class);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.nio.DoubleBuffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.LongBuffer;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -256,6 +257,50 @@ public class PointerTest extends TestCase {
|
||||
assertEquals("Wrong value", tp, p.getValue(0, TestPointerType.class, null));
|
||||
}
|
||||
|
||||
public void testGetStringArray() {
|
||||
Pointer p = new Memory(Pointer.SIZE*3);
|
||||
String VALUE1 = getName();
|
||||
String VALUE2 = getName() + "2";
|
||||
|
||||
p.setPointer(0, new NativeString(VALUE1).getPointer());
|
||||
p.setPointer(Pointer.SIZE, new NativeString(VALUE2).getPointer());
|
||||
p.setPointer(Pointer.SIZE*2, null);
|
||||
|
||||
assertEquals("Wrong null-terminated String array",
|
||||
Arrays.asList(new String[] { VALUE1, VALUE2 }),
|
||||
Arrays.asList(p.getStringArray(0)));
|
||||
|
||||
assertEquals("Wrong length-specified String array (1)",
|
||||
Arrays.asList(new String[] { VALUE1 }),
|
||||
Arrays.asList(p.getStringArray(0, 1)));
|
||||
assertEquals("Wrong length-specified String array (2)",
|
||||
Arrays.asList(new String[] { VALUE1, VALUE2 }),
|
||||
Arrays.asList(p.getStringArray(0, 2)));
|
||||
}
|
||||
|
||||
public void testReadPointerArray() {
|
||||
Pointer mem = new Memory(Pointer.SIZE * 2);
|
||||
Pointer[] p = new Pointer[2];
|
||||
String VALUE1 = getName();
|
||||
|
||||
p[0] = new NativeString(VALUE1).getPointer();
|
||||
p[1] = new Memory(1024);
|
||||
Pointer[] orig = new Pointer[p.length];
|
||||
System.arraycopy(p, 0, orig, 0, p.length);
|
||||
|
||||
mem.write(0, p, 0, p.length);
|
||||
mem.read(0, p, 0, p.length);
|
||||
|
||||
assertSame("Pointer object not preserved[0]", orig[0], p[0]);
|
||||
assertSame("Pointer object not preserved[1]", orig[1], p[1]);
|
||||
|
||||
mem.setPointer(0, null);
|
||||
mem.setPointer(Pointer.SIZE, new Memory(1024));
|
||||
mem.read(0, p, 0, p.length);
|
||||
assertNull("Pointer element not updated[0]", p[0]);
|
||||
assertNotSame("Pointer element not updated[1]", orig[1], p[1]);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(PointerTest.class);
|
||||
}
|
||||
|
||||
@@ -730,7 +730,7 @@ public class StructureTest extends TestCase {
|
||||
s.s1 = new StructureTest.PublicTestStructure.ByReference();
|
||||
s.s1.x = -1;
|
||||
s.write();
|
||||
assertEquals("Structure.ByReference not written automatically",
|
||||
assertEquals("Structure.ByReference field not written automatically",
|
||||
-1, s.s1.getPointer().getInt(0));
|
||||
}
|
||||
|
||||
@@ -860,24 +860,68 @@ public class StructureTest extends TestCase {
|
||||
|
||||
public void testNativeMappedWrite() {
|
||||
class TestStructure extends Structure {
|
||||
public ByteByReference ref;
|
||||
public ByteByReference ref;
|
||||
}
|
||||
TestStructure s = new TestStructure();
|
||||
ByteByReference ref = s.ref = new ByteByReference();
|
||||
s.write();
|
||||
assertEquals("Value not properly written", ref.getPointer(), s.getPointer().getPointer(0));
|
||||
|
||||
s.ref = null;
|
||||
s.write();
|
||||
assertNull("Non-null value was written: " + s.getPointer().getPointer(0), s.getPointer().getPointer(0));
|
||||
}
|
||||
|
||||
public void testNativeMappedRead() {
|
||||
class TestStructure extends Structure {
|
||||
public ByteByReference ref;
|
||||
}
|
||||
TestStructure s = new TestStructure();
|
||||
s.read();
|
||||
assertNull("Should read null for initial field value", s.ref);
|
||||
|
||||
ByteByReference ref = new ByteByReference();
|
||||
s.getPointer().setPointer(0, ref.getPointer());
|
||||
s.read();
|
||||
assertEquals("Field incorrectly read", ref, s.ref);
|
||||
|
||||
s.getPointer().setPointer(0, null);
|
||||
s.read();
|
||||
assertNull("Null field incorrectly read", s.ref);
|
||||
}
|
||||
|
||||
public static class ROStructure extends Structure {
|
||||
public final int field;
|
||||
{
|
||||
// Initialize in ctor to avoid compiler replacing
|
||||
// field references with a constant everywhere
|
||||
field = 0;
|
||||
getPointer().setInt(0, 42);
|
||||
read();
|
||||
}
|
||||
}
|
||||
private ROStructure avoidConstantFieldOptimization(ROStructure s) {
|
||||
return s;
|
||||
}
|
||||
public void testReadOnlyField() {
|
||||
ROStructure s = new ROStructure();
|
||||
assertEquals("Field value should be writable from native", 42, s.field);
|
||||
s.getPointer().setInt(0, 42);
|
||||
s.read();
|
||||
s = avoidConstantFieldOptimization(s);
|
||||
assertEquals("Field value should be set from native", 42, s.field);
|
||||
|
||||
s.getPointer().setInt(0, 0);
|
||||
s.read();
|
||||
s = avoidConstantFieldOptimization(s);
|
||||
assertEquals("Field value not synched after native change", 0, s.field);
|
||||
|
||||
s.getPointer().setInt(0, 42);
|
||||
// current Java field value of zero should not be written to native mem
|
||||
s.write();
|
||||
assertEquals("Field should not be written", 42, s.getPointer().getInt(0));
|
||||
|
||||
s.read();
|
||||
s = avoidConstantFieldOptimization(s);
|
||||
assertEquals("Field value not synched after native change (2)", 42, s.field);
|
||||
|
||||
}
|
||||
public void testNativeMappedArrayField() {
|
||||
final int SIZE = 24;
|
||||
@@ -1075,16 +1119,59 @@ public class StructureTest extends TestCase {
|
||||
assertTrue("Structure equals should ignore padding", s1.equals(s2));
|
||||
}
|
||||
|
||||
public void testRecursiveReadWrite() {
|
||||
public void testRecursiveWrite() {
|
||||
class TestStructureByRef extends Structure implements Structure.ByReference{
|
||||
public TestStructureByRef(Pointer p) { super(p); }
|
||||
public TestStructureByRef() { }
|
||||
public int unique;
|
||||
public TestStructureByRef s;
|
||||
}
|
||||
TestStructureByRef s = new TestStructureByRef();
|
||||
s.s = s;
|
||||
s.s = new TestStructureByRef();
|
||||
s.unique = 1;
|
||||
s.s.s = s;
|
||||
s.s.unique = 2;
|
||||
|
||||
s.write();
|
||||
assertEquals("Structure field contents not written",
|
||||
1, s.getPointer().getInt(0));
|
||||
assertEquals("ByReference structure field contents not written",
|
||||
2, s.s.getPointer().getInt(0));
|
||||
|
||||
s.s.unique = 0;
|
||||
Structure value = s.s;
|
||||
s.read();
|
||||
assertEquals("ByReference structure field not preserved", value, s.s);
|
||||
|
||||
assertEquals("ByReference structure field contents not read",
|
||||
2, s.s.unique);
|
||||
|
||||
assertTrue("Temporary storage should be cleared",
|
||||
s.busy().isEmpty());
|
||||
}
|
||||
|
||||
public static class CyclicTestStructure extends Structure {
|
||||
public static class ByReference extends CyclicTestStructure implements Structure.ByReference {}
|
||||
public CyclicTestStructure(Pointer p) { super(p); }
|
||||
public CyclicTestStructure() { }
|
||||
public CyclicTestStructure.ByReference next;
|
||||
}
|
||||
public void testCyclicRead() {
|
||||
CyclicTestStructure s = new CyclicTestStructure();
|
||||
s.next = new CyclicTestStructure.ByReference();
|
||||
|
||||
Structure value = s.next;
|
||||
s.next.next = s.next;
|
||||
s.write();
|
||||
s.read();
|
||||
assertEquals("ByReference structure field not preserved", value, s.next);
|
||||
|
||||
assertEquals("Temporary storage should be cleared",
|
||||
0, s.busy().size());
|
||||
value = s.next;
|
||||
s.next.next = null;
|
||||
s.read();
|
||||
assertSame("ByReference structure field should reuse existing value",
|
||||
value, s.next);
|
||||
assertSame("Nested ByReference structure field should reuse existing value",
|
||||
value, s.next.next);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ package com.sun.jna;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JScrollPane;
|
||||
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.io.File;
|
||||
@@ -24,17 +25,13 @@ import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.net.InetAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Properties;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestFailure;
|
||||
import junit.framework.TestResult;
|
||||
@@ -66,7 +63,10 @@ public class WebStartTest extends TestCase {
|
||||
// but will cause unsigned jars to fail (irrespective of policy)
|
||||
+ " <security><all-permissions/></security>\n"
|
||||
+ " <resources>\n"
|
||||
+ " <j2se version='1.4+'/>\n"
|
||||
// Explicitly supply javawebstart.version, which is missing in NetX
|
||||
// Boo, java-vm-args doesn't work in NetX
|
||||
// and neither does javaws -J<arg>
|
||||
+ " <j2se version='1.4+' java-vm-args='-Djavawebstart.version=0.0'/>\n"
|
||||
+ " <jar href='jna-test.jar'/>\n"
|
||||
+ " <jar href='jna.jar'/>\n"
|
||||
+ " <jar href='junit.jar'/>{CLOVER}\n"
|
||||
@@ -77,6 +77,8 @@ public class WebStartTest extends TestCase {
|
||||
+ " <argument>{CLASS}</argument>\n"
|
||||
+ " <argument>{METHOD}</argument>\n"
|
||||
+ " <argument>{PORT}</argument>\n"
|
||||
// NetX doesn't set javawebstart.version, so explicitly flag it
|
||||
+ " <argument>javawebstart</argument>\n"
|
||||
+ " </application-desc>\n"
|
||||
+ "</jnlp>";
|
||||
|
||||
@@ -95,14 +97,25 @@ public class WebStartTest extends TestCase {
|
||||
throw new Error(ERROR);
|
||||
}
|
||||
|
||||
public void testJNLPFindLibrary() {
|
||||
String path = Native.getWebStartLibraryPath("jnidispatch");
|
||||
assertNotNull("Web Start library path not found", path);
|
||||
public interface Dummy extends Library {
|
||||
void dummy();
|
||||
}
|
||||
public void testJNLPFindCustomLibrary() {
|
||||
assertNotNull("Custom library path not found by JNLP class loader",
|
||||
Native.getWebStartLibraryPath("jnidispatch"));
|
||||
Native.loadLibrary("jnidispatch", Dummy.class);
|
||||
}
|
||||
|
||||
public void testJNLPFindProcessLibrary() {
|
||||
String libname = Platform.isWindows()?"msvcrt":"c";
|
||||
assertNull("Process library path not expected to be found by JNLP class loader",
|
||||
Native.getWebStartLibraryPath(libname));
|
||||
Native.loadLibrary(libname, Dummy.class);
|
||||
}
|
||||
|
||||
public void testJNLPFindLibraryFailure() {
|
||||
try {
|
||||
Native.getWebStartLibraryPath("xyzzy");
|
||||
Native.loadLibrary("xyzzy", Dummy.class);
|
||||
fail("Missing native libraries should throw UnsatisfiedLinkError");
|
||||
}
|
||||
catch(UnsatisfiedLinkError e) {
|
||||
@@ -117,7 +130,7 @@ public class WebStartTest extends TestCase {
|
||||
String codebase = new File(BUILDDIR, "jws").toURI().toURL().toString();
|
||||
|
||||
ServerSocket s = new ServerSocket(0);
|
||||
s.setSoTimeout(20000);
|
||||
s.setSoTimeout(120000);
|
||||
int port = s.getLocalPort();
|
||||
|
||||
File jnlp = File.createTempFile(getName(), ".jnlp");
|
||||
@@ -135,11 +148,10 @@ public class WebStartTest extends TestCase {
|
||||
OutputStream os = new FileOutputStream(jnlp);
|
||||
os.write(contents.getBytes());
|
||||
os.close();
|
||||
File keystore = new File("jna.keystore");
|
||||
String path = findJWS();
|
||||
String[] cmd = {
|
||||
path,
|
||||
"-Xnosplash",
|
||||
"-Xnosplash",
|
||||
"-wait",
|
||||
jnlp.toURI().toURL().toString(),
|
||||
};
|
||||
@@ -258,42 +270,37 @@ public class WebStartTest extends TestCase {
|
||||
|
||||
private String findJWS() throws IOException {
|
||||
String JAVA_HOME = System.getProperty("java.home");
|
||||
String LIB = new File(JAVA_HOME, "/lib").getAbsolutePath();
|
||||
if (!new File(LIB, "javaws.jar").exists()) {
|
||||
LIB = new File("/System/Library/Frameworks/JavaVM.framework/Resources/Deploy.bundle/Contents/Home/lib").getAbsolutePath();
|
||||
if (!new File(LIB, "javaws.jar").exists()) {
|
||||
if (!Platform.isWindows())
|
||||
throw new IOException("javaws.jar not found");
|
||||
}
|
||||
}
|
||||
String PS = System.getProperty("path.separator");
|
||||
String path = System.getProperty("java.home") + "/bin/javaws";
|
||||
File javaws = new File(path);
|
||||
// NOTE: OSX puts javaws somewhere else entirely
|
||||
// NOTE: win64 only includes javaws in the system path
|
||||
String BIN = new File(JAVA_HOME, "/bin").getAbsolutePath();
|
||||
File javaws = new File(BIN, "javaws" + (Platform.isWindows()?".exe":""));
|
||||
if (!javaws.exists()) {
|
||||
// NOTE: OSX puts javaws somewhere else entirely
|
||||
if (Platform.isMac()) {
|
||||
javaws = new File(JAVA_HOME, "../Commands/javaws");
|
||||
}
|
||||
// NOTE: win64 only includes javaws in the system path
|
||||
if (Platform.isWindows()) {
|
||||
FolderInfo info = (FolderInfo)
|
||||
Native.loadLibrary("shell32", FolderInfo.class);
|
||||
char[] buf = new char[FolderInfo.MAX_PATH];
|
||||
int flags = 0;
|
||||
int result = info.SHGetFolderPathW(null, FolderInfo.CSIDL_WINDOWS, null, 0, buf);
|
||||
path = Native.toString(buf);
|
||||
//int result =
|
||||
info.SHGetFolderPathW(null, FolderInfo.CSIDL_WINDOWS, null, 0, buf);
|
||||
String path = Native.toString(buf);
|
||||
if (Platform.is64Bit()) {
|
||||
javaws = new File(path, "SysWOW64/javaws.exe");
|
||||
}
|
||||
else {
|
||||
javaws = new File(path, "system32/javaws.exe");
|
||||
}
|
||||
path = javaws.getAbsolutePath();
|
||||
}
|
||||
else {
|
||||
path = javaws.getName();
|
||||
if (!javaws.exists()) {
|
||||
throw new IOException("javaws executable not found");
|
||||
}
|
||||
}
|
||||
return path;
|
||||
return javaws.getAbsolutePath();
|
||||
}
|
||||
|
||||
// TODO: find some way of querying the current VM for the deployment
|
||||
// properties path
|
||||
private File findDeploymentProperties() {
|
||||
String path = System.getProperty("user.home");
|
||||
File deployment;
|
||||
@@ -301,8 +308,8 @@ public class WebStartTest extends TestCase {
|
||||
FolderInfo info = (FolderInfo)
|
||||
Native.loadLibrary("shell32", FolderInfo.class);
|
||||
char[] buf = new char[FolderInfo.MAX_PATH];
|
||||
int flags = 0;
|
||||
int result = info.SHGetFolderPathW(null, FolderInfo.CSIDL_APPDATA,
|
||||
//int result =
|
||||
info.SHGetFolderPathW(null, FolderInfo.CSIDL_APPDATA,
|
||||
null, 0, buf);
|
||||
path = Native.toString(buf);
|
||||
|
||||
@@ -402,27 +409,44 @@ public class WebStartTest extends TestCase {
|
||||
}
|
||||
|
||||
private static void showMessage(String msg) {
|
||||
showMessage(msg, 60000);
|
||||
}
|
||||
|
||||
private static void showMessage(String msg, int timeout) {
|
||||
JFrame f = new JFrame("Web Start Test Failure");
|
||||
f.getContentPane().add(new JLabel(msg));
|
||||
f.getContentPane().add(new JScrollPane(new JLabel(msg)));
|
||||
f.pack();
|
||||
f.setLocation(100, 100);
|
||||
f.setVisible(true);
|
||||
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
try { Thread.sleep(60000); } catch(Exception e) { }
|
||||
if (timeout != 0) {
|
||||
try { Thread.sleep(timeout); } catch(Exception e) { }
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (runningWebStart()) {
|
||||
String testClass = args.length > 0
|
||||
? args[0] : WebStartTest.class.getName();
|
||||
String testMethod = args.length > 1
|
||||
? args[1] : "testLaunchedUnderWebStart";
|
||||
int port = args.length > 2
|
||||
? Integer.parseInt(args[2]) : 8080;
|
||||
runTestCaseTest(testClass, testMethod, port);
|
||||
try {
|
||||
if (args.length == 4
|
||||
&& "javawebstart".equals(args[3])
|
||||
&& !runningWebStart()) {
|
||||
System.setProperty("javawebstart.version", "fake");
|
||||
}
|
||||
if (runningWebStart()) {
|
||||
|
||||
String testClass = args.length > 0
|
||||
? args[0] : WebStartTest.class.getName();
|
||||
String testMethod = args.length > 1
|
||||
? args[1] : "testLaunchedUnderWebStart";
|
||||
int port = args.length > 2
|
||||
? Integer.parseInt(args[2]) : 8080;
|
||||
runTestCaseTest(testClass, testMethod, port);
|
||||
}
|
||||
else {
|
||||
junit.textui.TestRunner.run(WebStartTest.class);
|
||||
}
|
||||
}
|
||||
else {
|
||||
junit.textui.TestRunner.run(WebStartTest.class);
|
||||
catch(Throwable t) {
|
||||
showMessage("ERROR: " + t.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+16
-3
@@ -3,7 +3,7 @@
|
||||
<meta name="author" content="Timothy Wall">
|
||||
<meta name="keywords" content="java,jna,jni,c,c++,native,method,function,call,ctypes,ffi,foreign function interface,jdirect,jinvoke,pinvoke,platform invoke,native library access,native access,call native from java,java c library,easy jni,call c from java,avoid jni,jni alternative,jni replacement,legacy,call from java, replace jni">
|
||||
<meta name="description" content="Java Native Access (JNA): access native libraries with pure Java code.">
|
||||
<meta name="date" content="2009-07-21">
|
||||
<meta name="date" content="2009-10-16">
|
||||
<title>Java Native Access (JNA): Pure Java access to native libraries</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
@@ -446,6 +446,8 @@ Libc.fclose(fp)
|
||||
<li><a href="#struct_debug">My structure has the wrong contents. What did I do wrong?</a>
|
||||
<li><a href="#j2me">Does JNA work with J2ME/Windows Mobile?</a>
|
||||
<li><a href="#performance">How does JNA performance compared to custom JNI?</a>
|
||||
<li><a href="#osx">I get an UnsatisfiedLinkError on OSX trying to include my custom library via Java Web Start</a>
|
||||
<li><a href="#COM">I need to use a COM/OCX/ActiveX object. Can JNA help me?</a>
|
||||
</ul>
|
||||
<a name=structure_use></a>
|
||||
<h4>When should I use Structure.ByReference? Structure.ByValue? Structure[]?</h4>
|
||||
@@ -491,8 +493,8 @@ void myfunc(simplestruct);
|
||||
If you need a ByValue or ByReference class, define them within your main Structure definition like this:
|
||||
<blockquote><pre><code>
|
||||
public class MyStructure extends Structure {
|
||||
public class ByValue extends MyStructure implements Structure.ByValue { }
|
||||
public class ByReference extends MyStructure implements Structure.ByReference { }
|
||||
public static class ByValue extends MyStructure implements Structure.ByValue { }
|
||||
public static class ByReference extends MyStructure implements Structure.ByReference { }
|
||||
}
|
||||
</code></pre></blockquote>
|
||||
|
||||
@@ -545,6 +547,17 @@ Normally when you invoke <code>toString</code> on a <code>Structure</code>, it w
|
||||
<h4>Does JNA work with J2ME/Windows Mobile?</h4>
|
||||
There is an <a href="https://jna.dev.java.net/issues/show_bug.cgi?id=108">implementation</a> available, but it has not yet been integrated into the standard build.<p>
|
||||
|
||||
<a name=COM></a>
|
||||
<h4>I need to use a COM/OCX/ActiveX object. Can JNA do that?</h4>
|
||||
Not really. Try <a href="http://sourceforge.net/projects/jacob-project/develop">JACOB</a> or <a href="http://com4j.dev.java.net/">com4j</a>, both of which
|
||||
can parse a COM interface definition and generate a Java object to match it.
|
||||
|
||||
<a name=osx></a>
|
||||
<h4>I get an UnsatisfiedLinkError on OSX when I provide my native library via Java Web Start</h4>
|
||||
Libraries loaded via the JNLP class loader on OSX must be named with a .jnilib
|
||||
suffix. The class loader won't find resources included with
|
||||
the <code><nativelib></code> tag if they have a .dylib suffix.<p>
|
||||
|
||||
<a name=performance></a>
|
||||
<h4>How does JNA performance compare to custom JNI?</h4>
|
||||
<p>
|
||||
|
||||
@@ -251,10 +251,14 @@ All Classes (JNA API)
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.HMODULE.html" title="class in com.sun.jna.examples.win32" target="classFrame">W32API.HMODULE</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.HRESULT.html" title="class in com.sun.jna.examples.win32" target="classFrame">W32API.HRESULT</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.HRGN.html" title="class in com.sun.jna.examples.win32" target="classFrame">W32API.HRGN</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.HWND.html" title="class in com.sun.jna.examples.win32" target="classFrame">W32API.HWND</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.LONG.html" title="class in com.sun.jna.examples.win32" target="classFrame">W32API.LONG</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.LONG_PTR.html" title="class in com.sun.jna.examples.win32" target="classFrame">W32API.LONG_PTR</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.LPARAM.html" title="class in com.sun.jna.examples.win32" target="classFrame">W32API.LPARAM</A>
|
||||
|
||||
@@ -251,10 +251,14 @@ All Classes (JNA API)
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.HMODULE.html" title="class in com.sun.jna.examples.win32">W32API.HMODULE</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.HRESULT.html" title="class in com.sun.jna.examples.win32">W32API.HRESULT</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.HRGN.html" title="class in com.sun.jna.examples.win32">W32API.HRGN</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.HWND.html" title="class in com.sun.jna.examples.win32">W32API.HWND</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.LONG.html" title="class in com.sun.jna.examples.win32">W32API.LONG</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.LONG_PTR.html" title="class in com.sun.jna.examples.win32">W32API.LONG_PTR</A>
|
||||
<BR>
|
||||
<A HREF="com/sun/jna/examples/win32/W32API.LPARAM.html" title="class in com.sun.jna.examples.win32">W32API.LPARAM</A>
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -133,7 +133,7 @@ Tagging interface to indicate the library or callback uses an alternate
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -169,7 +169,7 @@ void <B>uncaughtException</B>(<A HREF="../../../com/sun/jna/Callback.html" title
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -219,7 +219,7 @@ static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collecti
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -263,7 +263,7 @@ public int <B>getIndex</B>()</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -260,7 +260,7 @@ getReturnType</H3>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -413,7 +413,7 @@ public static <A HREF="../../../com/sun/jna/Pointer.html" title="class in com.su
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -210,7 +210,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Method
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -344,7 +344,7 @@ public <A HREF="../../../com/sun/jna/ToNativeConverter.html" title="interface in
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -214,7 +214,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html" ti
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -196,7 +196,7 @@ nativeType</H3>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -174,7 +174,7 @@ void <B>read</B>()</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -187,7 +187,7 @@ getFunctionName</H3>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -255,7 +255,7 @@ public int <B>getParameterIndex</B>()</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -249,7 +249,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" t
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -95,7 +95,7 @@ Class IntegerType</H2>
|
||||
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../com/sun/jna/NativeMapped.html" title="interface in com.sun.jna">NativeMapped</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sun/jna/NativeLong.html" title="class in com.sun.jna">NativeLong</A>, <A HREF="../../../com/sun/jna/Structure.FFIType.size_t.html" title="class in com.sun.jna">Structure.FFIType.size_t</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.DWORD.html" title="class in com.sun.jna.examples.win32">W32API.DWORD</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.LONG_PTR.html" title="class in com.sun.jna.examples.win32">W32API.LONG_PTR</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.UINT_PTR.html" title="class in com.sun.jna.examples.win32">W32API.UINT_PTR</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.ULONG_PTR.html" title="class in com.sun.jna.examples.win32">W32API.ULONG_PTR</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.WORD.html" title="class in com.sun.jna.examples.win32">W32API.WORD</A></DD>
|
||||
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sun/jna/NativeLong.html" title="class in com.sun.jna">NativeLong</A>, <A HREF="../../../com/sun/jna/Structure.FFIType.size_t.html" title="class in com.sun.jna">Structure.FFIType.size_t</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.DWORD.html" title="class in com.sun.jna.examples.win32">W32API.DWORD</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.LONG.html" title="class in com.sun.jna.examples.win32">W32API.LONG</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.LONG_PTR.html" title="class in com.sun.jna.examples.win32">W32API.LONG_PTR</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.UINT_PTR.html" title="class in com.sun.jna.examples.win32">W32API.UINT_PTR</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.ULONG_PTR.html" title="class in com.sun.jna.examples.win32">W32API.ULONG_PTR</A>, <A HREF="../../../com/sun/jna/examples/win32/W32API.WORD.html" title="class in com.sun.jna.examples.win32">W32API.WORD</A></DD>
|
||||
</DL>
|
||||
<HR>
|
||||
<DL>
|
||||
@@ -488,7 +488,7 @@ public int <B>hashCode</B>()</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -233,7 +233,7 @@ getInvocationHandler</H3>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -249,7 +249,7 @@ public <B>LastErrorException</B>(int code)</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -363,7 +363,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" t
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -333,7 +333,7 @@ static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.h
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -642,7 +642,7 @@ A <code>Pointer</code> to memory obtained from the native heap via a
|
||||
<TH ALIGN="left"><B>Methods inherited from class com.sun.jna.<A HREF="../../../com/sun/jna/Pointer.html" title="class in com.sun.jna">Pointer</A></B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><A HREF="../../../com/sun/jna/Pointer.html#_setMemory(long, long, byte)">_setMemory</A>, <A HREF="../../../com/sun/jna/Pointer.html#clear(long)">clear</A>, <A HREF="../../../com/sun/jna/Pointer.html#createConstant(long)">createConstant</A>, <A HREF="../../../com/sun/jna/Pointer.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../com/sun/jna/Pointer.html#getByteArray(long, int)">getByteArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getCharArray(long, int)">getCharArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getDoubleArray(long, int)">getDoubleArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getFloatArray(long, int)">getFloatArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getIntArray(long, int)">getIntArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getLongArray(long, int)">getLongArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getNativeLong(long)">getNativeLong</A>, <A HREF="../../../com/sun/jna/Pointer.html#getPointerArray(long)">getPointerArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getPointerArray(long, int)">getPointerArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getShortArray(long, int)">getShortArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getString(long)">getString</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, boolean)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getValue(long, java.lang.Class, java.lang.Object)">getValue</A>, <A HREF="../../../com/sun/jna/Pointer.html#hashCode()">hashCode</A>, <A HREF="../../../com/sun/jna/Pointer.html#indexOf(long, byte)">indexOf</A>, <A HREF="../../../com/sun/jna/Pointer.html#read(long, com.sun.jna.Pointer[], int, int)">read</A>, <A HREF="../../../com/sun/jna/Pointer.html#setMemory(long, long, byte)">setMemory</A>, <A HREF="../../../com/sun/jna/Pointer.html#setNativeLong(long, com.sun.jna.NativeLong)">setNativeLong</A>, <A HREF="../../../com/sun/jna/Pointer.html#setString(long, java.lang.String)">setString</A>, <A HREF="../../../com/sun/jna/Pointer.html#setValue(long, java.lang.Object, java.lang.Class)">setValue</A>, <A HREF="../../../com/sun/jna/Pointer.html#write(long, com.sun.jna.Pointer[], int, int)">write</A></CODE></TD>
|
||||
<TD><CODE><A HREF="../../../com/sun/jna/Pointer.html#_setMemory(long, long, byte)">_setMemory</A>, <A HREF="../../../com/sun/jna/Pointer.html#clear(long)">clear</A>, <A HREF="../../../com/sun/jna/Pointer.html#createConstant(long)">createConstant</A>, <A HREF="../../../com/sun/jna/Pointer.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../com/sun/jna/Pointer.html#getByteArray(long, int)">getByteArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getCharArray(long, int)">getCharArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getDoubleArray(long, int)">getDoubleArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getFloatArray(long, int)">getFloatArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getIntArray(long, int)">getIntArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getLongArray(long, int)">getLongArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getNativeLong(long)">getNativeLong</A>, <A HREF="../../../com/sun/jna/Pointer.html#getPointerArray(long)">getPointerArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getPointerArray(long, int)">getPointerArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getShortArray(long, int)">getShortArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getString(long)">getString</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, boolean)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, int)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, int, boolean)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getValue(long, java.lang.Class, java.lang.Object)">getValue</A>, <A HREF="../../../com/sun/jna/Pointer.html#hashCode()">hashCode</A>, <A HREF="../../../com/sun/jna/Pointer.html#indexOf(long, byte)">indexOf</A>, <A HREF="../../../com/sun/jna/Pointer.html#read(long, com.sun.jna.Pointer[], int, int)">read</A>, <A HREF="../../../com/sun/jna/Pointer.html#setMemory(long, long, byte)">setMemory</A>, <A HREF="../../../com/sun/jna/Pointer.html#setNativeLong(long, com.sun.jna.NativeLong)">setNativeLong</A>, <A HREF="../../../com/sun/jna/Pointer.html#setString(long, java.lang.String)">setString</A>, <A HREF="../../../com/sun/jna/Pointer.html#setValue(long, java.lang.Object, java.lang.Class)">setValue</A>, <A HREF="../../../com/sun/jna/Pointer.html#write(long, com.sun.jna.Pointer[], int, int)">write</A></CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
@@ -1628,7 +1628,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" t
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -224,7 +224,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Method
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -238,7 +238,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Method
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -284,7 +284,7 @@ public static void <B>main</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -166,7 +166,7 @@ void <B>invoke</B>(long cif,
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -1519,7 +1519,7 @@ public static void <B>main</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -662,7 +662,7 @@ static double <B>parseVersion</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/a
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -96,7 +96,7 @@ Class NativeLong</H2>
|
||||
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../com/sun/jna/NativeMapped.html" title="interface in com.sun.jna">NativeMapped</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sun/jna/examples/unix/X11.VisualID.html" title="class in com.sun.jna.examples.unix">X11.VisualID</A>, <A HREF="../../../com/sun/jna/examples/unix/X11.XID.html" title="class in com.sun.jna.examples.unix">X11.XID</A>, <A HREF="../../../com/sun/jna/examples/unix/X11.Xrender.PictFormat.html" title="class in com.sun.jna.examples.unix">X11.Xrender.PictFormat</A></DD>
|
||||
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sun/jna/examples/win32/W32API.HRESULT.html" title="class in com.sun.jna.examples.win32">W32API.HRESULT</A>, <A HREF="../../../com/sun/jna/examples/unix/X11.VisualID.html" title="class in com.sun.jna.examples.unix">X11.VisualID</A>, <A HREF="../../../com/sun/jna/examples/unix/X11.XID.html" title="class in com.sun.jna.examples.unix">X11.XID</A>, <A HREF="../../../com/sun/jna/examples/unix/X11.Xrender.PictFormat.html" title="class in com.sun.jna.examples.unix">X11.Xrender.PictFormat</A></DD>
|
||||
</DL>
|
||||
<HR>
|
||||
<DL>
|
||||
@@ -268,7 +268,7 @@ public <B>NativeLong</B>(long value)</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -336,7 +336,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" t
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -408,7 +408,7 @@ public int <B>compareTo</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/jav
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -547,7 +547,7 @@ public static final boolean <B>is64Bit</B>()</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -415,6 +415,28 @@ An abstraction for a native pointer data type. A Pointer instance
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, int)">getStringArray</A></B>(long base,
|
||||
int length)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns an array of <code>String</code> based on a native array
|
||||
of <code>char *</code>, using the given array length.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, int, boolean)">getStringArray</A></B>(long base,
|
||||
int length,
|
||||
boolean wide)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns an array of <code>String</code> based on a native array
|
||||
of <code>char*</code> or <code>wchar_t*</code> based on the
|
||||
<code>wide</code> parameter, using the given array length.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>(package private) <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Pointer.html#getValue(long, java.lang.Class, java.lang.Object)">getValue</A></B>(long offset,
|
||||
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> type,
|
||||
@@ -859,9 +881,10 @@ Pointer</H3>
|
||||
<A NAME="Pointer(long)"><!-- --></A><H3>
|
||||
Pointer</H3>
|
||||
<PRE>
|
||||
<B>Pointer</B>(long peer)</PRE>
|
||||
public <B>Pointer</B>(long peer)</PRE>
|
||||
<DL>
|
||||
<DD>Create from native pointer.
|
||||
<DD>Create from native pointer. Don't use this unless you know what
|
||||
you're doing.
|
||||
<P>
|
||||
</DL>
|
||||
|
||||
@@ -1594,6 +1617,21 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" t
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getStringArray(long, int)"><!-- --></A><H3>
|
||||
getStringArray</H3>
|
||||
<PRE>
|
||||
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getStringArray</B>(long base,
|
||||
int length)</PRE>
|
||||
<DL>
|
||||
<DD>Returns an array of <code>String</code> based on a native array
|
||||
of <code>char *</code>, using the given array length.
|
||||
<P>
|
||||
<DD><DL>
|
||||
</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getStringArray(long, boolean)"><!-- --></A><H3>
|
||||
getStringArray</H3>
|
||||
<PRE>
|
||||
@@ -1611,6 +1649,23 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" t
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getStringArray(long, int, boolean)"><!-- --></A><H3>
|
||||
getStringArray</H3>
|
||||
<PRE>
|
||||
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getStringArray</B>(long base,
|
||||
int length,
|
||||
boolean wide)</PRE>
|
||||
<DL>
|
||||
<DD>Returns an array of <code>String</code> based on a native array
|
||||
of <code>char*</code> or <code>wchar_t*</code> based on the
|
||||
<code>wide</code> parameter, using the given array length.
|
||||
<P>
|
||||
<DD><DL>
|
||||
</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="setValue(long, java.lang.Object, java.lang.Class)"><!-- --></A><H3>
|
||||
setValue</H3>
|
||||
<PRE>
|
||||
@@ -1883,7 +1938,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" t
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -400,7 +400,7 @@ public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/ja
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -200,7 +200,7 @@ Handle native array of <code>char*</code> or <code>wchar_t*</code> type
|
||||
<TH ALIGN="left"><B>Methods inherited from class com.sun.jna.<A HREF="../../../com/sun/jna/Pointer.html" title="class in com.sun.jna">Pointer</A></B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><A HREF="../../../com/sun/jna/Pointer.html#_setMemory(long, long, byte)">_setMemory</A>, <A HREF="../../../com/sun/jna/Pointer.html#clear(long)">clear</A>, <A HREF="../../../com/sun/jna/Pointer.html#createConstant(long)">createConstant</A>, <A HREF="../../../com/sun/jna/Pointer.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../com/sun/jna/Pointer.html#getByteArray(long, int)">getByteArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getCharArray(long, int)">getCharArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getDoubleArray(long, int)">getDoubleArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getFloatArray(long, int)">getFloatArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getIntArray(long, int)">getIntArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getLongArray(long, int)">getLongArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getNativeLong(long)">getNativeLong</A>, <A HREF="../../../com/sun/jna/Pointer.html#getPointerArray(long)">getPointerArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getPointerArray(long, int)">getPointerArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getShortArray(long, int)">getShortArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getString(long)">getString</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, boolean)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getValue(long, java.lang.Class, java.lang.Object)">getValue</A>, <A HREF="../../../com/sun/jna/Pointer.html#hashCode()">hashCode</A>, <A HREF="../../../com/sun/jna/Pointer.html#indexOf(long, byte)">indexOf</A>, <A HREF="../../../com/sun/jna/Pointer.html#read(long, com.sun.jna.Pointer[], int, int)">read</A>, <A HREF="../../../com/sun/jna/Pointer.html#setMemory(long, long, byte)">setMemory</A>, <A HREF="../../../com/sun/jna/Pointer.html#setNativeLong(long, com.sun.jna.NativeLong)">setNativeLong</A>, <A HREF="../../../com/sun/jna/Pointer.html#setString(long, java.lang.String)">setString</A>, <A HREF="../../../com/sun/jna/Pointer.html#setValue(long, java.lang.Object, java.lang.Class)">setValue</A>, <A HREF="../../../com/sun/jna/Pointer.html#write(long, com.sun.jna.Pointer[], int, int)">write</A></CODE></TD>
|
||||
<TD><CODE><A HREF="../../../com/sun/jna/Pointer.html#_setMemory(long, long, byte)">_setMemory</A>, <A HREF="../../../com/sun/jna/Pointer.html#clear(long)">clear</A>, <A HREF="../../../com/sun/jna/Pointer.html#createConstant(long)">createConstant</A>, <A HREF="../../../com/sun/jna/Pointer.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../com/sun/jna/Pointer.html#getByteArray(long, int)">getByteArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getCharArray(long, int)">getCharArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getDoubleArray(long, int)">getDoubleArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getFloatArray(long, int)">getFloatArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getIntArray(long, int)">getIntArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getLongArray(long, int)">getLongArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getNativeLong(long)">getNativeLong</A>, <A HREF="../../../com/sun/jna/Pointer.html#getPointerArray(long)">getPointerArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getPointerArray(long, int)">getPointerArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getShortArray(long, int)">getShortArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getString(long)">getString</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, boolean)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, int)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getStringArray(long, int, boolean)">getStringArray</A>, <A HREF="../../../com/sun/jna/Pointer.html#getValue(long, java.lang.Class, java.lang.Object)">getValue</A>, <A HREF="../../../com/sun/jna/Pointer.html#hashCode()">hashCode</A>, <A HREF="../../../com/sun/jna/Pointer.html#indexOf(long, byte)">indexOf</A>, <A HREF="../../../com/sun/jna/Pointer.html#read(long, com.sun.jna.Pointer[], int, int)">read</A>, <A HREF="../../../com/sun/jna/Pointer.html#setMemory(long, long, byte)">setMemory</A>, <A HREF="../../../com/sun/jna/Pointer.html#setNativeLong(long, com.sun.jna.NativeLong)">setNativeLong</A>, <A HREF="../../../com/sun/jna/Pointer.html#setString(long, java.lang.String)">setString</A>, <A HREF="../../../com/sun/jna/Pointer.html#setValue(long, java.lang.Object, java.lang.Class)">setValue</A>, <A HREF="../../../com/sun/jna/Pointer.html#write(long, com.sun.jna.Pointer[], int, int)">write</A></CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
@@ -303,7 +303,7 @@ public void <B>read</B>()</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -134,7 +134,7 @@ Tagging interface to indicate the address of an instance of the
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -132,7 +132,7 @@ Tagging interface to indicate the value of an instance of the
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -210,7 +210,7 @@ This class auto-generates an ffi_type structure appropriate for a given
|
||||
<TH ALIGN="left"><B>Methods inherited from class com.sun.jna.<A HREF="../../../com/sun/jna/Structure.html" title="class in com.sun.jna">Structure</A></B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><A HREF="../../../com/sun/jna/Structure.html#allocateMemory()">allocateMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#allocateMemory(int)">allocateMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#autoRead()">autoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#autoWrite()">autoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#cacheTypeInfo(com.sun.jna.Pointer)">cacheTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#calculateAlignedSize(int)">calculateAlignedSize</A>, <A HREF="../../../com/sun/jna/Structure.html#calculateSize(boolean)">calculateSize</A>, <A HREF="../../../com/sun/jna/Structure.html#clear()">clear</A>, <A HREF="../../../com/sun/jna/Structure.html#ensureAllocated()">ensureAllocated</A>, <A HREF="../../../com/sun/jna/Structure.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../com/sun/jna/Structure.html#fields()">fields</A>, <A HREF="../../../com/sun/jna/Structure.html#getAutoRead()">getAutoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#getAutoWrite()">getAutoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#getField(com.sun.jna.Structure.StructField)">getField</A>, <A HREF="../../../com/sun/jna/Structure.html#getFieldOrder()">getFieldOrder</A>, <A HREF="../../../com/sun/jna/Structure.html#getNativeAlignment(java.lang.Class, java.lang.Object, boolean)">getNativeAlignment</A>, <A HREF="../../../com/sun/jna/Structure.html#getPointer()">getPointer</A>, <A HREF="../../../com/sun/jna/Structure.html#getStructAlignment()">getStructAlignment</A>, <A HREF="../../../com/sun/jna/Structure.html#getTypeInfo()">getTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#getTypeInfo(java.lang.Object)">getTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#hashCode()">hashCode</A>, <A HREF="../../../com/sun/jna/Structure.html#newInstance(java.lang.Class)">newInstance</A>, <A HREF="../../../com/sun/jna/Structure.html#read()">read</A>, <A HREF="../../../com/sun/jna/Structure.html#readField(java.lang.String)">readField</A>, <A HREF="../../../com/sun/jna/Structure.html#readField(com.sun.jna.Structure.StructField)">readField</A>, <A HREF="../../../com/sun/jna/Structure.html#setAlignType(int)">setAlignType</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoRead(boolean)">setAutoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoSynch(boolean)">setAutoSynch</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoWrite(boolean)">setAutoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#setField(com.sun.jna.Structure.StructField, java.lang.Object)">setField</A>, <A HREF="../../../com/sun/jna/Structure.html#setFieldOrder(java.lang.String[])">setFieldOrder</A>, <A HREF="../../../com/sun/jna/Structure.html#setTypeMapper(com.sun.jna.TypeMapper)">setTypeMapper</A>, <A HREF="../../../com/sun/jna/Structure.html#size()">size</A>, <A HREF="../../../com/sun/jna/Structure.html#sortFields(java.lang.reflect.Field[], java.lang.String[])">sortFields</A>, <A HREF="../../../com/sun/jna/Structure.html#toArray(int)">toArray</A>, <A HREF="../../../com/sun/jna/Structure.html#toArray(com.sun.jna.Structure[])">toArray</A>, <A HREF="../../../com/sun/jna/Structure.html#toString()">toString</A>, <A HREF="../../../com/sun/jna/Structure.html#updateStructureByReference(java.lang.Class, com.sun.jna.Structure, com.sun.jna.Pointer)">updateStructureByReference</A>, <A HREF="../../../com/sun/jna/Structure.html#useMemory(com.sun.jna.Pointer)">useMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#useMemory(com.sun.jna.Pointer, int)">useMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#write()">write</A>, <A HREF="../../../com/sun/jna/Structure.html#writeField(java.lang.String)">writeField</A>, <A HREF="../../../com/sun/jna/Structure.html#writeField(java.lang.String, java.lang.Object)">writeField</A>, <A HREF="../../../com/sun/jna/Structure.html#writeField(com.sun.jna.Structure.StructField)">writeField</A></CODE></TD>
|
||||
<TD><CODE><A HREF="../../../com/sun/jna/Structure.html#allocateMemory()">allocateMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#allocateMemory(int)">allocateMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#autoRead()">autoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#autoRead(com.sun.jna.Structure[])">autoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#autoWrite()">autoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#autoWrite(com.sun.jna.Structure[])">autoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#busy()">busy</A>, <A HREF="../../../com/sun/jna/Structure.html#cacheTypeInfo(com.sun.jna.Pointer)">cacheTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#calculateAlignedSize(int)">calculateAlignedSize</A>, <A HREF="../../../com/sun/jna/Structure.html#calculateSize(boolean)">calculateSize</A>, <A HREF="../../../com/sun/jna/Structure.html#clear()">clear</A>, <A HREF="../../../com/sun/jna/Structure.html#ensureAllocated()">ensureAllocated</A>, <A HREF="../../../com/sun/jna/Structure.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../com/sun/jna/Structure.html#fields()">fields</A>, <A HREF="../../../com/sun/jna/Structure.html#getAutoRead()">getAutoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#getAutoWrite()">getAutoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#getField(com.sun.jna.Structure.StructField)">getField</A>, <A HREF="../../../com/sun/jna/Structure.html#getFieldOrder()">getFieldOrder</A>, <A HREF="../../../com/sun/jna/Structure.html#getNativeAlignment(java.lang.Class, java.lang.Object, boolean)">getNativeAlignment</A>, <A HREF="../../../com/sun/jna/Structure.html#getPointer()">getPointer</A>, <A HREF="../../../com/sun/jna/Structure.html#getStructAlignment()">getStructAlignment</A>, <A HREF="../../../com/sun/jna/Structure.html#getTypeInfo()">getTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#getTypeInfo(java.lang.Object)">getTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#hashCode()">hashCode</A>, <A HREF="../../../com/sun/jna/Structure.html#newInstance(java.lang.Class)">newInstance</A>, <A HREF="../../../com/sun/jna/Structure.html#read()">read</A>, <A HREF="../../../com/sun/jna/Structure.html#readField(java.lang.String)">readField</A>, <A HREF="../../../com/sun/jna/Structure.html#readField(com.sun.jna.Structure.StructField)">readField</A>, <A HREF="../../../com/sun/jna/Structure.html#reading()">reading</A>, <A HREF="../../../com/sun/jna/Structure.html#setAlignType(int)">setAlignType</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoRead(boolean)">setAutoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoSynch(boolean)">setAutoSynch</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoWrite(boolean)">setAutoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#setField(com.sun.jna.Structure.StructField, java.lang.Object)">setField</A>, <A HREF="../../../com/sun/jna/Structure.html#setFieldOrder(java.lang.String[])">setFieldOrder</A>, <A HREF="../../../com/sun/jna/Structure.html#setTypeMapper(com.sun.jna.TypeMapper)">setTypeMapper</A>, <A HREF="../../../com/sun/jna/Structure.html#size()">size</A>, <A HREF="../../../com/sun/jna/Structure.html#sortFields(java.lang.reflect.Field[], java.lang.String[])">sortFields</A>, <A HREF="../../../com/sun/jna/Structure.html#toArray(int)">toArray</A>, <A HREF="../../../com/sun/jna/Structure.html#toArray(com.sun.jna.Structure[])">toArray</A>, <A HREF="../../../com/sun/jna/Structure.html#toString()">toString</A>, <A HREF="../../../com/sun/jna/Structure.html#updateStructureByReference(java.lang.Class, com.sun.jna.Structure, com.sun.jna.Pointer)">updateStructureByReference</A>, <A HREF="../../../com/sun/jna/Structure.html#useMemory(com.sun.jna.Pointer)">useMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#useMemory(com.sun.jna.Pointer, int)">useMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#write()">write</A>, <A HREF="../../../com/sun/jna/Structure.html#writeField(java.lang.String)">writeField</A>, <A HREF="../../../com/sun/jna/Structure.html#writeField(java.lang.String, java.lang.Object)">writeField</A>, <A HREF="../../../com/sun/jna/Structure.html#writeField(com.sun.jna.Structure.StructField)">writeField</A></CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
@@ -317,7 +317,7 @@ static <A HREF="../../../com/sun/jna/Pointer.html" title="class in com.sun.jna">
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -219,7 +219,7 @@ public <B>Structure.FFIType.size_t</B>(long value)</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -123,6 +123,14 @@ Class Structure.StructField</H2>
|
||||
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Field.html" title="class or interface in java.lang.reflect">Field</A></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.StructField.html#field">field</A></B></CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.StructField.html#isReadOnly">isReadOnly</A></B></CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
@@ -291,6 +299,16 @@ public boolean <B>isVolatile</B></PRE>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="isReadOnly"><!-- --></A><H3>
|
||||
isReadOnly</H3>
|
||||
<PRE>
|
||||
public boolean <B>isReadOnly</B></PRE>
|
||||
<DL>
|
||||
<DL>
|
||||
</DL>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="readConverter"><!-- --></A><H3>
|
||||
readConverter</H3>
|
||||
<PRE>
|
||||
@@ -360,7 +378,7 @@ Structure.StructField</H3>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -119,7 +119,9 @@ Represents a native structure with a Java peer class. When used as a
|
||||
<li><code>volatile</code> JNA will not write the field unless specifically
|
||||
instructed to do so via <A HREF="../../../com/sun/jna/Structure.html#writeField(java.lang.String)"><CODE>writeField(String)</CODE></A>.
|
||||
<li><code>final</code> JNA will overwrite the field via <A HREF="../../../com/sun/jna/Structure.html#read()"><CODE>read()</CODE></A>,
|
||||
but otherwise the field is not modifiable from Java.
|
||||
but otherwise the field is not modifiable from Java. Take care when using
|
||||
this option, since the compiler will usually assume <em>all</em> accesses
|
||||
to the field (for a given Structure instance) have the same value.
|
||||
</ul>
|
||||
NOTE: Strings are used to represent native C strings because usage of
|
||||
<code>char *</code> is generally more common than <code>wchar_t *</code>.
|
||||
@@ -340,6 +342,14 @@ Represents a native structure with a Java peer class. When used as a
|
||||
<CODE> void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.html#autoRead()">autoRead</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>static void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.html#autoRead(com.sun.jna.Structure[])">autoRead</A></B>(<A HREF="../../../com/sun/jna/Structure.html" title="class in com.sun.jna">Structure</A>[] ss)</CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
@@ -348,6 +358,22 @@ Represents a native structure with a Java peer class. When used as a
|
||||
<CODE> void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.html#autoWrite()">autoWrite</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>static void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.html#autoWrite(com.sun.jna.Structure[])">autoWrite</A></B>(<A HREF="../../../com/sun/jna/Structure.html" title="class in com.sun.jna">Structure</A>[] ss)</CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>(package private) static <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.html#busy()">busy</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
@@ -397,8 +423,8 @@ Represents a native structure with a Java peer class. When used as a
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</CODE>
|
||||
|
||||
<BR>
|
||||
This structure is only equal to another based on the same native
|
||||
memory address and data type.</TD>
|
||||
This structure is equal to another based on the same data type
|
||||
and visible data fields.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
@@ -527,6 +553,14 @@ Represents a native structure with a Java peer class. When used as a
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>(package private) static <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A></CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.html#reading()">reading</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE>protected void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../com/sun/jna/Structure.html#setAlignType(int)">setAlignType</A></B>(int alignType)</CODE>
|
||||
|
||||
@@ -1018,6 +1052,28 @@ public <A HREF="../../../com/sun/jna/Pointer.html" title="class in com.sun.jna">
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="busy()"><!-- --></A><H3>
|
||||
busy</H3>
|
||||
<PRE>
|
||||
static <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A> <B>busy</B>()</PRE>
|
||||
<DL>
|
||||
<DD><DL>
|
||||
</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="reading()"><!-- --></A><H3>
|
||||
reading</H3>
|
||||
<PRE>
|
||||
static <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> <B>reading</B>()</PRE>
|
||||
<DL>
|
||||
<DD><DL>
|
||||
</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="read()"><!-- --></A><H3>
|
||||
read</H3>
|
||||
<PRE>
|
||||
@@ -1282,8 +1338,9 @@ public <A HREF="../../../com/sun/jna/Structure.html" title="class in com.sun.jna
|
||||
<DL>
|
||||
<DD>Returns a view of this structure's memory as an array of structures.
|
||||
Note that this <code>Structure</code> must have a public, no-arg
|
||||
constructor. If the structure is currently using a <A HREF="../../../com/sun/jna/Memory.html" title="class in com.sun.jna"><CODE>Memory</CODE></A>
|
||||
backing, the memory will be resized to fit the entire array.
|
||||
constructor. If the structure is currently using auto-allocated
|
||||
<A HREF="../../../com/sun/jna/Memory.html" title="class in com.sun.jna"><CODE>Memory</CODE></A> backing, the memory will be resized to fit the entire
|
||||
array.
|
||||
<P>
|
||||
<DD><DL>
|
||||
</DL>
|
||||
@@ -1298,8 +1355,9 @@ public <A HREF="../../../com/sun/jna/Structure.html" title="class in com.sun.jna
|
||||
<DL>
|
||||
<DD>Returns a view of this structure's memory as an array of structures.
|
||||
Note that this <code>Structure</code> must have a public, no-arg
|
||||
constructor. If the structure is currently using a <A HREF="../../../com/sun/jna/Memory.html" title="class in com.sun.jna"><CODE>Memory</CODE></A>
|
||||
backing, the memory will be resized to fit the entire array.
|
||||
constructor. If the structure is currently using auto-allocated
|
||||
<A HREF="../../../com/sun/jna/Memory.html" title="class in com.sun.jna"><CODE>Memory</CODE></A> backing, the memory will be resized to fit the entire
|
||||
array.
|
||||
<P>
|
||||
<DD><DL>
|
||||
</DL>
|
||||
@@ -1312,8 +1370,8 @@ equals</H3>
|
||||
<PRE>
|
||||
public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</PRE>
|
||||
<DL>
|
||||
<DD>This structure is only equal to another based on the same native
|
||||
memory address and data type.
|
||||
<DD>This structure is equal to another based on the same data type
|
||||
and visible data fields.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></DL>
|
||||
@@ -1470,6 +1528,17 @@ public static <A HREF="../../../com/sun/jna/Structure.html" title="class in com.
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="autoRead(com.sun.jna.Structure[])"><!-- --></A><H3>
|
||||
autoRead</H3>
|
||||
<PRE>
|
||||
public static void <B>autoRead</B>(<A HREF="../../../com/sun/jna/Structure.html" title="class in com.sun.jna">Structure</A>[] ss)</PRE>
|
||||
<DL>
|
||||
<DD><DL>
|
||||
</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="autoRead()"><!-- --></A><H3>
|
||||
autoRead</H3>
|
||||
<PRE>
|
||||
@@ -1481,6 +1550,17 @@ public void <B>autoRead</B>()</PRE>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="autoWrite(com.sun.jna.Structure[])"><!-- --></A><H3>
|
||||
autoWrite</H3>
|
||||
<PRE>
|
||||
public static void <B>autoWrite</B>(<A HREF="../../../com/sun/jna/Structure.html" title="class in com.sun.jna">Structure</A>[] ss)</PRE>
|
||||
<DL>
|
||||
<DD><DL>
|
||||
</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="autoWrite()"><!-- --></A><H3>
|
||||
autoWrite</H3>
|
||||
<PRE>
|
||||
@@ -1514,7 +1594,7 @@ public void <B>autoWrite</B>()</PRE>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -245,7 +245,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Field.
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -236,7 +236,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Field.
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -184,7 +184,7 @@ ToNativeContext</H3>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -212,7 +212,7 @@ nativeType</H3>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -163,7 +163,7 @@ Convenience interface for bidirectional conversion.
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -189,7 +189,7 @@ getToNativeConverter</H3>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -324,7 +324,7 @@ Represents a native union. When writing to native memory, the field
|
||||
<TH ALIGN="left"><B>Methods inherited from class com.sun.jna.<A HREF="../../../com/sun/jna/Structure.html" title="class in com.sun.jna">Structure</A></B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><A HREF="../../../com/sun/jna/Structure.html#allocateMemory()">allocateMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#allocateMemory(int)">allocateMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#autoRead()">autoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#autoWrite()">autoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#cacheTypeInfo(com.sun.jna.Pointer)">cacheTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#calculateAlignedSize(int)">calculateAlignedSize</A>, <A HREF="../../../com/sun/jna/Structure.html#clear()">clear</A>, <A HREF="../../../com/sun/jna/Structure.html#ensureAllocated()">ensureAllocated</A>, <A HREF="../../../com/sun/jna/Structure.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../com/sun/jna/Structure.html#fields()">fields</A>, <A HREF="../../../com/sun/jna/Structure.html#getAutoRead()">getAutoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#getAutoWrite()">getAutoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#getField(com.sun.jna.Structure.StructField)">getField</A>, <A HREF="../../../com/sun/jna/Structure.html#getFieldOrder()">getFieldOrder</A>, <A HREF="../../../com/sun/jna/Structure.html#getPointer()">getPointer</A>, <A HREF="../../../com/sun/jna/Structure.html#getStructAlignment()">getStructAlignment</A>, <A HREF="../../../com/sun/jna/Structure.html#getTypeInfo(java.lang.Object)">getTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#hashCode()">hashCode</A>, <A HREF="../../../com/sun/jna/Structure.html#newInstance(java.lang.Class)">newInstance</A>, <A HREF="../../../com/sun/jna/Structure.html#read()">read</A>, <A HREF="../../../com/sun/jna/Structure.html#setAlignType(int)">setAlignType</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoRead(boolean)">setAutoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoSynch(boolean)">setAutoSynch</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoWrite(boolean)">setAutoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#setField(com.sun.jna.Structure.StructField, java.lang.Object)">setField</A>, <A HREF="../../../com/sun/jna/Structure.html#setFieldOrder(java.lang.String[])">setFieldOrder</A>, <A HREF="../../../com/sun/jna/Structure.html#setTypeMapper(com.sun.jna.TypeMapper)">setTypeMapper</A>, <A HREF="../../../com/sun/jna/Structure.html#size()">size</A>, <A HREF="../../../com/sun/jna/Structure.html#sortFields(java.lang.reflect.Field[], java.lang.String[])">sortFields</A>, <A HREF="../../../com/sun/jna/Structure.html#toArray(int)">toArray</A>, <A HREF="../../../com/sun/jna/Structure.html#toArray(com.sun.jna.Structure[])">toArray</A>, <A HREF="../../../com/sun/jna/Structure.html#toString()">toString</A>, <A HREF="../../../com/sun/jna/Structure.html#updateStructureByReference(java.lang.Class, com.sun.jna.Structure, com.sun.jna.Pointer)">updateStructureByReference</A>, <A HREF="../../../com/sun/jna/Structure.html#useMemory(com.sun.jna.Pointer)">useMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#useMemory(com.sun.jna.Pointer, int)">useMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#write()">write</A></CODE></TD>
|
||||
<TD><CODE><A HREF="../../../com/sun/jna/Structure.html#allocateMemory()">allocateMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#allocateMemory(int)">allocateMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#autoRead()">autoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#autoRead(com.sun.jna.Structure[])">autoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#autoWrite()">autoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#autoWrite(com.sun.jna.Structure[])">autoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#busy()">busy</A>, <A HREF="../../../com/sun/jna/Structure.html#cacheTypeInfo(com.sun.jna.Pointer)">cacheTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#calculateAlignedSize(int)">calculateAlignedSize</A>, <A HREF="../../../com/sun/jna/Structure.html#clear()">clear</A>, <A HREF="../../../com/sun/jna/Structure.html#ensureAllocated()">ensureAllocated</A>, <A HREF="../../../com/sun/jna/Structure.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../com/sun/jna/Structure.html#fields()">fields</A>, <A HREF="../../../com/sun/jna/Structure.html#getAutoRead()">getAutoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#getAutoWrite()">getAutoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#getField(com.sun.jna.Structure.StructField)">getField</A>, <A HREF="../../../com/sun/jna/Structure.html#getFieldOrder()">getFieldOrder</A>, <A HREF="../../../com/sun/jna/Structure.html#getPointer()">getPointer</A>, <A HREF="../../../com/sun/jna/Structure.html#getStructAlignment()">getStructAlignment</A>, <A HREF="../../../com/sun/jna/Structure.html#getTypeInfo(java.lang.Object)">getTypeInfo</A>, <A HREF="../../../com/sun/jna/Structure.html#hashCode()">hashCode</A>, <A HREF="../../../com/sun/jna/Structure.html#newInstance(java.lang.Class)">newInstance</A>, <A HREF="../../../com/sun/jna/Structure.html#read()">read</A>, <A HREF="../../../com/sun/jna/Structure.html#reading()">reading</A>, <A HREF="../../../com/sun/jna/Structure.html#setAlignType(int)">setAlignType</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoRead(boolean)">setAutoRead</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoSynch(boolean)">setAutoSynch</A>, <A HREF="../../../com/sun/jna/Structure.html#setAutoWrite(boolean)">setAutoWrite</A>, <A HREF="../../../com/sun/jna/Structure.html#setField(com.sun.jna.Structure.StructField, java.lang.Object)">setField</A>, <A HREF="../../../com/sun/jna/Structure.html#setFieldOrder(java.lang.String[])">setFieldOrder</A>, <A HREF="../../../com/sun/jna/Structure.html#setTypeMapper(com.sun.jna.TypeMapper)">setTypeMapper</A>, <A HREF="../../../com/sun/jna/Structure.html#size()">size</A>, <A HREF="../../../com/sun/jna/Structure.html#sortFields(java.lang.reflect.Field[], java.lang.String[])">sortFields</A>, <A HREF="../../../com/sun/jna/Structure.html#toArray(int)">toArray</A>, <A HREF="../../../com/sun/jna/Structure.html#toArray(com.sun.jna.Structure[])">toArray</A>, <A HREF="../../../com/sun/jna/Structure.html#toString()">toString</A>, <A HREF="../../../com/sun/jna/Structure.html#updateStructureByReference(java.lang.Class, com.sun.jna.Structure, com.sun.jna.Pointer)">updateStructureByReference</A>, <A HREF="../../../com/sun/jna/Structure.html#useMemory(com.sun.jna.Pointer)">useMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#useMemory(com.sun.jna.Pointer, int)">useMemory</A>, <A HREF="../../../com/sun/jna/Structure.html#write()">write</A></CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
@@ -656,7 +656,7 @@ getTypeInfo</H3>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -353,7 +353,7 @@ public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/CharSequence.h
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -233,7 +233,7 @@ public static void <B>main</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function windowTitle()
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
@@ -233,7 +233,7 @@ public static void <B>main</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.0</font></EM>
|
||||
<b>JNA API</><font size="-1"> 3.2.4</font></EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário