Package org.lwjgl.sdl

Class SDL_MouseMotionEvent

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class SDL_MouseMotionEvent extends Struct<SDL_MouseMotionEvent> implements NativeResource

 struct SDL_MouseMotionEvent {
     SDL_EventType type;
     Uint32 reserved;
     Uint64 timestamp;
     SDL_WindowID windowID;
     SDL_MouseID which;
     SDL_MouseButtonFlags state;
     float x;
     float y;
     float xrel;
     float 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.
    • WINDOWID

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

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

      public static final int 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.
    • XREL

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

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

    • SDL_MouseMotionEvent

      public SDL_MouseMotionEvent(ByteBuffer container)
      Creates a SDL_MouseMotionEvent 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_MouseMotionEvent>
    • 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.
    • state

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

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

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

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

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

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

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

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

      public SDL_MouseMotionEvent which(int value)
      Sets the specified value to the which field.
    • state

      public SDL_MouseMotionEvent state(int value)
      Sets the specified value to the state field.
    • x

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

      public SDL_MouseMotionEvent y(float value)
      Sets the specified value to the y field.
    • xrel

      public SDL_MouseMotionEvent xrel(float value)
      Sets the specified value to the xrel field.
    • yrel

      public SDL_MouseMotionEvent yrel(float value)
      Sets the specified value to the yrel field.
    • set

      public SDL_MouseMotionEvent set(int type, long timestamp, int windowID, int which, int state, float x, float y, float xrel, float 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_MouseMotionEvent malloc()
      Returns a new SDL_MouseMotionEvent instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nstate(long struct)
      Unsafe version of state().
    • nx

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

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

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

      public static float 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.
    • 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.
    • nstate

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

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

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