Package org.lwjgl.nuklear
Class NkColor
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkColor
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkColor extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct nk_color { nk_byte r; nk_byte g; nk_byte b; nk_byte a; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkColor.BufferAn array ofNkColorstructs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description bytea()Returns the value of theafield.NkColora(byte value)Sets the specified value to theafield.byteb()Returns the value of thebfield.NkColorb(byte value)Sets the specified value to thebfield.static NkColorcalloc()Returns a newNkColorinstance allocated withmemCalloc.static NkColor.Buffercalloc(int capacity)Returns a newNkColor.Bufferinstance allocated withmemCalloc.static NkColorcallocStack()Returns a newNkColorinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkColor.BuffercallocStack(int capacity)Returns a newNkColor.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkColor.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkColor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkColorcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkColorinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkColorcreate()Returns a newNkColorinstance allocated withBufferUtils.static NkColor.Buffercreate(int capacity)Returns a newNkColor.Bufferinstance allocated withBufferUtils.static NkColorcreate(long address)Returns a newNkColorinstance for the specified memory address.static NkColor.Buffercreate(long address, int capacity)Create aNkColor.Bufferinstance at the specified memory.static NkColorcreateSafe(long address)static NkColor.BuffercreateSafe(long address, int capacity)byteg()Returns the value of thegfield.NkColorg(byte value)Sets the specified value to thegfield.static NkColormalloc()Returns a newNkColorinstance allocated withmemAlloc.static NkColor.Buffermalloc(int capacity)Returns a newNkColor.Bufferinstance allocated withmemAlloc.static NkColormallocStack()Returns a newNkColorinstance allocated on the thread-localMemoryStack.static NkColor.BuffermallocStack(int capacity)Returns a newNkColor.Bufferinstance allocated on the thread-localMemoryStack.static NkColor.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkColor.Bufferinstance allocated on the specifiedMemoryStack.static NkColormallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkColorinstance allocated on the specifiedMemoryStack.static bytena(long struct)Unsafe version ofa().static voidna(long struct, byte value)Unsafe version ofa.static bytenb(long struct)Unsafe version ofb().static voidnb(long struct, byte value)Unsafe version ofb.static byteng(long struct)Unsafe version ofg().static voidng(long struct, byte value)Unsafe version ofg.static bytenr(long struct)Unsafe version ofr().static voidnr(long struct, byte value)Unsafe version ofr.byter()Returns the value of therfield.NkColorr(byte value)Sets the specified value to therfield.NkColorset(byte r, byte g, byte b, byte a)Initializes this struct with the specified values.NkColorset(NkColor src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
NkColor
public NkColor(java.nio.ByteBuffer container)
Creates aNkColorinstance 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
-
r
public byte r()
Returns the value of therfield.
-
g
public byte g()
Returns the value of thegfield.
-
b
public byte b()
Returns the value of thebfield.
-
a
public byte a()
Returns the value of theafield.
-
r
public NkColor r(byte value)
Sets the specified value to therfield.
-
g
public NkColor g(byte value)
Sets the specified value to thegfield.
-
b
public NkColor b(byte value)
Sets the specified value to thebfield.
-
a
public NkColor a(byte value)
Sets the specified value to theafield.
-
set
public NkColor set(byte r, byte g, byte b, byte a)
Initializes this struct with the specified values.
-
set
public NkColor set(NkColor src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkColor malloc()
Returns a newNkColorinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkColor calloc()
Returns a newNkColorinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkColor create(long address)
Returns a newNkColorinstance for the specified memory address.
-
createSafe
@Nullable public static NkColor createSafe(long address)
-
malloc
public static NkColor.Buffer malloc(int capacity)
Returns a newNkColor.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkColor.Buffer calloc(int capacity)
Returns a newNkColor.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkColor.Buffer create(int capacity)
Returns a newNkColor.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkColor.Buffer create(long address, int capacity)
Create aNkColor.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkColor.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkColor mallocStack()
Returns a newNkColorinstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkColor callocStack()
Returns a newNkColorinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkColor mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkColorinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkColor callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkColorinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static NkColor.Buffer mallocStack(int capacity)
Returns a newNkColor.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkColor.Buffer callocStack(int capacity)
Returns a newNkColor.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static NkColor.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkColor.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static NkColor.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkColor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nr
public static byte nr(long struct)
Unsafe version ofr().
-
ng
public static byte ng(long struct)
Unsafe version ofg().
-
nb
public static byte nb(long struct)
Unsafe version ofb().
-
na
public static byte na(long struct)
Unsafe version ofa().
-
nr
public static void nr(long struct, byte value)Unsafe version ofr.
-
ng
public static void ng(long struct, byte value)Unsafe version ofg.
-
nb
public static void nb(long struct, byte value)Unsafe version ofb.
-
na
public static void na(long struct, byte value)Unsafe version ofa.
-
-