Package org.lwjgl.nuklear
Class NkCursor
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkCursor
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkCursor extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct nk_cursor {struct nk_imageimg;struct nk_vec2size;struct nk_vec2offset; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkCursor.BufferAn array ofNkCursorstructs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NkCursorcalloc()Returns a newNkCursorinstance allocated withmemCalloc.static NkCursor.Buffercalloc(int capacity)Returns a newNkCursor.Bufferinstance allocated withmemCalloc.static NkCursorcallocStack()Returns a newNkCursorinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkCursor.BuffercallocStack(int capacity)Returns a newNkCursor.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkCursor.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkCursorcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkCursorinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkCursorcreate()Returns a newNkCursorinstance allocated withBufferUtils.static NkCursor.Buffercreate(int capacity)Returns a newNkCursor.Bufferinstance allocated withBufferUtils.static NkCursorcreate(long address)Returns a newNkCursorinstance for the specified memory address.static NkCursor.Buffercreate(long address, int capacity)Create aNkCursor.Bufferinstance at the specified memory.static NkCursorcreateSafe(long address)static NkCursor.BuffercreateSafe(long address, int capacity)NkImageimg()Returns aNkImageview of theimgfield.NkCursorimg(java.util.function.Consumer<NkImage> consumer)Passes theimgfield to the specifiedConsumer.NkCursorimg(NkImage value)Copies the specifiedNkImageto theimgfield.static NkCursormalloc()Returns a newNkCursorinstance allocated withmemAlloc.static NkCursor.Buffermalloc(int capacity)Returns a newNkCursor.Bufferinstance allocated withmemAlloc.static NkCursormallocStack()Returns a newNkCursorinstance allocated on the thread-localMemoryStack.static NkCursor.BuffermallocStack(int capacity)Returns a newNkCursor.Bufferinstance allocated on the thread-localMemoryStack.static NkCursor.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStack.static NkCursormallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkCursorinstance allocated on the specifiedMemoryStack.static NkImagenimg(long struct)Unsafe version ofimg().static voidnimg(long struct, NkImage value)Unsafe version ofimg.static NkVec2noffset(long struct)Unsafe version ofoffset().static voidnoffset(long struct, NkVec2 value)Unsafe version ofoffset.static NkVec2nsize(long struct)Unsafe version ofsize().static voidnsize(long struct, NkVec2 value)Unsafe version ofsize.NkVec2offset()Returns aNkVec2view of theoffsetfield.NkCursoroffset(java.util.function.Consumer<NkVec2> consumer)Passes theoffsetfield to the specifiedConsumer.NkCursoroffset(NkVec2 value)Copies the specifiedNkVec2to theoffsetfield.NkCursorset(NkCursor src)Copies the specified struct data to this struct.NkCursorset(NkImage img, NkVec2 size, NkVec2 offset)Initializes this struct with the specified values.NkVec2size()Returns aNkVec2view of thesizefield.NkCursorsize(java.util.function.Consumer<NkVec2> consumer)Passes thesizefield to the specifiedConsumer.NkCursorsize(NkVec2 value)Copies the specifiedNkVec2to thesizefield.intsizeof()
-
-
-
Constructor Detail
-
NkCursor
public NkCursor(java.nio.ByteBuffer container)
Creates aNkCursorinstance 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
-
img
public NkCursor img(java.util.function.Consumer<NkImage> consumer)
Passes theimgfield to the specifiedConsumer.
-
size
public NkCursor size(java.util.function.Consumer<NkVec2> consumer)
Passes thesizefield to the specifiedConsumer.
-
offset
public NkCursor offset(java.util.function.Consumer<NkVec2> consumer)
Passes theoffsetfield to the specifiedConsumer.
-
set
public NkCursor set(NkImage img, NkVec2 size, NkVec2 offset)
Initializes this struct with the specified values.
-
set
public NkCursor set(NkCursor src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkCursor malloc()
Returns a newNkCursorinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkCursor calloc()
Returns a newNkCursorinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkCursor create(long address)
Returns a newNkCursorinstance for the specified memory address.
-
createSafe
@Nullable public static NkCursor createSafe(long address)
-
malloc
public static NkCursor.Buffer malloc(int capacity)
Returns a newNkCursor.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkCursor.Buffer calloc(int capacity)
Returns a newNkCursor.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkCursor.Buffer create(int capacity)
Returns a newNkCursor.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkCursor.Buffer create(long address, int capacity)
Create aNkCursor.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkCursor.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkCursor mallocStack()
Returns a newNkCursorinstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkCursor callocStack()
Returns a newNkCursorinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkCursor mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkCursorinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkCursor callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkCursorinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static NkCursor.Buffer mallocStack(int capacity)
Returns a newNkCursor.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkCursor.Buffer callocStack(int capacity)
Returns a newNkCursor.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static NkCursor.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static NkCursor.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-