Package org.lwjgl.nuklear
Class NkCursor
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_cursor {
struct nk_image img;
struct nk_vec2 size;
struct nk_vec2 offset;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkCursor(ByteBuffer container) Creates aNkCursorinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkCursorcalloc()Returns a newNkCursorinstance allocated withmemCalloc.static NkCursor.Buffercalloc(int capacity) Returns a newNkCursor.Bufferinstance allocated withmemCalloc.static NkCursor.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkCursorcalloc(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 @Nullable NkCursorcreateSafe(long address) static @Nullable NkCursor.BuffercreateSafe(long address, int capacity) img()Passes theimgfield to the specifiedConsumer.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, MemoryStack stack) Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStack.static NkCursormalloc(MemoryStack stack) Returns a newNkCursorinstance allocated on the specifiedMemoryStack.static NkImagenimg(long struct) Unsafe version ofimg().static voidUnsafe version ofimg.static NkVec2noffset(long struct) Unsafe version ofoffset().static voidUnsafe version ofoffset.static NkVec2nsize(long struct) Unsafe version ofsize().static voidUnsafe version ofsize.offset()Passes theoffsetfield to the specifiedConsumer.Copies the specifiedNkVec2to theoffsetfield.Copies the specified struct data to this struct.Initializes this struct with the specified values.size()Passes thesizefield to the specifiedConsumer.Copies the specifiedNkVec2to thesizefield.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
IMG
public static final int IMGThe struct member offsets. -
SIZE
public static final int SIZEThe struct member offsets. -
OFFSET
public static final int OFFSETThe struct member offsets.
-
-
Constructor Details
-
NkCursor
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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct). -
img
- Returns:
- a
NkImageview of theimgfield.
-
size
- Returns:
- a
NkVec2view of thesizefield.
-
offset
- Returns:
- a
NkVec2view of theoffsetfield.
-
img
Copies the specifiedNkImageto theimgfield. -
img
Passes theimgfield to the specifiedConsumer. -
size
Copies the specifiedNkVec2to thesizefield. -
size
Passes thesizefield to the specifiedConsumer. -
offset
Copies the specifiedNkVec2to theoffsetfield. -
offset
Passes theoffsetfield to the specifiedConsumer. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newNkCursorinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkCursorinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkCursorinstance allocated withBufferUtils. -
create
Returns a newNkCursorinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkCursor.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkCursor.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkCursor.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkCursor.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkCursorinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkCursorinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkCursor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nimg
Unsafe version ofimg(). -
nsize
Unsafe version ofsize(). -
noffset
Unsafe version ofoffset(). -
nimg
Unsafe version ofimg. -
nsize
Unsafe version ofsize. -
noffset
Unsafe version ofoffset.
-