public class NkStyleItem
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
type – the style type. One of:STYLE_ITEM_COLOR | STYLE_ITEM_IMAGE |
data – the style data
struct nk_style_item {
enum nk_style_item_type type;
union nk_style_item_data data;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NkStyleItem.Buffer
An array of
NkStyleItem structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DATA
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
TYPE
The struct member offsets.
|
| Constructor and Description |
|---|
NkStyleItem(java.nio.ByteBuffer container)
Creates a
NkStyleItem instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static NkStyleItem |
calloc()
Returns a new
NkStyleItem instance allocated with memCalloc. |
static NkStyleItem.Buffer |
calloc(int capacity)
Returns a new
NkStyleItem.Buffer instance allocated with memCalloc. |
static NkStyleItem |
callocStack()
Returns a new
NkStyleItem instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkStyleItem.Buffer |
callocStack(int capacity)
Returns a new
NkStyleItem.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkStyleItem.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkStyleItem.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkStyleItem |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkStyleItem instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkStyleItem |
create()
Returns a new
NkStyleItem instance allocated with BufferUtils. |
static NkStyleItem.Buffer |
create(int capacity)
Returns a new
NkStyleItem.Buffer instance allocated with BufferUtils. |
static NkStyleItem |
create(long address)
Returns a new
NkStyleItem instance for the specified memory address. |
static NkStyleItem.Buffer |
create(long address,
int capacity)
Create a
NkStyleItem.Buffer instance at the specified memory. |
static NkStyleItem |
createSafe(long address)
|
static NkStyleItem.Buffer |
createSafe(long address,
int capacity)
|
NkStyleItemData |
data()
Returns a
NkStyleItemData view of the data field. |
NkStyleItem |
data(java.util.function.Consumer<NkStyleItemData> consumer)
Passes the
data field to the specified Consumer. |
NkStyleItem |
data(NkStyleItemData value)
Copies the specified
NkStyleItemData to the data field. |
static NkStyleItem |
malloc()
Returns a new
NkStyleItem instance allocated with memAlloc. |
static NkStyleItem.Buffer |
malloc(int capacity)
Returns a new
NkStyleItem.Buffer instance allocated with memAlloc. |
static NkStyleItem |
mallocStack()
Returns a new
NkStyleItem instance allocated on the thread-local MemoryStack. |
static NkStyleItem.Buffer |
mallocStack(int capacity)
Returns a new
NkStyleItem.Buffer instance allocated on the thread-local MemoryStack. |
static NkStyleItem.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkStyleItem.Buffer instance allocated on the specified MemoryStack. |
static NkStyleItem |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkStyleItem instance allocated on the specified MemoryStack. |
static NkStyleItemData |
ndata(long struct)
Unsafe version of
data(). |
static void |
ndata(long struct,
NkStyleItemData value)
Unsafe version of
data. |
static int |
ntype(long struct)
Unsafe version of
type(). |
static void |
ntype(long struct,
int value)
Unsafe version of
type. |
NkStyleItem |
set(int type,
NkStyleItemData data)
Initializes this struct with the specified values.
|
NkStyleItem |
set(NkStyleItem src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
type()
Returns the value of the
type field. |
NkStyleItem |
type(int value)
Sets the specified value to the
type field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int TYPE
public static final int DATA
public NkStyleItem(java.nio.ByteBuffer container)
NkStyleItem 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 int type()
type field.public NkStyleItemData data()
NkStyleItemData view of the data field.public NkStyleItem type(int value)
type field.public NkStyleItem data(NkStyleItemData value)
NkStyleItemData to the data field.public NkStyleItem data(java.util.function.Consumer<NkStyleItemData> consumer)
data field to the specified Consumer.public NkStyleItem set(int type, NkStyleItemData data)
public NkStyleItem set(NkStyleItem src)
src - the source structpublic static NkStyleItem malloc()
NkStyleItem instance allocated with memAlloc. The instance must be explicitly freed.public static NkStyleItem calloc()
NkStyleItem instance allocated with memCalloc. The instance must be explicitly freed.public static NkStyleItem create()
NkStyleItem instance allocated with BufferUtils.public static NkStyleItem create(long address)
NkStyleItem instance for the specified memory address.@Nullable public static NkStyleItem createSafe(long address)
public static NkStyleItem.Buffer malloc(int capacity)
NkStyleItem.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkStyleItem.Buffer calloc(int capacity)
NkStyleItem.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkStyleItem.Buffer create(int capacity)
NkStyleItem.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NkStyleItem.Buffer create(long address, int capacity)
NkStyleItem.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NkStyleItem.Buffer createSafe(long address, int capacity)
public static NkStyleItem mallocStack()
NkStyleItem instance allocated on the thread-local MemoryStack.public static NkStyleItem callocStack()
NkStyleItem instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NkStyleItem mallocStack(org.lwjgl.system.MemoryStack stack)
NkStyleItem instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NkStyleItem callocStack(org.lwjgl.system.MemoryStack stack)
NkStyleItem instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NkStyleItem.Buffer mallocStack(int capacity)
NkStyleItem.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NkStyleItem.Buffer callocStack(int capacity)
NkStyleItem.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NkStyleItem.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkStyleItem.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkStyleItem.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkStyleItem.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int ntype(long struct)
type().public static NkStyleItemData ndata(long struct)
data().public static void ntype(long struct,
int value)
type.public static void ndata(long struct,
NkStyleItemData value)
data.Copyright LWJGL. All Rights Reserved. License terms.