Class MOUSEINPUT

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class MOUSEINPUT
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Contains information about a simulated mouse event.

    Layout

    
     struct MOUSEINPUT {
         LONG dx();
         LONG dy();
         DWORD mouseData();
         DWORD dwFlags();
         DWORD time();
         ULONG_PTR dwExtraInfo();
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MOUSEINPUT.Buffer
      An array of MOUSEINPUT structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
      • Nested classes/interfaces inherited from class org.lwjgl.system.Struct

        org.lwjgl.system.Struct.StructValidation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int DWEXTRAINFO
      DWFLAGS
      DX
      DY
      MOUSEDATA
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int TIME
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      MOUSEINPUT​(java.nio.ByteBuffer container)
      Creates a MOUSEINPUT instance at the current position of the specified ByteBuffer container.
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • DX, DY, MOUSEDATA, DWFLAGS, TIME, DWEXTRAINFO

        The struct member offsets.
    • Constructor Detail

      • MOUSEINPUT

        public MOUSEINPUT​(java.nio.ByteBuffer container)
        Creates a MOUSEINPUT 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • dx

        public int dx()
        the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the dwFlags member.

        Absolute data is specified as the x coordinate of the mouse; relative data is specified as the number of pixels moved.

      • dy

        public int dy()
        the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the dwFlags member.

        Absolute data is specified as the y coordinate of the mouse; relative data is specified as the number of pixels moved.

      • time

        public int time()
        the time stamp for the event, in milliseconds. If this parameter is 0, the system will provide its own time stamp.
      • dwExtraInfo

        public long dwExtraInfo()
        an additional value associated with the mouse event. An application calls User32.GetMessageExtraInfo() to obtain this extra information.
      • dx

        public MOUSEINPUT dx​(int value)
        Sets the specified value to the dx() field.
      • dy

        public MOUSEINPUT dy​(int value)
        Sets the specified value to the dy() field.
      • mouseData

        public MOUSEINPUT mouseData​(int value)
        Sets the specified value to the mouseData() field.
      • dwFlags

        public MOUSEINPUT dwFlags​(int value)
        Sets the specified value to the dwFlags() field.
      • time

        public MOUSEINPUT time​(int value)
        Sets the specified value to the time() field.
      • set

        public MOUSEINPUT set​(int dx,
                              int dy,
                              int mouseData,
                              int dwFlags,
                              int time,
                              long dwExtraInfo)
        Initializes this struct with the specified values.
      • set

        public MOUSEINPUT set​(MOUSEINPUT src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static MOUSEINPUT malloc()
        Returns a new MOUSEINPUT instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

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

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

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

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

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

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

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

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

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

        @Deprecated
        public static MOUSEINPUT mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static MOUSEINPUT callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

        @Deprecated
        public static MOUSEINPUT.Buffer mallocStack​(int capacity,
                                                    org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
      • callocStack

        @Deprecated
        public static MOUSEINPUT.Buffer callocStack​(int capacity,
                                                    org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
      • malloc

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

        public static MOUSEINPUT calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new MOUSEINPUT instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static MOUSEINPUT.Buffer malloc​(int capacity,
                                               org.lwjgl.system.MemoryStack stack)
        Returns a new MOUSEINPUT.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static MOUSEINPUT.Buffer calloc​(int capacity,
                                               org.lwjgl.system.MemoryStack stack)
        Returns a new MOUSEINPUT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • ndx

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

        public static int ndy​(long struct)
        Unsafe version of dy().
      • nmouseData

        public static int nmouseData​(long struct)
        Unsafe version of mouseData().
      • ndwFlags

        public static int ndwFlags​(long struct)
        Unsafe version of dwFlags().
      • ntime

        public static int ntime​(long struct)
        Unsafe version of time().
      • ndwExtraInfo

        public static long ndwExtraInfo​(long struct)
        Unsafe version of dwExtraInfo().
      • ndx

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

        public static void ndy​(long struct,
                               int value)
        Unsafe version of dy.
      • nmouseData

        public static void nmouseData​(long struct,
                                      int value)
        Unsafe version of mouseData.
      • ndwFlags

        public static void ndwFlags​(long struct,
                                    int value)
        Unsafe version of dwFlags.
      • ntime

        public static void ntime​(long struct,
                                 int value)
        Unsafe version of time.
      • ndwExtraInfo

        public static void ndwExtraInfo​(long struct,
                                        long value)
        Unsafe version of dwExtraInfo.