Package org.lwjgl.system.libffi
Class FFICIF
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.libffi.FFICIF
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class FFICIF extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FFICIF.Buffer
An array ofFFICIF
structs.
-
Constructor Summary
Constructors Constructor Description FFICIF(java.nio.ByteBuffer container)
Creates aFFICIF
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
abi()
org.lwjgl.PointerBuffer
arg_types(int capacity)
int
bytes()
static FFICIF
calloc()
Returns a newFFICIF
instance allocated withmemCalloc
.static FFICIF.Buffer
calloc(int capacity)
Returns a newFFICIF.Buffer
instance allocated withmemCalloc
.static FFICIF.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newFFICIF.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static FFICIF
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newFFICIF
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static FFICIF
create()
Returns a newFFICIF
instance allocated withBufferUtils
.static FFICIF.Buffer
create(int capacity)
Returns a newFFICIF.Buffer
instance allocated withBufferUtils
.static FFICIF
create(long address)
Returns a newFFICIF
instance for the specified memory address.static FFICIF.Buffer
create(long address, int capacity)
Create aFFICIF.Buffer
instance at the specified memory.static FFICIF
createSafe(long address)
static FFICIF.Buffer
createSafe(long address, int capacity)
int
flags()
static FFICIF
malloc()
Returns a newFFICIF
instance allocated withmemAlloc
.static FFICIF.Buffer
malloc(int capacity)
Returns a newFFICIF.Buffer
instance allocated withmemAlloc
.static FFICIF.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newFFICIF.Buffer
instance allocated on the specifiedMemoryStack
.static FFICIF
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newFFICIF
instance allocated on the specifiedMemoryStack
.static int
nabi(long struct)
Unsafe version ofabi()
.static org.lwjgl.PointerBuffer
narg_types(long struct, int capacity)
Unsafe version ofarg_types
.int
nargs()
static int
nbytes(long struct)
Unsafe version ofbytes()
.static int
nflags(long struct)
Unsafe version offlags()
.static int
nnargs(long struct)
Unsafe version ofnargs()
.static FFIType
nrtype(long struct)
Unsafe version ofrtype()
.FFIType
rtype()
int
sizeof()
-
-
-
Constructor Detail
-
FFICIF
public FFICIF(java.nio.ByteBuffer container)
Creates aFFICIF
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
abi
public int abi()
- Returns:
- the value of the
abi
field.
-
nargs
public int nargs()
- Returns:
- the value of the
nargs
field.
-
arg_types
public org.lwjgl.PointerBuffer arg_types(int capacity)
- Parameters:
capacity
- the number of elements in the returned buffer- Returns:
- a
PointerBuffer
view of the data pointed to by thearg_types
field.
-
bytes
public int bytes()
- Returns:
- the value of the
bytes
field.
-
flags
public int flags()
- Returns:
- the value of the
flags
field.
-
malloc
public static FFICIF malloc()
Returns a newFFICIF
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static FFICIF calloc()
Returns a newFFICIF
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static FFICIF create()
Returns a newFFICIF
instance allocated withBufferUtils
.
-
create
public static FFICIF create(long address)
Returns a newFFICIF
instance for the specified memory address.
-
createSafe
@Nullable public static FFICIF createSafe(long address)
-
malloc
public static FFICIF.Buffer malloc(int capacity)
Returns a newFFICIF.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static FFICIF.Buffer calloc(int capacity)
Returns a newFFICIF.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static FFICIF.Buffer create(int capacity)
Returns a newFFICIF.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static FFICIF.Buffer create(long address, int capacity)
Create aFFICIF.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static FFICIF.Buffer createSafe(long address, int capacity)
-
malloc
public static FFICIF malloc(org.lwjgl.system.MemoryStack stack)
Returns a newFFICIF
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static FFICIF calloc(org.lwjgl.system.MemoryStack stack)
Returns a newFFICIF
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
public static FFICIF.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newFFICIF.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public static FFICIF.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newFFICIF.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nabi
public static int nabi(long struct)
Unsafe version ofabi()
.
-
nnargs
public static int nnargs(long struct)
Unsafe version ofnargs()
.
-
narg_types
public static org.lwjgl.PointerBuffer narg_types(long struct, int capacity)
Unsafe version ofarg_types
.
-
nbytes
public static int nbytes(long struct)
Unsafe version ofbytes()
.
-
nflags
public static int nflags(long struct)
Unsafe version offlags()
.
-
-