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:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class INPUT
extends org.lwjgl.system.Struct
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 classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionINPUT
(ByteBuffer container) Creates aINPUT
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic INPUT
calloc()
Returns a newINPUT
instance allocated withmemCalloc
.static INPUT.Buffer
calloc
(int capacity) Returns a newINPUT.Buffer
instance allocated withmemCalloc
.static INPUT.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newINPUT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static INPUT
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newINPUT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static INPUT
Deprecated.static INPUT.Buffer
callocStack
(int capacity) Deprecated.static INPUT.Buffer
callocStack
(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static INPUT
callocStack
(org.lwjgl.system.MemoryStack stack) Deprecated.static INPUT
create()
Returns a newINPUT
instance allocated withBufferUtils
.static INPUT.Buffer
create
(int capacity) Returns a newINPUT.Buffer
instance allocated withBufferUtils
.static INPUT
create
(long address) Returns a newINPUT
instance for the specified memory address.static INPUT.Buffer
create
(long address, int capacity) Create aINPUT.Buffer
instance at the specified memory.static INPUT
createSafe
(long address) static INPUT.Buffer
createSafe
(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 specifiedHARDWAREINPUT
to 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 specifiedKEYBDINPUT
to 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 specifiedMOUSEINPUT
to theDUMMYUNIONNAME_mi()
field.static INPUT
malloc()
Returns a newINPUT
instance allocated withmemAlloc
.static INPUT.Buffer
malloc
(int capacity) Returns a newINPUT.Buffer
instance allocated withmemAlloc
.static INPUT.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newINPUT.Buffer
instance allocated on the specifiedMemoryStack
.static INPUT
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newINPUT
instance allocated on the specifiedMemoryStack
.static INPUT
Deprecated.static INPUT.Buffer
mallocStack
(int capacity) Deprecated.static INPUT.Buffer
mallocStack
(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static INPUT
mallocStack
(org.lwjgl.system.MemoryStack stack) Deprecated.static HARDWAREINPUT
nDUMMYUNIONNAME_hi
(long struct) Unsafe version ofDUMMYUNIONNAME_hi()
.static void
nDUMMYUNIONNAME_hi
(long struct, HARDWAREINPUT value) Unsafe version ofDUMMYUNIONNAME_hi
.static KEYBDINPUT
nDUMMYUNIONNAME_ki
(long struct) Unsafe version ofDUMMYUNIONNAME_ki()
.static void
nDUMMYUNIONNAME_ki
(long struct, KEYBDINPUT value) Unsafe version ofDUMMYUNIONNAME_ki
.static MOUSEINPUT
nDUMMYUNIONNAME_mi
(long struct) Unsafe version ofDUMMYUNIONNAME_mi()
.static void
nDUMMYUNIONNAME_mi
(long struct, MOUSEINPUT value) Unsafe version ofDUMMYUNIONNAME_mi
.static int
ntype
(long struct) Unsafe version oftype()
.static void
ntype
(long struct, int value) Unsafe version oftype
.Copies the specified struct data to this struct.int
sizeof()
int
type()
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
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aINPUT
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
type
public int type()the type of the input event. One of:User32.INPUT_MOUSE
User32.INPUT_KEYBOARD
User32.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 specifiedMOUSEINPUT
to theDUMMYUNIONNAME_mi()
field. -
DUMMYUNIONNAME_mi
Passes theDUMMYUNIONNAME_mi()
field to the specifiedConsumer
. -
DUMMYUNIONNAME_ki
Copies the specifiedKEYBDINPUT
to theDUMMYUNIONNAME_ki()
field. -
DUMMYUNIONNAME_ki
Passes theDUMMYUNIONNAME_ki()
field to the specifiedConsumer
. -
DUMMYUNIONNAME_hi
Copies the specifiedHARDWAREINPUT
to 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 newINPUT
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newINPUT
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newINPUT
instance allocated withBufferUtils
. -
create
Returns a newINPUT
instance for the specified memory address. -
createSafe
-
malloc
Returns a newINPUT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newINPUT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newINPUT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aINPUT.Buffer
instance 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 newINPUT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newINPUT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newINPUT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newINPUT.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-