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 Deprecated Methods Modifier and Type Method Description longallocated()static NkMemoryStatuscalloc()Returns a newNkMemoryStatusinstance allocated withmemCalloc.static NkMemoryStatus.Buffercalloc(int capacity)Returns a newNkMemoryStatus.Bufferinstance allocated withmemCalloc.static NkMemoryStatus.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkMemoryStatus.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkMemoryStatuscalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkMemoryStatusinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkMemoryStatuscallocStack()Deprecated.static NkMemoryStatus.BuffercallocStack(int capacity)Deprecated.static NkMemoryStatus.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkMemoryStatuscallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.longcalls()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 NkMemoryStatus.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkMemoryStatus.Bufferinstance allocated on the specifiedMemoryStack.static NkMemoryStatusmalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkMemoryStatusinstance allocated on the specifiedMemoryStack.static NkMemoryStatusmallocStack()Deprecated.static NkMemoryStatus.BuffermallocStack(int capacity)Deprecated.static NkMemoryStatus.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkMemoryStatusmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.java.nio.ByteBuffermemory()static longnallocated(long struct)Unsafe version ofallocated().static longncalls(long struct)Unsafe version ofcalls().longneeded()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()intsizeof()inttype()
-
-
-
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:
- a
ByteBufferview of the data pointed to by thememoryfield.
-
type
public int type()
- Returns:
- the value of the
typefield.
-
size
public long size()
- Returns:
- the value of the
sizefield.
-
allocated
public long allocated()
- Returns:
- the value of the
allocatedfield.
-
needed
public long needed()
- Returns:
- the value of the
neededfield.
-
calls
public long calls()
- Returns:
- the value of the
callsfield.
-
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
@Deprecated public static NkMemoryStatus mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkMemoryStatus callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkMemoryStatus mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkMemoryStatus callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkMemoryStatus.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkMemoryStatus.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static NkMemoryStatus.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkMemoryStatus.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static NkMemoryStatus malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkMemoryStatusinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NkMemoryStatus calloc(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
-
malloc
public static NkMemoryStatus.Buffer malloc(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
-
calloc
public static NkMemoryStatus.Buffer calloc(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().
-
-