Record Class SDL_DisplayMode
java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_DisplayMode
- All Implemented Interfaces:
IPointer
,ISDL_DisplayMode
@ValueBasedCandidate
@UnsafeConstructor
public record SDL_DisplayMode(@NotNull MemorySegment segment)
extends Record
implements ISDL_DisplayMode
The structure that defines a display mode.
Since: This struct is available since SDL 3.2.0.
See also:
SDL_GetFullscreenDisplayModes
SDL_GetDesktopDisplayMode
SDL_GetCurrentDisplayMode
SDL_SetWindowFullscreenMode
SDL_GetWindowFullscreenMode
Structure
typedef struct SDL_DisplayMode {
SDL_DisplayID displayID
;
SDL_PixelFormat
format
;
int w
;
int h
;
float pixel_density
;
float refresh_rate
;
int refresh_rate_numerator
;
int refresh_rate_denominator
;
SDL_DisplayModeData
* internal
;
} SDL_DisplayMode;
Contracts
The property segment()
should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)
), and properly aligned to
LAYOUT.byteAlignment()
bytes. To represent null pointer, you may use a Java
null
instead. See the documentation of IPointer.segment()
for more details.
The constructor of this class is marked as UnsafeConstructor
, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final AddressLayout
static final ValueLayout.OfFloat
static final ValueLayout.OfFloat
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_DisplayMode
(@NotNull MemorySegment segment) Creates an instance of aSDL_DisplayMode
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_DisplayMode
static SDL_DisplayMode.Ptr
static SDL_DisplayMode
clone
(Arena arena, SDL_DisplayMode src) int
displayID
(int value) final boolean
Indicates whether some other object is "equal to" this one.int
format()
format
(int value) int
h()
h
(int value) final int
hashCode()
Returns a hash code value for this object.@Nullable SDL_DisplayModeData
internal()
internal
(@Nullable SDL_DisplayModeData value) float
pixel_density
(float value) float
refresh_rate
(float value) int
refresh_rate_denominator
(int value) int
refresh_rate_numerator
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
Returns a string representation of this record class.int
w()
w
(int value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$displayID
-
PATH$format
-
PATH$w
-
PATH$h
-
PATH$pixel_density
-
PATH$refresh_rate
-
PATH$refresh_rate_numerator
-
PATH$refresh_rate_denominator
-
PATH$internal
-
LAYOUT$displayID
-
LAYOUT$format
-
LAYOUT$w
-
LAYOUT$h
-
LAYOUT$pixel_density
-
LAYOUT$refresh_rate
-
LAYOUT$refresh_rate_numerator
-
LAYOUT$refresh_rate_denominator
-
LAYOUT$internal
-
SIZE$displayID
public static final long SIZE$displayID -
SIZE$format
public static final long SIZE$format -
SIZE$w
public static final long SIZE$w -
SIZE$h
public static final long SIZE$h -
SIZE$pixel_density
public static final long SIZE$pixel_density -
SIZE$refresh_rate
public static final long SIZE$refresh_rate -
SIZE$refresh_rate_numerator
public static final long SIZE$refresh_rate_numerator -
SIZE$refresh_rate_denominator
public static final long SIZE$refresh_rate_denominator -
SIZE$internal
public static final long SIZE$internal -
OFFSET$displayID
public static final long OFFSET$displayID -
OFFSET$format
public static final long OFFSET$format -
OFFSET$w
public static final long OFFSET$w -
OFFSET$h
public static final long OFFSET$h -
OFFSET$pixel_density
public static final long OFFSET$pixel_density -
OFFSET$refresh_rate
public static final long OFFSET$refresh_rate -
OFFSET$refresh_rate_numerator
public static final long OFFSET$refresh_rate_numerator -
OFFSET$refresh_rate_denominator
public static final long OFFSET$refresh_rate_denominator -
OFFSET$internal
public static final long OFFSET$internal
-
-
Constructor Details
-
SDL_DisplayMode
Creates an instance of aSDL_DisplayMode
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
displayID
-
displayID
-
format
-
format
-
w
public int w() -
w
-
h
public int h() -
h
-
pixel_density
public float pixel_density() -
pixel_density
-
refresh_rate
public float refresh_rate() -
refresh_rate
-
refresh_rate_numerator
public int refresh_rate_numerator() -
refresh_rate_numerator
-
refresh_rate_denominator
public int refresh_rate_denominator() -
refresh_rate_denominator
-
internal
-
internal
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
segment
Returns the value of thesegment
record component.
-