Class HARDWAREINPUT

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class HARDWAREINPUT extends Struct<HARDWAREINPUT> implements NativeResource

 struct HARDWAREINPUT {
     DWORD uMsg;
     WORD wParamL;
     WORD wParamH;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int UMSG
      The struct member offsets.
    • WPARAML

      public static final int WPARAML
      The struct member offsets.
    • WPARAMH

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

    • HARDWAREINPUT

      public HARDWAREINPUT(ByteBuffer container)
      Creates a HARDWAREINPUT 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<HARDWAREINPUT>
    • uMsg

      public int uMsg()
      Returns:
      the value of the uMsg field.
    • wParamL

      public short wParamL()
      Returns:
      the value of the wParamL field.
    • wParamH

      public short wParamH()
      Returns:
      the value of the wParamH field.
    • uMsg

      public HARDWAREINPUT uMsg(int value)
      Sets the specified value to the uMsg field.
    • wParamL

      public HARDWAREINPUT wParamL(short value)
      Sets the specified value to the wParamL field.
    • wParamH

      public HARDWAREINPUT wParamH(short value)
      Sets the specified value to the wParamH field.
    • set

      public HARDWAREINPUT set(int uMsg, short wParamL, short wParamH)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nuMsg(long struct)
      Unsafe version of uMsg().
    • nwParamL

      public static short nwParamL(long struct)
      Unsafe version of wParamL().
    • nwParamH

      public static short nwParamH(long struct)
      Unsafe version of wParamH().
    • nuMsg

      public static void nuMsg(long struct, int value)
      Unsafe version of uMsg.
    • nwParamL

      public static void nwParamL(long struct, short value)
      Unsafe version of wParamL.
    • nwParamH

      public static void nwParamH(long struct, short value)
      Unsafe version of wParamH.