Class SDL_CursorFrameInfo
- All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
struct SDL_CursorFrameInfo {
SDL_Surface * surface;
Uint32 duration;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Struct
Struct.StructValidationNested classes/interfaces inherited from interface Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSDL_CursorFrameInfo(ByteBuffer container) Creates aSDL_CursorFrameInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_CursorFrameInfocalloc()Returns a newSDL_CursorFrameInfoinstance allocated withmemCalloc.static SDL_CursorFrameInfo.Buffercalloc(int capacity) Returns a newSDL_CursorFrameInfo.Bufferinstance allocated withmemCalloc.static SDL_CursorFrameInfo.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_CursorFrameInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_CursorFrameInfocalloc(MemoryStack stack) Returns a newSDL_CursorFrameInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_CursorFrameInfocreate()Returns a newSDL_CursorFrameInfoinstance allocated withBufferUtils.static SDL_CursorFrameInfo.Buffercreate(int capacity) Returns a newSDL_CursorFrameInfo.Bufferinstance allocated withBufferUtils.static SDL_CursorFrameInfocreate(long address) Returns a newSDL_CursorFrameInfoinstance for the specified memory address.static SDL_CursorFrameInfo.Buffercreate(long address, int capacity) Create aSDL_CursorFrameInfo.Bufferinstance at the specified memory.static @Nullable SDL_CursorFrameInfocreateSafe(long address) static @Nullable SDL_CursorFrameInfo.BuffercreateSafe(long address, int capacity) intduration()duration(int value) Sets the specified value to thedurationfield.static SDL_CursorFrameInfomalloc()Returns a newSDL_CursorFrameInfoinstance allocated withmemAlloc.static SDL_CursorFrameInfo.Buffermalloc(int capacity) Returns a newSDL_CursorFrameInfo.Bufferinstance allocated withmemAlloc.static SDL_CursorFrameInfo.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_CursorFrameInfo.Bufferinstance allocated on the specifiedMemoryStack.static SDL_CursorFrameInfomalloc(MemoryStack stack) Returns a newSDL_CursorFrameInfoinstance allocated on the specifiedMemoryStack.static intnduration(long struct) Unsafe version ofduration().static voidnduration(long struct, int value) Unsafe version ofduration.static SDL_Surfacensurface(long struct) Unsafe version ofsurface().static voidnsurface(long struct, SDL_Surface value) Unsafe version ofsurface.set(SDL_CursorFrameInfo src) Copies the specified struct data to this struct.set(SDL_Surface surface, int duration) Initializes this struct with the specified values.intsizeof()Returnssizeof(struct).surface()surface(SDL_Surface value) Sets the address of the specifiedSDL_Surfaceto thesurfacefield.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface 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. -
SURFACE
public static final int SURFACEThe struct member offsets. -
DURATION
public static final int DURATIONThe struct member offsets.
-
-
Constructor Details
-
SDL_CursorFrameInfo
Creates aSDL_CursorFrameInfoinstance 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_CursorFrameInfo>
-
surface
- Returns:
- a
SDL_Surfaceview of the struct pointed to by thesurfacefield.
-
duration
- Returns:
- the value of the
durationfield.
-
surface
Sets the address of the specifiedSDL_Surfaceto thesurfacefield. -
duration
Sets the specified value to thedurationfield. -
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_CursorFrameInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_CursorFrameInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_CursorFrameInfoinstance allocated withBufferUtils. -
create
Returns a newSDL_CursorFrameInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_CursorFrameInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_CursorFrameInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_CursorFrameInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_CursorFrameInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_CursorFrameInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_CursorFrameInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_CursorFrameInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_CursorFrameInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsurface
Unsafe version ofsurface(). -
nduration
public static int nduration(long struct) Unsafe version ofduration(). -
nsurface
Unsafe version ofsurface. -
nduration
public static void nduration(long struct, int value) Unsafe version ofduration. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-