Package org.lwjgl.sdl

Class SDL_JoyBallEvent

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_JoyBallEvent extends Struct<SDL_JoyBallEvent> implements NativeResource

 struct SDL_JoyBallEvent {
     SDL_EventType type;
     Uint32 reserved;
     Uint64 timestamp;
     SDL_JoystickID which;
     Uint8 ball;
     Uint8 padding1;
     Uint8 padding2;
     Uint8 padding3;
     Sint16 xrel;
     Sint16 yrel;
 }
  • 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.
    • BALL

      public static final int BALL
      The struct member offsets.
    • PADDING1

      public static final int PADDING1
      The struct member offsets.
    • PADDING2

      public static final int PADDING2
      The struct member offsets.
    • PADDING3

      public static final int PADDING3
      The struct member offsets.
    • XREL

      public static final int XREL
      The struct member offsets.
    • YREL

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

    • SDL_JoyBallEvent

      public SDL_JoyBallEvent(ByteBuffer container)
      Creates a SDL_JoyBallEvent 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_JoyBallEvent>
    • 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.
    • ball

      public byte ball()
      Returns:
      the value of the ball field.
    • xrel

      public short xrel()
      Returns:
      the value of the xrel field.
    • yrel

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

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

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

      public SDL_JoyBallEvent which(int value)
      Sets the specified value to the which field.
    • ball

      public SDL_JoyBallEvent ball(byte value)
      Sets the specified value to the ball field.
    • xrel

      public SDL_JoyBallEvent xrel(short value)
      Sets the specified value to the xrel field.
    • yrel

      public SDL_JoyBallEvent yrel(short value)
      Sets the specified value to the yrel field.
    • set

      public SDL_JoyBallEvent set(int type, long timestamp, int which, byte ball, short xrel, short yrel)
      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_JoyBallEvent malloc()
      Returns a new SDL_JoyBallEvent instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static byte nball(long struct)
      Unsafe version of ball().
    • npadding1

      public static byte npadding1(long struct)
    • npadding2

      public static byte npadding2(long struct)
    • npadding3

      public static byte npadding3(long struct)
    • nxrel

      public static short nxrel(long struct)
      Unsafe version of xrel().
    • nyrel

      public static short nyrel(long struct)
      Unsafe version of yrel().
    • 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.
    • nball

      public static void nball(long struct, byte value)
      Unsafe version of ball.
    • npadding1

      public static void npadding1(long struct, byte value)
    • npadding2

      public static void npadding2(long struct, byte value)
    • npadding3

      public static void npadding3(long struct, byte value)
    • nxrel

      public static void nxrel(long struct, short value)
      Unsafe version of xrel.
    • nyrel

      public static void nyrel(long struct, short value)
      Unsafe version of yrel.