Top Description Inners Fields Constructors Methods
org.lwjgl.system.windows

public Class INPUT

extends Struct<INPUT>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Used by User32#SendInput 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 and Inner Type Summary

Modifier and TypeClass and Description
public static class
INPUT.Buffer

An array of INPUT structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
DUMMYUNIONNAME

The struct member offsets.

public static final int
DUMMYUNIONNAME_HI

The struct member offsets.

public static final int
DUMMYUNIONNAME_KI

The struct member offsets.

public static final int
DUMMYUNIONNAME_MI

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
TYPE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
INPUT(long address, ByteBuffer container)

public
INPUT(ByteBuffer container)

Creates a INPUT instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static INPUT
calloc()

Returns a new INPUT instance allocated with memCalloc.

public static INPUT.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new INPUT.Buffer instance allocated with memCalloc.

public static INPUT
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new INPUT instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static INPUT.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new INPUT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static INPUT
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static INPUT
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static INPUT.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static INPUT.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected INPUT
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static INPUT
create()

Returns a new INPUT instance allocated with BufferUtils.

public static INPUT
create(long address)

Returns a new INPUT instance for the specified memory address.

public static INPUT.Buffer
create(int
the buffer capacity
capacity
)

Returns a new INPUT.Buffer instance allocated with BufferUtils.

public static INPUT.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a INPUT.Buffer instance at the specified memory.

public static INPUT
createSafe(long address)

Like create, but returns null if address is NULL.

public static INPUT.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public HARDWAREINPUT
DUMMYUNIONNAME_hi()

the information about a simulated hardware event

public INPUT
DUMMYUNIONNAME_hi(HARDWAREINPUT value)

Copies the specified HARDWAREINPUT to the DUMMYUNIONNAME_hi field.

public INPUT
DUMMYUNIONNAME_hi(Consumer<HARDWAREINPUT> consumer)

Passes the DUMMYUNIONNAME_hi field to the specified Consumer.

public KEYBDINPUT
DUMMYUNIONNAME_ki()

the information about a simulated keyboard event

public INPUT
DUMMYUNIONNAME_ki(KEYBDINPUT value)

Copies the specified KEYBDINPUT to the DUMMYUNIONNAME_ki field.

public INPUT
DUMMYUNIONNAME_ki(Consumer<KEYBDINPUT> consumer)

Passes the DUMMYUNIONNAME_ki field to the specified Consumer.

public MOUSEINPUT
DUMMYUNIONNAME_mi()

the information about a simulated mouse event

public INPUT
DUMMYUNIONNAME_mi(MOUSEINPUT value)

Copies the specified MOUSEINPUT to the DUMMYUNIONNAME_mi field.

public INPUT
DUMMYUNIONNAME_mi(Consumer<MOUSEINPUT> consumer)

Passes the DUMMYUNIONNAME_mi field to the specified Consumer.

public static INPUT
malloc()

Returns a new INPUT instance allocated with memAlloc.

public static INPUT.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new INPUT.Buffer instance allocated with memAlloc.

public static INPUT
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new INPUT instance allocated on the specified MemoryStack.

public static INPUT.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new INPUT.Buffer instance allocated on the specified MemoryStack.

public static INPUT
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static INPUT
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static INPUT.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static INPUT.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static HARDWAREINPUT
nDUMMYUNIONNAME_hi(long struct)

Unsafe version of DUMMYUNIONNAME_hi.

public static void
nDUMMYUNIONNAME_hi(long struct, HARDWAREINPUT value)

Unsafe version of DUMMYUNIONNAME_hi.

public static KEYBDINPUT
nDUMMYUNIONNAME_ki(long struct)

Unsafe version of DUMMYUNIONNAME_ki.

public static void
nDUMMYUNIONNAME_ki(long struct, KEYBDINPUT value)

Unsafe version of DUMMYUNIONNAME_ki.

public static MOUSEINPUT
nDUMMYUNIONNAME_mi(long struct)

Unsafe version of DUMMYUNIONNAME_mi.

public static void
nDUMMYUNIONNAME_mi(long struct, MOUSEINPUT value)

Unsafe version of DUMMYUNIONNAME_mi.

public static int
ntype(long struct)

Unsafe version of type.

public static void
ntype(long struct, int value)

Unsafe version of type.

public INPUT

Returns:

