Record Class SDL_MessageBoxData
java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_MessageBoxData
- All Implemented Interfaces:
IPointer,ISDL_MessageBoxData
@ValueBasedCandidate
@UnsafeConstructor
public record SDL_MessageBoxData(@NotNull MemorySegment segment)
extends Record
implements ISDL_MessageBoxData
MessageBox structure containing title, text, window, etc.
Since: This struct is available since SDL 3.2.0.
Structure
typedef struct SDL_MessageBoxData {
SDL_MessageBoxFlags flags;
SDL_Window* window;
char const* title;
char const* message;
int numbuttons;
SDL_MessageBoxButtonData const* buttons;
SDL_MessageBoxColorScheme const* colorScheme;
} SDL_MessageBoxData;
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 AddressLayoutstatic final AddressLayoutstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final AddressLayoutstatic 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 longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_MessageBoxData(@NotNull MemorySegment segment) Creates an instance of aSDL_MessageBoxDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_MessageBoxDatastatic SDL_MessageBoxData.Ptr@Nullable SDL_MessageBoxButtonDatabuttons()buttons(int assumedCount) buttons(@Nullable ISDL_MessageBoxButtonData value) voidbuttonsRaw(MemorySegment value) static SDL_MessageBoxDataclone(Arena arena, SDL_MessageBoxData src) @Nullable SDL_MessageBoxColorSchemecolorScheme(int assumedCount) colorScheme(@Nullable ISDL_MessageBoxColorScheme value) voidcolorSchemeRaw(MemorySegment value) final booleanIndicates whether some other object is "equal to" this one.intflags()flags(int value) final inthashCode()Returns a hash code value for this object.@Nullable BytePtrmessage()Note: the returnedBytePtrdoes not have correctBytePtr.size()property.voidmessageRaw(MemorySegment value) intnumbuttons(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.@Nullable BytePtrtitle()Note: the returnedBytePtrdoes not have correctBytePtr.size()property.titleRaw()voidtitleRaw(MemorySegment value) final StringtoString()Returns a string representation of this record class.@Nullable SDL_Windowwindow()window(@Nullable SDL_Window value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$flags
-
PATH$window
-
PATH$title
-
PATH$message
-
PATH$numbuttons
-
PATH$buttons
-
PATH$colorScheme
-
LAYOUT$flags
-
LAYOUT$window
-
LAYOUT$title
-
LAYOUT$message
-
LAYOUT$numbuttons
-
LAYOUT$buttons
-
LAYOUT$colorScheme
-
SIZE$flags
public static final long SIZE$flags -
SIZE$window
public static final long SIZE$window -
SIZE$title
public static final long SIZE$title -
SIZE$message
public static final long SIZE$message -
SIZE$numbuttons
public static final long SIZE$numbuttons -
SIZE$buttons
public static final long SIZE$buttons -
SIZE$colorScheme
public static final long SIZE$colorScheme -
OFFSET$flags
public static final long OFFSET$flags -
OFFSET$window
public static final long OFFSET$window -
OFFSET$title
public static final long OFFSET$title -
OFFSET$message
public static final long OFFSET$message -
OFFSET$numbuttons
public static final long OFFSET$numbuttons -
OFFSET$buttons
public static final long OFFSET$buttons -
OFFSET$colorScheme
public static final long OFFSET$colorScheme
-
-
Constructor Details
-
SDL_MessageBoxData
Creates an instance of aSDL_MessageBoxDatarecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
flags
-
flags
-
window
-
window
-
title
Note: the returnedBytePtrdoes not have correctBytePtr.size()property. It's up to user to track the size of the buffer, and useBytePtr.reinterpret(long)to set the size before actually reading from or writing to the buffer. -
title
-
titleRaw
-
titleRaw
-
message
Note: the returnedBytePtrdoes not have correctBytePtr.size()property. It's up to user to track the size of the buffer, and useBytePtr.reinterpret(long)to set the size before actually reading from or writing to the buffer. -
message
-
messageRaw
-
messageRaw
-
numbuttons
public int numbuttons() -
numbuttons
-
buttons
-
buttons
-
buttons
-
buttonsRaw
-
buttonsRaw
-
colorScheme
-
colorScheme
-
colorScheme
-
colorSchemeRaw
-
colorSchemeRaw
-
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.
-