Package org.lwjgl.sdl
Class SDL_DateTime
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct SDL_DateTime {
int year;
int month;
int day;
int hour;
int minute;
int second;
int nanosecond;
int day_of_week;
int utc_offset;
}
-
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 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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_DateTime
(ByteBuffer container) Creates aSDL_DateTime
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_DateTime
calloc()
Returns a newSDL_DateTime
instance allocated withmemCalloc
.static SDL_DateTime.Buffer
calloc
(int capacity) Returns a newSDL_DateTime.Buffer
instance allocated withmemCalloc
.static SDL_DateTime.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSDL_DateTime.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_DateTime
calloc
(MemoryStack stack) Returns a newSDL_DateTime
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_DateTime
create()
Returns a newSDL_DateTime
instance allocated withBufferUtils
.static SDL_DateTime.Buffer
create
(int capacity) Returns a newSDL_DateTime.Buffer
instance allocated withBufferUtils
.static SDL_DateTime
create
(long address) Returns a newSDL_DateTime
instance for the specified memory address.static SDL_DateTime.Buffer
create
(long address, int capacity) Create aSDL_DateTime.Buffer
instance at the specified memory.static @Nullable SDL_DateTime
createSafe
(long address) static @Nullable SDL_DateTime.Buffer
createSafe
(long address, int capacity) int
day()
day
(int value) Sets the specified value to theday
field.int
day_of_week
(int value) Sets the specified value to theday_of_week
field.int
hour()
hour
(int value) Sets the specified value to thehour
field.static SDL_DateTime
malloc()
Returns a newSDL_DateTime
instance allocated withmemAlloc
.static SDL_DateTime.Buffer
malloc
(int capacity) Returns a newSDL_DateTime.Buffer
instance allocated withmemAlloc
.static SDL_DateTime.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSDL_DateTime.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_DateTime
malloc
(MemoryStack stack) Returns a newSDL_DateTime
instance allocated on the specifiedMemoryStack
.int
minute()
minute
(int value) Sets the specified value to theminute
field.int
month()
month
(int value) Sets the specified value to themonth
field.int
nanosecond
(int value) Sets the specified value to thenanosecond
field.static int
nday
(long struct) Unsafe version ofday()
.static void
nday
(long struct, int value) Unsafe version ofday
.static int
nday_of_week
(long struct) Unsafe version ofday_of_week()
.static void
nday_of_week
(long struct, int value) Unsafe version ofday_of_week
.static int
nhour
(long struct) Unsafe version ofhour()
.static void
nhour
(long struct, int value) Unsafe version ofhour
.static int
nminute
(long struct) Unsafe version ofminute()
.static void
nminute
(long struct, int value) Unsafe version ofminute
.static int
nmonth
(long struct) Unsafe version ofmonth()
.static void
nmonth
(long struct, int value) Unsafe version ofmonth
.static int
nnanosecond
(long struct) Unsafe version ofnanosecond()
.static void
nnanosecond
(long struct, int value) Unsafe version ofnanosecond
.static int
nsecond
(long struct) Unsafe version ofsecond()
.static void
nsecond
(long struct, int value) Unsafe version ofsecond
.static int
nutc_offset
(long struct) Unsafe version ofutc_offset()
.static void
nutc_offset
(long struct, int value) Unsafe version ofutc_offset
.static int
nyear
(long struct) Unsafe version ofyear()
.static void
nyear
(long struct, int value) Unsafe version ofyear
.int
second()
second
(int value) Sets the specified value to thesecond
field.set
(int year, int month, int day, int hour, int minute, int second, int nanosecond, int day_of_week, int utc_offset) Initializes this struct with the specified values.set
(SDL_DateTime src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
utc_offset
(int value) Sets the specified value to theutc_offset
field.int
year()
year
(int 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. -
NANOSECOND
public static final int NANOSECONDThe struct member offsets. -
DAY_OF_WEEK
public static final int DAY_OF_WEEKThe struct member offsets. -
UTC_OFFSET
public static final int UTC_OFFSETThe struct member offsets.
-
-
Constructor Details
-
SDL_DateTime
Creates aSDL_DateTime
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)
.- Specified by:
sizeof
in classStruct<SDL_DateTime>
-
year
public int year()- Returns:
- the value of the
year
field.
-
month
public int month()- Returns:
- the value of the
month
field.
-
day
public int day()- Returns:
- the value of the
day
field.
-
hour
public int hour()- Returns:
- the value of the
hour
field.
-
minute
public int minute()- Returns:
- the value of the
minute
field.
-
second
public int second()- Returns:
- the value of the
second
field.
-
nanosecond
public int nanosecond()- Returns:
- the value of the
nanosecond
field.
-
day_of_week
public int day_of_week()- Returns:
- the value of the
day_of_week
field.
-
utc_offset
public int utc_offset()- Returns:
- the value of the
utc_offset
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. -
nanosecond
Sets the specified value to thenanosecond
field. -
day_of_week
Sets the specified value to theday_of_week
field. -
utc_offset
Sets the specified value to theutc_offset
field. -
set
public SDL_DateTime set(int year, int month, int day, int hour, int minute, int second, int nanosecond, int day_of_week, int utc_offset) 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 newSDL_DateTime
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_DateTime
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_DateTime
instance allocated withBufferUtils
. -
create
Returns a newSDL_DateTime
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_DateTime.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_DateTime.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_DateTime.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_DateTime.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_DateTime
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_DateTime
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_DateTime.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_DateTime.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 int nyear(long struct) Unsafe version ofyear()
. -
nmonth
public static int nmonth(long struct) Unsafe version ofmonth()
. -
nday
public static int nday(long struct) Unsafe version ofday()
. -
nhour
public static int nhour(long struct) Unsafe version ofhour()
. -
nminute
public static int nminute(long struct) Unsafe version ofminute()
. -
nsecond
public static int nsecond(long struct) Unsafe version ofsecond()
. -
nnanosecond
public static int nnanosecond(long struct) Unsafe version ofnanosecond()
. -
nday_of_week
public static int nday_of_week(long struct) Unsafe version ofday_of_week()
. -
nutc_offset
public static int nutc_offset(long struct) Unsafe version ofutc_offset()
. -
nyear
public static void nyear(long struct, int value) Unsafe version ofyear
. -
nmonth
public static void nmonth(long struct, int value) Unsafe version ofmonth
. -
nday
public static void nday(long struct, int value) Unsafe version ofday
. -
nhour
public static void nhour(long struct, int value) Unsafe version ofhour
. -
nminute
public static void nminute(long struct, int value) Unsafe version ofminute
. -
nsecond
public static void nsecond(long struct, int value) Unsafe version ofsecond
. -
nnanosecond
public static void nnanosecond(long struct, int value) Unsafe version ofnanosecond
. -
nday_of_week
public static void nday_of_week(long struct, int value) Unsafe version ofday_of_week
. -
nutc_offset
public static void nutc_offset(long struct, int value) Unsafe version ofutc_offset
.
-