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 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 AddressLayout
static final AddressLayout
static final ValueLayout.OfInt
static final AddressLayout
static final ValueLayout.OfInt
static final AddressLayout
static final AddressLayout
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 long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_MessageBoxData
(@NotNull MemorySegment segment) Creates an instance of aSDL_MessageBoxData
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_MessageBoxData
static SDL_MessageBoxData.Ptr
@Nullable SDL_MessageBoxButtonData
buttons()
buttons
(int assumedCount) buttons
(@Nullable ISDL_MessageBoxButtonData value) void
buttonsRaw
(MemorySegment value) static SDL_MessageBoxData
clone
(Arena arena, SDL_MessageBoxData src) @Nullable SDL_MessageBoxColorScheme
colorScheme
(int assumedCount) colorScheme
(@Nullable ISDL_MessageBoxColorScheme value) void
colorSchemeRaw
(MemorySegment value) final boolean
Indicates whether some other object is "equal to" this one.int
flags()
flags
(int value) final int
hashCode()
Returns a hash code value for this object.@Nullable BytePtr
message()
Note: the returnedBytePtr
does not have correctBytePtr.size()
property.void
messageRaw
(MemorySegment value) int
numbuttons
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.@Nullable BytePtr
title()
Note: the returnedBytePtr
does not have correctBytePtr.size()
property.titleRaw()
void
titleRaw
(MemorySegment value) final String
toString()
Returns a string representation of this record class.@Nullable SDL_Window
window()
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_MessageBoxData
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
flags
-
flags
-
window
-
window
-
title
Note: the returnedBytePtr
does 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 returnedBytePtr
does 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 thesegment
record component.
-