Package org.lwjgl.sdl

Class SDL_GamepadTouchpadEvent

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_GamepadTouchpadEvent extends Struct<SDL_GamepadTouchpadEvent> implements NativeResource

 struct SDL_GamepadTouchpadEvent {
     SDL_EventType type;
     Uint32 reserved;
     Uint64 timestamp;
     SDL_JoystickID which;
     Sint32 touchpad;
     Sint32 finger;
     float x;
     float y;
     float pressure;
 }
  • 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.
    • RESERVED

      public static final int RESERVED
      The struct member offsets.
    • TIMESTAMP

      public static final int TIMESTAMP
      The struct member offsets.
    • WHICH

      public static final int WHICH
      The struct member offsets.
    • TOUCHPAD

      public static final int TOUCHPAD
      The struct member offsets.
    • FINGER

      public static final int FINGER
      The struct member offsets.
    • X

      public static final int X
      The struct member offsets.
    • Y

      public static final int Y
      The struct member offsets.
    • PRESSURE

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

    • SDL_GamepadTouchpadEvent

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

      public int type()
      Returns:
      the value of the type field.
    • timestamp

      public long timestamp()
      Returns:
      the value of the timestamp field.
    • which

      public int which()
      Returns:
      the value of the which field.
    • touchpad

      public int touchpad()
      Returns:
      the value of the touchpad field.
    • finger

      public int finger()
      Returns:
      the value of the finger field.
    • x

      public float x()
      Returns:
      the value of the x field.
    • y

      public float y()
      Returns:
      the value of the y field.
    • pressure

      public float pressure()
      Returns:
      the value of the pressure field.
    • type

      public SDL_GamepadTouchpadEvent type(int value)
      Sets the specified value to the type field.
    • timestamp

      public SDL_GamepadTouchpadEvent timestamp(long value)
      Sets the specified value to the timestamp field.
    • which

      public SDL_GamepadTouchpadEvent which(int value)
      Sets the specified value to the which field.
    • touchpad

      public SDL_GamepadTouchpadEvent touchpad(int value)
      Sets the specified value to the touchpad field.
    • finger

      public SDL_GamepadTouchpadEvent finger(int value)
      Sets the specified value to the finger field.
    • x

      public SDL_GamepadTouchpadEvent x(float value)
      Sets the specified value to the x field.
    • y

      public SDL_GamepadTouchpadEvent y(float value)
      Sets the specified value to the y field.
    • pressure

      public SDL_GamepadTouchpadEvent pressure(float value)
      Sets the specified value to the pressure field.
    • set

      public SDL_GamepadTouchpadEvent set(int type, long timestamp, int which, int touchpad, int finger, float x, float y, float pressure)
      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_GamepadTouchpadEvent malloc()
      Returns a new SDL_GamepadTouchpadEvent instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

      public static SDL_GamepadTouchpadEvent.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new SDL_GamepadTouchpadEvent.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 int ntype(long struct)
      Unsafe version of type().
    • nreserved

      public static int nreserved(long struct)
    • ntimestamp

      public static long ntimestamp(long struct)
      Unsafe version of timestamp().
    • nwhich

      public static int nwhich(long struct)
      Unsafe version of which().
    • ntouchpad

      public static int ntouchpad(long struct)
      Unsafe version of touchpad().
    • nfinger

      public static int nfinger(long struct)
      Unsafe version of finger().
    • nx

      public static float nx(long struct)
      Unsafe version of x().
    • ny

      public static float ny(long struct)
      Unsafe version of y().
    • npressure

      public static float npressure(long struct)
      Unsafe version of pressure().
    • ntype

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

      public static void nreserved(long struct, int value)
    • ntimestamp

      public static void ntimestamp(long struct, long value)
      Unsafe version of timestamp.
    • nwhich

      public static void nwhich(long struct, int value)
      Unsafe version of which.
    • ntouchpad

      public static void ntouchpad(long struct, int value)
      Unsafe version of touchpad.
    • nfinger

      public static void nfinger(long struct, int value)
      Unsafe version of finger.
    • nx

      public static void nx(long struct, float value)
      Unsafe version of x.
    • ny

      public static void ny(long struct, float value)
      Unsafe version of y.
    • npressure

      public static void npressure(long struct, float value)
      Unsafe version of pressure.