Package org.lwjgl.util.spng
Class spng_bkgd
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct spng_bkgd {
uint16_t gray;
uint16_t red;
uint16_t green;
uint16_t blue;
uint16_t plte_index;
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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_bkgd
(ByteBuffer container) Creates aspng_bkgd
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionshort
blue()
blue
(short value) Sets the specified value to theblue
field.static spng_bkgd
calloc()
Returns a newspng_bkgd
instance allocated withmemCalloc
.static spng_bkgd.Buffer
calloc
(int capacity) Returns a newspng_bkgd.Buffer
instance allocated withmemCalloc
.static spng_bkgd.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newspng_bkgd.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static spng_bkgd
calloc
(MemoryStack stack) Returns a newspng_bkgd
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static spng_bkgd
create()
Returns a newspng_bkgd
instance allocated withBufferUtils
.static spng_bkgd.Buffer
create
(int capacity) Returns a newspng_bkgd.Buffer
instance allocated withBufferUtils
.static spng_bkgd
create
(long address) Returns a newspng_bkgd
instance for the specified memory address.static spng_bkgd.Buffer
create
(long address, int capacity) Create aspng_bkgd.Buffer
instance at the specified memory.static @Nullable spng_bkgd
createSafe
(long address) static @Nullable spng_bkgd.Buffer
createSafe
(long address, int capacity) short
gray()
gray
(short value) Sets the specified value to thegray
field.short
green()
green
(short value) Sets the specified value to thegreen
field.static spng_bkgd
malloc()
Returns a newspng_bkgd
instance allocated withmemAlloc
.static spng_bkgd.Buffer
malloc
(int capacity) Returns a newspng_bkgd.Buffer
instance allocated withmemAlloc
.static spng_bkgd.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newspng_bkgd.Buffer
instance allocated on the specifiedMemoryStack
.static spng_bkgd
malloc
(MemoryStack stack) Returns a newspng_bkgd
instance allocated on the specifiedMemoryStack
.static short
nblue
(long struct) Unsafe version ofblue()
.static void
nblue
(long struct, short value) Unsafe version ofblue
.static short
ngray
(long struct) Unsafe version ofgray()
.static void
ngray
(long struct, short value) Unsafe version ofgray
.static short
ngreen
(long struct) Unsafe version ofgreen()
.static void
ngreen
(long struct, short value) Unsafe version ofgreen
.static short
nplte_index
(long struct) Unsafe version ofplte_index()
.static void
nplte_index
(long struct, short value) Unsafe version ofplte_index
.static short
nred
(long struct) Unsafe version ofred()
.static void
nred
(long struct, short value) Unsafe version ofred
.short
plte_index
(short value) Sets the specified value to theplte_index
field.short
red()
red
(short value) Sets the specified value to thered
field.set
(short gray, short red, short green, short blue, short plte_index) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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. -
GRAY
public static final int GRAYThe struct member offsets. -
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. -
PLTE_INDEX
public static final int PLTE_INDEXThe struct member offsets.
-
-
Constructor Details
-
spng_bkgd
Creates aspng_bkgd
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
. -
gray
public short gray()- Returns:
- the value of the
gray
field.
-
red
public short red()- Returns:
- the value of the
red
field.
-
green
public short green()- Returns:
- the value of the
green
field.
-
blue
public short blue()- Returns:
- the value of the
blue
field.
-
plte_index
public short plte_index()- Returns:
- the value of the
plte_index
field.
-
gray
Sets the specified value to thegray
field. -
red
Sets the specified value to thered
field. -
green
Sets the specified value to thegreen
field. -
blue
Sets the specified value to theblue
field. -
plte_index
Sets the specified value to theplte_index
field. -
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_bkgd
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newspng_bkgd
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newspng_bkgd
instance allocated withBufferUtils
. -
create
Returns a newspng_bkgd
instance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_bkgd.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newspng_bkgd.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newspng_bkgd.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aspng_bkgd.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_bkgd
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newspng_bkgd
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newspng_bkgd.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newspng_bkgd.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
ngray
public static short ngray(long struct) Unsafe version ofgray()
. -
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()
. -
nplte_index
public static short nplte_index(long struct) Unsafe version ofplte_index()
. -
ngray
public static void ngray(long struct, short value) Unsafe version ofgray
. -
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
. -
nplte_index
public static void nplte_index(long struct, short value) Unsafe version ofplte_index
.
-