Package org.lwjgl.sdl

Class SDL_HapticCondition

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_HapticCondition extends Struct<SDL_HapticCondition> implements NativeResource

 struct SDL_HapticCondition {
     Uint16 type;
     {@link SDL_HapticDirection SDL_HapticDirection} direction;
     Uint32 length;
     Uint16 delay;
     Uint16 button;
     Uint16 interval;
     Uint16 right_sat[3];
     Uint16 left_sat[3];
     Sint16 right_coeff[3];
     Sint16 left_coeff[3];
     Uint16 deadband[3];
     Sint16 center[3];
 }
  • 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.
    • RIGHT_SAT

      public static final int RIGHT_SAT
      The struct member offsets.
    • LEFT_SAT

      public static final int LEFT_SAT
      The struct member offsets.
    • RIGHT_COEFF

      public static final int RIGHT_COEFF
      The struct member offsets.
    • LEFT_COEFF

      public static final int LEFT_COEFF
      The struct member offsets.
    • DEADBAND

      public static final int DEADBAND
      The struct member offsets.
    • CENTER

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

    • SDL_HapticCondition

      public SDL_HapticCondition(ByteBuffer container)
      Creates a SDL_HapticCondition 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_HapticCondition>
    • 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.
    • right_sat

      public ShortBuffer right_sat()
      Returns:
      a ShortBuffer view of the right_sat field.
    • right_sat

      public short right_sat(int index)
      Returns:
      the value at the specified index of the right_sat field.
    • left_sat

      public ShortBuffer left_sat()
      Returns:
      a ShortBuffer view of the left_sat field.
    • left_sat

      public short left_sat(int index)
      Returns:
      the value at the specified index of the left_sat field.
    • right_coeff

      public ShortBuffer right_coeff()
      Returns:
      a ShortBuffer view of the right_coeff field.
    • right_coeff

      public short right_coeff(int index)
      Returns:
      the value at the specified index of the right_coeff field.
    • left_coeff

      public ShortBuffer left_coeff()
      Returns:
      a ShortBuffer view of the left_coeff field.
    • left_coeff

      public short left_coeff(int index)
      Returns:
      the value at the specified index of the left_coeff field.
    • deadband

      public ShortBuffer deadband()
      Returns:
      a ShortBuffer view of the deadband field.
    • deadband

      public short deadband(int index)
      Returns:
      the value at the specified index of the deadband field.
    • center

      public ShortBuffer center()
      Returns:
      a ShortBuffer view of the center field.
    • center

      public short center(int index)
      Returns:
      the value at the specified index of the center field.
    • type

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

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

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

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

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

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

      public SDL_HapticCondition interval(short value)
      Sets the specified value to the interval field.
    • right_sat

      public SDL_HapticCondition right_sat(ShortBuffer value)
      Copies the specified ShortBuffer to the right_sat field.
    • right_sat

      public SDL_HapticCondition right_sat(int index, short value)
      Sets the specified value at the specified index of the right_sat field.
    • left_sat

      public SDL_HapticCondition left_sat(ShortBuffer value)
      Copies the specified ShortBuffer to the left_sat field.
    • left_sat

      public SDL_HapticCondition left_sat(int index, short value)
      Sets the specified value at the specified index of the left_sat field.
    • right_coeff

      public SDL_HapticCondition right_coeff(ShortBuffer value)
      Copies the specified ShortBuffer to the right_coeff field.
    • right_coeff

      public SDL_HapticCondition right_coeff(int index, short value)
      Sets the specified value at the specified index of the right_coeff field.
    • left_coeff

      public SDL_HapticCondition left_coeff(ShortBuffer value)
      Copies the specified ShortBuffer to the left_coeff field.
    • left_coeff

      public SDL_HapticCondition left_coeff(int index, short value)
      Sets the specified value at the specified index of the left_coeff field.
    • deadband

      public SDL_HapticCondition deadband(ShortBuffer value)
      Copies the specified ShortBuffer to the deadband field.
    • deadband

      public SDL_HapticCondition deadband(int index, short value)
      Sets the specified value at the specified index of the deadband field.
    • center

      public SDL_HapticCondition center(ShortBuffer value)
      Copies the specified ShortBuffer to the center field.
    • center

      public SDL_HapticCondition center(int index, short value)
      Sets the specified value at the specified index of the center field.
    • set

      public SDL_HapticCondition set(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, ShortBuffer right_sat, ShortBuffer left_sat, ShortBuffer right_coeff, ShortBuffer left_coeff, ShortBuffer deadband, ShortBuffer center)
      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_HapticCondition malloc()
      Returns a new SDL_HapticCondition instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

      public static SDL_HapticCondition calloc(MemoryStack stack)
      Returns a new SDL_HapticCondition 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_HapticCondition.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new SDL_HapticCondition.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static SDL_HapticCondition.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SDL_HapticCondition.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().
    • nright_sat

      public static ShortBuffer nright_sat(long struct)
      Unsafe version of right_sat().
    • nright_sat

      public static short nright_sat(long struct, int index)
      Unsafe version of right_sat.
    • nleft_sat

      public static ShortBuffer nleft_sat(long struct)
      Unsafe version of left_sat().
    • nleft_sat

      public static short nleft_sat(long struct, int index)
      Unsafe version of left_sat.
    • nright_coeff

      public static ShortBuffer nright_coeff(long struct)
      Unsafe version of right_coeff().
    • nright_coeff

      public static short nright_coeff(long struct, int index)
      Unsafe version of right_coeff.
    • nleft_coeff

      public static ShortBuffer nleft_coeff(long struct)
      Unsafe version of left_coeff().
    • nleft_coeff

      public static short nleft_coeff(long struct, int index)
      Unsafe version of left_coeff.
    • ndeadband

      public static ShortBuffer ndeadband(long struct)
      Unsafe version of deadband().
    • ndeadband

      public static short ndeadband(long struct, int index)
      Unsafe version of deadband.
    • ncenter

      public static ShortBuffer ncenter(long struct)
      Unsafe version of center().
    • ncenter

      public static short ncenter(long struct, int index)
      Unsafe version of center.
    • 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.
    • nright_sat

      public static void nright_sat(long struct, ShortBuffer value)
      Unsafe version of right_sat.
    • nright_sat

      public static void nright_sat(long struct, int index, short value)
      Unsafe version of right_sat.
    • nleft_sat

      public static void nleft_sat(long struct, ShortBuffer value)
      Unsafe version of left_sat.
    • nleft_sat

      public static void nleft_sat(long struct, int index, short value)
      Unsafe version of left_sat.
    • nright_coeff

      public static void nright_coeff(long struct, ShortBuffer value)
      Unsafe version of right_coeff.
    • nright_coeff

      public static void nright_coeff(long struct, int index, short value)
      Unsafe version of right_coeff.
    • nleft_coeff

      public static void nleft_coeff(long struct, ShortBuffer value)
      Unsafe version of left_coeff.
    • nleft_coeff

      public static void nleft_coeff(long struct, int index, short value)
      Unsafe version of left_coeff.
    • ndeadband

      public static void ndeadband(long struct, ShortBuffer value)
      Unsafe version of deadband.
    • ndeadband

      public static void ndeadband(long struct, int index, short value)
      Unsafe version of deadband.
    • ncenter

      public static void ncenter(long struct, ShortBuffer value)
      Unsafe version of center.
    • ncenter

      public static void ncenter(long struct, int index, short value)
      Unsafe version of center.