public class NkCursor
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct nk_cursor {
struct nk_image img;
struct nk_vec2 size;
struct nk_vec2 offset;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NkCursor.Buffer
An array of
NkCursor structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
IMG
The struct member offsets.
|
static int |
OFFSET
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
NkCursor(java.nio.ByteBuffer container)
Creates a
NkCursor instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static NkCursor |
calloc()
Returns a new
NkCursor instance allocated with memCalloc. |
static NkCursor.Buffer |
calloc(int capacity)
Returns a new
NkCursor.Buffer instance allocated with memCalloc. |
static NkCursor |
callocStack()
Returns a new
NkCursor instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkCursor.Buffer |
callocStack(int capacity)
Returns a new
NkCursor.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkCursor.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkCursor.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkCursor |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkCursor instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkCursor |
create()
Returns a new
NkCursor instance allocated with BufferUtils. |
static NkCursor.Buffer |
create(int capacity)
Returns a new
NkCursor.Buffer instance allocated with BufferUtils. |
static NkCursor |
create(long address)
Returns a new
NkCursor instance for the specified memory address. |
static NkCursor.Buffer |
create(long address,
int capacity)
Create a
NkCursor.Buffer instance at the specified memory. |
static NkCursor |
createSafe(long address)
|
static NkCursor.Buffer |
createSafe(long address,
int capacity)
|
NkImage |
img()
Returns a
NkImage view of the img field. |
NkCursor |
img(java.util.function.Consumer<NkImage> consumer)
Passes the
img field to the specified Consumer. |
NkCursor |
img(NkImage value)
Copies the specified
NkImage to the img field. |
static NkCursor |
malloc()
Returns a new
NkCursor instance allocated with memAlloc. |
static NkCursor.Buffer |
malloc(int capacity)
Returns a new
NkCursor.Buffer instance allocated with memAlloc. |
static NkCursor |
mallocStack()
Returns a new
NkCursor instance allocated on the thread-local MemoryStack. |
static NkCursor.Buffer |
mallocStack(int capacity)
Returns a new
NkCursor.Buffer instance allocated on the thread-local MemoryStack. |
static NkCursor.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkCursor.Buffer instance allocated on the specified MemoryStack. |
static NkCursor |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkCursor instance allocated on the specified MemoryStack. |
static NkImage |
nimg(long struct)
Unsafe version of
img(). |
static void |
nimg(long struct,
NkImage value)
Unsafe version of
img. |
static NkVec2 |
noffset(long struct)
Unsafe version of
offset(). |
static void |
noffset(long struct,
NkVec2 value)
Unsafe version of
offset. |
static NkVec2 |
nsize(long struct)
Unsafe version of
size(). |
static void |
nsize(long struct,
NkVec2 value)
Unsafe version of
size. |
NkVec2 |
offset()
Returns a
NkVec2 view of the offset field. |
NkCursor |
offset(java.util.function.Consumer<NkVec2> consumer)
Passes the
offset field to the specified Consumer. |
NkCursor |
offset(NkVec2 value)
Copies the specified
NkVec2 to the offset field. |
NkCursor |
set(NkCursor src)
Copies the specified struct data to this struct.
|
NkCursor |
set(NkImage img,
NkVec2 size,
NkVec2 offset)
Initializes this struct with the specified values.
|
NkVec2 |
size()
Returns a
NkVec2 view of the size field. |
NkCursor |
size(java.util.function.Consumer<NkVec2> consumer)
Passes the
size field to the specified Consumer. |
NkCursor |
size(NkVec2 value)
Copies the specified
NkVec2 to the size field. |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int IMG
public static final int SIZE
public static final int OFFSET
public NkCursor(java.nio.ByteBuffer container)
NkCursor instance at the current position of the specified ByteBuffer container. 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic NkCursor img(java.util.function.Consumer<NkImage> consumer)
img field to the specified Consumer.public NkCursor size(java.util.function.Consumer<NkVec2> consumer)
size field to the specified Consumer.public NkCursor offset(java.util.function.Consumer<NkVec2> consumer)
offset field to the specified Consumer.public NkCursor set(NkImage img, NkVec2 size, NkVec2 offset)
public NkCursor set(NkCursor src)
src - the source structpublic static NkCursor malloc()
NkCursor instance allocated with memAlloc. The instance must be explicitly freed.public static NkCursor calloc()
NkCursor instance allocated with memCalloc. The instance must be explicitly freed.public static NkCursor create()
NkCursor instance allocated with BufferUtils.public static NkCursor create(long address)
NkCursor instance for the specified memory address.@Nullable public static NkCursor createSafe(long address)
public static NkCursor.Buffer malloc(int capacity)
NkCursor.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkCursor.Buffer calloc(int capacity)
NkCursor.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkCursor.Buffer create(int capacity)
NkCursor.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NkCursor.Buffer create(long address, int capacity)
NkCursor.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NkCursor.Buffer createSafe(long address, int capacity)
public static NkCursor mallocStack()
NkCursor instance allocated on the thread-local MemoryStack.public static NkCursor callocStack()
NkCursor instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NkCursor mallocStack(org.lwjgl.system.MemoryStack stack)
NkCursor instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NkCursor callocStack(org.lwjgl.system.MemoryStack stack)
NkCursor instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NkCursor.Buffer mallocStack(int capacity)
NkCursor.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NkCursor.Buffer callocStack(int capacity)
NkCursor.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NkCursor.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkCursor.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkCursor.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkCursor.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacityCopyright LWJGL. All Rights Reserved. License terms.