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.NativeResource
Layout
union nk_style_item_data {
struct nk_image
image;struct nk_color
color; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NkStyleItemData.Buffer
An array ofNkStyleItemData
structs.
-
Constructor Summary
Constructors Constructor Description NkStyleItemData(java.nio.ByteBuffer container)
Creates aNkStyleItemData
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NkStyleItemData
calloc()
Returns a newNkStyleItemData
instance allocated withmemCalloc
.static NkStyleItemData.Buffer
calloc(int capacity)
Returns a newNkStyleItemData.Buffer
instance allocated withmemCalloc
.static NkStyleItemData
callocStack()
Returns a newNkStyleItemData
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkStyleItemData.Buffer
callocStack(int capacity)
Returns a newNkStyleItemData.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkStyleItemData.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemData.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkStyleItemData
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.NkColor
color()
Returns aNkColor
view of thecolor
field.NkStyleItemData
color(java.util.function.Consumer<NkColor> consumer)
Passes thecolor
field to the specifiedConsumer
.NkStyleItemData
color(NkColor value)
Copies the specifiedNkColor
to thecolor
field.static NkStyleItemData
create()
Returns a newNkStyleItemData
instance allocated withBufferUtils
.static NkStyleItemData.Buffer
create(int capacity)
Returns a newNkStyleItemData.Buffer
instance allocated withBufferUtils
.static NkStyleItemData
create(long address)
Returns a newNkStyleItemData
instance for the specified memory address.static NkStyleItemData.Buffer
create(long address, int capacity)
Create aNkStyleItemData.Buffer
instance at the specified memory.static NkStyleItemData
createSafe(long address)
static NkStyleItemData.Buffer
createSafe(long address, int capacity)
NkImage
image()
Returns aNkImage
view of theimage
field.NkStyleItemData
image(java.util.function.Consumer<NkImage> consumer)
Passes theimage
field to the specifiedConsumer
.NkStyleItemData
image(NkImage value)
Copies the specifiedNkImage
to theimage
field.static NkStyleItemData
malloc()
Returns a newNkStyleItemData
instance allocated withmemAlloc
.static NkStyleItemData.Buffer
malloc(int capacity)
Returns a newNkStyleItemData.Buffer
instance allocated withmemAlloc
.static NkStyleItemData
mallocStack()
Returns a newNkStyleItemData
instance allocated on the thread-localMemoryStack
.static NkStyleItemData.Buffer
mallocStack(int capacity)
Returns a newNkStyleItemData.Buffer
instance allocated on the thread-localMemoryStack
.static NkStyleItemData.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemData.Buffer
instance allocated on the specifiedMemoryStack
.static NkStyleItemData
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemData
instance allocated on the specifiedMemoryStack
.static NkColor
ncolor(long struct)
Unsafe version ofcolor()
.static void
ncolor(long struct, NkColor value)
Unsafe version ofcolor
.static NkImage
nimage(long struct)
Unsafe version ofimage()
.static void
nimage(long struct, NkImage value)
Unsafe version ofimage
.NkStyleItemData
set(NkStyleItemData src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
NkStyleItemData
public NkStyleItemData(java.nio.ByteBuffer container)
Creates aNkStyleItemData
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
image
public NkStyleItemData image(NkImage value)
Copies the specifiedNkImage
to theimage
field.
-
image
public NkStyleItemData image(java.util.function.Consumer<NkImage> consumer)
Passes theimage
field to the specifiedConsumer
.
-
color
public NkStyleItemData color(NkColor value)
Copies the specifiedNkColor
to thecolor
field.
-
color
public NkStyleItemData color(java.util.function.Consumer<NkColor> consumer)
Passes thecolor
field to the specifiedConsumer
.
-
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 newNkStyleItemData
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NkStyleItemData calloc()
Returns a newNkStyleItemData
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NkStyleItemData create()
Returns a newNkStyleItemData
instance allocated withBufferUtils
.
-
create
public static NkStyleItemData create(long address)
Returns a newNkStyleItemData
instance for the specified memory address.
-
createSafe
@Nullable public static NkStyleItemData createSafe(long address)
-
malloc
public static NkStyleItemData.Buffer malloc(int capacity)
Returns a newNkStyleItemData.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static NkStyleItemData.Buffer calloc(int capacity)
Returns a newNkStyleItemData.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static NkStyleItemData.Buffer create(int capacity)
Returns a newNkStyleItemData.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static NkStyleItemData.Buffer create(long address, int capacity)
Create aNkStyleItemData.Buffer
instance 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 newNkStyleItemData
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NkStyleItemData callocStack()
Returns a newNkStyleItemData
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NkStyleItemData mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemData
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NkStyleItemData callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkStyleItemData
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static NkStyleItemData.Buffer callocStack(int capacity)
Returns a newNkStyleItemData.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-