Package org.lwjgl.sdl

Class SDL_HapticLeftRight

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_HapticLeftRight extends Struct<SDL_HapticLeftRight> implements NativeResource

 struct SDL_HapticLeftRight {
     Uint16 type;
     Uint32 length;
     Uint16 large_magnitude;
     Uint16 small_magnitude;
 }
  • 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.
    • LENGTH

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

      public static final int LARGE_MAGNITUDE
      The struct member offsets.
    • SMALL_MAGNITUDE

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

    • SDL_HapticLeftRight

      public SDL_HapticLeftRight(ByteBuffer container)
      Creates a SDL_HapticLeftRight 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_HapticLeftRight>
    • type

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

      public int length()
      Returns:
      the value of the length field.
    • large_magnitude

      public short large_magnitude()
      Returns:
      the value of the large_magnitude field.
    • small_magnitude

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

      public SDL_HapticLeftRight type(short value)
      Sets the specified value to the type field.
    • length

      public SDL_HapticLeftRight length(int value)
      Sets the specified value to the length field.
    • large_magnitude

      public SDL_HapticLeftRight large_magnitude(short value)
      Sets the specified value to the large_magnitude field.
    • small_magnitude

      public SDL_HapticLeftRight small_magnitude(short value)
      Sets the specified value to the small_magnitude field.
    • set

      public SDL_HapticLeftRight set(short type, int length, short large_magnitude, short small_magnitude)
      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_HapticLeftRight malloc()
      Returns a new SDL_HapticLeftRight instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static short nlarge_magnitude(long struct)
      Unsafe version of large_magnitude().
    • nsmall_magnitude

      public static short nsmall_magnitude(long struct)
      Unsafe version of small_magnitude().
    • ntype

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

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

      public static void nlarge_magnitude(long struct, short value)
      Unsafe version of large_magnitude.
    • nsmall_magnitude

      public static void nsmall_magnitude(long struct, short value)
      Unsafe version of small_magnitude.