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.NativeResource
Used 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 { DWORD
type()
; union {MOUSEINPUT
mi
;KEYBDINPUT
ki
;HARDWAREINPUT
hi
; } DUMMYUNIONNAME; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
INPUT.Buffer
An array ofINPUT
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DUMMYUNIONNAME
DUMMYUNIONNAME_HI
DUMMYUNIONNAME_KI
DUMMYUNIONNAME_MIThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
TYPE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description INPUT(java.nio.ByteBuffer container)
Creates aINPUT
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static 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
callocStack()
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)
HARDWAREINPUT
DUMMYUNIONNAME_hi()
the information about a simulated hardware eventINPUT
DUMMYUNIONNAME_hi(java.util.function.Consumer<HARDWAREINPUT> consumer)
Passes theDUMMYUNIONNAME_hi()
field to the specifiedConsumer
.INPUT
DUMMYUNIONNAME_hi(HARDWAREINPUT value)
Copies the specifiedHARDWAREINPUT
to theDUMMYUNIONNAME_hi()
field.KEYBDINPUT
DUMMYUNIONNAME_ki()
the information about a simulated keyboard eventINPUT
DUMMYUNIONNAME_ki(java.util.function.Consumer<KEYBDINPUT> consumer)
Passes theDUMMYUNIONNAME_ki()
field to the specifiedConsumer
.INPUT
DUMMYUNIONNAME_ki(KEYBDINPUT value)
Copies the specifiedKEYBDINPUT
to theDUMMYUNIONNAME_ki()
field.MOUSEINPUT
DUMMYUNIONNAME_mi()
the information about a simulated mouse eventINPUT
DUMMYUNIONNAME_mi(java.util.function.Consumer<MOUSEINPUT> consumer)
Passes theDUMMYUNIONNAME_mi()
field to the specifiedConsumer
.INPUT
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
mallocStack()
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
.INPUT
set(INPUT src)
Copies the specified struct data to this struct.int
sizeof()
int
type()
the type of the input event.INPUT
type(int value)
Sets the specified value to thetype()
field.
-
-
-
Constructor Detail
-
INPUT
public INPUT(java.nio.ByteBuffer container)
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 Detail
-
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
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 specifiedMOUSEINPUT
to 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 specifiedKEYBDINPUT
to 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 specifiedHARDWAREINPUT
to 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 newINPUT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static INPUT calloc()
Returns a newINPUT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static INPUT create()
Returns a newINPUT
instance allocated withBufferUtils
.
-
create
public static INPUT create(long address)
Returns a newINPUT
instance for the specified memory address.
-
createSafe
@Nullable public static INPUT createSafe(long address)
-
malloc
public static INPUT.Buffer malloc(int capacity)
Returns a newINPUT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static INPUT.Buffer calloc(int capacity)
Returns a newINPUT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static INPUT.Buffer create(int capacity)
Returns a newINPUT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static INPUT.Buffer create(long address, int capacity)
Create aINPUT.Buffer
instance 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 newINPUT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static INPUT calloc(org.lwjgl.system.MemoryStack stack)
Returns a newINPUT
instance allocated on the specifiedMemoryStack
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 newINPUT.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-
-