Package org.lwjgl.sdl
Class SDL_HapticLeftRight
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct SDL_HapticLeftRight {
Uint16 type;
Uint32 length;
Uint16 large_magnitude;
Uint16 small_magnitude;
}-
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.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_HapticLeftRight(ByteBuffer container) Creates aSDL_HapticLeftRightinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_HapticLeftRightcalloc()Returns a newSDL_HapticLeftRightinstance allocated withmemCalloc.static SDL_HapticLeftRight.Buffercalloc(int capacity) Returns a newSDL_HapticLeftRight.Bufferinstance allocated withmemCalloc.static SDL_HapticLeftRight.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticLeftRight.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_HapticLeftRightcalloc(MemoryStack stack) Returns a newSDL_HapticLeftRightinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_HapticLeftRightcreate()Returns a newSDL_HapticLeftRightinstance allocated withBufferUtils.static SDL_HapticLeftRight.Buffercreate(int capacity) Returns a newSDL_HapticLeftRight.Bufferinstance allocated withBufferUtils.static SDL_HapticLeftRightcreate(long address) Returns a newSDL_HapticLeftRightinstance for the specified memory address.static SDL_HapticLeftRight.Buffercreate(long address, int capacity) Create aSDL_HapticLeftRight.Bufferinstance at the specified memory.static @Nullable SDL_HapticLeftRightcreateSafe(long address) static @Nullable SDL_HapticLeftRight.BuffercreateSafe(long address, int capacity) shortlarge_magnitude(short value) Sets the specified value to thelarge_magnitudefield.intlength()length(int value) Sets the specified value to thelengthfield.static SDL_HapticLeftRightmalloc()Returns a newSDL_HapticLeftRightinstance allocated withmemAlloc.static SDL_HapticLeftRight.Buffermalloc(int capacity) Returns a newSDL_HapticLeftRight.Bufferinstance allocated withmemAlloc.static SDL_HapticLeftRight.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticLeftRight.Bufferinstance allocated on the specifiedMemoryStack.static SDL_HapticLeftRightmalloc(MemoryStack stack) Returns a newSDL_HapticLeftRightinstance allocated on the specifiedMemoryStack.static shortnlarge_magnitude(long struct) Unsafe version oflarge_magnitude().static voidnlarge_magnitude(long struct, short value) Unsafe version oflarge_magnitude.static intnlength(long struct) Unsafe version oflength().static voidnlength(long struct, int value) Unsafe version oflength.static shortnsmall_magnitude(long struct) Unsafe version ofsmall_magnitude().static voidnsmall_magnitude(long struct, short value) Unsafe version ofsmall_magnitude.static shortntype(long struct) Unsafe version oftype().static voidntype(long struct, short value) Unsafe version oftype.set(short type, int length, short large_magnitude, short small_magnitude) Initializes this struct with the specified values.set(SDL_HapticLeftRight src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).shortsmall_magnitude(short value) Sets the specified value to thesmall_magnitudefield.shorttype()type(short value) Sets the specified value to thetypefield.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. -
TYPE
public static final int TYPEThe struct member offsets. -
LENGTH
public static final int LENGTHThe struct member offsets. -
LARGE_MAGNITUDE
public static final int LARGE_MAGNITUDEThe struct member offsets. -
SMALL_MAGNITUDE
public static final int SMALL_MAGNITUDEThe struct member offsets.
-
-
Constructor Details
-
SDL_HapticLeftRight
Creates aSDL_HapticLeftRightinstance 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_HapticLeftRight>
-
type
public short type()- Returns:
- the value of the
typefield.
-
length
public int length()- Returns:
- the value of the
lengthfield.
-
large_magnitude
public short large_magnitude()- Returns:
- the value of the
large_magnitudefield.
-
small_magnitude
public short small_magnitude()- Returns:
- the value of the
small_magnitudefield.
-
type
Sets the specified value to thetypefield. -
length
Sets the specified value to thelengthfield. -
large_magnitude
Sets the specified value to thelarge_magnitudefield. -
small_magnitude
Sets the specified value to thesmall_magnitudefield. -
set
public SDL_HapticLeftRight set(short type, int length, short large_magnitude, short small_magnitude) 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_HapticLeftRightinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_HapticLeftRightinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_HapticLeftRightinstance allocated withBufferUtils. -
create
Returns a newSDL_HapticLeftRightinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_HapticLeftRight.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_HapticLeftRight.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_HapticLeftRight.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_HapticLeftRight.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_HapticLeftRightinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticLeftRightinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_HapticLeftRight.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticLeftRight.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ntype
public static short ntype(long struct) Unsafe version oftype(). -
nlength
public static int nlength(long struct) Unsafe version oflength(). -
nlarge_magnitude
public static short nlarge_magnitude(long struct) Unsafe version oflarge_magnitude(). -
nsmall_magnitude
public static short nsmall_magnitude(long struct) Unsafe version ofsmall_magnitude(). -
ntype
public static void ntype(long struct, short value) Unsafe version oftype. -
nlength
public static void nlength(long struct, int value) Unsafe version oflength. -
nlarge_magnitude
public static void nlarge_magnitude(long struct, short value) Unsafe version oflarge_magnitude. -
nsmall_magnitude
public static void nsmall_magnitude(long struct, short value) Unsafe version ofsmall_magnitude.
-