Package org.lwjgl.sdl
Class SDL_HapticPeriodic
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct SDL_HapticPeriodic {
Uint16 type;
SDL_HapticDirection direction;
Uint32 length;
Uint16 delay;
Uint16 button;
Uint16 interval;
Uint16 period;
Sint16 magnitude;
Sint16 offset;
Uint16 phase;
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.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 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_HapticPeriodic(ByteBuffer container) Creates aSDL_HapticPeriodicinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionshortattack_length(short value) Sets the specified value to theattack_lengthfield.shortattack_level(short value) Sets the specified value to theattack_levelfield.shortbutton()button(short value) Sets the specified value to thebuttonfield.static SDL_HapticPeriodiccalloc()Returns a newSDL_HapticPeriodicinstance allocated withmemCalloc.static SDL_HapticPeriodic.Buffercalloc(int capacity) Returns a newSDL_HapticPeriodic.Bufferinstance allocated withmemCalloc.static SDL_HapticPeriodic.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticPeriodic.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_HapticPeriodiccalloc(MemoryStack stack) Returns a newSDL_HapticPeriodicinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_HapticPeriodiccreate()Returns a newSDL_HapticPeriodicinstance allocated withBufferUtils.static SDL_HapticPeriodic.Buffercreate(int capacity) Returns a newSDL_HapticPeriodic.Bufferinstance allocated withBufferUtils.static SDL_HapticPeriodiccreate(long address) Returns a newSDL_HapticPeriodicinstance for the specified memory address.static SDL_HapticPeriodic.Buffercreate(long address, int capacity) Create aSDL_HapticPeriodic.Bufferinstance at the specified memory.static @Nullable SDL_HapticPeriodiccreateSafe(long address) static @Nullable SDL_HapticPeriodic.BuffercreateSafe(long address, int capacity) 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.shortfade_length(short value) Sets the specified value to thefade_lengthfield.shortfade_level(short value) Sets the specified value to thefade_levelfield.shortinterval()interval(short value) Sets the specified value to theintervalfield.intlength()length(int value) Sets the specified value to thelengthfield.shortmagnitude(short value) Sets the specified value to themagnitudefield.static SDL_HapticPeriodicmalloc()Returns a newSDL_HapticPeriodicinstance allocated withmemAlloc.static SDL_HapticPeriodic.Buffermalloc(int capacity) Returns a newSDL_HapticPeriodic.Bufferinstance allocated withmemAlloc.static SDL_HapticPeriodic.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticPeriodic.Bufferinstance allocated on the specifiedMemoryStack.static SDL_HapticPeriodicmalloc(MemoryStack stack) Returns a newSDL_HapticPeriodicinstance allocated on the specifiedMemoryStack.static shortnattack_length(long struct) Unsafe version ofattack_length().static voidnattack_length(long struct, short value) Unsafe version ofattack_length.static shortnattack_level(long struct) Unsafe version ofattack_level().static voidnattack_level(long struct, short value) Unsafe version ofattack_level.static shortnbutton(long struct) Unsafe version ofbutton().static voidnbutton(long struct, short value) Unsafe version ofbutton.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 shortnfade_length(long struct) Unsafe version offade_length().static voidnfade_length(long struct, short value) Unsafe version offade_length.static shortnfade_level(long struct) Unsafe version offade_level().static voidnfade_level(long struct, short value) Unsafe version offade_level.static shortninterval(long struct) Unsafe version ofinterval().static voidninterval(long struct, short value) Unsafe version ofinterval.static intnlength(long struct) Unsafe version oflength().static voidnlength(long struct, int value) Unsafe version oflength.static shortnmagnitude(long struct) Unsafe version ofmagnitude().static voidnmagnitude(long struct, short value) Unsafe version ofmagnitude.static shortnoffset(long struct) Unsafe version ofoffset().static voidnoffset(long struct, short value) Unsafe version ofoffset.static shortnperiod(long struct) Unsafe version ofperiod().static voidnperiod(long struct, short value) Unsafe version ofperiod.static shortnphase(long struct) Unsafe version ofphase().static voidnphase(long struct, short value) Unsafe version ofphase.static shortntype(long struct) Unsafe version oftype().static voidntype(long struct, short value) Unsafe version oftype.shortoffset()offset(short value) Sets the specified value to theoffsetfield.shortperiod()period(short value) Sets the specified value to theperiodfield.shortphase()phase(short value) Sets the specified value to thephasefield.set(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, short period, short magnitude, short offset, short phase, short attack_length, short attack_level, short fade_length, short fade_level) Initializes this struct with the specified values.set(SDL_HapticPeriodic 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. -
PERIOD
public static final int PERIODThe struct member offsets. -
MAGNITUDE
public static final int MAGNITUDEThe struct member offsets. -
OFFSET
public static final int OFFSETThe struct member offsets. -
PHASE
public static final int PHASEThe 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_HapticPeriodic
Creates aSDL_HapticPeriodicinstance 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_HapticPeriodic>
-
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.
-
period
public short period()- Returns:
- the value of the
periodfield.
-
magnitude
public short magnitude()- Returns:
- the value of the
magnitudefield.
-
offset
public short offset()- Returns:
- the value of the
offsetfield.
-
phase
public short phase()- Returns:
- the value of the
phasefield.
-
attack_length
public short attack_length()- Returns:
- the value of the
attack_lengthfield.
-
attack_level
public short attack_level()- Returns:
- the value of the
attack_levelfield.
-
fade_length
public short fade_length()- Returns:
- the value of the
fade_lengthfield.
-
fade_level
public short fade_level()- Returns:
- the value of the
fade_levelfield.
-
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. -
period
Sets the specified value to theperiodfield. -
magnitude
Sets the specified value to themagnitudefield. -
offset
Sets the specified value to theoffsetfield. -
phase
Sets the specified value to thephasefield. -
attack_length
Sets the specified value to theattack_lengthfield. -
attack_level
Sets the specified value to theattack_levelfield. -
fade_length
Sets the specified value to thefade_lengthfield. -
fade_level
Sets the specified value to thefade_levelfield. -
set
public SDL_HapticPeriodic set(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, short period, short magnitude, short offset, short phase, 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_HapticPeriodicinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_HapticPeriodicinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_HapticPeriodicinstance allocated withBufferUtils. -
create
Returns a newSDL_HapticPeriodicinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_HapticPeriodic.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_HapticPeriodic.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_HapticPeriodic.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_HapticPeriodic.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_HapticPeriodicinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticPeriodicinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_HapticPeriodic.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticPeriodic.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(). -
nperiod
public static short nperiod(long struct) Unsafe version ofperiod(). -
nmagnitude
public static short nmagnitude(long struct) Unsafe version ofmagnitude(). -
noffset
public static short noffset(long struct) Unsafe version ofoffset(). -
nphase
public static short nphase(long struct) Unsafe version ofphase(). -
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. -
nperiod
public static void nperiod(long struct, short value) Unsafe version ofperiod. -
nmagnitude
public static void nmagnitude(long struct, short value) Unsafe version ofmagnitude. -
noffset
public static void noffset(long struct, short value) Unsafe version ofoffset. -
nphase
public static void nphase(long struct, short value) Unsafe version ofphase. -
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.
-