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.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.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_HapticLeftRight
(ByteBuffer container) Creates aSDL_HapticLeftRight
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_HapticLeftRight
calloc()
Returns a newSDL_HapticLeftRight
instance allocated withmemCalloc
.static SDL_HapticLeftRight.Buffer
calloc
(int capacity) Returns a newSDL_HapticLeftRight.Buffer
instance allocated withmemCalloc
.static SDL_HapticLeftRight.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSDL_HapticLeftRight.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_HapticLeftRight
calloc
(MemoryStack stack) Returns a newSDL_HapticLeftRight
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_HapticLeftRight
create()
Returns a newSDL_HapticLeftRight
instance allocated withBufferUtils
.static SDL_HapticLeftRight.Buffer
create
(int capacity) Returns a newSDL_HapticLeftRight.Buffer
instance allocated withBufferUtils
.static SDL_HapticLeftRight
create
(long address) Returns a newSDL_HapticLeftRight
instance for the specified memory address.static SDL_HapticLeftRight.Buffer
create
(long address, int capacity) Create aSDL_HapticLeftRight.Buffer
instance at the specified memory.static @Nullable SDL_HapticLeftRight
createSafe
(long address) static @Nullable SDL_HapticLeftRight.Buffer
createSafe
(long address, int capacity) short
large_magnitude
(short value) Sets the specified value to thelarge_magnitude
field.int
length()
length
(int value) Sets the specified value to thelength
field.static SDL_HapticLeftRight
malloc()
Returns a newSDL_HapticLeftRight
instance allocated withmemAlloc
.static SDL_HapticLeftRight.Buffer
malloc
(int capacity) Returns a newSDL_HapticLeftRight.Buffer
instance allocated withmemAlloc
.static SDL_HapticLeftRight.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSDL_HapticLeftRight.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_HapticLeftRight
malloc
(MemoryStack stack) Returns a newSDL_HapticLeftRight
instance allocated on the specifiedMemoryStack
.static short
nlarge_magnitude
(long struct) Unsafe version oflarge_magnitude()
.static void
nlarge_magnitude
(long struct, short value) Unsafe version oflarge_magnitude
.static int
nlength
(long struct) Unsafe version oflength()
.static void
nlength
(long struct, int value) Unsafe version oflength
.static short
nsmall_magnitude
(long struct) Unsafe version ofsmall_magnitude()
.static void
nsmall_magnitude
(long struct, short value) Unsafe version ofsmall_magnitude
.static short
ntype
(long struct) Unsafe version oftype()
.static void
ntype
(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.int
sizeof()
Returnssizeof(struct)
.short
small_magnitude
(short value) Sets the specified value to thesmall_magnitude
field.short
type()
type
(short value) Sets the specified value to thetype
field.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. -
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_HapticLeftRight
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_HapticLeftRight>
-
type
public short type()- Returns:
- the value of the
type
field.
-
length
public int length()- Returns:
- the value of the
length
field.
-
large_magnitude
public short large_magnitude()- Returns:
- the value of the
large_magnitude
field.
-
small_magnitude
public short small_magnitude()- Returns:
- the value of the
small_magnitude
field.
-
type
Sets the specified value to thetype
field. -
length
Sets the specified value to thelength
field. -
large_magnitude
Sets the specified value to thelarge_magnitude
field. -
small_magnitude
Sets the specified value to thesmall_magnitude
field. -
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_HapticLeftRight
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_HapticLeftRight
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_HapticLeftRight
instance allocated withBufferUtils
. -
create
Returns a newSDL_HapticLeftRight
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_HapticLeftRight.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_HapticLeftRight.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_HapticLeftRight.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_HapticLeftRight.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_HapticLeftRight
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_HapticLeftRight
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_HapticLeftRight.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_HapticLeftRight.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-