Package org.lwjgl.nuklear
Class NkMemory
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkMemory
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class NkMemory extends org.lwjgl.system.Struct
Layout
struct nk_memory { void * ptr; nk_size size; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NkMemory.Buffer
An array ofNkMemory
structs.
-
Constructor Summary
Constructors Constructor Description NkMemory(java.nio.ByteBuffer container)
Creates aNkMemory
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NkMemory
create(long address)
Returns a newNkMemory
instance for the specified memory address.static NkMemory.Buffer
create(long address, int capacity)
Create aNkMemory.Buffer
instance at the specified memory.static NkMemory
createSafe(long address)
static NkMemory.Buffer
createSafe(long address, int capacity)
static java.nio.ByteBuffer
nptr(long struct)
Unsafe version ofptr
.static long
nsize(long struct)
Unsafe version ofsize()
.java.nio.ByteBuffer
ptr()
Returns aByteBuffer
view of the data pointed to by theptr
field.long
size()
Returns the value of thesize
field.int
sizeof()
-
-
-
Constructor Detail
-
NkMemory
public NkMemory(java.nio.ByteBuffer container)
Creates aNkMemory
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
-
ptr
@Nullable public java.nio.ByteBuffer ptr()
Returns aByteBuffer
view of the data pointed to by theptr
field.
-
size
public long size()
Returns the value of thesize
field.
-
create
public static NkMemory create(long address)
Returns a newNkMemory
instance for the specified memory address.
-
createSafe
@Nullable public static NkMemory createSafe(long address)
-
create
public static NkMemory.Buffer create(long address, int capacity)
Create aNkMemory.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NkMemory.Buffer createSafe(long address, int capacity)
-
nptr
@Nullable public static java.nio.ByteBuffer nptr(long struct)
Unsafe version ofptr
.
-
nsize
public static long nsize(long struct)
Unsafe version ofsize()
.
-
-