Package org.lwjgl.nuklear
Class NkStyleItem
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkStyleItem
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkStyleItem extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceMember documentation
type– the style type. One of:STYLE_ITEM_COLORSTYLE_ITEM_IMAGEdata– the style data
Layout
struct nk_style_item { enum nk_style_item_type type;union nk_style_item_datadata; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkStyleItem.BufferAn array ofNkStyleItemstructs.
-
Constructor Summary
Constructors Constructor Description NkStyleItem(java.nio.ByteBuffer container)Creates aNkStyleIteminstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NkStyleItemcalloc()Returns a newNkStyleIteminstance allocated withmemCalloc.static NkStyleItem.Buffercalloc(int capacity)Returns a newNkStyleItem.Bufferinstance allocated withmemCalloc.static NkStyleItemcallocStack()Returns a newNkStyleIteminstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkStyleItem.BuffercallocStack(int capacity)Returns a newNkStyleItem.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkStyleItem.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkStyleItem.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStyleItemcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkStyleIteminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStyleItemcreate()Returns a newNkStyleIteminstance allocated withBufferUtils.static NkStyleItem.Buffercreate(int capacity)Returns a newNkStyleItem.Bufferinstance allocated withBufferUtils.static NkStyleItemcreate(long address)Returns a newNkStyleIteminstance for the specified memory address.static NkStyleItem.Buffercreate(long address, int capacity)Create aNkStyleItem.Bufferinstance at the specified memory.static NkStyleItemcreateSafe(long address)static NkStyleItem.BuffercreateSafe(long address, int capacity)NkStyleItemDatadata()Returns aNkStyleItemDataview of thedatafield.NkStyleItemdata(java.util.function.Consumer<NkStyleItemData> consumer)Passes thedatafield to the specifiedConsumer.NkStyleItemdata(NkStyleItemData value)Copies the specifiedNkStyleItemDatato thedatafield.static NkStyleItemmalloc()Returns a newNkStyleIteminstance allocated withmemAlloc.static NkStyleItem.Buffermalloc(int capacity)Returns a newNkStyleItem.Bufferinstance allocated withmemAlloc.static NkStyleItemmallocStack()Returns a newNkStyleIteminstance allocated on the thread-localMemoryStack.static NkStyleItem.BuffermallocStack(int capacity)Returns a newNkStyleItem.Bufferinstance allocated on the thread-localMemoryStack.static NkStyleItem.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkStyleItem.Bufferinstance allocated on the specifiedMemoryStack.static NkStyleItemmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkStyleIteminstance allocated on the specifiedMemoryStack.static NkStyleItemDatandata(long struct)Unsafe version ofdata().static voidndata(long struct, NkStyleItemData value)Unsafe version ofdata.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.NkStyleItemset(int type, NkStyleItemData data)Initializes this struct with the specified values.NkStyleItemset(NkStyleItem src)Copies the specified struct data to this struct.intsizeof()inttype()Returns the value of thetypefield.NkStyleItemtype(int value)Sets the specified value to thetypefield.
-
-
-
Constructor Detail
-
NkStyleItem
public NkStyleItem(java.nio.ByteBuffer container)
Creates aNkStyleIteminstance 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
-
type
public int type()
Returns the value of thetypefield.
-
data
public NkStyleItemData data()
Returns aNkStyleItemDataview of thedatafield.
-
data
public NkStyleItem data(java.util.function.Consumer<NkStyleItemData> consumer)
Passes thedatafield to the specifiedConsumer.
-
type
public NkStyleItem type(int value)
Sets the specified value to thetypefield.
-
data
public NkStyleItem data(NkStyleItemData value)
Copies the specifiedNkStyleItemDatato thedatafield.
-
set
public NkStyleItem set(int type, NkStyleItemData data)
Initializes this struct with the specified values.
-
set
public NkStyleItem set(NkStyleItem src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkStyleItem malloc()
Returns a newNkStyleIteminstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkStyleItem calloc()
Returns a newNkStyleIteminstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkStyleItem create()
Returns a newNkStyleIteminstance allocated withBufferUtils.
-
create
public static NkStyleItem create(long address)
Returns a newNkStyleIteminstance for the specified memory address.
-
createSafe
@Nullable public static NkStyleItem createSafe(long address)
-
malloc
public static NkStyleItem.Buffer malloc(int capacity)
Returns a newNkStyleItem.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkStyleItem.Buffer calloc(int capacity)
Returns a newNkStyleItem.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkStyleItem.Buffer create(int capacity)
Returns a newNkStyleItem.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkStyleItem.Buffer create(long address, int capacity)
Create aNkStyleItem.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkStyleItem.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkStyleItem mallocStack()
Returns a newNkStyleIteminstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkStyleItem callocStack()
Returns a newNkStyleIteminstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkStyleItem mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleIteminstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkStyleItem callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleIteminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static NkStyleItem.Buffer mallocStack(int capacity)
Returns a newNkStyleItem.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkStyleItem.Buffer callocStack(int capacity)
Returns a newNkStyleItem.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static NkStyleItem.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItem.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static NkStyleItem.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItem.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
ndata
public static NkStyleItemData ndata(long struct)
Unsafe version ofdata().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
ndata
public static void ndata(long struct, NkStyleItemData value)Unsafe version ofdata.
-
-