Package org.lwjgl.sdl
Class SDL_HapticEffect
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
union SDL_HapticEffect {
Uint16 type;
{@link SDL_HapticConstant SDL_HapticConstant} constant;
{@link SDL_HapticPeriodic SDL_HapticPeriodic} periodic;
{@link SDL_HapticCondition SDL_HapticCondition} condition;
{@link SDL_HapticRamp SDL_HapticRamp} ramp;
{@link SDL_HapticLeftRight SDL_HapticLeftRight} leftright;
{@link SDL_HapticCustom SDL_HapticCustom} custom;
}
-
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 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_HapticEffect
(ByteBuffer container) Creates aSDL_HapticEffect
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_HapticEffect
calloc()
Returns a newSDL_HapticEffect
instance allocated withmemCalloc
.static SDL_HapticEffect.Buffer
calloc
(int capacity) Returns a newSDL_HapticEffect.Buffer
instance allocated withmemCalloc
.static SDL_HapticEffect.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSDL_HapticEffect.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_HapticEffect
calloc
(MemoryStack stack) Returns a newSDL_HapticEffect
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.condition
(Consumer<SDL_HapticCondition> consumer) Passes thecondition
field to the specifiedConsumer
.condition
(SDL_HapticCondition value) Copies the specifiedSDL_HapticCondition
to thecondition
field.constant()
constant
(Consumer<SDL_HapticConstant> consumer) Passes theconstant
field to the specifiedConsumer
.constant
(SDL_HapticConstant value) Copies the specifiedSDL_HapticConstant
to theconstant
field.static SDL_HapticEffect
create()
Returns a newSDL_HapticEffect
instance allocated withBufferUtils
.static SDL_HapticEffect.Buffer
create
(int capacity) Returns a newSDL_HapticEffect.Buffer
instance allocated withBufferUtils
.static SDL_HapticEffect
create
(long address) Returns a newSDL_HapticEffect
instance for the specified memory address.static SDL_HapticEffect.Buffer
create
(long address, int capacity) Create aSDL_HapticEffect.Buffer
instance at the specified memory.static @Nullable SDL_HapticEffect
createSafe
(long address) static @Nullable SDL_HapticEffect.Buffer
createSafe
(long address, int capacity) custom()
custom
(Consumer<SDL_HapticCustom> consumer) Passes thecustom
field to the specifiedConsumer
.custom
(SDL_HapticCustom value) Copies the specifiedSDL_HapticCustom
to thecustom
field.leftright
(Consumer<SDL_HapticLeftRight> consumer) Passes theleftright
field to the specifiedConsumer
.leftright
(SDL_HapticLeftRight value) Copies the specifiedSDL_HapticLeftRight
to theleftright
field.static SDL_HapticEffect
malloc()
Returns a newSDL_HapticEffect
instance allocated withmemAlloc
.static SDL_HapticEffect.Buffer
malloc
(int capacity) Returns a newSDL_HapticEffect.Buffer
instance allocated withmemAlloc
.static SDL_HapticEffect.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSDL_HapticEffect.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_HapticEffect
malloc
(MemoryStack stack) Returns a newSDL_HapticEffect
instance allocated on the specifiedMemoryStack
.static SDL_HapticCondition
ncondition
(long struct) Unsafe version ofcondition()
.static void
ncondition
(long struct, SDL_HapticCondition value) Unsafe version ofcondition
.static SDL_HapticConstant
nconstant
(long struct) Unsafe version ofconstant()
.static void
nconstant
(long struct, SDL_HapticConstant value) Unsafe version ofconstant
.static SDL_HapticCustom
ncustom
(long struct) Unsafe version ofcustom()
.static void
ncustom
(long struct, SDL_HapticCustom value) Unsafe version ofcustom
.static SDL_HapticLeftRight
nleftright
(long struct) Unsafe version ofleftright()
.static void
nleftright
(long struct, SDL_HapticLeftRight value) Unsafe version ofleftright
.static SDL_HapticPeriodic
nperiodic
(long struct) Unsafe version ofperiodic()
.static void
nperiodic
(long struct, SDL_HapticPeriodic value) Unsafe version ofperiodic
.static SDL_HapticRamp
nramp
(long struct) Unsafe version oframp()
.static void
nramp
(long struct, SDL_HapticRamp value) Unsafe version oframp
.static short
ntype
(long struct) Unsafe version oftype()
.static void
ntype
(long struct, short value) Unsafe version oftype
.periodic()
periodic
(Consumer<SDL_HapticPeriodic> consumer) Passes theperiodic
field to the specifiedConsumer
.periodic
(SDL_HapticPeriodic value) Copies the specifiedSDL_HapticPeriodic
to theperiodic
field.ramp()
ramp
(Consumer<SDL_HapticRamp> consumer) Passes theramp
field to the specifiedConsumer
.ramp
(SDL_HapticRamp value) Copies the specifiedSDL_HapticRamp
to theramp
field.set
(SDL_HapticEffect 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. -
CONSTANT
public static final int CONSTANTThe struct member offsets. -
PERIODIC
public static final int PERIODICThe struct member offsets. -
CONDITION
public static final int CONDITIONThe struct member offsets. -
RAMP
public static final int RAMPThe struct member offsets. -
LEFTRIGHT
public static final int LEFTRIGHTThe struct member offsets. -
CUSTOM
public static final int CUSTOMThe struct member offsets.
-
-
Constructor Details
-
SDL_HapticEffect
Creates aSDL_HapticEffect
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_HapticEffect>
-
type
public short type()- Returns:
- the value of the
type
field.
-
constant
- Returns:
- a
SDL_HapticConstant
view of theconstant
field.
-
periodic
- Returns:
- a
SDL_HapticPeriodic
view of theperiodic
field.
-
condition
- Returns:
- a
SDL_HapticCondition
view of thecondition
field.
-
ramp
- Returns:
- a
SDL_HapticRamp
view of theramp
field.
-
leftright
- Returns:
- a
SDL_HapticLeftRight
view of theleftright
field.
-
custom
- Returns:
- a
SDL_HapticCustom
view of thecustom
field.
-
type
Sets the specified value to thetype
field. -
constant
Copies the specifiedSDL_HapticConstant
to theconstant
field. -
constant
Passes theconstant
field to the specifiedConsumer
. -
periodic
Copies the specifiedSDL_HapticPeriodic
to theperiodic
field. -
periodic
Passes theperiodic
field to the specifiedConsumer
. -
condition
Copies the specifiedSDL_HapticCondition
to thecondition
field. -
condition
Passes thecondition
field to the specifiedConsumer
. -
ramp
Copies the specifiedSDL_HapticRamp
to theramp
field. -
ramp
Passes theramp
field to the specifiedConsumer
. -
leftright
Copies the specifiedSDL_HapticLeftRight
to theleftright
field. -
leftright
Passes theleftright
field to the specifiedConsumer
. -
custom
Copies the specifiedSDL_HapticCustom
to thecustom
field. -
custom
Passes thecustom
field to the specifiedConsumer
. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newSDL_HapticEffect
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_HapticEffect
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_HapticEffect
instance allocated withBufferUtils
. -
create
Returns a newSDL_HapticEffect
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_HapticEffect.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_HapticEffect.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_HapticEffect.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_HapticEffect.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_HapticEffect
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_HapticEffect
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_HapticEffect.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_HapticEffect.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()
. -
nconstant
Unsafe version ofconstant()
. -
nperiodic
Unsafe version ofperiodic()
. -
ncondition
Unsafe version ofcondition()
. -
nramp
Unsafe version oframp()
. -
nleftright
Unsafe version ofleftright()
. -
ncustom
Unsafe version ofcustom()
. -
ntype
public static void ntype(long struct, short value) Unsafe version oftype
. -
nconstant
Unsafe version ofconstant
. -
nperiodic
Unsafe version ofperiodic
. -
ncondition
Unsafe version ofcondition
. -
nramp
Unsafe version oframp
. -
nleftright
Unsafe version ofleftright
. -
ncustom
Unsafe version ofcustom
.
-