this struct
set
(INPUT
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
type()

the type of the input event.

public INPUT
type(int value)

Sets the specified value to the type field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

DUMMYUNIONNAMEback to summary
public static final int DUMMYUNIONNAME

The struct member offsets.

DUMMYUNIONNAME_HIback to summary
public static final int DUMMYUNIONNAME_HI

The struct member offsets.

DUMMYUNIONNAME_KIback to summary
public static final int DUMMYUNIONNAME_KI

The struct member offsets.

DUMMYUNIONNAME_MIback to summary
public static final int DUMMYUNIONNAME_MI

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

TYPEback to summary
public static final int TYPE

The struct member offsets.

Constructor Detail

INPUTback to summary
protected INPUT(long address, ByteBuffer container)
INPUTback to summary
public INPUT(ByteBuffer container)

Creates a INPUT instance at the current position of the specified ByteBuffer 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

callocback to summary
public static INPUT calloc()

Returns a new INPUT instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static INPUT.Buffer calloc(int capacity)

Returns a new INPUT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static INPUT calloc(MemoryStack stack)

Returns a new INPUT instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static INPUT.Buffer calloc(int capacity, MemoryStack stack)

Returns a new INPUT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static INPUT callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static INPUT callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static INPUT.Buffer callocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static INPUT.Buffer callocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
createback to summary
protected INPUT create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static INPUT create()

Returns a new INPUT instance allocated with BufferUtils.

createback to summary
public static INPUT create(long address)

Returns a new INPUT instance for the specified memory address.

createback to summary
public static INPUT.Buffer create(int capacity)

Returns a new INPUT.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static INPUT.Buffer create(long address, int capacity)

Create a INPUT.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static INPUT createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static INPUT.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
DUMMYUNIONNAME_hiback to summary
public HARDWAREINPUT DUMMYUNIONNAME_hi()

the information about a simulated hardware event

DUMMYUNIONNAME_hiback to summary
public INPUT DUMMYUNIONNAME_hi(HARDWAREINPUT value)

Copies the specified HARDWAREINPUT to the DUMMYUNIONNAME_hi field.

DUMMYUNIONNAME_hiback to summary
public INPUT DUMMYUNIONNAME_hi(Consumer<HARDWAREINPUT> consumer)

Passes the DUMMYUNIONNAME_hi field to the specified Consumer.

DUMMYUNIONNAME_kiback to summary
public KEYBDINPUT DUMMYUNIONNAME_ki()

the information about a simulated keyboard event

DUMMYUNIONNAME_kiback to summary
public INPUT DUMMYUNIONNAME_ki(KEYBDINPUT value)

Copies the specified KEYBDINPUT to the DUMMYUNIONNAME_ki field.

DUMMYUNIONNAME_kiback to summary
public INPUT DUMMYUNIONNAME_ki(Consumer<KEYBDINPUT> consumer)

Passes the DUMMYUNIONNAME_ki field to the specified Consumer.

DUMMYUNIONNAME_miback to summary
public MOUSEINPUT DUMMYUNIONNAME_mi()

the information about a simulated mouse event

DUMMYUNIONNAME_miback to summary
public INPUT DUMMYUNIONNAME_mi(MOUSEINPUT value)

Copies the specified MOUSEINPUT to the DUMMYUNIONNAME_mi field.

DUMMYUNIONNAME_miback to summary
public INPUT DUMMYUNIONNAME_mi(Consumer<MOUSEINPUT> consumer)

Passes the DUMMYUNIONNAME_mi field to the specified Consumer.

mallocback to summary
public static INPUT malloc()

Returns a new INPUT instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static INPUT.Buffer malloc(int capacity)

Returns a new INPUT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static INPUT malloc(MemoryStack stack)

Returns a new INPUT instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static INPUT.Buffer malloc(int capacity, MemoryStack stack)

Returns a new INPUT.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static INPUT mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static INPUT mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static INPUT.Buffer mallocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static INPUT.Buffer mallocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
nDUMMYUNIONNAME_hiback to summary
public static HARDWAREINPUT nDUMMYUNIONNAME_hi(long struct)

Unsafe version of DUMMYUNIONNAME_hi.

nDUMMYUNIONNAME_hiback to summary
public static void nDUMMYUNIONNAME_hi(long struct, HARDWAREINPUT value)

Unsafe version of DUMMYUNIONNAME_hi.

nDUMMYUNIONNAME_kiback to summary
public static KEYBDINPUT nDUMMYUNIONNAME_ki(long struct)

Unsafe version of DUMMYUNIONNAME_ki.

nDUMMYUNIONNAME_kiback to summary
public static void nDUMMYUNIONNAME_ki(long struct, KEYBDINPUT value)

Unsafe version of DUMMYUNIONNAME_ki.

nDUMMYUNIONNAME_miback to summary
public static MOUSEINPUT nDUMMYUNIONNAME_mi(long struct)

Unsafe version of DUMMYUNIONNAME_mi.

nDUMMYUNIONNAME_miback to summary
public static void nDUMMYUNIONNAME_mi(long struct, MOUSEINPUT value)

Unsafe version of DUMMYUNIONNAME_mi.

ntypeback to summary
public static int ntype(long struct)

Unsafe version of type.

ntypeback to summary
public static void ntype(long struct, int value)

Unsafe version of type.

setback to summary
public INPUT set(INPUT src)

Copies the specified struct data to this struct.

Parameters
src:INPUT

the source struct

Returns:INPUT

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
typeback to summary
public int type()

the type of the input event. One of:

User32#INPUT_MOUSEUser32#INPUT_KEYBOARDUser32#INPUT_HARDWARE
Annotations
@NativeType:DWORD
typeback to summary
public INPUT type(int value)

Sets the specified value to the type field.

org.lwjgl.system.windows back to summary

public Class INPUT.Buffer

extends StructBuffer<INPUT, INPUT.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of INPUT structs.

Field Summary

Modifier and TypeField and Description
private static final INPUT

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new INPUT.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public HARDWAREINPUT
public INPUT.Buffer
DUMMYUNIONNAME_hi(HARDWAREINPUT value)

Copies the specified HARDWAREINPUT to the INPUT#DUMMYUNIONNAME_hi field.

public INPUT.Buffer
DUMMYUNIONNAME_hi(Consumer<HARDWAREINPUT> consumer)

Passes the INPUT#DUMMYUNIONNAME_hi field to the specified Consumer.

public KEYBDINPUT

Returns:

a KEYBDINPUT view of the INPUT#DUMMYUNIONNAME_ki field.
DUMMYUNIONNAME_ki
()

public INPUT.Buffer
DUMMYUNIONNAME_ki(KEYBDINPUT value)

Copies the specified KEYBDINPUT to the INPUT#DUMMYUNIONNAME_ki field.

public INPUT.Buffer
DUMMYUNIONNAME_ki(Consumer<KEYBDINPUT> consumer)

Passes the INPUT#DUMMYUNIONNAME_ki field to the specified Consumer.

public MOUSEINPUT

Returns:

a MOUSEINPUT view of the INPUT#DUMMYUNIONNAME_mi field.
DUMMYUNIONNAME_mi
()

public INPUT.Buffer
DUMMYUNIONNAME_mi(MOUSEINPUT value)

Copies the specified MOUSEINPUT to the INPUT#DUMMYUNIONNAME_mi field.

public INPUT.Buffer
DUMMYUNIONNAME_mi(Consumer<MOUSEINPUT> consumer)

Passes the INPUT#DUMMYUNIONNAME_mi field to the specified Consumer.

protected INPUT
protected INPUT.Buffer
public int

Returns:

the value of the INPUT#type field.
type
()

public INPUT.Buffer
type(int value)

Sets the specified value to the INPUT#type field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final INPUT ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new INPUT.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by INPUT#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

DUMMYUNIONNAME_hiback to summary
public HARDWAREINPUT DUMMYUNIONNAME_hi()
Returns:HARDWAREINPUT

a HARDWAREINPUT view of the INPUT#DUMMYUNIONNAME_hi field.

DUMMYUNIONNAME_hiback to summary
public INPUT.Buffer DUMMYUNIONNAME_hi(HARDWAREINPUT value)

Copies the specified HARDWAREINPUT to the INPUT#DUMMYUNIONNAME_hi field.

DUMMYUNIONNAME_hiback to summary
public INPUT.Buffer DUMMYUNIONNAME_hi(Consumer<HARDWAREINPUT> consumer)

Passes the INPUT#DUMMYUNIONNAME_hi field to the specified Consumer.

DUMMYUNIONNAME_kiback to summary
public KEYBDINPUT DUMMYUNIONNAME_ki()
Returns:KEYBDINPUT

a KEYBDINPUT view of the INPUT#DUMMYUNIONNAME_ki field.

DUMMYUNIONNAME_kiback to summary
public INPUT.Buffer DUMMYUNIONNAME_ki(KEYBDINPUT value)

Copies the specified KEYBDINPUT to the INPUT#DUMMYUNIONNAME_ki field.

DUMMYUNIONNAME_kiback to summary
public INPUT.Buffer DUMMYUNIONNAME_ki(Consumer<KEYBDINPUT> consumer)

Passes the INPUT#DUMMYUNIONNAME_ki field to the specified Consumer.

DUMMYUNIONNAME_miback to summary
public MOUSEINPUT DUMMYUNIONNAME_mi()
Returns:MOUSEINPUT

a MOUSEINPUT view of the INPUT#DUMMYUNIONNAME_mi field.

DUMMYUNIONNAME_miback to summary
public INPUT.Buffer DUMMYUNIONNAME_mi(MOUSEINPUT value)

Copies the specified MOUSEINPUT to the INPUT#DUMMYUNIONNAME_mi field.

DUMMYUNIONNAME_miback to summary
public INPUT.Buffer DUMMYUNIONNAME_mi(Consumer<MOUSEINPUT> consumer)

Passes the INPUT#DUMMYUNIONNAME_mi field to the specified Consumer.

getElementFactoryback to summary
protected INPUT getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
selfback to summary
protected INPUT.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
typeback to summary
public int type()
Returns:int

the value of the INPUT#type field.

Annotations
@NativeType:DWORD
typeback to summary
public INPUT.Buffer type(int value)

Sets the specified value to the INPUT#type field.