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.
-
Constructor Summary
Constructors Constructor Description NkHandle(java.nio.ByteBuffer container)Creates aNkHandleinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated 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 NkHandle.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkHandle.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkHandlecalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkHandleinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkHandlecallocStack()Deprecated.static NkHandle.BuffercallocStack(int capacity)Deprecated.static NkHandle.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkHandlecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()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 NkHandle.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkHandle.Bufferinstance allocated on the specifiedMemoryStack.static NkHandlemalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkHandleinstance allocated on the specifiedMemoryStack.static NkHandlemallocStack()Deprecated.static NkHandle.BuffermallocStack(int capacity)Deprecated.static NkHandle.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkHandlemallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()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 the
ptrfield.
-
id
public int id()
- Returns:
- the value of the
idfield.
-
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()
Returns a newNkHandleinstance allocated withBufferUtils.
-
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
@Deprecated public static NkHandle mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkHandle callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkHandle mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkHandle callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkHandle.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkHandle.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static NkHandle.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 NkHandle.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static NkHandle malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkHandleinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NkHandle calloc(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
-
malloc
public static NkHandle.Buffer malloc(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
-
calloc
public static NkHandle.Buffer calloc(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.
-
-