Class MOUSEINPUT

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class MOUSEINPUT extends Struct<MOUSEINPUT> implements NativeResource

 struct MOUSEINPUT {
     LONG dx;
     LONG dy;
     DWORD mouseData;
     DWORD dwFlags;
     DWORD time;
     ULONG_PTR dwExtraInfo;
 }
  • 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<MOUSEINPUT>
    • dx

      public int dx()
      Returns:
      the value of the dx field.
    • dy

      public int dy()
      Returns:
      the value of the dy field.
    • mouseData

      public int mouseData()
      Returns:
      the value of the mouseData field.
    • dwFlags

      public int dwFlags()
      Returns:
      the value of the dwFlags field.
    • time

      public int time()
      Returns:
      the value of the time field.
    • dwExtraInfo

      public long dwExtraInfo()
      Returns:
      the value of the dwExtraInfo field.
    • 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

      public static @Nullable 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

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

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

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

      public static MOUSEINPUT malloc(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(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, 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, 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.