Package org.lwjgl.util.spng
Class spng_splt_entry
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct spng_splt_entry {
uint16_t red;
uint16_t green;
uint16_t blue;
uint16_t alpha;
uint16_t frequency;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionspng_splt_entry(ByteBuffer container) Creates aspng_splt_entryinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionshortalpha()alpha(short value) Sets the specified value to thealphafield.shortblue()blue(short value) Sets the specified value to thebluefield.static spng_splt_entrycalloc()Returns a newspng_splt_entryinstance allocated withmemCalloc.static spng_splt_entry.Buffercalloc(int capacity) Returns a newspng_splt_entry.Bufferinstance allocated withmemCalloc.static spng_splt_entry.Buffercalloc(int capacity, MemoryStack stack) Returns a newspng_splt_entry.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_splt_entrycalloc(MemoryStack stack) Returns a newspng_splt_entryinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_splt_entrycreate()Returns a newspng_splt_entryinstance allocated withBufferUtils.static spng_splt_entry.Buffercreate(int capacity) Returns a newspng_splt_entry.Bufferinstance allocated withBufferUtils.static spng_splt_entrycreate(long address) Returns a newspng_splt_entryinstance for the specified memory address.static spng_splt_entry.Buffercreate(long address, int capacity) Create aspng_splt_entry.Bufferinstance at the specified memory.static @Nullable spng_splt_entrycreateSafe(long address) static @Nullable spng_splt_entry.BuffercreateSafe(long address, int capacity) shortfrequency(short value) Sets the specified value to thefrequencyfield.shortgreen()green(short value) Sets the specified value to thegreenfield.static spng_splt_entrymalloc()Returns a newspng_splt_entryinstance allocated withmemAlloc.static spng_splt_entry.Buffermalloc(int capacity) Returns a newspng_splt_entry.Bufferinstance allocated withmemAlloc.static spng_splt_entry.Buffermalloc(int capacity, MemoryStack stack) Returns a newspng_splt_entry.Bufferinstance allocated on the specifiedMemoryStack.static spng_splt_entrymalloc(MemoryStack stack) Returns a newspng_splt_entryinstance allocated on the specifiedMemoryStack.static shortnalpha(long struct) Unsafe version ofalpha().static voidnalpha(long struct, short value) Unsafe version ofalpha.static shortnblue(long struct) Unsafe version ofblue().static voidnblue(long struct, short value) Unsafe version ofblue.static shortnfrequency(long struct) Unsafe version offrequency().static voidnfrequency(long struct, short value) Unsafe version offrequency.static shortngreen(long struct) Unsafe version ofgreen().static voidngreen(long struct, short value) Unsafe version ofgreen.static shortnred(long struct) Unsafe version ofred().static voidnred(long struct, short value) Unsafe version ofred.shortred()red(short value) Sets the specified value to theredfield.set(short red, short green, short blue, short alpha, short frequency) Initializes this struct with the specified values.set(spng_splt_entry src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
RED
public static final int REDThe struct member offsets. -
GREEN
public static final int GREENThe struct member offsets. -
BLUE
public static final int BLUEThe struct member offsets. -
ALPHA
public static final int ALPHAThe struct member offsets. -
FREQUENCY
public static final int FREQUENCYThe struct member offsets.
-
-
Constructor Details
-
spng_splt_entry
Creates aspng_splt_entryinstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<spng_splt_entry>
-
red
public short red()- Returns:
- the value of the
redfield.
-
green
public short green()- Returns:
- the value of the
greenfield.
-
blue
public short blue()- Returns:
- the value of the
bluefield.
-
alpha
public short alpha()- Returns:
- the value of the
alphafield.
-
frequency
public short frequency()- Returns:
- the value of the
frequencyfield.
-
red
Sets the specified value to theredfield. -
green
Sets the specified value to thegreenfield. -
blue
Sets the specified value to thebluefield. -
alpha
Sets the specified value to thealphafield. -
frequency
Sets the specified value to thefrequencyfield. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newspng_splt_entryinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newspng_splt_entryinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newspng_splt_entryinstance allocated withBufferUtils. -
create
Returns a newspng_splt_entryinstance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_splt_entry.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newspng_splt_entry.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newspng_splt_entry.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aspng_splt_entry.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_splt_entryinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newspng_splt_entryinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newspng_splt_entry.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newspng_splt_entry.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nred
public static short nred(long struct) Unsafe version ofred(). -
ngreen
public static short ngreen(long struct) Unsafe version ofgreen(). -
nblue
public static short nblue(long struct) Unsafe version ofblue(). -
nalpha
public static short nalpha(long struct) Unsafe version ofalpha(). -
nfrequency
public static short nfrequency(long struct) Unsafe version offrequency(). -
nred
public static void nred(long struct, short value) Unsafe version ofred. -
ngreen
public static void ngreen(long struct, short value) Unsafe version ofgreen. -
nblue
public static void nblue(long struct, short value) Unsafe version ofblue. -
nalpha
public static void nalpha(long struct, short value) Unsafe version ofalpha. -
nfrequency
public static void nfrequency(long struct, short value) Unsafe version offrequency.
-