public class CXType
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct CXType {
enum CXTypeKind kind;
void * data[2];
}| Modifier and Type | Class and Description |
|---|---|
static class |
CXType.Buffer
An array of
CXType structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DATA
The struct member offsets.
|
static int |
KIND
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
CXType(java.nio.ByteBuffer container)
Creates a
CXType instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static CXType |
calloc()
Returns a new
CXType instance allocated with memCalloc. |
static CXType.Buffer |
calloc(int capacity)
Returns a new
CXType.Buffer instance allocated with memCalloc. |
static CXType |
callocStack()
Returns a new
CXType instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CXType.Buffer |
callocStack(int capacity)
Returns a new
CXType.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static CXType.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CXType.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CXType |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CXType instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static CXType |
create()
Returns a new
CXType instance allocated with BufferUtils. |
static CXType.Buffer |
create(int capacity)
Returns a new
CXType.Buffer instance allocated with BufferUtils. |
static CXType |
create(long address)
Returns a new
CXType instance for the specified memory address. |
static CXType.Buffer |
create(long address,
int capacity)
Create a
CXType.Buffer instance at the specified memory. |
static CXType |
createSafe(long address)
|
static CXType.Buffer |
createSafe(long address,
int capacity)
|
org.lwjgl.PointerBuffer |
data()
Returns a
PointerBuffer view of the data field. |
long |
data(int index)
Returns the value at the specified index of the
data field. |
int |
kind()
Returns the value of the
kind field. |
static CXType |
malloc()
Returns a new
CXType instance allocated with memAlloc. |
static CXType.Buffer |
malloc(int capacity)
Returns a new
CXType.Buffer instance allocated with memAlloc. |
static CXType |
mallocStack()
Returns a new
CXType instance allocated on the thread-local MemoryStack. |
static CXType.Buffer |
mallocStack(int capacity)
Returns a new
CXType.Buffer instance allocated on the thread-local MemoryStack. |
static CXType.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
CXType.Buffer instance allocated on the specified MemoryStack. |
static CXType |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
CXType instance allocated on the specified MemoryStack. |
static org.lwjgl.PointerBuffer |
ndata(long struct)
Unsafe version of
data(). |
static long |
ndata(long struct,
int index)
Unsafe version of
data. |
static int |
nkind(long struct)
Unsafe version of
kind(). |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int KIND
public static final int DATA
public CXType(java.nio.ByteBuffer container)
CXType instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int kind()
kind field.public org.lwjgl.PointerBuffer data()
PointerBuffer view of the data field.public long data(int index)
data field.public static CXType malloc()
CXType instance allocated with memAlloc. The instance must be explicitly freed.public static CXType calloc()
CXType instance allocated with memCalloc. The instance must be explicitly freed.public static CXType create()
CXType instance allocated with BufferUtils.public static CXType create(long address)
CXType instance for the specified memory address.@Nullable public static CXType createSafe(long address)
public static CXType.Buffer malloc(int capacity)
CXType.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CXType.Buffer calloc(int capacity)
CXType.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static CXType.Buffer create(int capacity)
CXType.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static CXType.Buffer create(long address, int capacity)
CXType.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static CXType.Buffer createSafe(long address, int capacity)
public static CXType mallocStack()
CXType instance allocated on the thread-local MemoryStack.public static CXType callocStack()
CXType instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static CXType mallocStack(org.lwjgl.system.MemoryStack stack)
CXType instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static CXType callocStack(org.lwjgl.system.MemoryStack stack)
CXType instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static CXType.Buffer mallocStack(int capacity)
CXType.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static CXType.Buffer callocStack(int capacity)
CXType.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static CXType.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CXType.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static CXType.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
CXType.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nkind(long struct)
kind().public static org.lwjgl.PointerBuffer ndata(long struct)
data().public static long ndata(long struct,
int index)
data.Copyright LWJGL. All Rights Reserved. License terms.