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;
SDL_MessageBoxButtonData const * buttons;
SDL_MessageBoxColorScheme const * colorScheme;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe 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_MessageBoxDatainstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbuttons()Sets the address of the specifiedSDL_MessageBoxButtonData.Bufferto thebuttonsfield.static SDL_MessageBoxDatacalloc()Returns a newSDL_MessageBoxDatainstance allocated withmemCalloc.static SDL_MessageBoxData.Buffercalloc(int capacity) Returns a newSDL_MessageBoxData.Bufferinstance allocated withmemCalloc.static SDL_MessageBoxData.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_MessageBoxData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_MessageBoxDatacalloc(MemoryStack stack) Returns a newSDL_MessageBoxDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.@Nullable SDL_MessageBoxColorSchemecolorScheme(@Nullable SDL_MessageBoxColorScheme value) Sets the address of the specifiedSDL_MessageBoxColorSchemeto thecolorSchemefield.static SDL_MessageBoxDatacreate()Returns a newSDL_MessageBoxDatainstance allocated withBufferUtils.static SDL_MessageBoxData.Buffercreate(int capacity) Returns a newSDL_MessageBoxData.Bufferinstance allocated withBufferUtils.static SDL_MessageBoxDatacreate(long address) Returns a newSDL_MessageBoxDatainstance for the specified memory address.static SDL_MessageBoxData.Buffercreate(long address, int capacity) Create aSDL_MessageBoxData.Bufferinstance at the specified memory.static @Nullable SDL_MessageBoxDatacreateSafe(long address) static @Nullable SDL_MessageBoxData.BuffercreateSafe(long address, int capacity) intflags()flags(int value) Sets the specified value to theflagsfield.static SDL_MessageBoxDatamalloc()Returns a newSDL_MessageBoxDatainstance allocated withmemAlloc.static SDL_MessageBoxData.Buffermalloc(int capacity) Returns a newSDL_MessageBoxData.Bufferinstance allocated withmemAlloc.static SDL_MessageBoxData.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_MessageBoxData.Bufferinstance allocated on the specifiedMemoryStack.static SDL_MessageBoxDatamalloc(MemoryStack stack) Returns a newSDL_MessageBoxDatainstance allocated on the specifiedMemoryStack.message()message(ByteBuffer value) Sets the address of the specified encoded string to themessagefield.nbuttons(long struct) Unsafe version ofbuttons().static voidnbuttons(long struct, SDL_MessageBoxButtonData.Buffer value) Unsafe version ofbuttons.static @Nullable SDL_MessageBoxColorSchemencolorScheme(long struct) Unsafe version ofcolorScheme().static voidncolorScheme(long struct, @Nullable SDL_MessageBoxColorScheme value) Unsafe version ofcolorScheme.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static ByteBuffernmessage(long struct) Unsafe version ofmessage().static voidnmessage(long struct, ByteBuffer value) Unsafe version ofmessage.static StringnmessageString(long struct) Unsafe version ofmessageString().static intnnumbuttons(long struct) Unsafe version ofnumbuttons().static voidnnumbuttons(long struct, int value) Sets the specified value to thenumbuttonsfield of the specifiedstruct.static ByteBufferntitle(long struct) Unsafe version oftitle().static voidntitle(long struct, ByteBuffer value) Unsafe version oftitle.static StringntitleString(long struct) Unsafe version oftitleString().intstatic longnwindow(long struct) Unsafe version ofwindow().static voidnwindow(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.intsizeof()Returnssizeof(struct).title()title(ByteBuffer value) Sets the address of the specified encoded string to thetitlefield.static voidvalidate(long struct) Validates pointer members that should not beNULL.longwindow()window(long value) Sets the specified value to thewindowfield.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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_MessageBoxDatainstance at the current position of the specifiedByteBuffercontainer. 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:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<SDL_MessageBoxData>
-
flags
public int flags()- Returns:
- the value of the
flagsfield.
-
window
public long window()- Returns:
- the value of the
windowfield.
-
title
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thetitlefield.
-
titleString
- Returns:
- the null-terminated string pointed to by the
titlefield.
-
message
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by themessagefield.
-
messageString
- Returns:
- the null-terminated string pointed to by the
messagefield.
-
numbuttons
public int numbuttons()- Returns:
- the value of the
numbuttonsfield.
-
buttons
- Returns:
- a
SDL_MessageBoxButtonData.Bufferview of the struct array pointed to by thebuttonsfield.
-
colorScheme
- Returns:
- a
SDL_MessageBoxColorSchemeview of the struct pointed to by thecolorSchemefield.
-
flags
Sets the specified value to theflagsfield. -
window
Sets the specified value to thewindowfield. -
title
Sets the address of the specified encoded string to thetitlefield. -
message
Sets the address of the specified encoded string to themessagefield. -
buttons
Sets the address of the specifiedSDL_MessageBoxButtonData.Bufferto thebuttonsfield. -
colorScheme
Sets the address of the specifiedSDL_MessageBoxColorSchemeto thecolorSchemefield. -
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_MessageBoxDatainstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_MessageBoxDatainstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_MessageBoxDatainstance allocated withBufferUtils. -
create
Returns a newSDL_MessageBoxDatainstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_MessageBoxData.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_MessageBoxData.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_MessageBoxData.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_MessageBoxData.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_MessageBoxDatainstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_MessageBoxDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_MessageBoxData.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_MessageBoxData.Bufferinstance allocated on the specifiedMemoryStackand 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 thenumbuttonsfield 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
-