Class MOUSEINPUT

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<MOUSEINPUT>
org.lwjgl.system.windows.MOUSEINPUT
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class MOUSEINPUT extends org.lwjgl.system.Struct<MOUSEINPUT> 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 
    An array of MOUSEINPUT structs.

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

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    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
    Creates a MOUSEINPUT instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static MOUSEINPUT
    Returns a new MOUSEINPUT instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new MOUSEINPUT.Buffer instance allocated with memCalloc.
    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.
    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.
    static MOUSEINPUT
    Deprecated.
    callocStack(int capacity)
    Deprecated.
    callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static MOUSEINPUT
    callocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static MOUSEINPUT
    Returns a new MOUSEINPUT instance allocated with BufferUtils.
    create(int capacity)
    Returns a new MOUSEINPUT.Buffer instance allocated with BufferUtils.
    static MOUSEINPUT
    create(long address)
    Returns a new MOUSEINPUT instance for the specified memory address.
    create(long address, int capacity)
    Create a MOUSEINPUT.Buffer instance at the specified memory.
    static MOUSEINPUT
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    long
    an additional value associated with the mouse event.
    dwExtraInfo(long value)
    Sets the specified value to the dwExtraInfo() field.
    int
    A set of bit flags that specify various aspects of mouse motion and button clicks.
    dwFlags(int value)
    Sets the specified value to the dwFlags() field.
    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.
    dx(int value)
    Sets the specified value to the dx() field.
    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.
    dy(int value)
    Sets the specified value to the dy() field.
    static MOUSEINPUT
    Returns a new MOUSEINPUT instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new MOUSEINPUT.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new MOUSEINPUT.Buffer instance allocated on the specified MemoryStack.
    static MOUSEINPUT
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new MOUSEINPUT instance allocated on the specified MemoryStack.
    static MOUSEINPUT
    Deprecated.
    mallocStack(int capacity)
    Deprecated.
    mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static MOUSEINPUT
    mallocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    int
    If dwFlags contains User32.MOUSEEVENTF_WHEEL, then mouseData specifies the amount of wheel movement.
    mouseData(int value)
    Sets the specified value to the mouseData() field.
    static long
    ndwExtraInfo(long struct)
    Unsafe version of dwExtraInfo().
    static void
    ndwExtraInfo(long struct, long value)
    Unsafe version of dwExtraInfo.
    static int
    ndwFlags(long struct)
    Unsafe version of dwFlags().
    static void
    ndwFlags(long struct, int value)
    Unsafe version of dwFlags.
    static int
    ndx(long struct)
    Unsafe version of dx().
    static void
    ndx(long struct, int value)
    Unsafe version of dx.
    static int
    ndy(long struct)
    Unsafe version of dy().
    static void
    ndy(long struct, int value)
    Unsafe version of dy.
    static int
    nmouseData(long struct)
    Unsafe version of mouseData().
    static void
    nmouseData(long struct, int value)
    Unsafe version of mouseData.
    static int
    ntime(long struct)
    Unsafe version of time().
    static void
    ntime(long struct, int value)
    Unsafe version of time.
    set(int dx, int dy, int mouseData, int dwFlags, int time, long dwExtraInfo)
    Initializes this struct with the specified values.
    Copies the specified struct data to this struct.
    int
     
    int
    the time stamp for the event, in milliseconds.
    time(int value)
    Sets the specified value to the time() field.

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • DX

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

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

      public static final int MOUSEDATA
      The struct member offsets.
    • DWFLAGS

      public static final int DWFLAGS
      The struct member offsets.
    • TIME

      public static final int TIME
      The struct member offsets.
    • DWEXTRAINFO

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

    • MOUSEINPUT

      public MOUSEINPUT(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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<MOUSEINPUT>
    • 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.

    • mouseData

      public int mouseData()
      If dwFlags contains User32.MOUSEEVENTF_WHEEL, then mouseData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as User32.WHEEL_DELTA, which is 120.

      Windows Vista: If dwFlags contains User32.MOUSEEVENTF_HWHEEL, then dwData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated to the right; a negative value indicates that the wheel was rotated to the left. One wheel click is defined as WHEEL_DELTA, which is 120.

      If dwFlags does not contain User32.MOUSEEVENTF_WHEEL, User32.MOUSEEVENTF_XDOWN, or User32.MOUSEEVENTF_XUP, then mouseData should be zero.

      If dwFlags contains User32.MOUSEEVENTF_XDOWN or User32.MOUSEEVENTF_XUP, then mouseData specifies which X buttons were pressed or released. This value may be any combination of the following flags: User32.XBUTTON1, User32.XBUTTON2. One of:

      User32.XBUTTON1User32.XBUTTON2
    • dwFlags

      public int dwFlags()
      A set of bit flags that specify various aspects of mouse motion and button clicks.

      The bit flags that specify mouse button status are set to indicate changes in status, not ongoing conditions. For example, if the left mouse button is pressed and held down, User32.MOUSEEVENTF_LEFTDOWN is set when the left button is first pressed, but not for subsequent motions. Similarly, User32.MOUSEEVENTF_LEFTUP is set only when the button is first released.

      You cannot specify both the User32.MOUSEEVENTF_WHEEL flag and either User32.MOUSEEVENTF_XDOWN or User32.MOUSEEVENTF_XUP flags simultaneously in the dwFlags parameter, because they both require use of the mouseData field. One of:

      User32.MOUSEEVENTF_ABSOLUTEUser32.MOUSEEVENTF_HWHEELUser32.MOUSEEVENTF_MOVEUser32.MOUSEEVENTF_MOVE_NOCOALESCE
      User32.MOUSEEVENTF_LEFTDOWNUser32.MOUSEEVENTF_LEFTUPUser32.MOUSEEVENTF_RIGHTDOWNUser32.MOUSEEVENTF_RIGHTUP
      User32.MOUSEEVENTF_MIDDLEDOWNUser32.MOUSEEVENTF_MIDDLEUPUser32.MOUSEEVENTF_VIRTUALDESKUser32.MOUSEEVENTF_WHEEL
      User32.MOUSEEVENTF_XDOWNUser32.MOUSEEVENTF_XUP
    • 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.
    • dwExtraInfo

      public MOUSEINPUT dwExtraInfo(long value)
      Sets the specified value to the dwExtraInfo() 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()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static MOUSEINPUT callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • 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)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static MOUSEINPUT.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, 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:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • 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:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • 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.