Package org.lwjgl.system.windows
Class INPUT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.INPUT
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class INPUT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceUsed byUser32.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 { DWORDtype(); union {MOUSEINPUTmi;KEYBDINPUTki;HARDWAREINPUThi; } DUMMYUNIONNAME; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classINPUT.BufferAn array ofINPUTstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDUMMYUNIONNAME
DUMMYUNIONNAME_HI
DUMMYUNIONNAME_KI
DUMMYUNIONNAME_MIThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description INPUT(java.nio.ByteBuffer container)Creates aINPUTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static INPUTcalloc()Returns a newINPUTinstance allocated withmemCalloc.static INPUT.Buffercalloc(int capacity)Returns a newINPUT.Bufferinstance allocated withmemCalloc.static INPUT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newINPUT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static INPUTcalloc(org.lwjgl.system.MemoryStack stack)Returns a newINPUTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static INPUTcallocStack()Deprecated.static INPUT.BuffercallocStack(int capacity)Deprecated.static INPUT.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static INPUTcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static INPUTcreate()Returns a newINPUTinstance allocated withBufferUtils.static INPUT.Buffercreate(int capacity)Returns a newINPUT.Bufferinstance allocated withBufferUtils.static INPUTcreate(long address)Returns a newINPUTinstance for the specified memory address.static INPUT.Buffercreate(long address, int capacity)Create aINPUT.Bufferinstance at the specified memory.static INPUTcreateSafe(long address)static INPUT.BuffercreateSafe(long address, int capacity)HARDWAREINPUTDUMMYUNIONNAME_hi()the information about a simulated hardware eventINPUTDUMMYUNIONNAME_hi(java.util.function.Consumer<HARDWAREINPUT> consumer)Passes theDUMMYUNIONNAME_hi()field to the specifiedConsumer.INPUTDUMMYUNIONNAME_hi(HARDWAREINPUT value)Copies the specifiedHARDWAREINPUTto theDUMMYUNIONNAME_hi()field.KEYBDINPUTDUMMYUNIONNAME_ki()the information about a simulated keyboard eventINPUTDUMMYUNIONNAME_ki(java.util.function.Consumer<KEYBDINPUT> consumer)Passes theDUMMYUNIONNAME_ki()field to the specifiedConsumer.INPUTDUMMYUNIONNAME_ki(KEYBDINPUT value)Copies the specifiedKEYBDINPUTto theDUMMYUNIONNAME_ki()field.MOUSEINPUTDUMMYUNIONNAME_mi()the information about a simulated mouse eventINPUTDUMMYUNIONNAME_mi(java.util.function.Consumer<MOUSEINPUT> consumer)Passes theDUMMYUNIONNAME_mi()field to the specifiedConsumer.INPUTDUMMYUNIONNAME_mi(MOUSEINPUT value)Copies the specifiedMOUSEINPUTto theDUMMYUNIONNAME_mi()field.static INPUTmalloc()Returns a newINPUTinstance allocated withmemAlloc.static INPUT.Buffermalloc(int capacity)Returns a newINPUT.Bufferinstance allocated withmemAlloc.static INPUT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newINPUT.Bufferinstance allocated on the specifiedMemoryStack.static INPUTmalloc(org.lwjgl.system.MemoryStack stack)Returns a newINPUTinstance allocated on the specifiedMemoryStack.static INPUTmallocStack()Deprecated.static INPUT.BuffermallocStack(int capacity)Deprecated.static INPUT.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static INPUTmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static HARDWAREINPUTnDUMMYUNIONNAME_hi(long struct)Unsafe version ofDUMMYUNIONNAME_hi().static voidnDUMMYUNIONNAME_hi(long struct, HARDWAREINPUT value)Unsafe version ofDUMMYUNIONNAME_hi.static KEYBDINPUTnDUMMYUNIONNAME_ki(long struct)Unsafe version ofDUMMYUNIONNAME_ki().static voidnDUMMYUNIONNAME_ki(long struct, KEYBDINPUT value)Unsafe version ofDUMMYUNIONNAME_ki.static MOUSEINPUTnDUMMYUNIONNAME_mi(long struct)Unsafe version ofDUMMYUNIONNAME_mi().static voidnDUMMYUNIONNAME_mi(long struct, MOUSEINPUT value)Unsafe version ofDUMMYUNIONNAME_mi.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.INPUTset(INPUT src)Copies the specified struct data to this struct.intsizeof()inttype()the type of the input event.INPUTtype(int value)Sets the specified value to thetype()field.
-
-
-
Constructor Detail
-
INPUT
public INPUT(java.nio.ByteBuffer container)
Creates aINPUTinstance at the current position of the specifiedByteBuffercontainer. 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
type
public int type()
the type of the input event. One of:User32.INPUT_MOUSEUser32.INPUT_KEYBOARDUser32.INPUT_HARDWARE
-
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
-
DUMMYUNIONNAME_mi
public INPUT DUMMYUNIONNAME_mi(MOUSEINPUT value)
Copies the specifiedMOUSEINPUTto theDUMMYUNIONNAME_mi()field.
-
DUMMYUNIONNAME_mi
public INPUT DUMMYUNIONNAME_mi(java.util.function.Consumer<MOUSEINPUT> consumer)
Passes theDUMMYUNIONNAME_mi()field to the specifiedConsumer.
-
DUMMYUNIONNAME_ki
public INPUT DUMMYUNIONNAME_ki(KEYBDINPUT value)
Copies the specifiedKEYBDINPUTto theDUMMYUNIONNAME_ki()field.
-
DUMMYUNIONNAME_ki
public INPUT DUMMYUNIONNAME_ki(java.util.function.Consumer<KEYBDINPUT> consumer)
Passes theDUMMYUNIONNAME_ki()field to the specifiedConsumer.
-
DUMMYUNIONNAME_hi
public INPUT DUMMYUNIONNAME_hi(HARDWAREINPUT value)
Copies the specifiedHARDWAREINPUTto theDUMMYUNIONNAME_hi()field.
-
DUMMYUNIONNAME_hi
public INPUT DUMMYUNIONNAME_hi(java.util.function.Consumer<HARDWAREINPUT> consumer)
Passes theDUMMYUNIONNAME_hi()field to the specifiedConsumer.
-
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 newINPUTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static INPUT calloc()
Returns a newINPUTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static INPUT create()
Returns a newINPUTinstance allocated withBufferUtils.
-
create
public static INPUT create(long address)
Returns a newINPUTinstance for the specified memory address.
-
createSafe
@Nullable public static INPUT createSafe(long address)
-
malloc
public static INPUT.Buffer malloc(int capacity)
Returns a newINPUT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static INPUT.Buffer calloc(int capacity)
Returns a newINPUT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static INPUT.Buffer create(int capacity)
Returns a newINPUT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static INPUT.Buffer create(long address, int capacity)
Create aINPUT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static INPUT.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static INPUT mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static INPUT callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static INPUT mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static INPUT callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static INPUT.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static INPUT.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(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. Usemalloc(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. Usecalloc(int, MemoryStack)instead.
-
malloc
public static INPUT malloc(org.lwjgl.system.MemoryStack stack)
Returns a newINPUTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static INPUT calloc(org.lwjgl.system.MemoryStack stack)
Returns a newINPUTinstance allocated on the specifiedMemoryStackand 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 newINPUT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static INPUT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newINPUT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
nDUMMYUNIONNAME_mi
public static MOUSEINPUT nDUMMYUNIONNAME_mi(long struct)
Unsafe version ofDUMMYUNIONNAME_mi().
-
nDUMMYUNIONNAME_ki
public static KEYBDINPUT nDUMMYUNIONNAME_ki(long struct)
Unsafe version ofDUMMYUNIONNAME_ki().
-
nDUMMYUNIONNAME_hi
public static HARDWAREINPUT nDUMMYUNIONNAME_hi(long struct)
Unsafe version ofDUMMYUNIONNAME_hi().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nDUMMYUNIONNAME_mi
public static void nDUMMYUNIONNAME_mi(long struct, MOUSEINPUT value)Unsafe version ofDUMMYUNIONNAME_mi.
-
nDUMMYUNIONNAME_ki
public static void nDUMMYUNIONNAME_ki(long struct, KEYBDINPUT value)Unsafe version ofDUMMYUNIONNAME_ki.
-
nDUMMYUNIONNAME_hi
public static void nDUMMYUNIONNAME_hi(long struct, HARDWAREINPUT value)Unsafe version ofDUMMYUNIONNAME_hi.
-
-