Package org.lwjgl.sdl
Class SDL_MessageBoxData
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct SDL_MessageBoxData {
SDL_MessageBoxFlags flags;
SDL_Window * window;
char const * title;
char const * message;
int numbuttons;
{@link SDL_MessageBoxButtonData SDL_MessageBoxButtonData} const * buttons;
{@link SDL_MessageBoxColorScheme SDL_MessageBoxColorScheme} const * colorScheme;
}
-
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 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_MessageBoxData
(ByteBuffer container) Creates aSDL_MessageBoxData
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionbuttons()
Sets the address of the specifiedSDL_MessageBoxButtonData.Buffer
to thebuttons
field.static SDL_MessageBoxData
calloc()
Returns a newSDL_MessageBoxData
instance allocated withmemCalloc
.static SDL_MessageBoxData.Buffer
calloc
(int capacity) Returns a newSDL_MessageBoxData.Buffer
instance allocated withmemCalloc
.static SDL_MessageBoxData.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSDL_MessageBoxData.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_MessageBoxData
calloc
(MemoryStack stack) Returns a newSDL_MessageBoxData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.@Nullable SDL_MessageBoxColorScheme
colorScheme
(@Nullable SDL_MessageBoxColorScheme value) Sets the address of the specifiedSDL_MessageBoxColorScheme
to thecolorScheme
field.static SDL_MessageBoxData
create()
Returns a newSDL_MessageBoxData
instance allocated withBufferUtils
.static SDL_MessageBoxData.Buffer
create
(int capacity) Returns a newSDL_MessageBoxData.Buffer
instance allocated withBufferUtils
.static SDL_MessageBoxData
create
(long address) Returns a newSDL_MessageBoxData
instance for the specified memory address.static SDL_MessageBoxData.Buffer
create
(long address, int capacity) Create aSDL_MessageBoxData.Buffer
instance at the specified memory.static @Nullable SDL_MessageBoxData
createSafe
(long address) static @Nullable SDL_MessageBoxData.Buffer
createSafe
(long address, int capacity) int
flags()
flags
(int value) Sets the specified value to theflags
field.static SDL_MessageBoxData
malloc()
Returns a newSDL_MessageBoxData
instance allocated withmemAlloc
.static SDL_MessageBoxData.Buffer
malloc
(int capacity) Returns a newSDL_MessageBoxData.Buffer
instance allocated withmemAlloc
.static SDL_MessageBoxData.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSDL_MessageBoxData.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_MessageBoxData
malloc
(MemoryStack stack) Returns a newSDL_MessageBoxData
instance allocated on the specifiedMemoryStack
.message()
message
(ByteBuffer value) Sets the address of the specified encoded string to themessage
field.nbuttons
(long struct) Unsafe version ofbuttons()
.static void
nbuttons
(long struct, SDL_MessageBoxButtonData.Buffer value) Unsafe version ofbuttons
.static @Nullable SDL_MessageBoxColorScheme
ncolorScheme
(long struct) Unsafe version ofcolorScheme()
.static void
ncolorScheme
(long struct, @Nullable SDL_MessageBoxColorScheme value) Unsafe version ofcolorScheme
.static int
nflags
(long struct) Unsafe version offlags()
.static void
nflags
(long struct, int value) Unsafe version offlags
.static ByteBuffer
nmessage
(long struct) Unsafe version ofmessage()
.static void
nmessage
(long struct, ByteBuffer value) Unsafe version ofmessage
.static String
nmessageString
(long struct) Unsafe version ofmessageString()
.static int
nnumbuttons
(long struct) Unsafe version ofnumbuttons()
.static void
nnumbuttons
(long struct, int value) Sets the specified value to thenumbuttons
field of the specifiedstruct
.static ByteBuffer
ntitle
(long struct) Unsafe version oftitle()
.static void
ntitle
(long struct, ByteBuffer value) Unsafe version oftitle
.static String
ntitleString
(long struct) Unsafe version oftitleString()
.int
static long
nwindow
(long struct) Unsafe version ofwindow()
.static void
nwindow
(long struct, long value) Unsafe version ofwindow
.set
(int flags, long window, ByteBuffer title, ByteBuffer message, SDL_MessageBoxButtonData.Buffer buttons, @Nullable SDL_MessageBoxColorScheme colorScheme) Initializes this struct with the specified values.set
(SDL_MessageBoxData src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.title()
title
(ByteBuffer value) Sets the address of the specified encoded string to thetitle
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.long
window()
window
(long value) Sets the specified value to thewindow
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. -
FLAGS
public static final int FLAGSThe struct member offsets. -
WINDOW
public static final int WINDOWThe struct member offsets. -
TITLE
public static final int TITLEThe struct member offsets. -
MESSAGE
public static final int MESSAGEThe struct member offsets. -
NUMBUTTONS
public static final int NUMBUTTONSThe struct member offsets. -
BUTTONS
public static final int BUTTONSThe struct member offsets. -
COLORSCHEME
public static final int COLORSCHEMEThe struct member offsets.
-
-
Constructor Details
-
SDL_MessageBoxData
Creates aSDL_MessageBoxData
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_MessageBoxData>
-
flags
public int flags()- Returns:
- the value of the
flags
field.
-
window
public long window()- Returns:
- the value of the
window
field.
-
title
- Returns:
- a
ByteBuffer
view of the null-terminated string pointed to by thetitle
field.
-
titleString
- Returns:
- the null-terminated string pointed to by the
title
field.
-
message
- Returns:
- a
ByteBuffer
view of the null-terminated string pointed to by themessage
field.
-
messageString
- Returns:
- the null-terminated string pointed to by the
message
field.
-
numbuttons
public int numbuttons()- Returns:
- the value of the
numbuttons
field.
-
buttons
- Returns:
- a
SDL_MessageBoxButtonData.Buffer
view of the struct array pointed to by thebuttons
field.
-
colorScheme
- Returns:
- a
SDL_MessageBoxColorScheme
view of the struct pointed to by thecolorScheme
field.
-
flags
Sets the specified value to theflags
field. -
window
Sets the specified value to thewindow
field. -
title
Sets the address of the specified encoded string to thetitle
field. -
message
Sets the address of the specified encoded string to themessage
field. -
buttons
Sets the address of the specifiedSDL_MessageBoxButtonData.Buffer
to thebuttons
field. -
colorScheme
Sets the address of the specifiedSDL_MessageBoxColorScheme
to thecolorScheme
field. -
set
public SDL_MessageBoxData set(int flags, long window, ByteBuffer title, ByteBuffer message, SDL_MessageBoxButtonData.Buffer buttons, @Nullable SDL_MessageBoxColorScheme colorScheme) 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_MessageBoxData
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_MessageBoxData
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_MessageBoxData
instance allocated withBufferUtils
. -
create
Returns a newSDL_MessageBoxData
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_MessageBoxData.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_MessageBoxData.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_MessageBoxData.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_MessageBoxData.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_MessageBoxData
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_MessageBoxData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_MessageBoxData.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_MessageBoxData.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nflags
public static int nflags(long struct) Unsafe version offlags()
. -
nwindow
public static long nwindow(long struct) Unsafe version ofwindow()
. -
ntitle
Unsafe version oftitle()
. -
ntitleString
Unsafe version oftitleString()
. -
nmessage
Unsafe version ofmessage()
. -
nmessageString
Unsafe version ofmessageString()
. -
nnumbuttons
public static int nnumbuttons(long struct) Unsafe version ofnumbuttons()
. -
nbuttons
Unsafe version ofbuttons()
. -
ncolorScheme
Unsafe version ofcolorScheme()
. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags
. -
nwindow
public static void nwindow(long struct, long value) Unsafe version ofwindow
. -
ntitle
Unsafe version oftitle
. -
nmessage
Unsafe version ofmessage
. -
nnumbuttons
public static void nnumbuttons(long struct, int value) Sets the specified value to thenumbuttons
field of the specifiedstruct
. -
nbuttons
Unsafe version ofbuttons
. -
ncolorScheme
Unsafe version ofcolorScheme
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-