Package org.lwjgl.sdl

Class SDL_HapticPeriodic

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_HapticPeriodic extends Struct<SDL_HapticPeriodic> implements NativeResource

 struct SDL_HapticPeriodic {
     Uint16 type;
     {@link SDL_HapticDirection 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;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • DIRECTION

      public static final int DIRECTION
      The struct member offsets.
    • LENGTH

      public static final int LENGTH
      The struct member offsets.
    • DELAY

      public static final int DELAY
      The struct member offsets.
    • BUTTON

      public static final int BUTTON
      The struct member offsets.
    • INTERVAL

      public static final int INTERVAL
      The struct member offsets.
    • PERIOD

      public static final int PERIOD
      The struct member offsets.
    • MAGNITUDE

      public static final int MAGNITUDE
      The struct member offsets.
    • OFFSET

      public static final int OFFSET
      The struct member offsets.
    • PHASE

      public static final int PHASE
      The struct member offsets.
    • ATTACK_LENGTH

      public static final int ATTACK_LENGTH
      The struct member offsets.
    • ATTACK_LEVEL

      public static final int ATTACK_LEVEL
      The struct member offsets.
    • FADE_LENGTH

      public static final int FADE_LENGTH
      The struct member offsets.
    • FADE_LEVEL

      public static final int FADE_LEVEL
      The struct member offsets.
  • Constructor Details

    • SDL_HapticPeriodic

      public SDL_HapticPeriodic(ByteBuffer container)
      Creates a SDL_HapticPeriodic instance at the current position of the specified ByteBuffer 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
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<SDL_HapticPeriodic>
    • type

      public short type()
      Returns:
      the value of the type field.
    • direction

      public SDL_HapticDirection direction()
      Returns:
      a SDL_HapticDirection view of the direction 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.
    • period

      public short period()
      Returns:
      the value of the period field.
    • magnitude

      public short magnitude()
      Returns:
      the value of the magnitude field.
    • offset

      public short offset()
      Returns:
      the value of the offset field.
    • phase

      public short phase()
      Returns:
      the value of the phase 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

      public SDL_HapticPeriodic type(short value)
      Sets the specified value to the type field.
    • direction

      public SDL_HapticPeriodic direction(SDL_HapticDirection value)
      Copies the specified SDL_HapticDirection to the direction field.
    • direction

      public SDL_HapticPeriodic direction(Consumer<SDL_HapticDirection> consumer)
      Passes the direction field to the specified Consumer.
    • length

      public SDL_HapticPeriodic length(int value)
      Sets the specified value to the length field.
    • delay

      public SDL_HapticPeriodic delay(short value)
      Sets the specified value to the delay field.
    • button

      public SDL_HapticPeriodic button(short value)
      Sets the specified value to the button field.
    • interval

      public SDL_HapticPeriodic interval(short value)
      Sets the specified value to the interval field.
    • period

      public SDL_HapticPeriodic period(short value)
      Sets the specified value to the period field.
    • magnitude

      public SDL_HapticPeriodic magnitude(short value)
      Sets the specified value to the magnitude field.
    • offset

      public SDL_HapticPeriodic offset(short value)
      Sets the specified value to the offset field.
    • phase

      public SDL_HapticPeriodic phase(short value)
      Sets the specified value to the phase field.
    • attack_length

      public SDL_HapticPeriodic attack_length(short value)
      Sets the specified value to the attack_length field.
    • attack_level

      public SDL_HapticPeriodic attack_level(short value)
      Sets the specified value to the attack_level field.
    • fade_length

      public SDL_HapticPeriodic fade_length(short value)
      Sets the specified value to the fade_length field.
    • fade_level

      public SDL_HapticPeriodic fade_level(short value)
      Sets the specified value to the fade_level field.
    • 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

      public static SDL_HapticPeriodic malloc()
      Returns a new SDL_HapticPeriodic instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static SDL_HapticPeriodic calloc()
      Returns a new SDL_HapticPeriodic instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static SDL_HapticPeriodic create()
      Returns a new SDL_HapticPeriodic instance allocated with BufferUtils.
    • create

      public static SDL_HapticPeriodic create(long address)
      Returns a new SDL_HapticPeriodic instance for the specified memory address.
    • createSafe

      public static @Nullable SDL_HapticPeriodic createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static SDL_HapticPeriodic.Buffer malloc(int capacity)
      Returns a new SDL_HapticPeriodic.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static SDL_HapticPeriodic.Buffer calloc(int capacity)
      Returns a new SDL_HapticPeriodic.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static SDL_HapticPeriodic.Buffer create(int capacity)
      Returns a new SDL_HapticPeriodic.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static SDL_HapticPeriodic.Buffer create(long address, int capacity)
      Create a SDL_HapticPeriodic.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable SDL_HapticPeriodic.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static SDL_HapticPeriodic malloc(MemoryStack stack)
      Returns a new SDL_HapticPeriodic instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static SDL_HapticPeriodic calloc(MemoryStack stack)
      Returns a new SDL_HapticPeriodic instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static SDL_HapticPeriodic.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new SDL_HapticPeriodic.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static SDL_HapticPeriodic.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SDL_HapticPeriodic.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntype

      public static short ntype(long struct)
      Unsafe version of type().
    • ndirection

      public static SDL_HapticDirection ndirection(long struct)
      Unsafe version of direction().
    • nlength

      public static int nlength(long struct)
      Unsafe version of length().
    • ndelay

      public static short ndelay(long struct)
      Unsafe version of delay().
    • nbutton

      public static short nbutton(long struct)
      Unsafe version of button().
    • ninterval

      public static short ninterval(long struct)
      Unsafe version of interval().
    • nperiod

      public static short nperiod(long struct)
      Unsafe version of period().
    • nmagnitude

      public static short nmagnitude(long struct)
      Unsafe version of magnitude().
    • noffset

      public static short noffset(long struct)
      Unsafe version of offset().
    • nphase

      public static short nphase(long struct)
      Unsafe version of phase().
    • nattack_length

      public static short nattack_length(long struct)
      Unsafe version of attack_length().
    • nattack_level

      public static short nattack_level(long struct)
      Unsafe version of attack_level().
    • nfade_length

      public static short nfade_length(long struct)
      Unsafe version of fade_length().
    • nfade_level

      public static short nfade_level(long struct)
      Unsafe version of fade_level().
    • ntype

      public static void ntype(long struct, short value)
      Unsafe version of type.
    • ndirection

      public static void ndirection(long struct, SDL_HapticDirection value)
      Unsafe version of direction.
    • nlength

      public static void nlength(long struct, int value)
      Unsafe version of length.
    • ndelay

      public static void ndelay(long struct, short value)
      Unsafe version of delay.
    • nbutton

      public static void nbutton(long struct, short value)
      Unsafe version of button.
    • ninterval

      public static void ninterval(long struct, short value)
      Unsafe version of interval.
    • nperiod

      public static void nperiod(long struct, short value)
      Unsafe version of period.
    • nmagnitude

      public static void nmagnitude(long struct, short value)
      Unsafe version of magnitude.
    • noffset

      public static void noffset(long struct, short value)
      Unsafe version of offset.
    • nphase

      public static void nphase(long struct, short value)
      Unsafe version of phase.
    • nattack_length

      public static void nattack_length(long struct, short value)
      Unsafe version of attack_length.
    • nattack_level

      public static void nattack_level(long struct, short value)
      Unsafe version of attack_level.
    • nfade_length

      public static void nfade_length(long struct, short value)
      Unsafe version of fade_length.
    • nfade_level

      public static void nfade_level(long struct, short value)
      Unsafe version of fade_level.