Package org.lwjgl.util.spng
Class spng_text
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct spng_text {
char keyword[80];
int type;
size_t length;
char * text;
uint8_t compression_flag;
uint8_t compression_method;
char * language_tag;
char * translated_keyword;
}-
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.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionspng_text(ByteBuffer container) Creates aspng_textinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic spng_textcalloc()Returns a newspng_textinstance allocated withmemCalloc.static spng_text.Buffercalloc(int capacity) Returns a newspng_text.Bufferinstance allocated withmemCalloc.static spng_text.Buffercalloc(int capacity, MemoryStack stack) Returns a newspng_text.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_textcalloc(MemoryStack stack) Returns a newspng_textinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.bytecompression_flag(byte value) Sets the specified value to thecompression_flagfield.bytecompression_method(byte value) Sets the specified value to thecompression_methodfield.static spng_textcreate()Returns a newspng_textinstance allocated withBufferUtils.static spng_text.Buffercreate(int capacity) Returns a newspng_text.Bufferinstance allocated withBufferUtils.static spng_textcreate(long address) Returns a newspng_textinstance for the specified memory address.static spng_text.Buffercreate(long address, int capacity) Create aspng_text.Bufferinstance at the specified memory.static @Nullable spng_textcreateSafe(long address) static @Nullable spng_text.BuffercreateSafe(long address, int capacity) keyword()keyword(ByteBuffer value) Copies the specified encoded string to thekeywordfield.language_tag(ByteBuffer value) Sets the address of the specified encoded string to thelanguage_tagfield.longlength()static spng_textmalloc()Returns a newspng_textinstance allocated withmemAlloc.static spng_text.Buffermalloc(int capacity) Returns a newspng_text.Bufferinstance allocated withmemAlloc.static spng_text.Buffermalloc(int capacity, MemoryStack stack) Returns a newspng_text.Bufferinstance allocated on the specifiedMemoryStack.static spng_textmalloc(MemoryStack stack) Returns a newspng_textinstance allocated on the specifiedMemoryStack.static bytencompression_flag(long struct) Unsafe version ofcompression_flag().static voidncompression_flag(long struct, byte value) Unsafe version ofcompression_flag.static bytencompression_method(long struct) Unsafe version ofcompression_method().static voidncompression_method(long struct, byte value) Unsafe version ofcompression_method.static ByteBuffernkeyword(long struct) Unsafe version ofkeyword().static voidnkeyword(long struct, ByteBuffer value) Unsafe version ofkeyword.static StringnkeywordString(long struct) Unsafe version ofkeywordString().static ByteBuffernlanguage_tag(long struct) Unsafe version oflanguage_tag().static voidnlanguage_tag(long struct, ByteBuffer value) Unsafe version oflanguage_tag.static Stringnlanguage_tagString(long struct) Unsafe version oflanguage_tagString().static longnlength(long struct) Unsafe version oflength().static voidnlength(long struct, long value) Sets the specified value to thelengthfield of the specifiedstruct.static ByteBufferntext(long struct) Unsafe version oftext().static voidntext(long struct, ByteBuffer value) Unsafe version oftext.static StringntextString(long struct) Unsafe version oftextString().static ByteBufferntranslated_keyword(long struct) Unsafe version oftranslated_keyword().static voidntranslated_keyword(long struct, ByteBuffer value) Unsafe version oftranslated_keyword.static Stringntranslated_keywordString(long struct) Unsafe version oftranslated_keywordString().static intntype(long struct) Unsafe version oftype().static voidntype(long struct, int value) Unsafe version oftype.set(ByteBuffer keyword, int type, ByteBuffer text, byte compression_flag, byte compression_method, ByteBuffer language_tag, ByteBuffer translated_keyword) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).text()text(ByteBuffer value) Sets the address of the specified encoded string to thetextfield.translated_keyword(ByteBuffer value) Sets the address of the specified encoded string to thetranslated_keywordfield.inttype()type(int value) Sets the specified value to thetypefield.static voidvalidate(long struct) Validates pointer members that should not beNULL.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. -
KEYWORD
public static final int KEYWORDThe struct member offsets. -
TYPE
public static final int TYPEThe struct member offsets. -
LENGTH
public static final int LENGTHThe struct member offsets. -
TEXT
public static final int TEXTThe struct member offsets. -
COMPRESSION_FLAG
public static final int COMPRESSION_FLAGThe struct member offsets. -
COMPRESSION_METHOD
public static final int COMPRESSION_METHODThe struct member offsets. -
LANGUAGE_TAG
public static final int LANGUAGE_TAGThe struct member offsets. -
TRANSLATED_KEYWORD
public static final int TRANSLATED_KEYWORDThe struct member offsets.
-
-
Constructor Details
-
spng_text
Creates aspng_textinstance 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). -
keyword
- Returns:
- a
ByteBufferview of thekeywordfield.
-
keywordString
- Returns:
- the null-terminated string stored in the
keywordfield.
-
type
public int type()- Returns:
- the value of the
typefield.
-
length
public long length()- Returns:
- the value of the
lengthfield.
-
text
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thetextfield.
-
textString
- Returns:
- the null-terminated string pointed to by the
textfield.
-
compression_flag
public byte compression_flag()- Returns:
- the value of the
compression_flagfield.
-
compression_method
public byte compression_method()- Returns:
- the value of the
compression_methodfield.
-
language_tag
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thelanguage_tagfield.
-
language_tagString
- Returns:
- the null-terminated string pointed to by the
language_tagfield.
-
translated_keyword
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thetranslated_keywordfield.
-
translated_keywordString
- Returns:
- the null-terminated string pointed to by the
translated_keywordfield.
-
keyword
Copies the specified encoded string to thekeywordfield. -
type
Sets the specified value to thetypefield. -
text
Sets the address of the specified encoded string to thetextfield. -
compression_flag
Sets the specified value to thecompression_flagfield. -
compression_method
Sets the specified value to thecompression_methodfield. -
language_tag
Sets the address of the specified encoded string to thelanguage_tagfield. -
translated_keyword
Sets the address of the specified encoded string to thetranslated_keywordfield. -
set
public spng_text set(ByteBuffer keyword, int type, ByteBuffer text, byte compression_flag, byte compression_method, ByteBuffer language_tag, ByteBuffer translated_keyword) 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_textinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newspng_textinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newspng_textinstance allocated withBufferUtils. -
create
Returns a newspng_textinstance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_text.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newspng_text.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newspng_text.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aspng_text.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_textinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newspng_textinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newspng_text.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newspng_text.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nkeyword
Unsafe version ofkeyword(). -
nkeywordString
Unsafe version ofkeywordString(). -
ntype
public static int ntype(long struct) Unsafe version oftype(). -
nlength
public static long nlength(long struct) Unsafe version oflength(). -
ntext
Unsafe version oftext(). -
ntextString
Unsafe version oftextString(). -
ncompression_flag
public static byte ncompression_flag(long struct) Unsafe version ofcompression_flag(). -
ncompression_method
public static byte ncompression_method(long struct) Unsafe version ofcompression_method(). -
nlanguage_tag
Unsafe version oflanguage_tag(). -
nlanguage_tagString
Unsafe version oflanguage_tagString(). -
ntranslated_keyword
Unsafe version oftranslated_keyword(). -
ntranslated_keywordString
Unsafe version oftranslated_keywordString(). -
nkeyword
Unsafe version ofkeyword. -
ntype
public static void ntype(long struct, int value) Unsafe version oftype. -
nlength
public static void nlength(long struct, long value) Sets the specified value to thelengthfield of the specifiedstruct. -
ntext
Unsafe version oftext. -
ncompression_flag
public static void ncompression_flag(long struct, byte value) Unsafe version ofcompression_flag. -
ncompression_method
public static void ncompression_method(long struct, byte value) Unsafe version ofcompression_method. -
nlanguage_tag
Unsafe version oflanguage_tag. -
ntranslated_keyword
Unsafe version oftranslated_keyword. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-