Class HARDWAREINPUT

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

    public class HARDWAREINPUT
    extends Struct
    implements NativeResource
    Contains information about a simulated message generated by an input device other than a keyboard or mouse.

    Member documentation

    • uMsg – the message generated by the input hardware
    • wParamL – the low-order word of the lParam parameter for uMsg
    • wParamH – the high-order word of the lParam parameter for uMsg

    Layout

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

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • UMSG, WPARAML, WPARAMH

        The struct member offsets.
    • Constructor Detail

      • HARDWAREINPUT

        public HARDWAREINPUT​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • 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​(long address)
        Returns a new HARDWAREINPUT instance for the specified memory address.
      • createSafe

        @Nullable
        public static HARDWAREINPUT createSafe​(long address)
        Like create, but returns null if address is NULL.
      • 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

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

        public static HARDWAREINPUT mallocStack()
        Returns a new HARDWAREINPUT instance allocated on the thread-local MemoryStack.
      • callocStack

        public static HARDWAREINPUT callocStack()
        Returns a new HARDWAREINPUT instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

        public static HARDWAREINPUT callocStack​(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
      • 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.