Package org.lwjgl.nuklear
Class NkHandle
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkHandle
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkHandle extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
union nk_handle { void * ptr; int id; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkHandle.BufferAn array ofNkHandlestructs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NkHandlecalloc()Returns a newNkHandleinstance allocated withmemCalloc.static NkHandle.Buffercalloc(int capacity)Returns a newNkHandle.Bufferinstance allocated withmemCalloc.static NkHandlecallocStack()Returns a newNkHandleinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkHandle.BuffercallocStack(int capacity)Returns a newNkHandle.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkHandle.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkHandle.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkHandlecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkHandleinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkHandlecreate()Returns a newNkHandleinstance allocated withBufferUtils.static NkHandle.Buffercreate(int capacity)Returns a newNkHandle.Bufferinstance allocated withBufferUtils.static NkHandlecreate(long address)Returns a newNkHandleinstance for the specified memory address.static NkHandle.Buffercreate(long address, int capacity)Create aNkHandle.Bufferinstance at the specified memory.static NkHandlecreateSafe(long address)static NkHandle.BuffercreateSafe(long address, int capacity)intid()Returns the value of theidfield.NkHandleid(int value)Sets the specified value to theidfield.static NkHandlemalloc()Returns a newNkHandleinstance allocated withmemAlloc.static NkHandle.Buffermalloc(int capacity)Returns a newNkHandle.Bufferinstance allocated withmemAlloc.static NkHandlemallocStack()Returns a newNkHandleinstance allocated on the thread-localMemoryStack.static NkHandle.BuffermallocStack(int capacity)Returns a newNkHandle.Bufferinstance allocated on the thread-localMemoryStack.static NkHandle.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkHandle.Bufferinstance allocated on the specifiedMemoryStack.static NkHandlemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkHandleinstance allocated on the specifiedMemoryStack.static intnid(long struct)Unsafe version ofid().static voidnid(long struct, int value)Unsafe version ofid.static longnptr(long struct)Unsafe version ofptr().static voidnptr(long struct, long value)Unsafe version ofptr.longptr()Returns the value of theptrfield.NkHandleptr(long value)Sets the specified value to theptrfield.NkHandleset(NkHandle src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
NkHandle
public NkHandle(java.nio.ByteBuffer container)
Creates aNkHandleinstance 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
-
ptr
public long ptr()
Returns the value of theptrfield.
-
id
public int id()
Returns the value of theidfield.
-
ptr
public NkHandle ptr(long value)
Sets the specified value to theptrfield.
-
id
public NkHandle id(int value)
Sets the specified value to theidfield.
-
set
public NkHandle set(NkHandle src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkHandle malloc()
Returns a newNkHandleinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkHandle calloc()
Returns a newNkHandleinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkHandle create(long address)
Returns a newNkHandleinstance for the specified memory address.
-
createSafe
@Nullable public static NkHandle createSafe(long address)
-
malloc
public static NkHandle.Buffer malloc(int capacity)
Returns a newNkHandle.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkHandle.Buffer calloc(int capacity)
Returns a newNkHandle.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkHandle.Buffer create(int capacity)
Returns a newNkHandle.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkHandle.Buffer create(long address, int capacity)
Create aNkHandle.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkHandle.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkHandle mallocStack()
Returns a newNkHandleinstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkHandle callocStack()
Returns a newNkHandleinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkHandle mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkHandleinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkHandle callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkHandleinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static NkHandle.Buffer mallocStack(int capacity)
Returns a newNkHandle.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkHandle.Buffer callocStack(int capacity)
Returns a newNkHandle.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static NkHandle.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkHandle.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static NkHandle.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkHandle.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nptr
public static long nptr(long struct)
Unsafe version ofptr().
-
nid
public static int nid(long struct)
Unsafe version ofid().
-
nptr
public static void nptr(long struct, long value)Unsafe version ofptr.
-
nid
public static void nid(long struct, int value)Unsafe version ofid.
-
-