mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 06:55:55 +00:00
parent
6dfe032152
commit
166786061c
4 changed files with 38 additions and 33 deletions
|
@ -400,7 +400,7 @@ BOOL WINAPI ImmSetCandidateWindow(HIMC hIMC, LPCANDIDATEFORM lpCandidate)
|
||||||
|
|
||||||
ImmUnlockIMC(hIMC);
|
ImmUnlockIMC(hIMC);
|
||||||
|
|
||||||
Imm32NotifyAction(hIMC, hWnd, NI_CONTEXTUPDATED, 0, IMC_SETCANDIDATEPOS,
|
Imm32MakeIMENotify(hIMC, hWnd, NI_CONTEXTUPDATED, 0, IMC_SETCANDIDATEPOS,
|
||||||
IMN_SETCANDIDATEPOS, (1 << (BYTE)lpCandidate->dwIndex));
|
IMN_SETCANDIDATEPOS, (1 << (BYTE)lpCandidate->dwIndex));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -549,11 +549,11 @@ HKL WINAPI ImmInstallIMEW(LPCWSTR lpszIMEFileName, LPCWSTR lpszLayoutText)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Get the IME layouts from registry */
|
/* Get the IME layouts from registry */
|
||||||
cLayouts = Imm32GetRegImes(NULL, 0);
|
cLayouts = Imm32GetImeLayout(NULL, 0);
|
||||||
if (cLayouts)
|
if (cLayouts)
|
||||||
{
|
{
|
||||||
pLayouts = ImmLocalAlloc(0, cLayouts * sizeof(REG_IME));
|
pLayouts = ImmLocalAlloc(0, cLayouts * sizeof(REG_IME));
|
||||||
if (!pLayouts || !Imm32GetRegImes(pLayouts, cLayouts))
|
if (!pLayouts || !Imm32GetImeLayout(pLayouts, cLayouts))
|
||||||
{
|
{
|
||||||
ImmLocalFree(pLayouts);
|
ImmLocalFree(pLayouts);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -585,19 +585,19 @@ HKL WINAPI ImmInstallIMEW(LPCWSTR lpszIMEFileName, LPCWSTR lpszLayoutText)
|
||||||
|
|
||||||
/* If the source and the destination pathnames were different, then copy the IME file */
|
/* If the source and the destination pathnames were different, then copy the IME file */
|
||||||
if (lstrcmpiW(szImeFileName, szImeDestPath) != 0 &&
|
if (lstrcmpiW(szImeFileName, szImeDestPath) != 0 &&
|
||||||
!Imm32CopyFile(szImeFileName, szImeDestPath))
|
!Imm32CopyImeFile(szImeFileName, szImeDestPath))
|
||||||
{
|
{
|
||||||
hNewKL = NULL;
|
hNewKL = NULL;
|
||||||
goto Quit;
|
goto Quit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hNewKL == NULL)
|
if (hNewKL == NULL)
|
||||||
hNewKL = Imm32GetNextHKL(cLayouts, pLayouts, wLangID);
|
hNewKL = Imm32AssignNewLayout(cLayouts, pLayouts, wLangID);
|
||||||
|
|
||||||
if (hNewKL)
|
if (hNewKL)
|
||||||
{
|
{
|
||||||
/* Write the IME layout to registry */
|
/* Write the IME layout to registry */
|
||||||
if (Imm32WriteRegIme(hNewKL, pchFilePart, lpszLayoutText))
|
if (Imm32WriteImeLayout(hNewKL, pchFilePart, lpszLayoutText))
|
||||||
{
|
{
|
||||||
/* Load the keyboard layout */
|
/* Load the keyboard layout */
|
||||||
Imm32UIntToStr((DWORD)(DWORD_PTR)hNewKL, 16, szImeKey, _countof(szImeKey));
|
Imm32UIntToStr((DWORD)(DWORD_PTR)hNewKL, 16, szImeKey, _countof(szImeKey));
|
||||||
|
@ -1184,8 +1184,8 @@ BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
|
||||||
|
|
||||||
if (bHasChange)
|
if (bHasChange)
|
||||||
{
|
{
|
||||||
Imm32NotifyAction(hIMC, hWnd, NI_CONTEXTUPDATED, 0,
|
Imm32MakeIMENotify(hIMC, hWnd, NI_CONTEXTUPDATED, 0,
|
||||||
IMC_SETOPENSTATUS, IMN_SETOPENSTATUS, 0);
|
IMC_SETOPENSTATUS, IMN_SETOPENSTATUS, 0);
|
||||||
NtUserNotifyIMEStatus(hWnd, fOpen, dwConversion);
|
NtUserNotifyIMEStatus(hWnd, fOpen, dwConversion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1237,8 +1237,8 @@ BOOL WINAPI ImmSetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
|
||||||
|
|
||||||
ImmUnlockIMC(hIMC);
|
ImmUnlockIMC(hIMC);
|
||||||
|
|
||||||
Imm32NotifyAction(hIMC, hWnd, NI_CONTEXTUPDATED, 0,
|
Imm32MakeIMENotify(hIMC, hWnd, NI_CONTEXTUPDATED, 0,
|
||||||
IMC_SETSTATUSWINDOWPOS, IMN_SETSTATUSWINDOWPOS, 0);
|
IMC_SETSTATUSWINDOWPOS, IMN_SETSTATUSWINDOWPOS, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1288,8 +1288,8 @@ BOOL WINAPI ImmSetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
|
||||||
|
|
||||||
ImmUnlockIMC(hIMC);
|
ImmUnlockIMC(hIMC);
|
||||||
|
|
||||||
Imm32NotifyAction(hIMC, hWnd, NI_CONTEXTUPDATED, 0,
|
Imm32MakeIMENotify(hIMC, hWnd, NI_CONTEXTUPDATED, 0,
|
||||||
IMC_SETCOMPOSITIONWINDOW, IMN_SETCOMPOSITIONWINDOW, 0);
|
IMC_SETCOMPOSITIONWINDOW, IMN_SETCOMPOSITIONWINDOW, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1418,8 +1418,8 @@ BOOL WINAPI ImmSetCompositionFontA(HIMC hIMC, LPLOGFONTA lplf)
|
||||||
|
|
||||||
ImmUnlockIMC(hIMC);
|
ImmUnlockIMC(hIMC);
|
||||||
|
|
||||||
Imm32NotifyAction(hIMC, hWnd, NI_CONTEXTUPDATED, 0, IMC_SETCOMPOSITIONFONT,
|
Imm32MakeIMENotify(hIMC, hWnd, NI_CONTEXTUPDATED, 0, IMC_SETCOMPOSITIONFONT,
|
||||||
IMN_SETCOMPOSITIONFONT, 0);
|
IMN_SETCOMPOSITIONFONT, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1476,8 +1476,8 @@ BOOL WINAPI ImmSetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf)
|
||||||
|
|
||||||
ImmUnlockIMC(hIMC);
|
ImmUnlockIMC(hIMC);
|
||||||
|
|
||||||
Imm32NotifyAction(hIMC, hWnd, NI_CONTEXTUPDATED, 0, IMC_SETCOMPOSITIONFONT,
|
Imm32MakeIMENotify(hIMC, hWnd, NI_CONTEXTUPDATED, 0, IMC_SETCOMPOSITIONFONT,
|
||||||
IMN_SETCOMPOSITIONFONT, 0);
|
IMN_SETCOMPOSITIONFONT, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1657,16 +1657,16 @@ BOOL WINAPI ImmSetConversionStatus(HIMC hIMC, DWORD fdwConversion, DWORD fdwSent
|
||||||
|
|
||||||
if (fConversionChange || fUseCicero)
|
if (fConversionChange || fUseCicero)
|
||||||
{
|
{
|
||||||
Imm32NotifyAction(hIMC, hWnd, NI_CONTEXTUPDATED, dwOldConversion,
|
Imm32MakeIMENotify(hIMC, hWnd, NI_CONTEXTUPDATED, dwOldConversion,
|
||||||
IMC_SETCONVERSIONMODE, IMN_SETCONVERSIONMODE, 0);
|
IMC_SETCONVERSIONMODE, IMN_SETCONVERSIONMODE, 0);
|
||||||
if (fConversionChange)
|
if (fConversionChange)
|
||||||
NtUserNotifyIMEStatus(hWnd, fOpen, fdwConversion);
|
NtUserNotifyIMEStatus(hWnd, fOpen, fdwConversion);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fSentenceChange || fUseCicero)
|
if (fSentenceChange || fUseCicero)
|
||||||
{
|
{
|
||||||
Imm32NotifyAction(hIMC, hWnd, NI_CONTEXTUPDATED, dwOldSentence,
|
Imm32MakeIMENotify(hIMC, hWnd, NI_CONTEXTUPDATED, dwOldSentence,
|
||||||
IMC_SETSENTENCEMODE, IMN_SETSENTENCEMODE, 0);
|
IMC_SETSENTENCEMODE, IMN_SETSENTENCEMODE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -124,8 +124,8 @@ CandidateListAnsiToWide(const CANDIDATELIST *pAnsiCL, LPCANDIDATELIST pWideCL, D
|
||||||
UINT uCodePage);
|
UINT uCodePage);
|
||||||
|
|
||||||
BOOL APIENTRY
|
BOOL APIENTRY
|
||||||
Imm32NotifyAction(HIMC hIMC, HWND hwnd, DWORD dwAction, DWORD_PTR dwIndex, DWORD_PTR dwValue,
|
Imm32MakeIMENotify(HIMC hIMC, HWND hwnd, DWORD dwAction, DWORD_PTR dwIndex, DWORD_PTR dwValue,
|
||||||
DWORD_PTR dwCommand, DWORD_PTR dwData);
|
DWORD_PTR dwCommand, DWORD_PTR dwData);
|
||||||
|
|
||||||
DWORD APIENTRY Imm32AllocAndBuildHimcList(DWORD dwThreadId, HIMC **pphList);
|
DWORD APIENTRY Imm32AllocAndBuildHimcList(DWORD dwThreadId, HIMC **pphList);
|
||||||
|
|
||||||
|
@ -152,10 +152,10 @@ Imm32ReconvertWideFromAnsi(LPRECONVERTSTRING pDest, const RECONVERTSTRING *pSrc,
|
||||||
HRESULT APIENTRY Imm32StrToUInt(LPCWSTR pszText, LPDWORD pdwValue, ULONG nBase);
|
HRESULT APIENTRY Imm32StrToUInt(LPCWSTR pszText, LPDWORD pdwValue, ULONG nBase);
|
||||||
HRESULT APIENTRY Imm32UIntToStr(DWORD dwValue, ULONG nBase, LPWSTR pszBuff, USHORT cchBuff);
|
HRESULT APIENTRY Imm32UIntToStr(DWORD dwValue, ULONG nBase, LPWSTR pszBuff, USHORT cchBuff);
|
||||||
BOOL APIENTRY Imm32LoadImeVerInfo(PIMEINFOEX pImeInfoEx);
|
BOOL APIENTRY Imm32LoadImeVerInfo(PIMEINFOEX pImeInfoEx);
|
||||||
UINT APIENTRY Imm32GetRegImes(PREG_IME pLayouts, UINT cLayouts);
|
UINT APIENTRY Imm32GetImeLayout(PREG_IME pLayouts, UINT cLayouts);
|
||||||
BOOL APIENTRY Imm32WriteRegIme(HKL hKL, LPCWSTR pchFilePart, LPCWSTR pszLayout);
|
BOOL APIENTRY Imm32WriteImeLayout(HKL hKL, LPCWSTR pchFilePart, LPCWSTR pszLayout);
|
||||||
HKL APIENTRY Imm32GetNextHKL(UINT cKLs, const REG_IME *pLayouts, WORD wLangID);
|
HKL APIENTRY Imm32AssignNewLayout(UINT cKLs, const REG_IME *pLayouts, WORD wLangID);
|
||||||
BOOL APIENTRY Imm32CopyFile(LPWSTR pszOldFile, LPCWSTR pszNewFile);
|
BOOL APIENTRY Imm32CopyImeFile(LPWSTR pszOldFile, LPCWSTR pszNewFile);
|
||||||
|
|
||||||
static inline PTHREADINFO FASTCALL Imm32CurrentPti(VOID)
|
static inline PTHREADINFO FASTCALL Imm32CurrentPti(VOID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -229,9 +229,10 @@ LPVOID APIENTRY ImmLocalAlloc(DWORD dwFlags, DWORD dwBytes)
|
||||||
return HeapAlloc(ghImmHeap, dwFlags, dwBytes);
|
return HeapAlloc(ghImmHeap, dwFlags, dwBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Win: MakeIMENotify
|
||||||
BOOL APIENTRY
|
BOOL APIENTRY
|
||||||
Imm32NotifyAction(HIMC hIMC, HWND hwnd, DWORD dwAction, DWORD_PTR dwIndex, DWORD_PTR dwValue,
|
Imm32MakeIMENotify(HIMC hIMC, HWND hwnd, DWORD dwAction, DWORD_PTR dwIndex, DWORD_PTR dwValue,
|
||||||
DWORD_PTR dwCommand, DWORD_PTR dwData)
|
DWORD_PTR dwCommand, DWORD_PTR dwData)
|
||||||
{
|
{
|
||||||
DWORD dwThreadId;
|
DWORD dwThreadId;
|
||||||
HKL hKL;
|
HKL hKL;
|
||||||
|
@ -668,7 +669,8 @@ Quit:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
HKL APIENTRY Imm32GetNextHKL(UINT cKLs, const REG_IME *pLayouts, WORD wLangID)
|
// Win: AssignNewLayout
|
||||||
|
HKL APIENTRY Imm32AssignNewLayout(UINT cKLs, const REG_IME *pLayouts, WORD wLangID)
|
||||||
{
|
{
|
||||||
UINT iKL, wID, wLow = 0xE0FF, wHigh = 0xE01F, wNextID = 0;
|
UINT iKL, wID, wLow = 0xE0FF, wHigh = 0xE01F, wNextID = 0;
|
||||||
|
|
||||||
|
@ -713,7 +715,8 @@ HKL APIENTRY Imm32GetNextHKL(UINT cKLs, const REG_IME *pLayouts, WORD wLangID)
|
||||||
return (HKL)(DWORD_PTR)MAKELONG(wLangID, wNextID);
|
return (HKL)(DWORD_PTR)MAKELONG(wLangID, wNextID);
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT APIENTRY Imm32GetRegImes(PREG_IME pLayouts, UINT cLayouts)
|
// Win: GetImeLayout
|
||||||
|
UINT APIENTRY Imm32GetImeLayout(PREG_IME pLayouts, UINT cLayouts)
|
||||||
{
|
{
|
||||||
HKEY hkeyLayouts, hkeyIME;
|
HKEY hkeyLayouts, hkeyIME;
|
||||||
WCHAR szImeFileName[80], szImeKey[20];
|
WCHAR szImeFileName[80], szImeKey[20];
|
||||||
|
@ -780,7 +783,8 @@ UINT APIENTRY Imm32GetRegImes(PREG_IME pLayouts, UINT cLayouts)
|
||||||
return nCount;
|
return nCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL APIENTRY Imm32WriteRegIme(HKL hKL, LPCWSTR pchFilePart, LPCWSTR pszLayout)
|
// Win: WriteImeLayout
|
||||||
|
BOOL APIENTRY Imm32WriteImeLayout(HKL hKL, LPCWSTR pchFilePart, LPCWSTR pszLayout)
|
||||||
{
|
{
|
||||||
UINT iPreload;
|
UINT iPreload;
|
||||||
HKEY hkeyLayouts, hkeyIME, hkeyPreload;
|
HKEY hkeyLayouts, hkeyIME, hkeyPreload;
|
||||||
|
@ -876,7 +880,8 @@ typedef INT (WINAPI *FN_LZOpenFileW)(LPWSTR, LPOFSTRUCT, WORD);
|
||||||
typedef LONG (WINAPI *FN_LZCopy)(INT, INT);
|
typedef LONG (WINAPI *FN_LZCopy)(INT, INT);
|
||||||
typedef VOID (WINAPI *FN_LZClose)(INT);
|
typedef VOID (WINAPI *FN_LZClose)(INT);
|
||||||
|
|
||||||
BOOL APIENTRY Imm32CopyFile(LPWSTR pszOldFile, LPCWSTR pszNewFile)
|
// Win: CopyImeFile
|
||||||
|
BOOL APIENTRY Imm32CopyImeFile(LPWSTR pszOldFile, LPCWSTR pszNewFile)
|
||||||
{
|
{
|
||||||
BOOL ret = FALSE, bLoaded = FALSE;
|
BOOL ret = FALSE, bLoaded = FALSE;
|
||||||
HMODULE hinstLZ32;
|
HMODULE hinstLZ32;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue