Package org.lwjgl.nuklear
Class NkMemory
- All Implemented Interfaces:
Pointer
struct nk_memory {
void * ptr;
nk_size size;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkMemory(ByteBuffer container) Creates aNkMemoryinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkMemorycreate(long address) Returns a newNkMemoryinstance for the specified memory address.static NkMemory.Buffercreate(long address, int capacity) Create aNkMemory.Bufferinstance at the specified memory.static @Nullable NkMemorycreateSafe(long address) static @Nullable NkMemory.BuffercreateSafe(long address, int capacity) static @Nullable ByteBuffernptr(long struct) Unsafe version ofptr.static longnsize(long struct) Unsafe version ofsize().@Nullable ByteBufferptr()longsize()intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
PTR
public static final int PTRThe struct member offsets. -
SIZE
public static final int SIZEThe struct member offsets.
-
-
Constructor Details
-
NkMemory
Creates aNkMemoryinstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct). -
ptr
- Returns:
- a
ByteBufferview of the data pointed to by theptrfield.
-
size
public long size()- Returns:
- the value of the
sizefield.
-
create
Returns a newNkMemoryinstance for the specified memory address. -
createSafe
-
create
Create aNkMemory.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
nptr
Unsafe version ofptr. -
nsize
public static long nsize(long struct) Unsafe version ofsize().
-