| Modifier and Type | Class and Description |
|---|---|
| public static interface | Closure.Buffer
An interface to the native callback parameter buffer. |
| public static interface | Closure.Handle
A Handle is allocated by the |
| invoke | back to summary |
|---|---|
| public void invoke(Closure. | |
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: A native memory address.The parameter index index)Gets the value of a native pointer parameter. |
| public byte | Returns: An 8 bit integer value.The parameter index index)Gets the value of an 8 bit integer parameter. |
| public double | Returns: A 64 bit floating point value.The parameter index index)Gets the value of a 64 bit floating point parameter. |
| public float | Returns: A 32 bit floating point value.The parameter index index)Gets the value of a 32 bit floating point parameter. |
| public int | Returns: A 32 bit integer value.The parameter index index)Gets the value of a 32 bit integer parameter. |
| public long | Returns: A 64 bit integer value.The parameter index index)Gets the value of a 64 bit integer parameter. |
| public short | Returns: A 16 bit integer value.The parameter index index)Gets the value of a 16 bit integer parameter. |
| public long | Returns: A native memory address.The parameter index index)Gets the address of a struct parameter that is passed by value. |
| public void | setAddressReturn(long
The native pointer value to return from the closure. address)Sets the closure return value to a native pointer value. |
| public void | setByteReturn(byte
The 8 bit integer value to return from the closure. value)Sets the closure return value to an 8 bit integer value. |
| public void | setDoubleReturn(double
The 64 bit floating point value to return from the closure. value)Sets the closure return value to a 64 bit floating point value. |
| public void | setFloatReturn(float
The 32 bit floating point value to return from the closure. value)Sets the closure return value to a 32 bit floating point value. |
| public void | setIntReturn(int
The 32 bit integer value to return from the closure. value)Sets the closure return value to a 32 bit integer value. |
| public void | setLongReturn(long
The 64 bit integer value to return from the closure. value)Sets the closure return value to a 64 bit integer value. |
| public void | setShortReturn(short
The 16 bit integer value to return from the closure. value)Sets the closure return value to a 16 bit integer value. |
| public void | setStructReturn(long
The address of a native struct to return as a struct value from the closure. address)Sets the closure return value to the contents of a struct |
| public void | setStructReturn(byte[]
Struct data packed into a byte array to return as a struct value from the closure. data, int the offset within the byte array to start copying data offset)Sets the closure return value to the contents of a struct |
| getAddress | back to summary |
|---|---|
| public long getAddress(int index) Gets the value of a native pointer parameter.
| |
| getByte | back to summary |
|---|---|
| public byte getByte(int index) Gets the value of an 8 bit integer parameter.
| |
| getDouble | back to summary |
|---|---|
| public double getDouble(int index) Gets the value of a 64 bit floating point parameter.
| |
| getFloat | back to summary |
|---|---|
| public float getFloat(int index) Gets the value of a 32 bit floating point parameter.
| |
| getInt | back to summary |
|---|---|
| public int getInt(int index) Gets the value of a 32 bit integer parameter.
| |
| getLong | back to summary |
|---|---|
| public long getLong(int index) Gets the value of a 64 bit integer parameter.
| |
| getShort | back to summary |
|---|---|
| public short getShort(int index) Gets the value of a 16 bit integer parameter.
| |
| getStruct | back to summary |
|---|---|
| public long getStruct(int index) Gets the address of a struct parameter that is passed by value.
| |
| setAddressReturn | back to summary |
|---|---|
| public void setAddressReturn(long address) Sets the closure return value to a native pointer value.
| |
| setByteReturn | back to summary |
|---|---|
| public void setByteReturn(byte value) Sets the closure return value to an 8 bit integer value.
| |
| setDoubleReturn | back to summary |
|---|---|
| public void setDoubleReturn(double value) Sets the closure return value to a 64 bit floating point value.
| |
| setFloatReturn | back to summary |
|---|---|
| public void setFloatReturn(float value) Sets the closure return value to a 32 bit floating point value.
| |
| setIntReturn | back to summary |
|---|---|
| public void setIntReturn(int value) Sets the closure return value to a 32 bit integer value.
| |
| setLongReturn | back to summary |
|---|---|
| public void setLongReturn(long value) Sets the closure return value to a 64 bit integer value.
| |
| setShortReturn | back to summary |
|---|---|
| public void setShortReturn(short value) Sets the closure return value to a 16 bit integer value.
| |
| setStructReturn | back to summary |
|---|---|
| public void setStructReturn(long address) Sets the closure return value to the contents of a struct
| |
| setStructReturn | back to summary |
|---|---|
| public void setStructReturn(byte[] data, int offset) Sets the closure return value to the contents of a struct
| |
ClosureManager, as a strong reference
to the native closure trampoline.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public long | Returns: The native address of the closure code.Gets the native code address of the closure. |
| public void | setAutoRelease(boolean
If true, the closure memory is automatically managed,
else the closure memory must be explicitly freed. autorelease)Sets whether the closure memory should be released when the |
| dispose | back to summary |
|---|---|
| public void dispose() Releases the closure memory back to the operating system.
Although the closure trampoline memory will normally be released when
the | |
| free | back to summary |
|---|---|
| public void free()
Deprecated
| |
| getAddress | back to summary |
|---|---|
| public long getAddress() Gets the native code address of the closure. This can be passed into a native function that takes a function pointer.
| |
| setAutoRelease | back to summary |
|---|---|
| public void setAutoRelease(boolean autorelease) Sets whether the closure memory should be released when the
| |