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.
-
Constructor Summary
Constructors Constructor Description NkCursor(java.nio.ByteBuffer container)Creates aNkCursorinstance 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 NkCursorcalloc()Returns a newNkCursorinstance allocated withmemCalloc.static NkCursor.Buffercalloc(int capacity)Returns a newNkCursor.Bufferinstance allocated withmemCalloc.static NkCursor.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkCursorcalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkCursorinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkCursorcallocStack()Deprecated.static NkCursor.BuffercallocStack(int capacity)Deprecated.static NkCursor.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkCursorcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()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 NkCursor.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStack.static NkCursormalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkCursorinstance allocated on the specifiedMemoryStack.static NkCursormallocStack()Deprecated.static NkCursor.BuffermallocStack(int capacity)Deprecated.static NkCursor.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkCursormallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()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()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()
Returns a newNkCursorinstance allocated withBufferUtils.
-
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
@Deprecated public static NkCursor mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkCursor callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkCursor mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkCursor callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkCursor.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkCursor.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static NkCursor.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 NkCursor.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static NkCursor malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkCursorinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NkCursor calloc(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
-
malloc
public static NkCursor.Buffer malloc(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
-
calloc
public static NkCursor.Buffer calloc(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
-
-