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.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.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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_text
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic spng_text
calloc()
Returns a newspng_text
instance allocated withmemCalloc
.static spng_text.Buffer
calloc
(int capacity) Returns a newspng_text.Buffer
instance allocated withmemCalloc
.static spng_text.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newspng_text.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static spng_text
calloc
(MemoryStack stack) Returns a newspng_text
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.byte
compression_flag
(byte value) Sets the specified value to thecompression_flag
field.byte
compression_method
(byte value) Sets the specified value to thecompression_method
field.static spng_text
create()
Returns a newspng_text
instance allocated withBufferUtils
.static spng_text.Buffer
create
(int capacity) Returns a newspng_text.Buffer
instance allocated withBufferUtils
.static spng_text
create
(long address) Returns a newspng_text
instance for the specified memory address.static spng_text.Buffer
create
(long address, int capacity) Create aspng_text.Buffer
instance at the specified memory.static @Nullable spng_text
createSafe
(long address) static @Nullable spng_text.Buffer
createSafe
(long address, int capacity) keyword()
keyword
(ByteBuffer value) Copies the specified encoded string to thekeyword
field.language_tag
(ByteBuffer value) Sets the address of the specified encoded string to thelanguage_tag
field.long
length()
static spng_text
malloc()
Returns a newspng_text
instance allocated withmemAlloc
.static spng_text.Buffer
malloc
(int capacity) Returns a newspng_text.Buffer
instance allocated withmemAlloc
.static spng_text.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newspng_text.Buffer
instance allocated on the specifiedMemoryStack
.static spng_text
malloc
(MemoryStack stack) Returns a newspng_text
instance allocated on the specifiedMemoryStack
.static byte
ncompression_flag
(long struct) Unsafe version ofcompression_flag()
.static void
ncompression_flag
(long struct, byte value) Unsafe version ofcompression_flag
.static byte
ncompression_method
(long struct) Unsafe version ofcompression_method()
.static void
ncompression_method
(long struct, byte value) Unsafe version ofcompression_method
.static ByteBuffer
nkeyword
(long struct) Unsafe version ofkeyword()
.static void
nkeyword
(long struct, ByteBuffer value) Unsafe version ofkeyword
.static String
nkeywordString
(long struct) Unsafe version ofkeywordString()
.static ByteBuffer
nlanguage_tag
(long struct) Unsafe version oflanguage_tag()
.static void
nlanguage_tag
(long struct, ByteBuffer value) Unsafe version oflanguage_tag
.static String
nlanguage_tagString
(long struct) Unsafe version oflanguage_tagString()
.static long
nlength
(long struct) Unsafe version oflength()
.static void
nlength
(long struct, long value) Sets the specified value to thelength
field of the specifiedstruct
.static ByteBuffer
ntext
(long struct) Unsafe version oftext()
.static void
ntext
(long struct, ByteBuffer value) Unsafe version oftext
.static String
ntextString
(long struct) Unsafe version oftextString()
.static ByteBuffer
ntranslated_keyword
(long struct) Unsafe version oftranslated_keyword()
.static void
ntranslated_keyword
(long struct, ByteBuffer value) Unsafe version oftranslated_keyword
.static String
ntranslated_keywordString
(long struct) Unsafe version oftranslated_keywordString()
.static int
ntype
(long struct) Unsafe version oftype()
.static void
ntype
(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.int
sizeof()
Returnssizeof(struct)
.text()
text
(ByteBuffer value) Sets the address of the specified encoded string to thetext
field.translated_keyword
(ByteBuffer value) Sets the address of the specified encoded string to thetranslated_keyword
field.int
type()
type
(int value) Sets the specified value to thetype
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.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. -
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_text
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)
. -
keyword
- Returns:
- a
ByteBuffer
view of thekeyword
field.
-
keywordString
- Returns:
- the null-terminated string stored in the
keyword
field.
-
type
public int type()- Returns:
- the value of the
type
field.
-
length
public long length()- Returns:
- the value of the
length
field.
-
text
- Returns:
- a
ByteBuffer
view of the null-terminated string pointed to by thetext
field.
-
textString
- Returns:
- the null-terminated string pointed to by the
text
field.
-
compression_flag
public byte compression_flag()- Returns:
- the value of the
compression_flag
field.
-
compression_method
public byte compression_method()- Returns:
- the value of the
compression_method
field.
-
language_tag
- Returns:
- a
ByteBuffer
view of the null-terminated string pointed to by thelanguage_tag
field.
-
language_tagString
- Returns:
- the null-terminated string pointed to by the
language_tag
field.
-
translated_keyword
- Returns:
- a
ByteBuffer
view of the null-terminated string pointed to by thetranslated_keyword
field.
-
translated_keywordString
- Returns:
- the null-terminated string pointed to by the
translated_keyword
field.
-
keyword
Copies the specified encoded string to thekeyword
field. -
type
Sets the specified value to thetype
field. -
text
Sets the address of the specified encoded string to thetext
field. -
compression_flag
Sets the specified value to thecompression_flag
field. -
compression_method
Sets the specified value to thecompression_method
field. -
language_tag
Sets the address of the specified encoded string to thelanguage_tag
field. -
translated_keyword
Sets the address of the specified encoded string to thetranslated_keyword
field. -
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_text
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newspng_text
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newspng_text
instance allocated withBufferUtils
. -
create
Returns a newspng_text
instance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_text.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newspng_text.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newspng_text.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aspng_text.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_text
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newspng_text
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newspng_text.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newspng_text.Buffer
instance allocated on the specifiedMemoryStack
and 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 thelength
field 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
-