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.NativeResourceLayout
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 classNkMemoryStatus.BufferAn array ofNkMemoryStatusstructs.
-
Constructor Summary
Constructors Constructor Description NkMemoryStatus(java.nio.ByteBuffer container)Creates aNkMemoryStatusinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longallocated()Returns the value of theallocatedfield.static NkMemoryStatuscalloc()Returns a newNkMemoryStatusinstance allocated withmemCalloc.static NkMemoryStatus.Buffercalloc(int capacity)Returns a newNkMemoryStatus.Bufferinstance allocated withmemCalloc.static NkMemoryStatuscallocStack()Returns a newNkMemoryStatusinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkMemoryStatus.BuffercallocStack(int capacity)Returns a newNkMemoryStatus.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkMemoryStatus.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkMemoryStatus.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkMemoryStatuscallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkMemoryStatusinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.longcalls()Returns the value of thecallsfield.static NkMemoryStatuscreate()Returns a newNkMemoryStatusinstance allocated withBufferUtils.static NkMemoryStatus.Buffercreate(int capacity)Returns a newNkMemoryStatus.Bufferinstance allocated withBufferUtils.static NkMemoryStatuscreate(long address)Returns a newNkMemoryStatusinstance for the specified memory address.static NkMemoryStatus.Buffercreate(long address, int capacity)Create aNkMemoryStatus.Bufferinstance at the specified memory.static NkMemoryStatuscreateSafe(long address)static NkMemoryStatus.BuffercreateSafe(long address, int capacity)static NkMemoryStatusmalloc()Returns a newNkMemoryStatusinstance allocated withmemAlloc.static NkMemoryStatus.Buffermalloc(int capacity)Returns a newNkMemoryStatus.Bufferinstance allocated withmemAlloc.static NkMemoryStatusmallocStack()Returns a newNkMemoryStatusinstance allocated on the thread-localMemoryStack.static NkMemoryStatus.BuffermallocStack(int capacity)Returns a newNkMemoryStatus.Bufferinstance allocated on the thread-localMemoryStack.static NkMemoryStatus.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkMemoryStatus.Bufferinstance allocated on the specifiedMemoryStack.static NkMemoryStatusmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkMemoryStatusinstance allocated on the specifiedMemoryStack.java.nio.ByteBuffermemory()Returns aByteBufferview of the data pointed to by thememoryfield.static longnallocated(long struct)Unsafe version ofallocated().static longncalls(long struct)Unsafe version ofcalls().longneeded()Returns the value of theneededfield.static java.nio.ByteBuffernmemory(long struct)Unsafe version ofmemory.static longnneeded(long struct)Unsafe version ofneeded().static longnsize(long struct)Unsafe version ofsize().static intntype(long struct)Unsafe version oftype().longsize()Returns the value of thesizefield.intsizeof()inttype()Returns the value of thetypefield.
-
-
-
Constructor Detail
-
NkMemoryStatus
public NkMemoryStatus(java.nio.ByteBuffer container)
Creates aNkMemoryStatusinstance 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
-
memory
public java.nio.ByteBuffer memory()
Returns aByteBufferview of the data pointed to by thememoryfield.
-
type
public int type()
Returns the value of thetypefield.
-
size
public long size()
Returns the value of thesizefield.
-
allocated
public long allocated()
Returns the value of theallocatedfield.
-
needed
public long needed()
Returns the value of theneededfield.
-
calls
public long calls()
Returns the value of thecallsfield.
-
malloc
public static NkMemoryStatus malloc()
Returns a newNkMemoryStatusinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkMemoryStatus calloc()
Returns a newNkMemoryStatusinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkMemoryStatus create()
Returns a newNkMemoryStatusinstance allocated withBufferUtils.
-
create
public static NkMemoryStatus create(long address)
Returns a newNkMemoryStatusinstance for the specified memory address.
-
createSafe
@Nullable public static NkMemoryStatus createSafe(long address)
-
malloc
public static NkMemoryStatus.Buffer malloc(int capacity)
Returns a newNkMemoryStatus.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkMemoryStatus.Buffer calloc(int capacity)
Returns a newNkMemoryStatus.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkMemoryStatus.Buffer create(int capacity)
Returns a newNkMemoryStatus.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkMemoryStatus.Buffer create(long address, int capacity)
Create aNkMemoryStatus.Bufferinstance 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 newNkMemoryStatusinstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkMemoryStatus callocStack()
Returns a newNkMemoryStatusinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkMemoryStatus mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatusinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkMemoryStatus callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatusinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkMemoryStatus.Buffer callocStack(int capacity)
Returns a newNkMemoryStatus.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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().
-
-