Package org.lwjgl.sdl
Class SDL_HapticCustom
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct SDL_HapticCustom {
Uint16 type;
SDL_HapticDirection direction;
Uint32 length;
Uint16 delay;
Uint16 button;
Uint16 interval;
Uint8 channels;
Uint16 period;
Uint16 samples;
Uint16 * data;
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_HapticCustom(ByteBuffer container) Creates aSDL_HapticCustominstance 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_HapticCustomcalloc()Returns a newSDL_HapticCustominstance allocated withmemCalloc.static SDL_HapticCustom.Buffercalloc(int capacity) Returns a newSDL_HapticCustom.Bufferinstance allocated withmemCalloc.static SDL_HapticCustom.Buffercalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticCustom.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_HapticCustomcalloc(MemoryStack stack) Returns a newSDL_HapticCustominstance allocated on the specifiedMemoryStackand initializes all its bits to zero.bytechannels()channels(byte value) Sets the specified value to thechannelsfield.static SDL_HapticCustomcreate()Returns a newSDL_HapticCustominstance allocated withBufferUtils.static SDL_HapticCustom.Buffercreate(int capacity) Returns a newSDL_HapticCustom.Bufferinstance allocated withBufferUtils.static SDL_HapticCustomcreate(long address) Returns a newSDL_HapticCustominstance for the specified memory address.static SDL_HapticCustom.Buffercreate(long address, int capacity) Create aSDL_HapticCustom.Bufferinstance at the specified memory.static @Nullable SDL_HapticCustomcreateSafe(long address) static @Nullable SDL_HapticCustom.BuffercreateSafe(long address, int capacity) data()data(ShortBuffer value) Sets the address of the specifiedShortBufferto thedatafield.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.static SDL_HapticCustommalloc()Returns a newSDL_HapticCustominstance allocated withmemAlloc.static SDL_HapticCustom.Buffermalloc(int capacity) Returns a newSDL_HapticCustom.Bufferinstance allocated withmemAlloc.static SDL_HapticCustom.Buffermalloc(int capacity, MemoryStack stack) Returns a newSDL_HapticCustom.Bufferinstance allocated on the specifiedMemoryStack.static SDL_HapticCustommalloc(MemoryStack stack) Returns a newSDL_HapticCustominstance 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 bytenchannels(long struct) Unsafe version ofchannels().static voidnchannels(long struct, byte value) Unsafe version ofchannels.static ShortBufferndata(long struct) Unsafe version ofdata.static voidndata(long struct, ShortBuffer value) Unsafe version ofdata.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 shortnperiod(long struct) Unsafe version ofperiod().static voidnperiod(long struct, short value) Unsafe version ofperiod.static shortnsamples(long struct) Unsafe version ofsamples().static voidnsamples(long struct, short value) Unsafe version ofsamples.static shortntype(long struct) Unsafe version oftype().static voidntype(long struct, short value) Unsafe version oftype.shortperiod()period(short value) Sets the specified value to theperiodfield.shortsamples()samples(short value) Sets the specified value to thesamplesfield.set(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, byte channels, short period, short samples, ShortBuffer data, short attack_length, short attack_level, short fade_length, short fade_level) Initializes this struct with the specified values.set(SDL_HapticCustom src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).shorttype()type(short value) Sets the specified value to thetypefield.static voidvalidate(long struct) Validates pointer members that should not beNULL.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. -
CHANNELS
public static final int CHANNELSThe struct member offsets. -
PERIOD
public static final int PERIODThe struct member offsets. -
SAMPLES
public static final int SAMPLESThe struct member offsets. -
DATA
public static final int DATAThe 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_HapticCustom
Creates aSDL_HapticCustominstance 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_HapticCustom>
-
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.
-
channels
public byte channels()- Returns:
- the value of the
channelsfield.
-
period
public short period()- Returns:
- the value of the
periodfield.
-
samples
public short samples()- Returns:
- the value of the
samplesfield.
-
data
- Returns:
- a
ShortBufferview of the data pointed to by thedatafield.
-
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. -
channels
Sets the specified value to thechannelsfield. -
period
Sets the specified value to theperiodfield. -
samples
Sets the specified value to thesamplesfield. -
data
Sets the address of the specifiedShortBufferto thedatafield. -
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_HapticCustom set(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, byte channels, short period, short samples, ShortBuffer data, 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_HapticCustominstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_HapticCustominstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_HapticCustominstance allocated withBufferUtils. -
create
Returns a newSDL_HapticCustominstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_HapticCustom.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_HapticCustom.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_HapticCustom.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_HapticCustom.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_HapticCustominstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticCustominstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_HapticCustom.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_HapticCustom.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(). -
nchannels
public static byte nchannels(long struct) Unsafe version ofchannels(). -
nperiod
public static short nperiod(long struct) Unsafe version ofperiod(). -
nsamples
public static short nsamples(long struct) Unsafe version ofsamples(). -
ndata
Unsafe version ofdata. -
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. -
nchannels
public static void nchannels(long struct, byte value) Unsafe version ofchannels. -
nperiod
public static void nperiod(long struct, short value) Unsafe version ofperiod. -
nsamples
public static void nsamples(long struct, short value) Unsafe version ofsamples. -
ndata
Unsafe version ofdata. -
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. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-