Package org.lwjgl.sdl
Class SDL_MessageBoxButtonData
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
public class SDL_MessageBoxButtonData
extends Struct<SDL_MessageBoxButtonData>
implements NativeResource
struct SDL_MessageBoxButtonData {
SDL_MessageBoxButtonFlags flags;
int buttonID;
char const * text;
}-
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 size in bytes.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_MessageBoxButtonData(ByteBuffer container) Creates aSDL_MessageBoxButtonDatainstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintbuttonID()buttonID(int value) Sets the specified value to thebuttonIDfield.static SDL_MessageBoxButtonDatacalloc()Returns a newSDL_MessageBoxButtonDatainstance allocated withmemCalloc.calloc(int capacity) Returns a newSDL_MessageBoxButtonData.Bufferinstance allocated withmemCalloc.calloc(int capacity, MemoryStack stack) Returns a newSDL_MessageBoxButtonData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_MessageBoxButtonDatacalloc(MemoryStack stack) Returns a newSDL_MessageBoxButtonDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_MessageBoxButtonDatacreate()Returns a newSDL_MessageBoxButtonDatainstance allocated withBufferUtils.create(int capacity) Returns a newSDL_MessageBoxButtonData.Bufferinstance allocated withBufferUtils.static SDL_MessageBoxButtonDatacreate(long address) Returns a newSDL_MessageBoxButtonDatainstance for the specified memory address.create(long address, int capacity) Create aSDL_MessageBoxButtonData.Bufferinstance at the specified memory.static @Nullable SDL_MessageBoxButtonDatacreateSafe(long address) static @Nullable SDL_MessageBoxButtonData.BuffercreateSafe(long address, int capacity) intflags()flags(int value) Sets the specified value to theflagsfield.static SDL_MessageBoxButtonDatamalloc()Returns a newSDL_MessageBoxButtonDatainstance allocated withmemAlloc.malloc(int capacity) Returns a newSDL_MessageBoxButtonData.Bufferinstance allocated withmemAlloc.malloc(int capacity, MemoryStack stack) Returns a newSDL_MessageBoxButtonData.Bufferinstance allocated on the specifiedMemoryStack.static SDL_MessageBoxButtonDatamalloc(MemoryStack stack) Returns a newSDL_MessageBoxButtonDatainstance allocated on the specifiedMemoryStack.static intnbuttonID(long struct) Unsafe version ofbuttonID().static voidnbuttonID(long struct, int value) Unsafe version ofbuttonID.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static ByteBufferntext(long struct) Unsafe version oftext().static voidntext(long struct, ByteBuffer value) Unsafe version oftext.static StringntextString(long struct) Unsafe version oftextString().set(int flags, int buttonID, ByteBuffer text) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).text()text(ByteBuffer value) Sets the address of the specified encoded string to thetextfield.static voidvalidate(long struct) Validates pointer members that should not beNULL.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. -
BUTTONID
public static final int BUTTONIDThe struct member offsets. -
TEXT
public static final int TEXTThe struct member offsets.
-
-
Constructor Details
-
SDL_MessageBoxButtonData
Creates aSDL_MessageBoxButtonDatainstance 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_MessageBoxButtonData>
-
flags
public int flags()- Returns:
- the value of the
flagsfield.
-
buttonID
public int buttonID()- Returns:
- the value of the
buttonIDfield.
-
text
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thetextfield.
-
textString
- Returns:
- the null-terminated string pointed to by the
textfield.
-
flags
Sets the specified value to theflagsfield. -
buttonID
Sets the specified value to thebuttonIDfield. -
text
Sets the address of the specified encoded string to thetextfield. -
set
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_MessageBoxButtonDatainstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_MessageBoxButtonDatainstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_MessageBoxButtonDatainstance allocated withBufferUtils. -
create
Returns a newSDL_MessageBoxButtonDatainstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_MessageBoxButtonData.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_MessageBoxButtonData.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_MessageBoxButtonData.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_MessageBoxButtonData.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_MessageBoxButtonDatainstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_MessageBoxButtonDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_MessageBoxButtonData.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_MessageBoxButtonData.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(). -
nbuttonID
public static int nbuttonID(long struct) Unsafe version ofbuttonID(). -
ntext
Unsafe version oftext(). -
ntextString
Unsafe version oftextString(). -
nflags
public static void nflags(long struct, int value) Unsafe version offlags. -
nbuttonID
public static void nbuttonID(long struct, int value) Unsafe version ofbuttonID. -
ntext
Unsafe version oftext. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-