Package org.lwjgl.sdl

Class SDL_TouchFingerEvent

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_TouchFingerEvent extends Struct<SDL_TouchFingerEvent> implements NativeResource

 struct SDL_TouchFingerEvent {
     SDL_EventType type;
     Uint32 reserved;
     Uint64 timestamp;
     SDL_TouchID touchID;
     SDL_FingerID fingerID;
     float x;
     float y;
     float dx;
     float dy;
     float pressure;
     SDL_WindowID windowID;
 }
  • 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.
    • TOUCHID

      public static final int TOUCHID
      The struct member offsets.
    • FINGERID

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

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

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

      public static final int DX
      The struct member offsets.
    • DY

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

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

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

    • SDL_TouchFingerEvent

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

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

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

      public long touchID()
      Returns:
      the value of the touchID field.
    • fingerID

      public long fingerID()
      Returns:
      the value of the fingerID field.
    • x

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

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

      public float dx()
      Returns:
      the value of the dx field.
    • dy

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

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

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

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

      public SDL_TouchFingerEvent timestamp(long value)
      Sets the specified value to the timestamp field.
    • touchID

      public SDL_TouchFingerEvent touchID(long value)
      Sets the specified value to the touchID field.
    • fingerID

      public SDL_TouchFingerEvent fingerID(long value)
      Sets the specified value to the fingerID field.
    • x

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

      public SDL_TouchFingerEvent y(float value)
      Sets the specified value to the y field.
    • dx

      public SDL_TouchFingerEvent dx(float value)
      Sets the specified value to the dx field.
    • dy

      public SDL_TouchFingerEvent dy(float value)
      Sets the specified value to the dy field.
    • pressure

      public SDL_TouchFingerEvent pressure(float value)
      Sets the specified value to the pressure field.
    • windowID

      public SDL_TouchFingerEvent windowID(int value)
      Sets the specified value to the windowID field.
    • set

      public SDL_TouchFingerEvent set(int type, long timestamp, long touchID, long fingerID, float x, float y, float dx, float dy, float pressure, int windowID)
      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_TouchFingerEvent malloc()
      Returns a new SDL_TouchFingerEvent instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static long ntouchID(long struct)
      Unsafe version of touchID().
    • nfingerID

      public static long nfingerID(long struct)
      Unsafe version of fingerID().
    • nx

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

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

      public static float ndx(long struct)
      Unsafe version of dx().
    • ndy

      public static float ndy(long struct)
      Unsafe version of dy().
    • npressure

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

      public static int nwindowID(long struct)
      Unsafe version of windowID().
    • 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.
    • ntouchID

      public static void ntouchID(long struct, long value)
      Unsafe version of touchID.
    • nfingerID

      public static void nfingerID(long struct, long value)
      Unsafe version of fingerID.
    • 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.
    • ndx

      public static void ndx(long struct, float value)
      Unsafe version of dx.
    • ndy

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

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

      public static void nwindowID(long struct, int value)
      Unsafe version of windowID.