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_GetFullscreenDisplayModesSDL_GetDesktopDisplayModeSDL_GetCurrentDisplayModeSDL_SetWindowFullscreenModeSDL_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 recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final ValueLayout.OfFloatstatic final ValueLayout.OfFloatstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_DisplayMode(@NotNull MemorySegment segment) Creates an instance of aSDL_DisplayModerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_DisplayModestatic SDL_DisplayMode.Ptrstatic SDL_DisplayModeclone(Arena arena, SDL_DisplayMode src) intdisplayID(int value) final booleanIndicates whether some other object is "equal to" this one.intformat()format(int value) inth()h(int value) final inthashCode()Returns a hash code value for this object.@Nullable SDL_DisplayModeDatainternal()internal(@Nullable SDL_DisplayModeData value) floatpixel_density(float value) floatrefresh_rate(float value) intrefresh_rate_denominator(int value) intrefresh_rate_numerator(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()Returns a string representation of this record class.intw()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_DisplayModerecord class.- Parameters:
segment- the value for thesegmentrecord 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 thesegmentrecord component.
-