Package org.lwjgl.system.libffi
Class FFICIF
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<FFICIF>
org.lwjgl.system.libffi.FFICIF
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class FFICIF
extends org.lwjgl.system.Struct<FFICIF>
implements org.lwjgl.system.NativeResource
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct member offsets.static final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionFFICIF
(ByteBuffer container) Creates aFFICIF
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
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()
.rtype()
int
sizeof()
Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
ABI
public static final int ABIThe struct member offsets. -
NARGS
public static final int NARGSThe struct member offsets. -
ARG_TYPES
public static final int ARG_TYPESThe struct member offsets. -
RTYPE
public static final int RTYPEThe struct member offsets. -
BYTES
public static final int BYTESThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets.
-
-
Constructor Details
-
FFICIF
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeof
in classorg.lwjgl.system.Struct<FFICIF>
-
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.
-
rtype
- Returns:
- a
FFIType
view of the struct pointed to by thertype
field.
-
bytes
public int bytes()- Returns:
- the value of the
bytes
field.
-
flags
public int flags()- Returns:
- the value of the
flags
field.
-
malloc
Returns a newFFICIF
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newFFICIF
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newFFICIF
instance allocated withBufferUtils
. -
create
Returns a newFFICIF
instance for the specified memory address. -
createSafe
-
malloc
Returns a newFFICIF.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newFFICIF.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newFFICIF.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aFFICIF.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newFFICIF
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newFFICIF
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newFFICIF.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newFFICIF.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
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
. -
nrtype
Unsafe version ofrtype()
. -
nbytes
public static int nbytes(long struct) Unsafe version ofbytes()
. -
nflags
public static int nflags(long struct) Unsafe version offlags()
.
-