Package org.lwjgl.nuklear
Class NkMemoryStatus
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkMemoryStatus
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class NkMemoryStatus extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct nk_memory_status { void * memory; unsigned int type; nk_size size; nk_size allocated; nk_size needed; nk_size calls; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NkMemoryStatus.Buffer
An array ofNkMemoryStatus
structs.
-
Constructor Summary
Constructors Constructor Description NkMemoryStatus(java.nio.ByteBuffer container)
Creates aNkMemoryStatus
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
allocated()
Returns the value of theallocated
field.static NkMemoryStatus
calloc()
Returns a newNkMemoryStatus
instance allocated withmemCalloc
.static NkMemoryStatus.Buffer
calloc(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated withmemCalloc
.static NkMemoryStatus
callocStack()
Returns a newNkMemoryStatus
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkMemoryStatus.Buffer
callocStack(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkMemoryStatus.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatus.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkMemoryStatus
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatus
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.long
calls()
Returns the value of thecalls
field.static NkMemoryStatus
create()
Returns a newNkMemoryStatus
instance allocated withBufferUtils
.static NkMemoryStatus.Buffer
create(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated withBufferUtils
.static NkMemoryStatus
create(long address)
Returns a newNkMemoryStatus
instance for the specified memory address.static NkMemoryStatus.Buffer
create(long address, int capacity)
Create aNkMemoryStatus.Buffer
instance at the specified memory.static NkMemoryStatus
createSafe(long address)
static NkMemoryStatus.Buffer
createSafe(long address, int capacity)
static NkMemoryStatus
malloc()
Returns a newNkMemoryStatus
instance allocated withmemAlloc
.static NkMemoryStatus.Buffer
malloc(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated withmemAlloc
.static NkMemoryStatus
mallocStack()
Returns a newNkMemoryStatus
instance allocated on the thread-localMemoryStack
.static NkMemoryStatus.Buffer
mallocStack(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated on the thread-localMemoryStack
.static NkMemoryStatus.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatus.Buffer
instance allocated on the specifiedMemoryStack
.static NkMemoryStatus
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatus
instance allocated on the specifiedMemoryStack
.java.nio.ByteBuffer
memory()
Returns aByteBuffer
view of the data pointed to by thememory
field.static long
nallocated(long struct)
Unsafe version ofallocated()
.static long
ncalls(long struct)
Unsafe version ofcalls()
.long
needed()
Returns the value of theneeded
field.static java.nio.ByteBuffer
nmemory(long struct)
Unsafe version ofmemory
.static long
nneeded(long struct)
Unsafe version ofneeded()
.static long
nsize(long struct)
Unsafe version ofsize()
.static int
ntype(long struct)
Unsafe version oftype()
.long
size()
Returns the value of thesize
field.int
sizeof()
int
type()
Returns the value of thetype
field.
-
-
-
Constructor Detail
-
NkMemoryStatus
public NkMemoryStatus(java.nio.ByteBuffer container)
Creates aNkMemoryStatus
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
-
memory
public java.nio.ByteBuffer memory()
Returns aByteBuffer
view of the data pointed to by thememory
field.
-
type
public int type()
Returns the value of thetype
field.
-
size
public long size()
Returns the value of thesize
field.
-
allocated
public long allocated()
Returns the value of theallocated
field.
-
needed
public long needed()
Returns the value of theneeded
field.
-
calls
public long calls()
Returns the value of thecalls
field.
-
malloc
public static NkMemoryStatus malloc()
Returns a newNkMemoryStatus
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NkMemoryStatus calloc()
Returns a newNkMemoryStatus
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NkMemoryStatus create()
Returns a newNkMemoryStatus
instance allocated withBufferUtils
.
-
create
public static NkMemoryStatus create(long address)
Returns a newNkMemoryStatus
instance for the specified memory address.
-
createSafe
@Nullable public static NkMemoryStatus createSafe(long address)
-
malloc
public static NkMemoryStatus.Buffer malloc(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static NkMemoryStatus.Buffer calloc(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static NkMemoryStatus.Buffer create(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static NkMemoryStatus.Buffer create(long address, int capacity)
Create aNkMemoryStatus.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NkMemoryStatus.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkMemoryStatus mallocStack()
Returns a newNkMemoryStatus
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NkMemoryStatus callocStack()
Returns a newNkMemoryStatus
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NkMemoryStatus mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatus
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NkMemoryStatus callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatus
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static NkMemoryStatus.Buffer mallocStack(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static NkMemoryStatus.Buffer callocStack(int capacity)
Returns a newNkMemoryStatus.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static NkMemoryStatus.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatus.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static NkMemoryStatus.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatus.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nmemory
public static java.nio.ByteBuffer nmemory(long struct)
Unsafe version ofmemory
.
-
ntype
public static int ntype(long struct)
Unsafe version oftype()
.
-
nsize
public static long nsize(long struct)
Unsafe version ofsize()
.
-
nallocated
public static long nallocated(long struct)
Unsafe version ofallocated()
.
-
nneeded
public static long nneeded(long struct)
Unsafe version ofneeded()
.
-
ncalls
public static long ncalls(long struct)
Unsafe version ofcalls()
.
-
-