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
,NativeResource
,Pointer
public class INPUT extends Struct implements 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.Member documentation
type
– the type of the input event. One of:User32.INPUT_MOUSE
User32.INPUT_KEYBOARD
User32.INPUT_HARDWARE
DUMMYUNIONNAME
DUMMYUNIONNAME.mi
– the information about a simulated mouse eventDUMMYUNIONNAME.ki
– the information about a simulated keyboard eventDUMMYUNIONNAME.hi
– the information about a simulated hardware event
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.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
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.-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
-
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 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
callocStack()
Returns a newINPUT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static INPUT.Buffer
callocStack(int capacity)
Returns a newINPUT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static INPUT.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newINPUT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static INPUT
callocStack(MemoryStack stack)
Returns a newINPUT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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()
Returns aHARDWAREINPUT
view of theDUMMYUNIONNAME.hi
field.INPUT
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()
Returns aKEYBDINPUT
view of theDUMMYUNIONNAME.ki
field.INPUT
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()
Returns aMOUSEINPUT
view of theDUMMYUNIONNAME.mi
field.INPUT
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
mallocStack()
Returns a newINPUT
instance allocated on the thread-localMemoryStack
.static INPUT.Buffer
mallocStack(int capacity)
Returns a newINPUT.Buffer
instance allocated on the thread-localMemoryStack
.static INPUT.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newINPUT.Buffer
instance allocated on the specifiedMemoryStack
.static INPUT
mallocStack(MemoryStack stack)
Returns a newINPUT
instance allocated on the specifiedMemoryStack
.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()
Returnssizeof(struct)
.int
type()
Returns the value of thetype
field.INPUT
type(int value)
Sets the specified value to thetype
field.-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
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()
Description copied from class:Struct
Returnssizeof(struct)
.
-
type
public int type()
Returns the value of thetype
field.
-
DUMMYUNIONNAME_mi
public MOUSEINPUT DUMMYUNIONNAME_mi()
Returns aMOUSEINPUT
view of theDUMMYUNIONNAME.mi
field.
-
DUMMYUNIONNAME_ki
public KEYBDINPUT DUMMYUNIONNAME_ki()
Returns aKEYBDINPUT
view of theDUMMYUNIONNAME.ki
field.
-
DUMMYUNIONNAME_hi
public HARDWAREINPUT DUMMYUNIONNAME_hi()
Returns aHARDWAREINPUT
view of theDUMMYUNIONNAME.hi
field.
-
type
public INPUT type(int value)
Sets the specified value to thetype
field.
-
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
public static INPUT mallocStack()
Returns a newINPUT
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static INPUT callocStack()
Returns a newINPUT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static INPUT mallocStack(MemoryStack stack)
Returns a newINPUT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static INPUT callocStack(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
-
mallocStack
public static INPUT.Buffer mallocStack(int capacity)
Returns a newINPUT.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static INPUT.Buffer callocStack(int capacity)
Returns a newINPUT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static INPUT.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newINPUT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static INPUT.Buffer callocStack(int capacity, 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
.
-
-