Package org.lwjgl.nuklear
Class NkStyleItemData
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkStyleItemData
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkStyleItemData extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
union nk_style_item_data {struct nk_imageimage;struct nk_colorcolor; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkStyleItemData.BufferAn array ofNkStyleItemDatastructs.
-
Constructor Summary
Constructors Constructor Description NkStyleItemData(java.nio.ByteBuffer container)Creates aNkStyleItemDatainstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NkStyleItemDatacalloc()Returns a newNkStyleItemDatainstance allocated withmemCalloc.static NkStyleItemData.Buffercalloc(int capacity)Returns a newNkStyleItemData.Bufferinstance allocated withmemCalloc.static NkStyleItemDatacallocStack()Returns a newNkStyleItemDatainstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkStyleItemData.BuffercallocStack(int capacity)Returns a newNkStyleItemData.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkStyleItemData.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkStyleItemData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkStyleItemDatacallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkStyleItemDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.NkColorcolor()Returns aNkColorview of thecolorfield.NkStyleItemDatacolor(java.util.function.Consumer<NkColor> consumer)Passes thecolorfield to the specifiedConsumer.NkStyleItemDatacolor(NkColor value)Copies the specifiedNkColorto thecolorfield.static NkStyleItemDatacreate()Returns a newNkStyleItemDatainstance allocated withBufferUtils.static NkStyleItemData.Buffercreate(int capacity)Returns a newNkStyleItemData.Bufferinstance allocated withBufferUtils.static NkStyleItemDatacreate(long address)Returns a newNkStyleItemDatainstance for the specified memory address.static NkStyleItemData.Buffercreate(long address, int capacity)Create aNkStyleItemData.Bufferinstance at the specified memory.static NkStyleItemDatacreateSafe(long address)static NkStyleItemData.BuffercreateSafe(long address, int capacity)NkImageimage()Returns aNkImageview of theimagefield.NkStyleItemDataimage(java.util.function.Consumer<NkImage> consumer)Passes theimagefield to the specifiedConsumer.NkStyleItemDataimage(NkImage value)Copies the specifiedNkImageto theimagefield.static NkStyleItemDatamalloc()Returns a newNkStyleItemDatainstance allocated withmemAlloc.static NkStyleItemData.Buffermalloc(int capacity)Returns a newNkStyleItemData.Bufferinstance allocated withmemAlloc.static NkStyleItemDatamallocStack()Returns a newNkStyleItemDatainstance allocated on the thread-localMemoryStack.static NkStyleItemData.BuffermallocStack(int capacity)Returns a newNkStyleItemData.Bufferinstance allocated on the thread-localMemoryStack.static NkStyleItemData.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkStyleItemData.Bufferinstance allocated on the specifiedMemoryStack.static NkStyleItemDatamallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkStyleItemDatainstance allocated on the specifiedMemoryStack.static NkColorncolor(long struct)Unsafe version ofcolor().static voidncolor(long struct, NkColor value)Unsafe version ofcolor.static NkImagenimage(long struct)Unsafe version ofimage().static voidnimage(long struct, NkImage value)Unsafe version ofimage.NkStyleItemDataset(NkStyleItemData src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
NkStyleItemData
public NkStyleItemData(java.nio.ByteBuffer container)
Creates aNkStyleItemDatainstance 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
-
image
public NkStyleItemData image(java.util.function.Consumer<NkImage> consumer)
Passes theimagefield to the specifiedConsumer.
-
color
public NkStyleItemData color(java.util.function.Consumer<NkColor> consumer)
Passes thecolorfield to the specifiedConsumer.
-
image
public NkStyleItemData image(NkImage value)
Copies the specifiedNkImageto theimagefield.
-
color
public NkStyleItemData color(NkColor value)
Copies the specifiedNkColorto thecolorfield.
-
set
public NkStyleItemData set(NkStyleItemData src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkStyleItemData malloc()
Returns a newNkStyleItemDatainstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkStyleItemData calloc()
Returns a newNkStyleItemDatainstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkStyleItemData create()
Returns a newNkStyleItemDatainstance allocated withBufferUtils.
-
create
public static NkStyleItemData create(long address)
Returns a newNkStyleItemDatainstance for the specified memory address.
-
createSafe
@Nullable public static NkStyleItemData createSafe(long address)
-
malloc
public static NkStyleItemData.Buffer malloc(int capacity)
Returns a newNkStyleItemData.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkStyleItemData.Buffer calloc(int capacity)
Returns a newNkStyleItemData.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkStyleItemData.Buffer create(int capacity)
Returns a newNkStyleItemData.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkStyleItemData.Buffer create(long address, int capacity)
Create aNkStyleItemData.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkStyleItemData.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkStyleItemData mallocStack()
Returns a newNkStyleItemDatainstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkStyleItemData callocStack()
Returns a newNkStyleItemDatainstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkStyleItemData mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemDatainstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkStyleItemData callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static NkStyleItemData.Buffer mallocStack(int capacity)
Returns a newNkStyleItemData.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkStyleItemData.Buffer callocStack(int capacity)
Returns a newNkStyleItemData.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static NkStyleItemData.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemData.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static NkStyleItemData.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-