public class MOUSEINPUT
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
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.
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.
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.XBUTTON1 | User32.XBUTTON2 |
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:
time – the time stamp for the event, in milliseconds. If this parameter is 0, the system will provide its own time stamp.dwExtraInfo – an additional value associated with the mouse event. An application calls User32.GetMessageExtraInfo() to obtain this extra information.
struct MOUSEINPUT {
LONG dx;
LONG dy;
DWORD mouseData;
DWORD dwFlags;
DWORD time;
ULONG_PTR dwExtraInfo;
}| Modifier and Type | Class and Description |
|---|---|
static class |
MOUSEINPUT.Buffer
An array of
MOUSEINPUT structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DWEXTRAINFO
The struct member offsets.
|
static int |
DWFLAGS
The struct member offsets.
|
static int |
DX
The struct member offsets.
|
static int |
DY
The struct member offsets.
|
static int |
MOUSEDATA
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
TIME
The struct member offsets.
|
| Constructor and Description |
|---|
MOUSEINPUT(java.nio.ByteBuffer container)
Creates a
MOUSEINPUT instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static MOUSEINPUT |
calloc()
Returns a new
MOUSEINPUT instance allocated with memCalloc. |
static MOUSEINPUT.Buffer |
calloc(int capacity)
Returns a new
MOUSEINPUT.Buffer instance allocated with memCalloc. |
static MOUSEINPUT |
callocStack()
Returns a new
MOUSEINPUT instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static MOUSEINPUT.Buffer |
callocStack(int capacity)
Returns a new
MOUSEINPUT.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static MOUSEINPUT.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
MOUSEINPUT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static MOUSEINPUT |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
MOUSEINPUT instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static MOUSEINPUT |
create()
Returns a new
MOUSEINPUT instance allocated with BufferUtils. |
static MOUSEINPUT.Buffer |
create(int capacity)
Returns a new
MOUSEINPUT.Buffer instance allocated with BufferUtils. |
static MOUSEINPUT |
create(long address)
Returns a new
MOUSEINPUT instance for the specified memory address. |
static MOUSEINPUT.Buffer |
create(long address,
int capacity)
Create a
MOUSEINPUT.Buffer instance at the specified memory. |
static MOUSEINPUT |
createSafe(long address)
|
static MOUSEINPUT.Buffer |
createSafe(long address,
int capacity)
|
long |
dwExtraInfo()
Returns the value of the
dwExtraInfo field. |
MOUSEINPUT |
dwExtraInfo(long value)
Sets the specified value to the
dwExtraInfo field. |
int |
dwFlags()
Returns the value of the
dwFlags field. |
MOUSEINPUT |
dwFlags(int value)
Sets the specified value to the
dwFlags field. |
int |
dx()
Returns the value of the
dx field. |
MOUSEINPUT |
dx(int value)
Sets the specified value to the
dx field. |
int |
dy()
Returns the value of the
dy field. |
MOUSEINPUT |
dy(int value)
Sets the specified value to the
dy field. |
static MOUSEINPUT |
malloc()
Returns a new
MOUSEINPUT instance allocated with memAlloc. |
static MOUSEINPUT.Buffer |
malloc(int capacity)
Returns a new
MOUSEINPUT.Buffer instance allocated with memAlloc. |
static MOUSEINPUT |
mallocStack()
Returns a new
MOUSEINPUT instance allocated on the thread-local MemoryStack. |
static MOUSEINPUT.Buffer |
mallocStack(int capacity)
Returns a new
MOUSEINPUT.Buffer instance allocated on the thread-local MemoryStack. |
static MOUSEINPUT.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
MOUSEINPUT.Buffer instance allocated on the specified MemoryStack. |
static MOUSEINPUT |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
MOUSEINPUT instance allocated on the specified MemoryStack. |
int |
mouseData()
Returns the value of the
mouseData field. |
MOUSEINPUT |
mouseData(int value)
Sets the specified value to the
mouseData field. |
static long |
ndwExtraInfo(long struct)
Unsafe version of
dwExtraInfo(). |
static void |
ndwExtraInfo(long struct,
long value)
Unsafe version of
dwExtraInfo. |
static int |
ndwFlags(long struct)
Unsafe version of
dwFlags(). |
static void |
ndwFlags(long struct,
int value)
Unsafe version of
dwFlags. |
static int |
ndx(long struct)
Unsafe version of
dx(). |
static void |
ndx(long struct,
int value)
Unsafe version of
dx. |
static int |
ndy(long struct)
Unsafe version of
dy(). |
static void |
ndy(long struct,
int value)
Unsafe version of
dy. |
static int |
nmouseData(long struct)
Unsafe version of
mouseData(). |
static void |
nmouseData(long struct,
int value)
Unsafe version of
mouseData. |
static int |
ntime(long struct)
Unsafe version of
time(). |
static void |
ntime(long struct,
int value)
Unsafe version of
time. |
MOUSEINPUT |
set(int dx,
int dy,
int mouseData,
int dwFlags,
int time,
long dwExtraInfo)
Initializes this struct with the specified values.
|
MOUSEINPUT |
set(MOUSEINPUT src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
time()
Returns the value of the
time field. |
MOUSEINPUT |
time(int value)
Sets the specified value to the
time field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int DX
public static final int DY
public static final int MOUSEDATA
public static final int DWFLAGS
public static final int TIME
public static final int DWEXTRAINFO
public MOUSEINPUT(java.nio.ByteBuffer container)
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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int dx()
dx field.public int dy()
dy field.public int mouseData()
mouseData field.public int dwFlags()
dwFlags field.public int time()
time field.public long dwExtraInfo()
dwExtraInfo field.public MOUSEINPUT dx(int value)
dx field.public MOUSEINPUT dy(int value)
dy field.public MOUSEINPUT mouseData(int value)
mouseData field.public MOUSEINPUT dwFlags(int value)
dwFlags field.public MOUSEINPUT time(int value)
time field.public MOUSEINPUT dwExtraInfo(long value)
dwExtraInfo field.public MOUSEINPUT set(int dx, int dy, int mouseData, int dwFlags, int time, long dwExtraInfo)
public MOUSEINPUT set(MOUSEINPUT src)
src - the source structpublic static MOUSEINPUT malloc()
MOUSEINPUT instance allocated with memAlloc. The instance must be explicitly freed.public static MOUSEINPUT calloc()
MOUSEINPUT instance allocated with memCalloc. The instance must be explicitly freed.public static MOUSEINPUT create()
MOUSEINPUT instance allocated with BufferUtils.public static MOUSEINPUT create(long address)
MOUSEINPUT instance for the specified memory address.@Nullable public static MOUSEINPUT createSafe(long address)
public static MOUSEINPUT.Buffer malloc(int capacity)
MOUSEINPUT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static MOUSEINPUT.Buffer calloc(int capacity)
MOUSEINPUT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static MOUSEINPUT.Buffer create(int capacity)
MOUSEINPUT.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static MOUSEINPUT.Buffer create(long address, int capacity)
MOUSEINPUT.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static MOUSEINPUT.Buffer createSafe(long address, int capacity)
public static MOUSEINPUT mallocStack()
MOUSEINPUT instance allocated on the thread-local MemoryStack.public static MOUSEINPUT callocStack()
MOUSEINPUT instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static MOUSEINPUT mallocStack(org.lwjgl.system.MemoryStack stack)
MOUSEINPUT instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static MOUSEINPUT callocStack(org.lwjgl.system.MemoryStack stack)
MOUSEINPUT instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static MOUSEINPUT.Buffer mallocStack(int capacity)
MOUSEINPUT.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static MOUSEINPUT.Buffer callocStack(int capacity)
MOUSEINPUT.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static MOUSEINPUT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
MOUSEINPUT.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static MOUSEINPUT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
MOUSEINPUT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int ndx(long struct)
dx().public static int ndy(long struct)
dy().public static int nmouseData(long struct)
mouseData().public static int ndwFlags(long struct)
dwFlags().public static int ntime(long struct)
time().public static long ndwExtraInfo(long struct)
dwExtraInfo().public static void ndx(long struct,
int value)
dx.public static void ndy(long struct,
int value)
dy.public static void nmouseData(long struct,
int value)
mouseData.public static void ndwFlags(long struct,
int value)
dwFlags.public static void ntime(long struct,
int value)
time.public static void ndwExtraInfo(long struct,
long value)
dwExtraInfo.Copyright LWJGL. All Rights Reserved. License terms.