Package org.lwjgl.util.spng
Class spng_hist
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct spng_hist {
uint16_t frequency[256];
}-
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 size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionspng_hist(ByteBuffer container) Creates aspng_histinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic spng_histcalloc()Returns a newspng_histinstance allocated withmemCalloc.static spng_hist.Buffercalloc(int capacity) Returns a newspng_hist.Bufferinstance allocated withmemCalloc.static spng_hist.Buffercalloc(int capacity, MemoryStack stack) Returns a newspng_hist.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_histcalloc(MemoryStack stack) Returns a newspng_histinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_histcreate()Returns a newspng_histinstance allocated withBufferUtils.static spng_hist.Buffercreate(int capacity) Returns a newspng_hist.Bufferinstance allocated withBufferUtils.static spng_histcreate(long address) Returns a newspng_histinstance for the specified memory address.static spng_hist.Buffercreate(long address, int capacity) Create aspng_hist.Bufferinstance at the specified memory.static @Nullable spng_histcreateSafe(long address) static @Nullable spng_hist.BuffercreateSafe(long address, int capacity) shortfrequency(int index) frequency(int index, short value) Sets the specified value at the specified index of thefrequencyfield.frequency(ShortBuffer value) Copies the specifiedShortBufferto thefrequencyfield.static spng_histmalloc()Returns a newspng_histinstance allocated withmemAlloc.static spng_hist.Buffermalloc(int capacity) Returns a newspng_hist.Bufferinstance allocated withmemAlloc.static spng_hist.Buffermalloc(int capacity, MemoryStack stack) Returns a newspng_hist.Bufferinstance allocated on the specifiedMemoryStack.static spng_histmalloc(MemoryStack stack) Returns a newspng_histinstance allocated on the specifiedMemoryStack.static ShortBuffernfrequency(long struct) Unsafe version offrequency().static shortnfrequency(long struct, int index) Unsafe version offrequency.static voidnfrequency(long struct, int index, short value) Unsafe version offrequency.static voidnfrequency(long struct, ShortBuffer value) Unsafe version offrequency.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. -
FREQUENCY
public static final int FREQUENCYThe struct member offsets.
-
-
Constructor Details
-
spng_hist
Creates aspng_histinstance 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). -
frequency
- Returns:
- a
ShortBufferview of thefrequencyfield.
-
frequency
public short frequency(int index) - Returns:
- the value at the specified index of the
frequencyfield.
-
frequency
Copies the specifiedShortBufferto thefrequencyfield. -
frequency
Sets the specified value at the specified index of thefrequencyfield. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newspng_histinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newspng_histinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newspng_histinstance allocated withBufferUtils. -
create
Returns a newspng_histinstance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_hist.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newspng_hist.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newspng_hist.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aspng_hist.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_histinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newspng_histinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newspng_hist.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newspng_hist.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nfrequency
Unsafe version offrequency(). -
nfrequency
public static short nfrequency(long struct, int index) Unsafe version offrequency. -
nfrequency
Unsafe version offrequency. -
nfrequency
public static void nfrequency(long struct, int index, short value) Unsafe version offrequency.
-