Package org.lwjgl.sdl

Class SDL_HapticRamp

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_HapticRamp extends Struct<SDL_HapticRamp> implements NativeResource

 struct SDL_HapticRamp {
     Uint16 type;
     {@link SDL_HapticDirection SDL_HapticDirection} direction;
     Uint32 length;
     Uint16 delay;
     Uint16 button;
     Uint16 interval;
     Sint16 start;
     Sint16 end;
     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.
    • START

      public static final int START
      The struct member offsets.
    • END

      public static final int END
      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_HapticRamp

      public SDL_HapticRamp(ByteBuffer container)
      Creates a SDL_HapticRamp 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_HapticRamp>
    • 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.
    • start

      public short start()
      Returns:
      the value of the start field.
    • end

      public short end()
      Returns:
      the value of the end 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_HapticRamp type(short value)
      Sets the specified value to the type field.
    • direction

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

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

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

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

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

      public SDL_HapticRamp interval(short value)
      Sets the specified value to the interval field.
    • start

      public SDL_HapticRamp start(short value)
      Sets the specified value to the start field.
    • end

      public SDL_HapticRamp end(short value)
      Sets the specified value to the end field.
    • attack_length

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

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

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

      public SDL_HapticRamp fade_level(short value)
      Sets the specified value to the fade_level field.
    • set

      public SDL_HapticRamp set(short type, SDL_HapticDirection direction, int length, short delay, short button, short interval, short start, short end, short attack_length, short attack_level, short fade_length, short fade_level)
      Initializes this struct with the specified values.
    • set

      public SDL_HapticRamp set(SDL_HapticRamp src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static short nstart(long struct)
      Unsafe version of start().
    • nend

      public static short nend(long struct)
      Unsafe version of end().
    • 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.
    • nstart

      public static void nstart(long struct, short value)
      Unsafe version of start.
    • nend

      public static void nend(long struct, short value)
      Unsafe version of end.
    • 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.