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.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 size in bytes.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_MessageBoxButtonData
(ByteBuffer container) Creates aSDL_MessageBoxButtonData
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionint
buttonID()
buttonID
(int value) Sets the specified value to thebuttonID
field.static SDL_MessageBoxButtonData
calloc()
Returns a newSDL_MessageBoxButtonData
instance allocated withmemCalloc
.calloc
(int capacity) Returns a newSDL_MessageBoxButtonData.Buffer
instance allocated withmemCalloc
.calloc
(int capacity, MemoryStack stack) Returns a newSDL_MessageBoxButtonData.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_MessageBoxButtonData
calloc
(MemoryStack stack) Returns a newSDL_MessageBoxButtonData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_MessageBoxButtonData
create()
Returns a newSDL_MessageBoxButtonData
instance allocated withBufferUtils
.create
(int capacity) Returns a newSDL_MessageBoxButtonData.Buffer
instance allocated withBufferUtils
.static SDL_MessageBoxButtonData
create
(long address) Returns a newSDL_MessageBoxButtonData
instance for the specified memory address.create
(long address, int capacity) Create aSDL_MessageBoxButtonData.Buffer
instance at the specified memory.static @Nullable SDL_MessageBoxButtonData
createSafe
(long address) static @Nullable SDL_MessageBoxButtonData.Buffer
createSafe
(long address, int capacity) int
flags()
flags
(int value) Sets the specified value to theflags
field.static SDL_MessageBoxButtonData
malloc()
Returns a newSDL_MessageBoxButtonData
instance allocated withmemAlloc
.malloc
(int capacity) Returns a newSDL_MessageBoxButtonData.Buffer
instance allocated withmemAlloc
.malloc
(int capacity, MemoryStack stack) Returns a newSDL_MessageBoxButtonData.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_MessageBoxButtonData
malloc
(MemoryStack stack) Returns a newSDL_MessageBoxButtonData
instance allocated on the specifiedMemoryStack
.static int
nbuttonID
(long struct) Unsafe version ofbuttonID()
.static void
nbuttonID
(long struct, int value) Unsafe version ofbuttonID
.static int
nflags
(long struct) Unsafe version offlags()
.static void
nflags
(long struct, int value) Unsafe version offlags
.static ByteBuffer
ntext
(long struct) Unsafe version oftext()
.static void
ntext
(long struct, ByteBuffer value) Unsafe version oftext
.static String
ntextString
(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.int
sizeof()
Returnssizeof(struct)
.text()
text
(ByteBuffer value) Sets the address of the specified encoded string to thetext
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.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. -
BUTTONID
public static final int BUTTONIDThe struct member offsets. -
TEXT
public static final int TEXTThe struct member offsets.
-
-
Constructor Details
-
SDL_MessageBoxButtonData
Creates aSDL_MessageBoxButtonData
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_MessageBoxButtonData>
-
flags
public int flags()- Returns:
- the value of the
flags
field.
-
buttonID
public int buttonID()- Returns:
- the value of the
buttonID
field.
-
text
- Returns:
- a
ByteBuffer
view of the null-terminated string pointed to by thetext
field.
-
textString
- Returns:
- the null-terminated string pointed to by the
text
field.
-
flags
Sets the specified value to theflags
field. -
buttonID
Sets the specified value to thebuttonID
field. -
text
Sets the address of the specified encoded string to thetext
field. -
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_MessageBoxButtonData
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_MessageBoxButtonData
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_MessageBoxButtonData
instance allocated withBufferUtils
. -
create
Returns a newSDL_MessageBoxButtonData
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_MessageBoxButtonData.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_MessageBoxButtonData.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_MessageBoxButtonData.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_MessageBoxButtonData.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_MessageBoxButtonData
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_MessageBoxButtonData
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_MessageBoxButtonData.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_MessageBoxButtonData.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()
. -
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
-