imm32: Implement ImmGetRegisterWordStyle using loaded IME.
This commit is contained in:
parent
f9414028ca
commit
fb12a3ec7a
|
@ -1294,9 +1294,26 @@ DWORD WINAPI ImmGetProperty(HKL hKL, DWORD fdwIndex)
|
||||||
UINT WINAPI ImmGetRegisterWordStyleA(
|
UINT WINAPI ImmGetRegisterWordStyleA(
|
||||||
HKL hKL, UINT nItem, LPSTYLEBUFA lpStyleBuf)
|
HKL hKL, UINT nItem, LPSTYLEBUFA lpStyleBuf)
|
||||||
{
|
{
|
||||||
FIXME("(%p, %d, %p): stub\n", hKL, nItem, lpStyleBuf);
|
ImmHkl *immHkl = IMM_GetImmHkl(hKL);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
TRACE("(%p, %d, %p):\n", hKL, nItem, lpStyleBuf);
|
||||||
return 0;
|
if (immHkl->hIME && immHkl->pImeGetRegisterWordStyle)
|
||||||
|
{
|
||||||
|
if (!is_kbd_ime_unicode(immHkl))
|
||||||
|
return immHkl->pImeGetRegisterWordStyle(nItem,(LPSTYLEBUFW)lpStyleBuf);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
STYLEBUFW sbw;
|
||||||
|
UINT rc;
|
||||||
|
|
||||||
|
rc = immHkl->pImeGetRegisterWordStyle(nItem,&sbw);
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, sbw.szDescription, -1,
|
||||||
|
lpStyleBuf->szDescription, 32, NULL, NULL);
|
||||||
|
lpStyleBuf->dwStyle = sbw.dwStyle;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1305,9 +1322,26 @@ UINT WINAPI ImmGetRegisterWordStyleA(
|
||||||
UINT WINAPI ImmGetRegisterWordStyleW(
|
UINT WINAPI ImmGetRegisterWordStyleW(
|
||||||
HKL hKL, UINT nItem, LPSTYLEBUFW lpStyleBuf)
|
HKL hKL, UINT nItem, LPSTYLEBUFW lpStyleBuf)
|
||||||
{
|
{
|
||||||
FIXME("(%p, %d, %p): stub\n", hKL, nItem, lpStyleBuf);
|
ImmHkl *immHkl = IMM_GetImmHkl(hKL);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
TRACE("(%p, %d, %p):\n", hKL, nItem, lpStyleBuf);
|
||||||
return 0;
|
if (immHkl->hIME && immHkl->pImeGetRegisterWordStyle)
|
||||||
|
{
|
||||||
|
if (is_kbd_ime_unicode(immHkl))
|
||||||
|
return immHkl->pImeGetRegisterWordStyle(nItem,lpStyleBuf);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
STYLEBUFA sba;
|
||||||
|
UINT rc;
|
||||||
|
|
||||||
|
rc = immHkl->pImeGetRegisterWordStyle(nItem,(LPSTYLEBUFW)&sba);
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, sba.szDescription, -1,
|
||||||
|
lpStyleBuf->szDescription, 32);
|
||||||
|
lpStyleBuf->dwStyle = sba.dwStyle;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue