Package org.lwjgl.util.spng
Class spng_time
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct spng_time {
uint16_t year;
uint8_t month;
uint8_t day;
uint8_t hour;
uint8_t minute;
uint8_t second;
}
-
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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionspng_time
(ByteBuffer container) Creates aspng_time
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic spng_time
calloc()
Returns a newspng_time
instance allocated withmemCalloc
.static spng_time.Buffer
calloc
(int capacity) Returns a newspng_time.Buffer
instance allocated withmemCalloc
.static spng_time.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newspng_time.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static spng_time
calloc
(MemoryStack stack) Returns a newspng_time
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static spng_time
create()
Returns a newspng_time
instance allocated withBufferUtils
.static spng_time.Buffer
create
(int capacity) Returns a newspng_time.Buffer
instance allocated withBufferUtils
.static spng_time
create
(long address) Returns a newspng_time
instance for the specified memory address.static spng_time.Buffer
create
(long address, int capacity) Create aspng_time.Buffer
instance at the specified memory.static @Nullable spng_time
createSafe
(long address) static @Nullable spng_time.Buffer
createSafe
(long address, int capacity) byte
day()
day
(byte value) Sets the specified value to theday
field.byte
hour()
hour
(byte value) Sets the specified value to thehour
field.static spng_time
malloc()
Returns a newspng_time
instance allocated withmemAlloc
.static spng_time.Buffer
malloc
(int capacity) Returns a newspng_time.Buffer
instance allocated withmemAlloc
.static spng_time.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newspng_time.Buffer
instance allocated on the specifiedMemoryStack
.static spng_time
malloc
(MemoryStack stack) Returns a newspng_time
instance allocated on the specifiedMemoryStack
.byte
minute()
minute
(byte value) Sets the specified value to theminute
field.byte
month()
month
(byte value) Sets the specified value to themonth
field.static byte
nday
(long struct) Unsafe version ofday()
.static void
nday
(long struct, byte value) Unsafe version ofday
.static byte
nhour
(long struct) Unsafe version ofhour()
.static void
nhour
(long struct, byte value) Unsafe version ofhour
.static byte
nminute
(long struct) Unsafe version ofminute()
.static void
nminute
(long struct, byte value) Unsafe version ofminute
.static byte
nmonth
(long struct) Unsafe version ofmonth()
.static void
nmonth
(long struct, byte value) Unsafe version ofmonth
.static byte
nsecond
(long struct) Unsafe version ofsecond()
.static void
nsecond
(long struct, byte value) Unsafe version ofsecond
.static short
nyear
(long struct) Unsafe version ofyear()
.static void
nyear
(long struct, short value) Unsafe version ofyear
.byte
second()
second
(byte value) Sets the specified value to thesecond
field.set
(short year, byte month, byte day, byte hour, byte minute, byte second) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.short
year()
year
(short value) Sets the specified value to theyear
field.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. -
YEAR
public static final int YEARThe struct member offsets. -
MONTH
public static final int MONTHThe struct member offsets. -
DAY
public static final int DAYThe struct member offsets. -
HOUR
public static final int HOURThe struct member offsets. -
MINUTE
public static final int MINUTEThe struct member offsets. -
SECOND
public static final int SECONDThe struct member offsets.
-
-
Constructor Details
-
spng_time
Creates aspng_time
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)
. -
year
public short year()- Returns:
- the value of the
year
field.
-
month
public byte month()- Returns:
- the value of the
month
field.
-
day
public byte day()- Returns:
- the value of the
day
field.
-
hour
public byte hour()- Returns:
- the value of the
hour
field.
-
minute
public byte minute()- Returns:
- the value of the
minute
field.
-
second
public byte second()- Returns:
- the value of the
second
field.
-
year
Sets the specified value to theyear
field. -
month
Sets the specified value to themonth
field. -
day
Sets the specified value to theday
field. -
hour
Sets the specified value to thehour
field. -
minute
Sets the specified value to theminute
field. -
second
Sets the specified value to thesecond
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_time
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newspng_time
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newspng_time
instance allocated withBufferUtils
. -
create
Returns a newspng_time
instance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_time.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newspng_time.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newspng_time.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aspng_time.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_time
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newspng_time
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newspng_time.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newspng_time.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nyear
public static short nyear(long struct) Unsafe version ofyear()
. -
nmonth
public static byte nmonth(long struct) Unsafe version ofmonth()
. -
nday
public static byte nday(long struct) Unsafe version ofday()
. -
nhour
public static byte nhour(long struct) Unsafe version ofhour()
. -
nminute
public static byte nminute(long struct) Unsafe version ofminute()
. -
nsecond
public static byte nsecond(long struct) Unsafe version ofsecond()
. -
nyear
public static void nyear(long struct, short value) Unsafe version ofyear
. -
nmonth
public static void nmonth(long struct, byte value) Unsafe version ofmonth
. -
nday
public static void nday(long struct, byte value) Unsafe version ofday
. -
nhour
public static void nhour(long struct, byte value) Unsafe version ofhour
. -
nminute
public static void nminute(long struct, byte value) Unsafe version ofminute
. -
nsecond
public static void nsecond(long struct, byte value) Unsafe version ofsecond
.
-