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

public Class MOUSEINPUT

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

Contains information about a simulated mouse event.

Layout


struct MOUSEINPUT {
    LONG dx;
    LONG dy;
    DWORD mouseData;
    DWORD dwFlags;
    DWORD time;
    ULONG_PTR dwExtraInfo;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
MOUSEINPUT.Buffer

An array of MOUSEINPUT structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
DWEXTRAINFO

The struct member offsets.

public static final int
DWFLAGS

The struct member offsets.

public static final int
DX

The struct member offsets.

public static final int
DY

The struct member offsets.

public static final int
MOUSEDATA

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
TIME

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

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

public
MOUSEINPUT(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static MOUSEINPUT
calloc()

Returns a new MOUSEINPUT instance allocated with memCalloc.

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

Returns a new MOUSEINPUT.Buffer instance allocated with memCalloc.

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

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

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

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

public static MOUSEINPUT
callocStack()

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

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

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

Deprecated
Deprecated for removal in 3.4.0.
protected MOUSEINPUT
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 MOUSEINPUT
create()

Returns a new MOUSEINPUT instance allocated with BufferUtils.

public static MOUSEINPUT
create(long address)

Returns a new MOUSEINPUT instance for the specified memory address.

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

Returns a new MOUSEINPUT.Buffer instance allocated with BufferUtils.

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

Create a MOUSEINPUT.Buffer instance at the specified memory.

public static MOUSEINPUT
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public long
dwExtraInfo()

an additional value associated with the mouse event.

public MOUSEINPUT
dwExtraInfo(long value)

Sets the specified value to the dwExtraInfo field.

public int
dwFlags()

A set of bit flags that specify various aspects of mouse motion and button clicks.

public MOUSEINPUT
dwFlags(int value)

Sets the specified value to the dwFlags field.

public int
dx()

the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the dwFlags member.

public MOUSEINPUT
dx(int value)

Sets the specified value to the dx field.

public int
dy()

the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the dwFlags member.

public MOUSEINPUT
dy(int value)

Sets the specified value to the dy field.

public static MOUSEINPUT
malloc()

Returns a new MOUSEINPUT instance allocated with memAlloc.

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

Returns a new MOUSEINPUT.Buffer instance allocated with memAlloc.

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

Returns a new MOUSEINPUT instance allocated on the specified MemoryStack.

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

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

public static MOUSEINPUT
mallocStack()

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

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

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

Deprecated
Deprecated for removal in 3.4.0.
public int
mouseData()

If dwFlags contains User32#MOUSEEVENTF_WHEEL, then mouseData specifies the amount of wheel movement.

public MOUSEINPUT
mouseData(int value)

Sets the specified value to the mouseData field.

public static long
ndwExtraInfo(long struct)

Unsafe version of dwExtraInfo.

public static void
ndwExtraInfo(long struct, long value)

Unsafe version of dwExtraInfo.

public static int
ndwFlags(long struct)

Unsafe version of dwFlags.

public static void
ndwFlags(long struct, int value)

Unsafe version of dwFlags.

public static int
ndx(long struct)

Unsafe version of dx.

public static void
ndx(long struct, int value)

Unsafe version of dx.

public static int
ndy(long struct)

Unsafe version of dy.

public static void
ndy(long struct, int value)

Unsafe version of dy.

public static int
nmouseData(long struct)

Unsafe version of mouseData.

public static void
nmouseData(long struct, int value)

Unsafe version of mouseData.

public static int
ntime(long struct)

Unsafe version of time.

public static void
ntime(long struct, int value)

Unsafe version of time.

public MOUSEINPUT
set(int dx, int dy, int mouseData, int dwFlags, int time, long dwExtraInfo)

Initializes this struct with the specified values.

public MOUSEINPUT

Returns:

this struct
set
(MOUSEINPUT
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
time()

the time stamp for the event, in milliseconds.

public MOUSEINPUT
time(int value)

Sets the specified value to the time 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.

DWEXTRAINFOback to summary
public static final int DWEXTRAINFO

The struct member offsets.

DWFLAGSback to summary
public static final int DWFLAGS

The struct member offsets.

DXback to summary
public static final int DX

The struct member offsets.

DYback to summary
public static final int DY

The struct member offsets.

MOUSEDATAback to summary
public static final int MOUSEDATA

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

TIMEback to summary
public static final int TIME

The struct member offsets.

Constructor Detail

MOUSEINPUTback to summary
protected MOUSEINPUT(long address, ByteBuffer container)
MOUSEINPUTback to summary
public MOUSEINPUT(ByteBuffer container)

Creates a MOUSEINPUT 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 MOUSEINPUT calloc()

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

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

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

Parameters
capacity:int

the buffer capacity

callocback to summary
public static MOUSEINPUT calloc(MemoryStack stack)

Returns a new MOUSEINPUT 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 MOUSEINPUT.Buffer calloc(int capacity, MemoryStack stack)

Returns a new MOUSEINPUT.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 MOUSEINPUT callocStack()

Deprecated

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

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

Deprecated

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

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

Deprecated

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

Annotations
@Deprecated
callocStackback to summary
public static MOUSEINPUT.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 MOUSEINPUT 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 MOUSEINPUT create()

Returns a new MOUSEINPUT instance allocated with BufferUtils.

createback to summary
public static MOUSEINPUT create(long address)

Returns a new MOUSEINPUT instance for the specified memory address.

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

Returns a new MOUSEINPUT.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

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

Create a MOUSEINPUT.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static MOUSEINPUT createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

Annotations
@Nullable
dwExtraInfoback to summary
public long dwExtraInfo()

an additional value associated with the mouse event. An application calls User32#GetMessageExtraInfo to obtain this extra information.

Annotations
@NativeType:ULONG_PTR
dwExtraInfoback to summary
public MOUSEINPUT dwExtraInfo(long value)

Sets the specified value to the dwExtraInfo field.

dwFlagsback to summary
public int dwFlags()

A set of bit flags that specify various aspects of mouse motion and button clicks.

The bit flags that specify mouse button status are set to indicate changes in status, not ongoing conditions. For example, if the left mouse button is pressed and held down, User32#MOUSEEVENTF_LEFTDOWN is set when the left button is first pressed, but not for subsequent motions. Similarly, User32#MOUSEEVENTF_LEFTUP is set only when the button is first released.

You cannot specify both the User32#MOUSEEVENTF_WHEEL flag and either User32#MOUSEEVENTF_XDOWN or User32#MOUSEEVENTF_XUP flags simultaneously in the dwFlags parameter, because they both require use of the mouseData field. One of:

User32#MOUSEEVENTF_ABSOLUTEUser32#MOUSEEVENTF_HWHEELUser32#MOUSEEVENTF_MOVEUser32#MOUSEEVENTF_MOVE_NOCOALESCE
User32#MOUSEEVENTF_LEFTDOWNUser32#MOUSEEVENTF_LEFTUPUser32#MOUSEEVENTF_RIGHTDOWNUser32#MOUSEEVENTF_RIGHTUP
User32#MOUSEEVENTF_MIDDLEDOWNUser32#MOUSEEVENTF_MIDDLEUPUser32#MOUSEEVENTF_VIRTUALDESKUser32#MOUSEEVENTF_WHEEL
User32#MOUSEEVENTF_XDOWNUser32#MOUSEEVENTF_XUP
Annotations
@NativeType:DWORD
dwFlagsback to summary
public MOUSEINPUT dwFlags(int value)

Sets the specified value to the dwFlags field.

dxback to summary
public int dx()

the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the dwFlags member.

Absolute data is specified as the x coordinate of the mouse; relative data is specified as the number of pixels moved.

Annotations
@NativeType:LONG
dxback to summary
public MOUSEINPUT dx(int value)

Sets the specified value to the dx field.

dyback to summary
public int dy()

the absolute position of the mouse, or the amount of motion since the last mouse event was generated, depending on the value of the dwFlags member.

Absolute data is specified as the y coordinate of the mouse; relative data is specified as the number of pixels moved.

Annotations
@NativeType:LONG
dyback to summary
public MOUSEINPUT dy(int value)

Sets the specified value to the dy field.

mallocback to summary
public static MOUSEINPUT malloc()

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

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

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

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static MOUSEINPUT malloc(MemoryStack stack)

Returns a new MOUSEINPUT instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

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

Returns a new MOUSEINPUT.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 MOUSEINPUT mallocStack()

Deprecated

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

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

Deprecated

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

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

Deprecated

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

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

Deprecated

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

Annotations
@Deprecated
mouseDataback to summary
public int mouseData()

If dwFlags contains User32#MOUSEEVENTF_WHEEL, then mouseData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. One wheel click is defined as User32#WHEEL_DELTA, which is 120.

Windows Vista: If dwFlags contains User32#MOUSEEVENTF_HWHEEL, then dwData specifies the amount of wheel movement. A positive value indicates that the wheel was rotated to the right; a negative value indicates that the wheel was rotated to the left. One wheel click is defined as WHEEL_DELTA, which is 120.

If dwFlags does not contain User32#MOUSEEVENTF_WHEEL, User32#MOUSEEVENTF_XDOWN, or User32#MOUSEEVENTF_XUP, then mouseData should be zero.

If dwFlags contains User32#MOUSEEVENTF_XDOWN or User32#MOUSEEVENTF_XUP, then mouseData specifies which X buttons were pressed or released. This value may be any combination of the following flags: User32#XBUTTON1, User32#XBUTTON2. One of:

User32#XBUTTON1User32#XBUTTON2
Annotations
@NativeType:DWORD
mouseDataback to summary
public MOUSEINPUT mouseData(int value)

Sets the specified value to the mouseData field.

ndwExtraInfoback to summary
public static long ndwExtraInfo(long struct)

Unsafe version of dwExtraInfo.

ndwExtraInfoback to summary
public static void ndwExtraInfo(long struct, long value)

Unsafe version of dwExtraInfo.

ndwFlagsback to summary
public static int ndwFlags(long struct)

Unsafe version of dwFlags.

ndwFlagsback to summary
public static void ndwFlags(long struct, int value)

Unsafe version of dwFlags.

ndxback to summary
public static int ndx(long struct)

Unsafe version of dx.

ndxback to summary
public static void ndx(long struct, int value)

Unsafe version of dx.

ndyback to summary
public static int ndy(long struct)

Unsafe version of dy.

ndyback to summary
public static void ndy(long struct, int value)

Unsafe version of dy.

nmouseDataback to summary
public static int nmouseData(long struct)

Unsafe version of mouseData.

nmouseDataback to summary
public static void nmouseData(long struct, int value)

Unsafe version of mouseData.

ntimeback to summary
public static int ntime(long struct)

Unsafe version of time.

ntimeback to summary
public static void ntime(long struct, int value)

Unsafe version of time.

setback to summary
public MOUSEINPUT set(int dx, int dy, int mouseData, int dwFlags, int time, long dwExtraInfo)

Initializes this struct with the specified values.

setback to summary
public MOUSEINPUT set(MOUSEINPUT src)

Copies the specified struct data to this struct.

Parameters
src:MOUSEINPUT

the source struct

Returns:MOUSEINPUT

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
timeback to summary
public int time()

the time stamp for the event, in milliseconds. If this parameter is 0, the system will provide its own time stamp.

Annotations
@NativeType:DWORD
timeback to summary
public MOUSEINPUT time(int value)

Sets the specified value to the time field.

org.lwjgl.system.windows back to summary

public Class MOUSEINPUT.Buffer

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

An array of MOUSEINPUT structs.

Field Summary

Modifier and TypeField and Description
private static final MOUSEINPUT

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new MOUSEINPUT.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 long

Returns:

the value of the MOUSEINPUT#dwExtraInfo field.
dwExtraInfo
()

public MOUSEINPUT.Buffer
dwExtraInfo(long value)

Sets the specified value to the MOUSEINPUT#dwExtraInfo field.

public int

Returns:

the value of the MOUSEINPUT#dwFlags field.
dwFlags
()

public MOUSEINPUT.Buffer
dwFlags(int value)

Sets the specified value to the MOUSEINPUT#dwFlags field.

public int

Returns:

the value of the MOUSEINPUT#dx field.
dx
()

public MOUSEINPUT.Buffer
dx(int value)

Sets the specified value to the MOUSEINPUT#dx field.

public int

Returns:

the value of the MOUSEINPUT#dy field.
dy
()

public MOUSEINPUT.Buffer
dy(int value)

Sets the specified value to the MOUSEINPUT#dy field.

protected MOUSEINPUT
public int

Returns:

the value of the MOUSEINPUT#mouseData field.
mouseData
()

public MOUSEINPUT.Buffer
mouseData(int value)

Sets the specified value to the MOUSEINPUT#mouseData field.

protected MOUSEINPUT.Buffer
public int

Returns:

the value of the MOUSEINPUT#time field.
time
()

public MOUSEINPUT.Buffer
time(int value)

Sets the specified value to the MOUSEINPUT#time field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final MOUSEINPUT ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new MOUSEINPUT.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 MOUSEINPUT#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

dwExtraInfoback to summary
public long dwExtraInfo()
Returns:long

the value of the MOUSEINPUT#dwExtraInfo field.

Annotations
@NativeType:ULONG_PTR
dwExtraInfoback to summary
public MOUSEINPUT.Buffer dwExtraInfo(long value)

Sets the specified value to the MOUSEINPUT#dwExtraInfo field.

dwFlagsback to summary
public int dwFlags()
Returns:int

the value of the MOUSEINPUT#dwFlags field.

Annotations
@NativeType:DWORD
dwFlagsback to summary
public MOUSEINPUT.Buffer dwFlags(int value)

Sets the specified value to the MOUSEINPUT#dwFlags field.

dxback to summary
public int dx()
Returns:int

the value of the MOUSEINPUT#dx field.

Annotations
@NativeType:LONG
dxback to summary
public MOUSEINPUT.Buffer dx(int value)

Sets the specified value to the MOUSEINPUT#dx field.

dyback to summary
public int dy()
Returns:int

the value of the MOUSEINPUT#dy field.

Annotations
@NativeType:LONG
dyback to summary
public MOUSEINPUT.Buffer dy(int value)

Sets the specified value to the MOUSEINPUT#dy field.

getElementFactoryback to summary
protected MOUSEINPUT getElementFactory()

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

Annotations
@Override
mouseDataback to summary
public int mouseData()
Returns:int

the value of the MOUSEINPUT#mouseData field.

Annotations
@NativeType:DWORD
mouseDataback to summary
public MOUSEINPUT.Buffer mouseData(int value)

Sets the specified value to the MOUSEINPUT#mouseData field.

selfback to summary
protected MOUSEINPUT.Buffer self()

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

Annotations
@Override
timeback to summary
public int time()
Returns:int

the value of the MOUSEINPUT#time field.

Annotations
@NativeType:DWORD
timeback to summary
public MOUSEINPUT.Buffer time(int value)

Sets the specified value to the MOUSEINPUT#time field.