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_MOUSEUser32.INPUT_KEYBOARDUser32.INPUT_HARDWAREDUMMYUNIONNAMEDUMMYUNIONNAME.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 {MOUSEINPUTmi;KEYBDINPUTki;HARDWAREINPUThi; } DUMMYUNIONNAME; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classINPUT.BufferAn array ofINPUTstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
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.-
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 aINPUTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete 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 INPUTcallocStack()Returns a newINPUTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static INPUT.BuffercallocStack(int capacity)Returns a newINPUT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static INPUT.BuffercallocStack(int capacity, MemoryStack stack)Returns a newINPUT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static INPUTcallocStack(MemoryStack stack)Returns a newINPUTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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()Returns aHARDWAREINPUTview of theDUMMYUNIONNAME.hifield.INPUTDUMMYUNIONNAME_hi(java.util.function.Consumer<HARDWAREINPUT> consumer)Passes theDUMMYUNIONNAME.hifield to the specifiedConsumer.INPUTDUMMYUNIONNAME_hi(HARDWAREINPUT value)Copies the specifiedHARDWAREINPUTto theDUMMYUNIONNAME.hifield.KEYBDINPUTDUMMYUNIONNAME_ki()Returns aKEYBDINPUTview of theDUMMYUNIONNAME.kifield.INPUTDUMMYUNIONNAME_ki(java.util.function.Consumer<KEYBDINPUT> consumer)Passes theDUMMYUNIONNAME.kifield to the specifiedConsumer.INPUTDUMMYUNIONNAME_ki(KEYBDINPUT value)Copies the specifiedKEYBDINPUTto theDUMMYUNIONNAME.kifield.MOUSEINPUTDUMMYUNIONNAME_mi()Returns aMOUSEINPUTview of theDUMMYUNIONNAME.mifield.INPUTDUMMYUNIONNAME_mi(java.util.function.Consumer<MOUSEINPUT> consumer)Passes theDUMMYUNIONNAME.mifield to the specifiedConsumer.INPUTDUMMYUNIONNAME_mi(MOUSEINPUT value)Copies the specifiedMOUSEINPUTto theDUMMYUNIONNAME.mifield.static INPUTmalloc()Returns a newINPUTinstance allocated withmemAlloc.static INPUT.Buffermalloc(int capacity)Returns a newINPUT.Bufferinstance allocated withmemAlloc.static INPUTmallocStack()Returns a newINPUTinstance allocated on the thread-localMemoryStack.static INPUT.BuffermallocStack(int capacity)Returns a newINPUT.Bufferinstance allocated on the thread-localMemoryStack.static INPUT.BuffermallocStack(int capacity, MemoryStack stack)Returns a newINPUT.Bufferinstance allocated on the specifiedMemoryStack.static INPUTmallocStack(MemoryStack stack)Returns a newINPUTinstance allocated on the specifiedMemoryStack.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()Returnssizeof(struct).inttype()Returns the value of thetypefield.INPUTtype(int value)Sets the specified value to thetypefield.-
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 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()
Description copied from class:StructReturnssizeof(struct).
-
type
public int type()
Returns the value of thetypefield.
-
DUMMYUNIONNAME_mi
public MOUSEINPUT DUMMYUNIONNAME_mi()
Returns aMOUSEINPUTview of theDUMMYUNIONNAME.mifield.
-
DUMMYUNIONNAME_ki
public KEYBDINPUT DUMMYUNIONNAME_ki()
Returns aKEYBDINPUTview of theDUMMYUNIONNAME.kifield.
-
DUMMYUNIONNAME_hi
public HARDWAREINPUT DUMMYUNIONNAME_hi()
Returns aHARDWAREINPUTview of theDUMMYUNIONNAME.hifield.
-
type
public INPUT type(int value)
Sets the specified value to thetypefield.
-
DUMMYUNIONNAME_mi
public INPUT DUMMYUNIONNAME_mi(MOUSEINPUT value)
Copies the specifiedMOUSEINPUTto theDUMMYUNIONNAME.mifield.
-
DUMMYUNIONNAME_mi
public INPUT DUMMYUNIONNAME_mi(java.util.function.Consumer<MOUSEINPUT> consumer)
Passes theDUMMYUNIONNAME.mifield to the specifiedConsumer.
-
DUMMYUNIONNAME_ki
public INPUT DUMMYUNIONNAME_ki(KEYBDINPUT value)
Copies the specifiedKEYBDINPUTto theDUMMYUNIONNAME.kifield.
-
DUMMYUNIONNAME_ki
public INPUT DUMMYUNIONNAME_ki(java.util.function.Consumer<KEYBDINPUT> consumer)
Passes theDUMMYUNIONNAME.kifield to the specifiedConsumer.
-
DUMMYUNIONNAME_hi
public INPUT DUMMYUNIONNAME_hi(HARDWAREINPUT value)
Copies the specifiedHARDWAREINPUTto theDUMMYUNIONNAME.hifield.
-
DUMMYUNIONNAME_hi
public INPUT DUMMYUNIONNAME_hi(java.util.function.Consumer<HARDWAREINPUT> consumer)
Passes theDUMMYUNIONNAME.hifield 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
public static INPUT mallocStack()
Returns a newINPUTinstance allocated on the thread-localMemoryStack.
-
callocStack
public static INPUT callocStack()
Returns a newINPUTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static INPUT mallocStack(MemoryStack stack)
Returns a newINPUTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static INPUT callocStack(MemoryStack stack)
Returns a newINPUTinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static INPUT.Buffer callocStack(int capacity)
Returns a newINPUT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static INPUT.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newINPUT.Bufferinstance 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.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.
-
-