Package org.lwjgl.nuklear
Class NkColorf
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkColorf
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkColorf extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct nk_colorf { float r; float g; float b; float a; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkColorf.BufferAn array ofNkColorfstructs.
-
Constructor Summary
Constructors Constructor Description NkColorf(java.nio.ByteBuffer container)Creates aNkColorfinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description floata()NkColorfa(float value)Sets the specified value to theafield.floatb()NkColorfb(float value)Sets the specified value to thebfield.static NkColorfcalloc()Returns a newNkColorfinstance allocated withmemCalloc.static NkColorf.Buffercalloc(int capacity)Returns a newNkColorf.Bufferinstance allocated withmemCalloc.static NkColorf.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkColorf.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkColorfcalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkColorfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkColorfcallocStack()Deprecated.static NkColorf.BuffercallocStack(int capacity)Deprecated.static NkColorf.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkColorfcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static NkColorfcreate()Returns a newNkColorfinstance allocated withBufferUtils.static NkColorf.Buffercreate(int capacity)Returns a newNkColorf.Bufferinstance allocated withBufferUtils.static NkColorfcreate(long address)Returns a newNkColorfinstance for the specified memory address.static NkColorf.Buffercreate(long address, int capacity)Create aNkColorf.Bufferinstance at the specified memory.static NkColorfcreateSafe(long address)static NkColorf.BuffercreateSafe(long address, int capacity)floatg()NkColorfg(float value)Sets the specified value to thegfield.static NkColorfmalloc()Returns a newNkColorfinstance allocated withmemAlloc.static NkColorf.Buffermalloc(int capacity)Returns a newNkColorf.Bufferinstance allocated withmemAlloc.static NkColorf.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkColorf.Bufferinstance allocated on the specifiedMemoryStack.static NkColorfmalloc(org.lwjgl.system.MemoryStack stack)Returns a newNkColorfinstance allocated on the specifiedMemoryStack.static NkColorfmallocStack()Deprecated.static NkColorf.BuffermallocStack(int capacity)Deprecated.static NkColorf.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static NkColorfmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static floatna(long struct)Unsafe version ofa().static voidna(long struct, float value)Unsafe version ofa.static floatnb(long struct)Unsafe version ofb().static voidnb(long struct, float value)Unsafe version ofb.static floatng(long struct)Unsafe version ofg().static voidng(long struct, float value)Unsafe version ofg.static floatnr(long struct)Unsafe version ofr().static voidnr(long struct, float value)Unsafe version ofr.floatr()NkColorfr(float value)Sets the specified value to therfield.NkColorfset(float r, float g, float b, float a)Initializes this struct with the specified values.NkColorfset(NkColorf src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
NkColorf
public NkColorf(java.nio.ByteBuffer container)
Creates aNkColorfinstance 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 float r()
- Returns:
- the value of the
rfield.
-
g
public float g()
- Returns:
- the value of the
gfield.
-
b
public float b()
- Returns:
- the value of the
bfield.
-
a
public float a()
- Returns:
- the value of the
afield.
-
r
public NkColorf r(float value)
Sets the specified value to therfield.
-
g
public NkColorf g(float value)
Sets the specified value to thegfield.
-
b
public NkColorf b(float value)
Sets the specified value to thebfield.
-
a
public NkColorf a(float value)
Sets the specified value to theafield.
-
set
public NkColorf set(float r, float g, float b, float a)
Initializes this struct with the specified values.
-
set
public NkColorf set(NkColorf src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkColorf malloc()
Returns a newNkColorfinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkColorf calloc()
Returns a newNkColorfinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkColorf create()
Returns a newNkColorfinstance allocated withBufferUtils.
-
create
public static NkColorf create(long address)
Returns a newNkColorfinstance for the specified memory address.
-
createSafe
@Nullable public static NkColorf createSafe(long address)
-
malloc
public static NkColorf.Buffer malloc(int capacity)
Returns a newNkColorf.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkColorf.Buffer calloc(int capacity)
Returns a newNkColorf.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkColorf.Buffer create(int capacity)
Returns a newNkColorf.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkColorf.Buffer create(long address, int capacity)
Create aNkColorf.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkColorf.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static NkColorf mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkColorf callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkColorf mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkColorf callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkColorf.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkColorf.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static NkColorf.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 NkColorf.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static NkColorf malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkColorfinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NkColorf calloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkColorfinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static NkColorf.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static NkColorf.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkColorf.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 float nr(long struct)
Unsafe version ofr().
-
ng
public static float ng(long struct)
Unsafe version ofg().
-
nb
public static float nb(long struct)
Unsafe version ofb().
-
na
public static float na(long struct)
Unsafe version ofa().
-
nr
public static void nr(long struct, float value)Unsafe version ofr.
-
ng
public static void ng(long struct, float value)Unsafe version ofg.
-
nb
public static void nb(long struct, float value)Unsafe version ofb.
-
na
public static void na(long struct, float value)Unsafe version ofa.
-
-