mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 00:28:56 +00:00
Implement NtUserGetAsyncKeyState and support for TrackMouseEvent.
svn path=/trunk/; revision=16509
This commit is contained in:
parent
6c4cbed9a2
commit
622c4d86e9
|
@ -35,6 +35,8 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
extern BYTE QueueKeyStateTable[];
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
static HANDLE MouseDeviceHandle;
|
static HANDLE MouseDeviceHandle;
|
||||||
|
@ -986,36 +988,42 @@ IntMouseInput(MOUSEINPUT *mi)
|
||||||
Msg.message = 0;
|
Msg.message = 0;
|
||||||
if(mi->dwFlags & MOUSEEVENTF_LEFTDOWN)
|
if(mi->dwFlags & MOUSEEVENTF_LEFTDOWN)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_LBUTTON] |= 0xc0;
|
||||||
Msg.message = SwapBtnMsg[0][SwapButtons];
|
Msg.message = SwapBtnMsg[0][SwapButtons];
|
||||||
CurInfo->ButtonsDown |= SwapBtn[SwapButtons];
|
CurInfo->ButtonsDown |= SwapBtn[SwapButtons];
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
}
|
}
|
||||||
else if(mi->dwFlags & MOUSEEVENTF_LEFTUP)
|
else if(mi->dwFlags & MOUSEEVENTF_LEFTUP)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_LBUTTON] &= ~0x80;
|
||||||
Msg.message = SwapBtnMsg[1][SwapButtons];
|
Msg.message = SwapBtnMsg[1][SwapButtons];
|
||||||
CurInfo->ButtonsDown &= ~SwapBtn[SwapButtons];
|
CurInfo->ButtonsDown &= ~SwapBtn[SwapButtons];
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
}
|
}
|
||||||
if(mi->dwFlags & MOUSEEVENTF_MIDDLEDOWN)
|
if(mi->dwFlags & MOUSEEVENTF_MIDDLEDOWN)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_MBUTTON] |= 0xc0;
|
||||||
Msg.message = WM_MBUTTONDOWN;
|
Msg.message = WM_MBUTTONDOWN;
|
||||||
CurInfo->ButtonsDown |= MK_MBUTTON;
|
CurInfo->ButtonsDown |= MK_MBUTTON;
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
}
|
}
|
||||||
else if(mi->dwFlags & MOUSEEVENTF_MIDDLEUP)
|
else if(mi->dwFlags & MOUSEEVENTF_MIDDLEUP)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_MBUTTON] &= ~0x80;
|
||||||
Msg.message = WM_MBUTTONUP;
|
Msg.message = WM_MBUTTONUP;
|
||||||
CurInfo->ButtonsDown &= ~MK_MBUTTON;
|
CurInfo->ButtonsDown &= ~MK_MBUTTON;
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
}
|
}
|
||||||
if(mi->dwFlags & MOUSEEVENTF_RIGHTDOWN)
|
if(mi->dwFlags & MOUSEEVENTF_RIGHTDOWN)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_RBUTTON] |= 0xc0;
|
||||||
Msg.message = SwapBtnMsg[0][!SwapButtons];
|
Msg.message = SwapBtnMsg[0][!SwapButtons];
|
||||||
CurInfo->ButtonsDown |= SwapBtn[!SwapButtons];
|
CurInfo->ButtonsDown |= SwapBtn[!SwapButtons];
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
}
|
}
|
||||||
else if(mi->dwFlags & MOUSEEVENTF_RIGHTUP)
|
else if(mi->dwFlags & MOUSEEVENTF_RIGHTUP)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_RBUTTON] &= ~0x80;
|
||||||
Msg.message = SwapBtnMsg[1][!SwapButtons];
|
Msg.message = SwapBtnMsg[1][!SwapButtons];
|
||||||
CurInfo->ButtonsDown &= ~SwapBtn[!SwapButtons];
|
CurInfo->ButtonsDown &= ~SwapBtn[!SwapButtons];
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
|
@ -1033,12 +1041,14 @@ IntMouseInput(MOUSEINPUT *mi)
|
||||||
Msg.message = WM_XBUTTONDOWN;
|
Msg.message = WM_XBUTTONDOWN;
|
||||||
if(mi->mouseData & XBUTTON1)
|
if(mi->mouseData & XBUTTON1)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_XBUTTON1] |= 0xc0;
|
||||||
Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON1);
|
Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON1);
|
||||||
CurInfo->ButtonsDown |= XBUTTON1;
|
CurInfo->ButtonsDown |= XBUTTON1;
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
}
|
}
|
||||||
if(mi->mouseData & XBUTTON2)
|
if(mi->mouseData & XBUTTON2)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_XBUTTON2] |= 0xc0;
|
||||||
Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON2);
|
Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON2);
|
||||||
CurInfo->ButtonsDown |= XBUTTON2;
|
CurInfo->ButtonsDown |= XBUTTON2;
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
|
@ -1049,12 +1059,14 @@ IntMouseInput(MOUSEINPUT *mi)
|
||||||
Msg.message = WM_XBUTTONUP;
|
Msg.message = WM_XBUTTONUP;
|
||||||
if(mi->mouseData & XBUTTON1)
|
if(mi->mouseData & XBUTTON1)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_XBUTTON1] &= 0x80;
|
||||||
Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON1);
|
Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON1);
|
||||||
CurInfo->ButtonsDown &= ~XBUTTON1;
|
CurInfo->ButtonsDown &= ~XBUTTON1;
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
}
|
}
|
||||||
if(mi->mouseData & XBUTTON2)
|
if(mi->mouseData & XBUTTON2)
|
||||||
{
|
{
|
||||||
|
QueueKeyStateTable[VK_XBUTTON2] &= 0x80;
|
||||||
Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON2);
|
Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON2);
|
||||||
CurInfo->ButtonsDown &= ~XBUTTON2;
|
CurInfo->ButtonsDown &= ~XBUTTON2;
|
||||||
MsqInsertSystemMessage(&Msg);
|
MsqInsertSystemMessage(&Msg);
|
||||||
|
|
|
@ -331,6 +331,24 @@ NtUserGetKeyState(
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DWORD
|
||||||
|
STDCALL
|
||||||
|
NtUserGetAsyncKeyState(
|
||||||
|
DWORD key)
|
||||||
|
{
|
||||||
|
DWORD ret = 0;
|
||||||
|
|
||||||
|
IntLockQueueState;
|
||||||
|
if( key < 0x100 ) {
|
||||||
|
ret = ((DWORD)(QueueKeyStateTable[key] & KS_DOWN_BIT) << 8 ) |
|
||||||
|
(QueueKeyStateTable[key] & KS_LOCK_BIT);
|
||||||
|
}
|
||||||
|
IntUnLockQueueState;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int STDCALL ToUnicodeEx( UINT wVirtKey,
|
int STDCALL ToUnicodeEx( UINT wVirtKey,
|
||||||
UINT wScanCode,
|
UINT wScanCode,
|
||||||
PBYTE lpKeyState,
|
PBYTE lpKeyState,
|
||||||
|
|
|
@ -283,16 +283,6 @@ NtUserGetAltTabInfo(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD
|
|
||||||
STDCALL
|
|
||||||
NtUserGetAsyncKeyState(
|
|
||||||
DWORD Unknown0)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
NtUserGetComboBoxInfo(
|
NtUserGetComboBoxInfo(
|
||||||
|
|
Loading…
Reference in a new issue