Package org.lwjgl.sdl
Class SDL_HapticCondition
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct SDL_HapticCondition {
Uint16 type;
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.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 member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.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.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_HapticConditioninstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionshortbutton()button(short value) Sets the specified value to thebuttonfield.static SDL_HapticConditioncalloc()Returns a newSDL_HapticConditioninstance allocated withmemCalloc.static SDL_HapticCondition.Buffercalloc(int capacity) Returns a newSDL_HapticCondition.Bufferinstance allocated withmemCalloc.static SDL_HapticCondition.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticCondition.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_HapticConditioncalloc(MemoryStack stack) Returns a newSDL_HapticConditioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.center()shortcenter(int index) center(int index, short value) Sets the specified value at the specified index of thecenterfield.center(ShortBuffer value) Copies the specifiedShortBufferto thecenterfield.static SDL_HapticConditioncreate()Returns a newSDL_HapticConditioninstance allocated withBufferUtils.static SDL_HapticCondition.Buffercreate(int capacity) Returns a newSDL_HapticCondition.Bufferinstance allocated withBufferUtils.static SDL_HapticConditioncreate(long address) Returns a newSDL_HapticConditioninstance for the specified memory address.static SDL_HapticCondition.Buffercreate(long address, int capacity) Create aSDL_HapticCondition.Bufferinstance at the specified memory.static @Nullable SDL_HapticConditioncreateSafe(long address) static @Nullable SDL_HapticCondition.BuffercreateSafe(long address, int capacity) deadband()shortdeadband(int index) deadband(int index, short value) Sets the specified value at the specified index of thedeadbandfield.deadband(ShortBuffer value) Copies the specifiedShortBufferto thedeadbandfield.shortdelay()delay(short value) Sets the specified value to thedelayfield.direction(Consumer<SDL_HapticDirection> consumer) Passes thedirectionfield to the specifiedConsumer.direction(SDL_HapticDirection value) Copies the specifiedSDL_HapticDirectionto thedirectionfield.shortinterval()interval(short value) Sets the specified value to theintervalfield.shortleft_coeff(int index) left_coeff(int index, short value) Sets the specified value at the specified index of theleft_coefffield.left_coeff(ShortBuffer value) Copies the specifiedShortBufferto theleft_coefffield.left_sat()shortleft_sat(int index) left_sat(int index, short value) Sets the specified value at the specified index of theleft_satfield.left_sat(ShortBuffer value) Copies the specifiedShortBufferto theleft_satfield.intlength()length(int value) Sets the specified value to thelengthfield.static SDL_HapticConditionmalloc()Returns a newSDL_HapticConditioninstance allocated withmemAlloc.static SDL_HapticCondition.Buffermalloc(int capacity) Returns a newSDL_HapticCondition.Bufferinstance allocated withmemAlloc.static SDL_HapticCondition.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticCondition.Bufferinstance allocated on the specifiedMemoryStack.static SDL_HapticConditionmalloc(MemoryStack stack) Returns a newSDL_HapticConditioninstance allocated on the specifiedMemoryStack.static shortnbutton(long struct) Unsafe version ofbutton().static voidnbutton(long struct, short value) Unsafe version ofbutton.static ShortBufferncenter(long struct) Unsafe version ofcenter().static shortncenter(long struct, int index) Unsafe version ofcenter.static voidncenter(long struct, int index, short value) Unsafe version ofcenter.static voidncenter(long struct, ShortBuffer value) Unsafe version ofcenter.static ShortBufferndeadband(long struct) Unsafe version ofdeadband().static shortndeadband(long struct, int index) Unsafe version ofdeadband.static voidndeadband(long struct, int index, short value) Unsafe version ofdeadband.static voidndeadband(long struct, ShortBuffer value) Unsafe version ofdeadband.static shortndelay(long struct) Unsafe version ofdelay().static voidndelay(long struct, short value) Unsafe version ofdelay.static SDL_HapticDirectionndirection(long struct) Unsafe version ofdirection().static voidndirection(long struct, SDL_HapticDirection value) Unsafe version ofdirection.static shortninterval(long struct) Unsafe version ofinterval().static voidninterval(long struct, short value) Unsafe version ofinterval.static ShortBuffernleft_coeff(long struct) Unsafe version ofleft_coeff().static shortnleft_coeff(long struct, int index) Unsafe version ofleft_coeff.static voidnleft_coeff(long struct, int index, short value) Unsafe version ofleft_coeff.static voidnleft_coeff(long struct, ShortBuffer value) Unsafe version ofleft_coeff.static ShortBuffernleft_sat(long struct) Unsafe version ofleft_sat().static shortnleft_sat(long struct, int index) Unsafe version ofleft_sat.static voidnleft_sat(long struct, int index, short value) Unsafe version ofleft_sat.static voidnleft_sat(long struct, ShortBuffer value) Unsafe version ofleft_sat.static intnlength(long struct) Unsafe version oflength().static voidnlength(long struct, int value) Unsafe version oflength.static ShortBuffernright_coeff(long struct) Unsafe version ofright_coeff().static shortnright_coeff(long struct, int index) Unsafe version ofright_coeff.static voidnright_coeff(long struct, int index, short value) Unsafe version ofright_coeff.static voidnright_coeff(long struct, ShortBuffer value) Unsafe version ofright_coeff.static ShortBuffernright_sat(long struct) Unsafe version ofright_sat().static shortnright_sat(long struct, int index) Unsafe version ofright_sat.static voidnright_sat(long struct, int index, short value) Unsafe version ofright_sat.static voidnright_sat(long struct, ShortBuffer value) Unsafe version ofright_sat.static shortntype(long struct) Unsafe version oftype().static voidntype(long struct, short value) Unsafe version oftype.shortright_coeff(int index) right_coeff(int index, short value) Sets the specified value at the specified index of theright_coefffield.right_coeff(ShortBuffer value) Copies the specifiedShortBufferto theright_coefffield.shortright_sat(int index) right_sat(int index, short value) Sets the specified value at the specified index of theright_satfield.right_sat(ShortBuffer value) Copies the specifiedShortBufferto theright_satfield.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.intsizeof()Returnssizeof(struct).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. -
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_HapticConditioninstance 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_HapticCondition>
-
type
public short type()- Returns:
- the value of the
typefield.
-
direction
- Returns:
- a
SDL_HapticDirectionview of thedirectionfield.
-
length
public int length()- Returns:
- the value of the
lengthfield.
-
delay
public short delay()- Returns:
- the value of the
delayfield.
-
button
public short button()- Returns:
- the value of the
buttonfield.
-
interval
public short interval()- Returns:
- the value of the
intervalfield.
-
right_sat
- Returns:
- a
ShortBufferview of theright_satfield.
-
right_sat
public short right_sat(int index) - Returns:
- the value at the specified index of the
right_satfield.
-
left_sat
- Returns:
- a
ShortBufferview of theleft_satfield.
-
left_sat
public short left_sat(int index) - Returns:
- the value at the specified index of the
left_satfield.
-
right_coeff
- Returns:
- a
ShortBufferview of theright_coefffield.
-
right_coeff
public short right_coeff(int index) - Returns:
- the value at the specified index of the
right_coefffield.
-
left_coeff
- Returns:
- a
ShortBufferview of theleft_coefffield.
-
left_coeff
public short left_coeff(int index) - Returns:
- the value at the specified index of the
left_coefffield.
-
deadband
- Returns:
- a
ShortBufferview of thedeadbandfield.
-
deadband
public short deadband(int index) - Returns:
- the value at the specified index of the
deadbandfield.
-
center
- Returns:
- a
ShortBufferview of thecenterfield.
-
center
public short center(int index) - Returns:
- the value at the specified index of the
centerfield.
-
type
Sets the specified value to thetypefield. -
direction
Copies the specifiedSDL_HapticDirectionto thedirectionfield. -
direction
Passes thedirectionfield to the specifiedConsumer. -
length
Sets the specified value to thelengthfield. -
delay
Sets the specified value to thedelayfield. -
button
Sets the specified value to thebuttonfield. -
interval
Sets the specified value to theintervalfield. -
right_sat
Copies the specifiedShortBufferto theright_satfield. -
right_sat
Sets the specified value at the specified index of theright_satfield. -
left_sat
Copies the specifiedShortBufferto theleft_satfield. -
left_sat
Sets the specified value at the specified index of theleft_satfield. -
right_coeff
Copies the specifiedShortBufferto theright_coefffield. -
right_coeff
Sets the specified value at the specified index of theright_coefffield. -
left_coeff
Copies the specifiedShortBufferto theleft_coefffield. -
left_coeff
Sets the specified value at the specified index of theleft_coefffield. -
deadband
Copies the specifiedShortBufferto thedeadbandfield. -
deadband
Sets the specified value at the specified index of thedeadbandfield. -
center
Copies the specifiedShortBufferto thecenterfield. -
center
Sets the specified value at the specified index of thecenterfield. -
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_HapticConditioninstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_HapticConditioninstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_HapticConditioninstance allocated withBufferUtils. -
create
Returns a newSDL_HapticConditioninstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_HapticCondition.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_HapticCondition.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_HapticCondition.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_HapticCondition.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_HapticConditioninstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticConditioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_HapticCondition.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticCondition.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(). -
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.
-