Package org.lwjgl.sdl
Class SDL_HapticCondition
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct SDL_HapticCondition {
Uint16 type;
{@link SDL_HapticDirection SDL_HapticDirection} direction;
Uint32 length;
Uint16 delay;
Uint16 button;
Uint16 interval;
Uint16 right_sat[3];
Uint16 left_sat[3];
Sint16 right_coeff[3];
Sint16 left_coeff[3];
Uint16 deadband[3];
Sint16 center[3];
}
-
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 member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.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_HapticCondition
(ByteBuffer container) Creates aSDL_HapticCondition
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionshort
button()
button
(short value) Sets the specified value to thebutton
field.static SDL_HapticCondition
calloc()
Returns a newSDL_HapticCondition
instance allocated withmemCalloc
.static SDL_HapticCondition.Buffer
calloc
(int capacity) Returns a newSDL_HapticCondition.Buffer
instance allocated withmemCalloc
.static SDL_HapticCondition.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSDL_HapticCondition.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_HapticCondition
calloc
(MemoryStack stack) Returns a newSDL_HapticCondition
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.center()
short
center
(int index) center
(int index, short value) Sets the specified value at the specified index of thecenter
field.center
(ShortBuffer value) Copies the specifiedShortBuffer
to thecenter
field.static SDL_HapticCondition
create()
Returns a newSDL_HapticCondition
instance allocated withBufferUtils
.static SDL_HapticCondition.Buffer
create
(int capacity) Returns a newSDL_HapticCondition.Buffer
instance allocated withBufferUtils
.static SDL_HapticCondition
create
(long address) Returns a newSDL_HapticCondition
instance for the specified memory address.static SDL_HapticCondition.Buffer
create
(long address, int capacity) Create aSDL_HapticCondition.Buffer
instance at the specified memory.static @Nullable SDL_HapticCondition
createSafe
(long address) static @Nullable SDL_HapticCondition.Buffer
createSafe
(long address, int capacity) deadband()
short
deadband
(int index) deadband
(int index, short value) Sets the specified value at the specified index of thedeadband
field.deadband
(ShortBuffer value) Copies the specifiedShortBuffer
to thedeadband
field.short
delay()
delay
(short value) Sets the specified value to thedelay
field.direction
(Consumer<SDL_HapticDirection> consumer) Passes thedirection
field to the specifiedConsumer
.direction
(SDL_HapticDirection value) Copies the specifiedSDL_HapticDirection
to thedirection
field.short
interval()
interval
(short value) Sets the specified value to theinterval
field.short
left_coeff
(int index) left_coeff
(int index, short value) Sets the specified value at the specified index of theleft_coeff
field.left_coeff
(ShortBuffer value) Copies the specifiedShortBuffer
to theleft_coeff
field.left_sat()
short
left_sat
(int index) left_sat
(int index, short value) Sets the specified value at the specified index of theleft_sat
field.left_sat
(ShortBuffer value) Copies the specifiedShortBuffer
to theleft_sat
field.int
length()
length
(int value) Sets the specified value to thelength
field.static SDL_HapticCondition
malloc()
Returns a newSDL_HapticCondition
instance allocated withmemAlloc
.static SDL_HapticCondition.Buffer
malloc
(int capacity) Returns a newSDL_HapticCondition.Buffer
instance allocated withmemAlloc
.static SDL_HapticCondition.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSDL_HapticCondition.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_HapticCondition
malloc
(MemoryStack stack) Returns a newSDL_HapticCondition
instance allocated on the specifiedMemoryStack
.static short
nbutton
(long struct) Unsafe version ofbutton()
.static void
nbutton
(long struct, short value) Unsafe version ofbutton
.static ShortBuffer
ncenter
(long struct) Unsafe version ofcenter()
.static short
ncenter
(long struct, int index) Unsafe version ofcenter
.static void
ncenter
(long struct, int index, short value) Unsafe version ofcenter
.static void
ncenter
(long struct, ShortBuffer value) Unsafe version ofcenter
.static ShortBuffer
ndeadband
(long struct) Unsafe version ofdeadband()
.static short
ndeadband
(long struct, int index) Unsafe version ofdeadband
.static void
ndeadband
(long struct, int index, short value) Unsafe version ofdeadband
.static void
ndeadband
(long struct, ShortBuffer value) Unsafe version ofdeadband
.static short
ndelay
(long struct) Unsafe version ofdelay()
.static void
ndelay
(long struct, short value) Unsafe version ofdelay
.static SDL_HapticDirection
ndirection
(long struct) Unsafe version ofdirection()
.static void
ndirection
(long struct, SDL_HapticDirection value) Unsafe version ofdirection
.static short
ninterval
(long struct) Unsafe version ofinterval()
.static void
ninterval
(long struct, short value) Unsafe version ofinterval
.static ShortBuffer
nleft_coeff
(long struct) Unsafe version ofleft_coeff()
.static short
nleft_coeff
(long struct, int index) Unsafe version ofleft_coeff
.static void
nleft_coeff
(long struct, int index, short value) Unsafe version ofleft_coeff
.static void
nleft_coeff
(long struct, ShortBuffer value) Unsafe version ofleft_coeff
.static ShortBuffer
nleft_sat
(long struct) Unsafe version ofleft_sat()
.static short
nleft_sat
(long struct, int index) Unsafe version ofleft_sat
.static void
nleft_sat
(long struct, int index, short value) Unsafe version ofleft_sat
.static void
nleft_sat
(long struct, ShortBuffer value) Unsafe version ofleft_sat
.static int
nlength
(long struct) Unsafe version oflength()
.static void
nlength
(long struct, int value) Unsafe version oflength
.static ShortBuffer
nright_coeff
(long struct) Unsafe version ofright_coeff()
.static short
nright_coeff
(long struct, int index) Unsafe version ofright_coeff
.static void
nright_coeff
(long struct, int index, short value) Unsafe version ofright_coeff
.static void
nright_coeff
(long struct, ShortBuffer value) Unsafe version ofright_coeff
.static ShortBuffer
nright_sat
(long struct) Unsafe version ofright_sat()
.static short
nright_sat
(long struct, int index) Unsafe version ofright_sat
.static void
nright_sat
(long struct, int index, short value) Unsafe version ofright_sat
.static void
nright_sat
(long struct, ShortBuffer value) Unsafe version ofright_sat
.static short
ntype
(long struct) Unsafe version oftype()
.static void
ntype
(long struct, short value) Unsafe version oftype
.short
right_coeff
(int index) right_coeff
(int index, short value) Sets the specified value at the specified index of theright_coeff
field.right_coeff
(ShortBuffer value) Copies the specifiedShortBuffer
to theright_coeff
field.short
right_sat
(int index) right_sat
(int index, short value) Sets the specified value at the specified index of theright_sat
field.right_sat
(ShortBuffer value) Copies the specifiedShortBuffer
to theright_sat
field.set
(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, ShortBuffer right_sat, ShortBuffer left_sat, ShortBuffer right_coeff, ShortBuffer left_coeff, ShortBuffer deadband, ShortBuffer center) Initializes this struct with the specified values.set
(SDL_HapticCondition src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.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. -
DIRECTION
public static final int DIRECTIONThe struct member offsets. -
LENGTH
public static final int LENGTHThe struct member offsets. -
DELAY
public static final int DELAYThe struct member offsets. -
BUTTON
public static final int BUTTONThe struct member offsets. -
INTERVAL
public static final int INTERVALThe struct member offsets. -
RIGHT_SAT
public static final int RIGHT_SATThe struct member offsets. -
LEFT_SAT
public static final int LEFT_SATThe struct member offsets. -
RIGHT_COEFF
public static final int RIGHT_COEFFThe struct member offsets. -
LEFT_COEFF
public static final int LEFT_COEFFThe struct member offsets. -
DEADBAND
public static final int DEADBANDThe struct member offsets. -
CENTER
public static final int CENTERThe struct member offsets.
-
-
Constructor Details
-
SDL_HapticCondition
Creates aSDL_HapticCondition
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_HapticCondition>
-
type
public short type()- Returns:
- the value of the
type
field.
-
direction
- Returns:
- a
SDL_HapticDirection
view of thedirection
field.
-
length
public int length()- Returns:
- the value of the
length
field.
-
delay
public short delay()- Returns:
- the value of the
delay
field.
-
button
public short button()- Returns:
- the value of the
button
field.
-
interval
public short interval()- Returns:
- the value of the
interval
field.
-
right_sat
- Returns:
- a
ShortBuffer
view of theright_sat
field.
-
right_sat
public short right_sat(int index) - Returns:
- the value at the specified index of the
right_sat
field.
-
left_sat
- Returns:
- a
ShortBuffer
view of theleft_sat
field.
-
left_sat
public short left_sat(int index) - Returns:
- the value at the specified index of the
left_sat
field.
-
right_coeff
- Returns:
- a
ShortBuffer
view of theright_coeff
field.
-
right_coeff
public short right_coeff(int index) - Returns:
- the value at the specified index of the
right_coeff
field.
-
left_coeff
- Returns:
- a
ShortBuffer
view of theleft_coeff
field.
-
left_coeff
public short left_coeff(int index) - Returns:
- the value at the specified index of the
left_coeff
field.
-
deadband
- Returns:
- a
ShortBuffer
view of thedeadband
field.
-
deadband
public short deadband(int index) - Returns:
- the value at the specified index of the
deadband
field.
-
center
- Returns:
- a
ShortBuffer
view of thecenter
field.
-
center
public short center(int index) - Returns:
- the value at the specified index of the
center
field.
-
type
Sets the specified value to thetype
field. -
direction
Copies the specifiedSDL_HapticDirection
to thedirection
field. -
direction
Passes thedirection
field to the specifiedConsumer
. -
length
Sets the specified value to thelength
field. -
delay
Sets the specified value to thedelay
field. -
button
Sets the specified value to thebutton
field. -
interval
Sets the specified value to theinterval
field. -
right_sat
Copies the specifiedShortBuffer
to theright_sat
field. -
right_sat
Sets the specified value at the specified index of theright_sat
field. -
left_sat
Copies the specifiedShortBuffer
to theleft_sat
field. -
left_sat
Sets the specified value at the specified index of theleft_sat
field. -
right_coeff
Copies the specifiedShortBuffer
to theright_coeff
field. -
right_coeff
Sets the specified value at the specified index of theright_coeff
field. -
left_coeff
Copies the specifiedShortBuffer
to theleft_coeff
field. -
left_coeff
Sets the specified value at the specified index of theleft_coeff
field. -
deadband
Copies the specifiedShortBuffer
to thedeadband
field. -
deadband
Sets the specified value at the specified index of thedeadband
field. -
center
Copies the specifiedShortBuffer
to thecenter
field. -
center
Sets the specified value at the specified index of thecenter
field. -
set
public SDL_HapticCondition set(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, ShortBuffer right_sat, ShortBuffer left_sat, ShortBuffer right_coeff, ShortBuffer left_coeff, ShortBuffer deadband, ShortBuffer center) 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_HapticCondition
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_HapticCondition
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_HapticCondition
instance allocated withBufferUtils
. -
create
Returns a newSDL_HapticCondition
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_HapticCondition.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_HapticCondition.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_HapticCondition.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_HapticCondition.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_HapticCondition
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_HapticCondition
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_HapticCondition.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_HapticCondition.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()
. -
ndirection
Unsafe version ofdirection()
. -
nlength
public static int nlength(long struct) Unsafe version oflength()
. -
ndelay
public static short ndelay(long struct) Unsafe version ofdelay()
. -
nbutton
public static short nbutton(long struct) Unsafe version ofbutton()
. -
ninterval
public static short ninterval(long struct) Unsafe version ofinterval()
. -
nright_sat
Unsafe version ofright_sat()
. -
nright_sat
public static short nright_sat(long struct, int index) Unsafe version ofright_sat
. -
nleft_sat
Unsafe version ofleft_sat()
. -
nleft_sat
public static short nleft_sat(long struct, int index) Unsafe version ofleft_sat
. -
nright_coeff
Unsafe version ofright_coeff()
. -
nright_coeff
public static short nright_coeff(long struct, int index) Unsafe version ofright_coeff
. -
nleft_coeff
Unsafe version ofleft_coeff()
. -
nleft_coeff
public static short nleft_coeff(long struct, int index) Unsafe version ofleft_coeff
. -
ndeadband
Unsafe version ofdeadband()
. -
ndeadband
public static short ndeadband(long struct, int index) Unsafe version ofdeadband
. -
ncenter
Unsafe version ofcenter()
. -
ncenter
public static short ncenter(long struct, int index) Unsafe version ofcenter
. -
ntype
public static void ntype(long struct, short value) Unsafe version oftype
. -
ndirection
Unsafe version ofdirection
. -
nlength
public static void nlength(long struct, int value) Unsafe version oflength
. -
ndelay
public static void ndelay(long struct, short value) Unsafe version ofdelay
. -
nbutton
public static void nbutton(long struct, short value) Unsafe version ofbutton
. -
ninterval
public static void ninterval(long struct, short value) Unsafe version ofinterval
. -
nright_sat
Unsafe version ofright_sat
. -
nright_sat
public static void nright_sat(long struct, int index, short value) Unsafe version ofright_sat
. -
nleft_sat
Unsafe version ofleft_sat
. -
nleft_sat
public static void nleft_sat(long struct, int index, short value) Unsafe version ofleft_sat
. -
nright_coeff
Unsafe version ofright_coeff
. -
nright_coeff
public static void nright_coeff(long struct, int index, short value) Unsafe version ofright_coeff
. -
nleft_coeff
Unsafe version ofleft_coeff
. -
nleft_coeff
public static void nleft_coeff(long struct, int index, short value) Unsafe version ofleft_coeff
. -
ndeadband
Unsafe version ofdeadband
. -
ndeadband
public static void ndeadband(long struct, int index, short value) Unsafe version ofdeadband
. -
ncenter
Unsafe version ofcenter
. -
ncenter
public static void ncenter(long struct, int index, short value) Unsafe version ofcenter
.
-