Package org.lwjgl.sdl
Class SDL_HapticEffect
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
union SDL_HapticEffect {
Uint16 type;
SDL_HapticConstant constant;
SDL_HapticPeriodic periodic;
SDL_HapticCondition condition;
SDL_HapticRamp ramp;
SDL_HapticLeftRight leftright;
SDL_HapticCustom custom;
}-
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 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_HapticEffect(ByteBuffer container) Creates aSDL_HapticEffectinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_HapticEffectcalloc()Returns a newSDL_HapticEffectinstance allocated withmemCalloc.static SDL_HapticEffect.Buffercalloc(int capacity) Returns a newSDL_HapticEffect.Bufferinstance allocated withmemCalloc.static SDL_HapticEffect.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticEffect.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_HapticEffectcalloc(MemoryStack stack) Returns a newSDL_HapticEffectinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.condition(Consumer<SDL_HapticCondition> consumer) Passes theconditionfield to the specifiedConsumer.condition(SDL_HapticCondition value) Copies the specifiedSDL_HapticConditionto theconditionfield.constant()constant(Consumer<SDL_HapticConstant> consumer) Passes theconstantfield to the specifiedConsumer.constant(SDL_HapticConstant value) Copies the specifiedSDL_HapticConstantto theconstantfield.static SDL_HapticEffectcreate()Returns a newSDL_HapticEffectinstance allocated withBufferUtils.static SDL_HapticEffect.Buffercreate(int capacity) Returns a newSDL_HapticEffect.Bufferinstance allocated withBufferUtils.static SDL_HapticEffectcreate(long address) Returns a newSDL_HapticEffectinstance for the specified memory address.static SDL_HapticEffect.Buffercreate(long address, int capacity) Create aSDL_HapticEffect.Bufferinstance at the specified memory.static @Nullable SDL_HapticEffectcreateSafe(long address) static @Nullable SDL_HapticEffect.BuffercreateSafe(long address, int capacity) custom()custom(Consumer<SDL_HapticCustom> consumer) Passes thecustomfield to the specifiedConsumer.custom(SDL_HapticCustom value) Copies the specifiedSDL_HapticCustomto thecustomfield.leftright(Consumer<SDL_HapticLeftRight> consumer) Passes theleftrightfield to the specifiedConsumer.leftright(SDL_HapticLeftRight value) Copies the specifiedSDL_HapticLeftRightto theleftrightfield.static SDL_HapticEffectmalloc()Returns a newSDL_HapticEffectinstance allocated withmemAlloc.static SDL_HapticEffect.Buffermalloc(int capacity) Returns a newSDL_HapticEffect.Bufferinstance allocated withmemAlloc.static SDL_HapticEffect.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticEffect.Bufferinstance allocated on the specifiedMemoryStack.static SDL_HapticEffectmalloc(MemoryStack stack) Returns a newSDL_HapticEffectinstance allocated on the specifiedMemoryStack.static SDL_HapticConditionncondition(long struct) Unsafe version ofcondition().static voidncondition(long struct, SDL_HapticCondition value) Unsafe version ofcondition.static SDL_HapticConstantnconstant(long struct) Unsafe version ofconstant().static voidnconstant(long struct, SDL_HapticConstant value) Unsafe version ofconstant.static SDL_HapticCustomncustom(long struct) Unsafe version ofcustom().static voidncustom(long struct, SDL_HapticCustom value) Unsafe version ofcustom.static SDL_HapticLeftRightnleftright(long struct) Unsafe version ofleftright().static voidnleftright(long struct, SDL_HapticLeftRight value) Unsafe version ofleftright.static SDL_HapticPeriodicnperiodic(long struct) Unsafe version ofperiodic().static voidnperiodic(long struct, SDL_HapticPeriodic value) Unsafe version ofperiodic.static SDL_HapticRampnramp(long struct) Unsafe version oframp().static voidnramp(long struct, SDL_HapticRamp value) Unsafe version oframp.static shortntype(long struct) Unsafe version oftype().static voidntype(long struct, short value) Unsafe version oftype.periodic()periodic(Consumer<SDL_HapticPeriodic> consumer) Passes theperiodicfield to the specifiedConsumer.periodic(SDL_HapticPeriodic value) Copies the specifiedSDL_HapticPeriodicto theperiodicfield.ramp()ramp(Consumer<SDL_HapticRamp> consumer) Passes therampfield to the specifiedConsumer.ramp(SDL_HapticRamp value) Copies the specifiedSDL_HapticRampto therampfield.set(SDL_HapticEffect 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. -
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_HapticEffectinstance 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_HapticEffect>
-
type
public short type()- Returns:
- the value of the
typefield.
-
constant
- Returns:
- a
SDL_HapticConstantview of theconstantfield.
-
periodic
- Returns:
- a
SDL_HapticPeriodicview of theperiodicfield.
-
condition
- Returns:
- a
SDL_HapticConditionview of theconditionfield.
-
ramp
- Returns:
- a
SDL_HapticRampview of therampfield.
-
leftright
- Returns:
- a
SDL_HapticLeftRightview of theleftrightfield.
-
custom
- Returns:
- a
SDL_HapticCustomview of thecustomfield.
-
type
Sets the specified value to thetypefield. -
constant
Copies the specifiedSDL_HapticConstantto theconstantfield. -
constant
Passes theconstantfield to the specifiedConsumer. -
periodic
Copies the specifiedSDL_HapticPeriodicto theperiodicfield. -
periodic
Passes theperiodicfield to the specifiedConsumer. -
condition
Copies the specifiedSDL_HapticConditionto theconditionfield. -
condition
Passes theconditionfield to the specifiedConsumer. -
ramp
Copies the specifiedSDL_HapticRampto therampfield. -
ramp
Passes therampfield to the specifiedConsumer. -
leftright
Copies the specifiedSDL_HapticLeftRightto theleftrightfield. -
leftright
Passes theleftrightfield to the specifiedConsumer. -
custom
Copies the specifiedSDL_HapticCustomto thecustomfield. -
custom
Passes thecustomfield to the specifiedConsumer. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newSDL_HapticEffectinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_HapticEffectinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_HapticEffectinstance allocated withBufferUtils. -
create
Returns a newSDL_HapticEffectinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_HapticEffect.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_HapticEffect.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_HapticEffect.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_HapticEffect.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_HapticEffectinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticEffectinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_HapticEffect.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticEffect.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(). -
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.
-