Class INPUT

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

public class INPUT extends org.lwjgl.system.Struct<INPUT> implements org.lwjgl.system.NativeResource
Used by User32.SendInput(org.lwjgl.system.windows.INPUT.Buffer, int) to store information for synthesizing input events such as keystrokes, mouse movement, and mouse clicks.

Layout


 struct INPUT {
     DWORD type();
     union {
         MOUSEINPUT mi;
         KEYBDINPUT ki;
         HARDWAREINPUT hi;
     } DUMMYUNIONNAME;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • DUMMYUNIONNAME

      public static final int DUMMYUNIONNAME
      The struct member offsets.
    • DUMMYUNIONNAME_MI

      public static final int DUMMYUNIONNAME_MI
      The struct member offsets.
    • DUMMYUNIONNAME_KI

      public static final int DUMMYUNIONNAME_KI
      The struct member offsets.
    • DUMMYUNIONNAME_HI

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

    • INPUT

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

      public int type()
    • DUMMYUNIONNAME_mi

      public MOUSEINPUT DUMMYUNIONNAME_mi()
      the information about a simulated mouse event
    • DUMMYUNIONNAME_ki

      public KEYBDINPUT DUMMYUNIONNAME_ki()
      the information about a simulated keyboard event
    • DUMMYUNIONNAME_hi

      public HARDWAREINPUT DUMMYUNIONNAME_hi()
      the information about a simulated hardware event
    • type

      public INPUT type(int value)
      Sets the specified value to the type() field.
    • DUMMYUNIONNAME_mi

      public INPUT DUMMYUNIONNAME_mi(MOUSEINPUT value)
      Copies the specified MOUSEINPUT to the DUMMYUNIONNAME_mi() field.
    • DUMMYUNIONNAME_mi

      public INPUT DUMMYUNIONNAME_mi(Consumer<MOUSEINPUT> consumer)
      Passes the DUMMYUNIONNAME_mi() field to the specified Consumer.
    • DUMMYUNIONNAME_ki

      public INPUT DUMMYUNIONNAME_ki(KEYBDINPUT value)
      Copies the specified KEYBDINPUT to the DUMMYUNIONNAME_ki() field.
    • DUMMYUNIONNAME_ki

      public INPUT DUMMYUNIONNAME_ki(Consumer<KEYBDINPUT> consumer)
      Passes the DUMMYUNIONNAME_ki() field to the specified Consumer.
    • DUMMYUNIONNAME_hi

      public INPUT DUMMYUNIONNAME_hi(HARDWAREINPUT value)
      Copies the specified HARDWAREINPUT to the DUMMYUNIONNAME_hi() field.
    • DUMMYUNIONNAME_hi

      public INPUT DUMMYUNIONNAME_hi(Consumer<HARDWAREINPUT> consumer)
      Passes the DUMMYUNIONNAME_hi() field to the specified Consumer.
    • set

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static INPUT mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static INPUT callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

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

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

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

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

      @Deprecated public static INPUT.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 INPUT.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 INPUT malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new INPUT instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

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

      public static INPUT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new INPUT.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
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nDUMMYUNIONNAME_mi

      public static MOUSEINPUT nDUMMYUNIONNAME_mi(long struct)
      Unsafe version of DUMMYUNIONNAME_mi().
    • nDUMMYUNIONNAME_ki

      public static KEYBDINPUT nDUMMYUNIONNAME_ki(long struct)
      Unsafe version of DUMMYUNIONNAME_ki().
    • nDUMMYUNIONNAME_hi

      public static HARDWAREINPUT nDUMMYUNIONNAME_hi(long struct)
      Unsafe version of DUMMYUNIONNAME_hi().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nDUMMYUNIONNAME_mi

      public static void nDUMMYUNIONNAME_mi(long struct, MOUSEINPUT value)
      Unsafe version of DUMMYUNIONNAME_mi.
    • nDUMMYUNIONNAME_ki

      public static void nDUMMYUNIONNAME_ki(long struct, KEYBDINPUT value)
      Unsafe version of DUMMYUNIONNAME_ki.
    • nDUMMYUNIONNAME_hi

      public static void nDUMMYUNIONNAME_hi(long struct, HARDWAREINPUT value)
      Unsafe version of DUMMYUNIONNAME_hi.