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.
-
Constructor Summary
Constructors Constructor Description NkColor(java.nio.ByteBuffer container)Creates aNkColorinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description bytea()NkColora(byte value)Sets the specified value to theafield.byteb()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 NkColor.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkColor.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkColorcalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkColorinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkColorcallocStack()Deprecated.static NkColor.BuffercallocStack(int capacity)Deprecated.static NkColor.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkColorcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()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 NkColor.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkColor.Bufferinstance allocated on the specifiedMemoryStack.static NkColormalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkColorinstance allocated on the specifiedMemoryStack.static NkColormallocStack()Deprecated.static NkColor.BuffermallocStack(int capacity)Deprecated.static NkColor.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkColormallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()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 the
rfield.
-
g
public byte g()
- Returns:
- the value of the
gfield.
-
b
public byte b()
- Returns:
- the value of the
bfield.
-
a
public byte a()
- Returns:
- the value of the
afield.
-
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()
Returns a newNkColorinstance allocated withBufferUtils.
-
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
@Deprecated public static NkColor mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkColor callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkColor mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkColor callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkColor.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkColor.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static NkColor.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkColor.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static NkColor malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkColorinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NkColor calloc(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
-
malloc
public static NkColor.Buffer malloc(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
-
calloc
public static NkColor.Buffer calloc(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.
-
-