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 classFFICIF.BufferAn array ofFFICIFstructs.
-
Constructor Summary
Constructors Constructor Description FFICIF(java.nio.ByteBuffer container)Creates aFFICIFinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intabi()org.lwjgl.PointerBufferarg_types(int capacity)intbytes()static FFICIFcalloc()Returns a newFFICIFinstance allocated withmemCalloc.static FFICIF.Buffercalloc(int capacity)Returns a newFFICIF.Bufferinstance allocated withmemCalloc.static FFICIF.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newFFICIF.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static FFICIFcalloc(org.lwjgl.system.MemoryStack stack)Returns a newFFICIFinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static FFICIFcreate()Returns a newFFICIFinstance allocated withBufferUtils.static FFICIF.Buffercreate(int capacity)Returns a newFFICIF.Bufferinstance allocated withBufferUtils.static FFICIFcreate(long address)Returns a newFFICIFinstance for the specified memory address.static FFICIF.Buffercreate(long address, int capacity)Create aFFICIF.Bufferinstance at the specified memory.static FFICIFcreateSafe(long address)static FFICIF.BuffercreateSafe(long address, int capacity)intflags()static FFICIFmalloc()Returns a newFFICIFinstance allocated withmemAlloc.static FFICIF.Buffermalloc(int capacity)Returns a newFFICIF.Bufferinstance allocated withmemAlloc.static FFICIF.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newFFICIF.Bufferinstance allocated on the specifiedMemoryStack.static FFICIFmalloc(org.lwjgl.system.MemoryStack stack)Returns a newFFICIFinstance allocated on the specifiedMemoryStack.static intnabi(long struct)Unsafe version ofabi().static org.lwjgl.PointerBuffernarg_types(long struct, int capacity)Unsafe version ofarg_types.intnargs()static intnbytes(long struct)Unsafe version ofbytes().static intnflags(long struct)Unsafe version offlags().static intnnargs(long struct)Unsafe version ofnargs().static FFITypenrtype(long struct)Unsafe version ofrtype().FFITypertype()intsizeof()
-
-
-
Constructor Detail
-
FFICIF
public FFICIF(java.nio.ByteBuffer container)
Creates aFFICIFinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
abi
public int abi()
- Returns:
- the value of the
abifield.
-
nargs
public int nargs()
- Returns:
- the value of the
nargsfield.
-
arg_types
public org.lwjgl.PointerBuffer arg_types(int capacity)
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- a
PointerBufferview of the data pointed to by thearg_typesfield.
-
bytes
public int bytes()
- Returns:
- the value of the
bytesfield.
-
flags
public int flags()
- Returns:
- the value of the
flagsfield.
-
malloc
public static FFICIF malloc()
Returns a newFFICIFinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static FFICIF calloc()
Returns a newFFICIFinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static FFICIF create()
Returns a newFFICIFinstance allocated withBufferUtils.
-
create
public static FFICIF create(long address)
Returns a newFFICIFinstance for the specified memory address.
-
createSafe
@Nullable public static FFICIF createSafe(long address)
-
malloc
public static FFICIF.Buffer malloc(int capacity)
Returns a newFFICIF.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static FFICIF.Buffer calloc(int capacity)
Returns a newFFICIF.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static FFICIF.Buffer create(int capacity)
Returns a newFFICIF.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static FFICIF.Buffer create(long address, int capacity)
Create aFFICIF.Bufferinstance 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 newFFICIFinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static FFICIF calloc(org.lwjgl.system.MemoryStack stack)
Returns a newFFICIFinstance allocated on the specifiedMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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().
-
-