Package org.lwjgl.system.windows
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;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionINPUT(ByteBuffer container) Creates aINPUTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 INPUTDeprecated.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 @Nullable INPUTcreateSafe(long address) static @Nullable INPUT.BuffercreateSafe(long address, int capacity) the information about a simulated hardware eventDUMMYUNIONNAME_hi(Consumer<HARDWAREINPUT> consumer) Passes theDUMMYUNIONNAME_hi()field to the specifiedConsumer.DUMMYUNIONNAME_hi(HARDWAREINPUT value) Copies the specifiedHARDWAREINPUTto theDUMMYUNIONNAME_hi()field.the information about a simulated keyboard eventDUMMYUNIONNAME_ki(Consumer<KEYBDINPUT> consumer) Passes theDUMMYUNIONNAME_ki()field to the specifiedConsumer.DUMMYUNIONNAME_ki(KEYBDINPUT value) Copies the specifiedKEYBDINPUTto theDUMMYUNIONNAME_ki()field.the information about a simulated mouse eventDUMMYUNIONNAME_mi(Consumer<MOUSEINPUT> consumer) Passes theDUMMYUNIONNAME_mi()field to the specifiedConsumer.DUMMYUNIONNAME_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 INPUTDeprecated.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.Copies the specified struct data to this struct.intsizeof()inttype()the type of the input event.type(int value) Sets the specified value to thetype()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
TYPE
public static final int TYPEThe struct member offsets. -
DUMMYUNIONNAME
public static final int DUMMYUNIONNAMEThe struct member offsets. -
DUMMYUNIONNAME_MI
public static final int DUMMYUNIONNAME_MIThe struct member offsets. -
DUMMYUNIONNAME_KI
public static final int DUMMYUNIONNAME_KIThe struct member offsets. -
DUMMYUNIONNAME_HI
public static final int DUMMYUNIONNAME_HIThe struct member offsets.
-
-
Constructor Details
-
INPUT
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<INPUT>
-
type
public int type()the type of the input event. One of:User32.INPUT_MOUSEUser32.INPUT_KEYBOARDUser32.INPUT_HARDWARE -
DUMMYUNIONNAME_mi
the information about a simulated mouse event -
DUMMYUNIONNAME_ki
the information about a simulated keyboard event -
DUMMYUNIONNAME_hi
the information about a simulated hardware event -
type
Sets the specified value to thetype()field. -
DUMMYUNIONNAME_mi
Copies the specifiedMOUSEINPUTto theDUMMYUNIONNAME_mi()field. -
DUMMYUNIONNAME_mi
Passes theDUMMYUNIONNAME_mi()field to the specifiedConsumer. -
DUMMYUNIONNAME_ki
Copies the specifiedKEYBDINPUTto theDUMMYUNIONNAME_ki()field. -
DUMMYUNIONNAME_ki
Passes theDUMMYUNIONNAME_ki()field to the specifiedConsumer. -
DUMMYUNIONNAME_hi
Copies the specifiedHARDWAREINPUTto theDUMMYUNIONNAME_hi()field. -
DUMMYUNIONNAME_hi
Passes theDUMMYUNIONNAME_hi()field to the specifiedConsumer. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newINPUTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newINPUTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newINPUTinstance allocated withBufferUtils. -
create
Returns a newINPUTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newINPUT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newINPUT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newINPUT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aINPUT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
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
Returns a newINPUTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newINPUTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newINPUT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newINPUT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ntype
public static int ntype(long struct) Unsafe version oftype(). -
nDUMMYUNIONNAME_mi
Unsafe version ofDUMMYUNIONNAME_mi(). -
nDUMMYUNIONNAME_ki
Unsafe version ofDUMMYUNIONNAME_ki(). -
nDUMMYUNIONNAME_hi
Unsafe version ofDUMMYUNIONNAME_hi(). -
ntype
public static void ntype(long struct, int value) Unsafe version oftype. -
nDUMMYUNIONNAME_mi
Unsafe version ofDUMMYUNIONNAME_mi. -
nDUMMYUNIONNAME_ki
Unsafe version ofDUMMYUNIONNAME_ki. -
nDUMMYUNIONNAME_hi
Unsafe version ofDUMMYUNIONNAME_hi.
-