Package org.lwjgl.sdl
Class SDL_HapticConstant
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct SDL_HapticConstant {
Uint16 type;
{@link SDL_HapticDirection SDL_HapticDirection} direction;
Uint32 length;
Uint16 delay;
Uint16 button;
Uint16 interval;
Sint16 level;
Uint16 attack_length;
Uint16 attack_level;
Uint16 fade_length;
Uint16 fade_level;
}
-
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 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_HapticConstant
(ByteBuffer container) Creates aSDL_HapticConstant
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionshort
attack_length
(short value) Sets the specified value to theattack_length
field.short
attack_level
(short value) Sets the specified value to theattack_level
field.short
button()
button
(short value) Sets the specified value to thebutton
field.static SDL_HapticConstant
calloc()
Returns a newSDL_HapticConstant
instance allocated withmemCalloc
.static SDL_HapticConstant.Buffer
calloc
(int capacity) Returns a newSDL_HapticConstant.Buffer
instance allocated withmemCalloc
.static SDL_HapticConstant.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSDL_HapticConstant.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_HapticConstant
calloc
(MemoryStack stack) Returns a newSDL_HapticConstant
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_HapticConstant
create()
Returns a newSDL_HapticConstant
instance allocated withBufferUtils
.static SDL_HapticConstant.Buffer
create
(int capacity) Returns a newSDL_HapticConstant.Buffer
instance allocated withBufferUtils
.static SDL_HapticConstant
create
(long address) Returns a newSDL_HapticConstant
instance for the specified memory address.static SDL_HapticConstant.Buffer
create
(long address, int capacity) Create aSDL_HapticConstant.Buffer
instance at the specified memory.static @Nullable SDL_HapticConstant
createSafe
(long address) static @Nullable SDL_HapticConstant.Buffer
createSafe
(long address, int capacity) 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
fade_length
(short value) Sets the specified value to thefade_length
field.short
fade_level
(short value) Sets the specified value to thefade_level
field.short
interval()
interval
(short value) Sets the specified value to theinterval
field.int
length()
length
(int value) Sets the specified value to thelength
field.short
level()
level
(short value) Sets the specified value to thelevel
field.static SDL_HapticConstant
malloc()
Returns a newSDL_HapticConstant
instance allocated withmemAlloc
.static SDL_HapticConstant.Buffer
malloc
(int capacity) Returns a newSDL_HapticConstant.Buffer
instance allocated withmemAlloc
.static SDL_HapticConstant.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSDL_HapticConstant.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_HapticConstant
malloc
(MemoryStack stack) Returns a newSDL_HapticConstant
instance allocated on the specifiedMemoryStack
.static short
nattack_length
(long struct) Unsafe version ofattack_length()
.static void
nattack_length
(long struct, short value) Unsafe version ofattack_length
.static short
nattack_level
(long struct) Unsafe version ofattack_level()
.static void
nattack_level
(long struct, short value) Unsafe version ofattack_level
.static short
nbutton
(long struct) Unsafe version ofbutton()
.static void
nbutton
(long struct, short value) Unsafe version ofbutton
.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
nfade_length
(long struct) Unsafe version offade_length()
.static void
nfade_length
(long struct, short value) Unsafe version offade_length
.static short
nfade_level
(long struct) Unsafe version offade_level()
.static void
nfade_level
(long struct, short value) Unsafe version offade_level
.static short
ninterval
(long struct) Unsafe version ofinterval()
.static void
ninterval
(long struct, short value) Unsafe version ofinterval
.static int
nlength
(long struct) Unsafe version oflength()
.static void
nlength
(long struct, int value) Unsafe version oflength
.static short
nlevel
(long struct) Unsafe version oflevel()
.static void
nlevel
(long struct, short value) Unsafe version oflevel
.static short
ntype
(long struct) Unsafe version oftype()
.static void
ntype
(long struct, short value) Unsafe version oftype
.set
(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, short level, short attack_length, short attack_level, short fade_length, short fade_level) Initializes this struct with the specified values.set
(SDL_HapticConstant 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. -
LEVEL
public static final int LEVELThe struct member offsets. -
ATTACK_LENGTH
public static final int ATTACK_LENGTHThe struct member offsets. -
ATTACK_LEVEL
public static final int ATTACK_LEVELThe struct member offsets. -
FADE_LENGTH
public static final int FADE_LENGTHThe struct member offsets. -
FADE_LEVEL
public static final int FADE_LEVELThe struct member offsets.
-
-
Constructor Details
-
SDL_HapticConstant
Creates aSDL_HapticConstant
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_HapticConstant>
-
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.
-
level
public short level()- Returns:
- the value of the
level
field.
-
attack_length
public short attack_length()- Returns:
- the value of the
attack_length
field.
-
attack_level
public short attack_level()- Returns:
- the value of the
attack_level
field.
-
fade_length
public short fade_length()- Returns:
- the value of the
fade_length
field.
-
fade_level
public short fade_level()- Returns:
- the value of the
fade_level
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. -
level
Sets the specified value to thelevel
field. -
attack_length
Sets the specified value to theattack_length
field. -
attack_level
Sets the specified value to theattack_level
field. -
fade_length
Sets the specified value to thefade_length
field. -
fade_level
Sets the specified value to thefade_level
field. -
set
public SDL_HapticConstant set(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, short level, short attack_length, short attack_level, short fade_length, short fade_level) 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_HapticConstant
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_HapticConstant
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_HapticConstant
instance allocated withBufferUtils
. -
create
Returns a newSDL_HapticConstant
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_HapticConstant.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_HapticConstant.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_HapticConstant.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_HapticConstant.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_HapticConstant
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_HapticConstant
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_HapticConstant.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_HapticConstant.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()
. -
nlevel
public static short nlevel(long struct) Unsafe version oflevel()
. -
nattack_length
public static short nattack_length(long struct) Unsafe version ofattack_length()
. -
nattack_level
public static short nattack_level(long struct) Unsafe version ofattack_level()
. -
nfade_length
public static short nfade_length(long struct) Unsafe version offade_length()
. -
nfade_level
public static short nfade_level(long struct) Unsafe version offade_level()
. -
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
. -
nlevel
public static void nlevel(long struct, short value) Unsafe version oflevel
. -
nattack_length
public static void nattack_length(long struct, short value) Unsafe version ofattack_length
. -
nattack_level
public static void nattack_level(long struct, short value) Unsafe version ofattack_level
. -
nfade_length
public static void nfade_length(long struct, short value) Unsafe version offade_length
. -
nfade_level
public static void nfade_level(long struct, short value) Unsafe version offade_level
.
-