Package org.lwjgl.sdl

Class SDL_PenTouchEvent

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_PenTouchEvent extends Struct<SDL_PenTouchEvent> implements NativeResource

 struct SDL_PenTouchEvent {
     SDL_EventType type;
     Uint32 reserved;
     Uint64 timestamp;
     SDL_WindowID windowID;
     SDL_PenID which;
     SDL_PenInputFlags pen_state;
     float x;
     float y;
     bool eraser;
     bool down;
 }
  • 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.
    • WINDOWID

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

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

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

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

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

      public static final int ERASER
      The struct member offsets.
    • DOWN

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

    • SDL_PenTouchEvent

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

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

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

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

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

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

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

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

      public boolean eraser()
      Returns:
      the value of the eraser field.
    • down

      public boolean down()
      Returns:
      the value of the down field.
    • type

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

      public SDL_PenTouchEvent timestamp(long value)
      Sets the specified value to the timestamp field.
    • windowID

      public SDL_PenTouchEvent windowID(int value)
      Sets the specified value to the windowID field.
    • which

      public SDL_PenTouchEvent which(int value)
      Sets the specified value to the which field.
    • pen_state

      public SDL_PenTouchEvent pen_state(int value)
      Sets the specified value to the pen_state field.
    • x

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

      public SDL_PenTouchEvent y(float value)
      Sets the specified value to the y field.
    • eraser

      public SDL_PenTouchEvent eraser(boolean value)
      Sets the specified value to the eraser field.
    • down

      public SDL_PenTouchEvent down(boolean value)
      Sets the specified value to the down field.
    • set

      public SDL_PenTouchEvent set(int type, long timestamp, int windowID, int which, int pen_state, float x, float y, boolean eraser, boolean down)
      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_PenTouchEvent malloc()
      Returns a new SDL_PenTouchEvent instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nwindowID(long struct)
      Unsafe version of windowID().
    • nwhich

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

      public static int npen_state(long struct)
      Unsafe version of pen_state().
    • nx

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

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

      public static boolean neraser(long struct)
      Unsafe version of eraser().
    • ndown

      public static boolean ndown(long struct)
      Unsafe version of down().
    • 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.
    • nwindowID

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

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

      public static void npen_state(long struct, int value)
      Unsafe version of pen_state.
    • 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.
    • neraser

      public static void neraser(long struct, boolean value)
      Unsafe version of eraser.
    • ndown

      public static void ndown(long struct, boolean value)
      Unsafe version of down.