mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 09:52:56 +00:00
Implemented VkKeyScan, GetKeyboardTypeand, GetKeyboardLayout and some Wine ports.
svn path=/trunk/; revision=16559
This commit is contained in:
parent
f84f0b7a10
commit
be123f5a26
1 changed files with 45 additions and 26 deletions
|
@ -162,24 +162,22 @@ GetDoubleClickTime(VOID)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
HKL STDCALL
|
HKL STDCALL
|
||||||
GetKeyboardLayout(DWORD idThread)
|
GetKeyboardLayout(DWORD idThread)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return (HKL)NtUserCallOneParam((DWORD) idThread, ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT);
|
||||||
return (HKL)0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
UINT STDCALL
|
UINT STDCALL
|
||||||
GetKBCodePage(VOID)
|
GetKBCodePage(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return GetOEMCP();
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,12 +244,15 @@ GetKeyboardLayoutList(int nBuff,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
GetKeyboardLayoutNameA(LPSTR pwszKLID)
|
GetKeyboardLayoutNameA(LPSTR pwszKLID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
WCHAR buf[KL_NAMELENGTH];
|
||||||
|
|
||||||
|
if (GetKeyboardLayoutNameW(buf))
|
||||||
|
return WideCharToMultiByte( CP_ACP, 0, buf, -1, pwszKLID, KL_NAMELENGTH, NULL, NULL ) != 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,7 +269,7 @@ GetKeyboardLayoutNameW(LPWSTR pwszKLID)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
GetKeyboardState(PBYTE lpKeyState)
|
GetKeyboardState(PBYTE lpKeyState)
|
||||||
|
@ -279,13 +280,12 @@ GetKeyboardState(PBYTE lpKeyState)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
int STDCALL
|
int STDCALL
|
||||||
GetKeyboardType(int nTypeFlag)
|
GetKeyboardType(int nTypeFlag)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return (int)NtUserCallOneParam((DWORD) nTypeFlag, ONEPARAM_ROUTINE_GETKEYBOARDTYPE);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -301,14 +301,22 @@ GetLastInputInfo(PLASTINPUTINFO plii)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
HKL STDCALL
|
HKL STDCALL
|
||||||
LoadKeyboardLayoutA(LPCSTR pwszKLID,
|
LoadKeyboardLayoutA(LPCSTR pwszKLID,
|
||||||
UINT Flags)
|
UINT Flags)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
HKL ret;
|
||||||
return (HKL)0;
|
UNICODE_STRING pwszKLIDW;
|
||||||
|
|
||||||
|
if (pwszKLID) RtlCreateUnicodeStringFromAsciiz(&pwszKLIDW, pwszKLID);
|
||||||
|
else pwszKLIDW.Buffer = NULL;
|
||||||
|
|
||||||
|
ret = LoadKeyboardLayoutW(pwszKLIDW.Buffer, Flags);
|
||||||
|
RtlFreeUnicodeString(&pwszKLIDW);
|
||||||
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -371,13 +379,24 @@ MapVirtualKeyW(UINT uCode,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
DWORD STDCALL
|
DWORD STDCALL
|
||||||
OemKeyScan(WORD wOemChar)
|
OemKeyScan(WORD wOemChar)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
WCHAR p;
|
||||||
return 0;
|
SHORT Vk;
|
||||||
|
UINT Scan;
|
||||||
|
|
||||||
|
MultiByteToWideChar(CP_OEMCP, 0, (PCSTR)&wOemChar, 1, &p, 1);
|
||||||
|
Vk = VkKeyScanW(p);
|
||||||
|
Scan = MapVirtualKeyW((Vk & 0x00ff), 0);
|
||||||
|
if(!Scan) return -1;
|
||||||
|
/*
|
||||||
|
Page 450-1, MS W2k SuperBible by SAMS. Return, low word has the
|
||||||
|
scan code and high word has the shift state.
|
||||||
|
*/
|
||||||
|
return ((Vk & 0xff00) << 8) | Scan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -411,7 +430,7 @@ SetDoubleClickTime(UINT uInterval)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
HWND STDCALL
|
HWND STDCALL
|
||||||
SetFocus(HWND hWnd)
|
SetFocus(HWND hWnd)
|
||||||
|
@ -421,7 +440,7 @@ SetFocus(HWND hWnd)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
SetKeyboardState(LPBYTE lpKeyState)
|
SetKeyboardState(LPBYTE lpKeyState)
|
||||||
|
@ -495,7 +514,7 @@ ToUnicode(UINT wVirtKey,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
int STDCALL
|
int STDCALL
|
||||||
ToUnicodeEx(UINT wVirtKey,
|
ToUnicodeEx(UINT wVirtKey,
|
||||||
|
@ -565,14 +584,13 @@ VkKeyScanExA(CHAR ch,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
SHORT STDCALL
|
SHORT STDCALL
|
||||||
VkKeyScanExW(WCHAR ch,
|
VkKeyScanExW(WCHAR ch,
|
||||||
HKL dwhkl)
|
HKL dwhkl)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
return (SHORT) NtUserVkKeyScanEx((DWORD) ch,(DWORD) dwhkl,(DWORD)NULL);
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -850,7 +868,8 @@ TrackMouseEvent(
|
||||||
pos.y = 0;
|
pos.y = 0;
|
||||||
SetRectEmpty(&client);
|
SetRectEmpty(&client);
|
||||||
|
|
||||||
DPRINT("%lx, %lx, %p, %lx\n", ptme->cbSize, ptme->dwFlags, ptme->hwndTrack, ptme->dwHoverTime);
|
DbgPrint("%lx, %lx, %p, %lx\n", ptme->cbSize, ptme->dwFlags, ptme->hwndTrack, ptme->dwHoverTime);
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
|
||||||
if (ptme->cbSize != sizeof(TRACKMOUSEEVENT)) {
|
if (ptme->cbSize != sizeof(TRACKMOUSEEVENT)) {
|
||||||
DPRINT("wrong TRACKMOUSEEVENT size from app\n");
|
DPRINT("wrong TRACKMOUSEEVENT size from app\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue