https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5b87c95e2328eb3e742b2…
commit 5b87c95e2328eb3e742b2ba260ade9a27050a738
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Sep 8 09:40:50 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Thu Sep 8 09:40:50 2022 +0900
[IMM32] s/Imm32IsCiceroMode/IS_CICERO_MODE/
CORE-11700
---
dll/win32/imm32/ctf.c | 8 ++++----
dll/win32/imm32/ime.c | 12 ++++++------
dll/win32/imm32/imm.c | 18 +++++++++---------
dll/win32/imm32/precomp.h | 2 --
win32ss/include/ntuser.h | 3 ++-
win32ss/user/ntuser/ntuser.h | 1 -
6 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c
index 7c4c9dae4ac..ecab88a5198 100644
--- a/dll/win32/imm32/ctf.c
+++ b/dll/win32/imm32/ctf.c
@@ -40,7 +40,7 @@ HRESULT APIENTRY Imm32CtfImeDestroyInputContext(HIMC hIMC)
// Win: CtfImmTIMDestroyInputContext
HRESULT APIENTRY CtfImmTIMDestroyInputContext(HIMC hIMC)
{
- if (!Imm32IsCiceroMode() || (GetWin32ClientInfo()->dwCompatFlags2 & 2))
+ if (!IS_CICERO_MODE() || (GetWin32ClientInfo()->dwCompatFlags2 & 2))
return E_NOINTERFACE;
return Imm32CtfImeDestroyInputContext(hIMC);
@@ -58,7 +58,7 @@ HRESULT APIENTRY CtfImmTIMCreateInputContext(HIMC hIMC)
*/
BOOL WINAPI CtfImmIsCiceroEnabled(VOID)
{
- return Imm32IsCiceroMode();
+ return IS_CICERO_MODE();
}
/***********************************************************************
@@ -116,7 +116,7 @@ BOOL WINAPI CtfImmIsGuidMapEnable(HIMC hIMC)
TRACE("(%p)\n", hIMC);
- if (!Imm32IsCiceroMode() || Imm32Is16BitMode())
+ if (!IS_CICERO_MODE() || Imm32Is16BitMode())
return ret;
dwThreadId = (DWORD)NtUserQueryInputContext(hIMC, QIC_INPUTTHREADID);
@@ -150,7 +150,7 @@ HRESULT WINAPI CtfImmGetGuidAtom(HIMC hIMC, DWORD dwUnknown, LPDWORD
pdwGuidAtom
*pdwGuidAtom = 0;
- if (!Imm32IsCiceroMode() || Imm32Is16BitMode())
+ if (!IS_CICERO_MODE() || Imm32Is16BitMode())
return hr;
dwThreadId = (DWORD)NtUserQueryInputContext(hIMC, QIC_INPUTTHREADID);
diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c
index dd3519087a4..1b2b0c66c2d 100644
--- a/dll/win32/imm32/ime.c
+++ b/dll/win32/imm32/ime.c
@@ -59,7 +59,7 @@ BOOL APIENTRY Imm32InquireIme(PIMEDPI pImeDpi)
if (!pImeDpi->ImeInquire(pImeInfo, szUIClass, dwSysInfoFlags))
return FALSE;
}
- else if (Imm32IsCiceroMode() && pImeDpi->CtfImeInquireExW)
+ else if (IS_CICERO_MODE() && pImeDpi->CtfImeInquireExW)
{
if (!pImeDpi->CtfImeInquireExW(pImeInfo, szUIClass, dwSysInfoFlags,
pImeDpi->hKL))
return FALSE;
@@ -296,7 +296,7 @@ PIMEDPI APIENTRY Imm32FindOrLoadImeDpi(HKL hKL)
{
PIMEDPI pImeDpi;
- if (!IS_IME_HKL(hKL) && (!Imm32IsCiceroMode() || Imm32Is16BitMode()))
+ if (!IS_IME_HKL(hKL) && (!IS_CICERO_MODE() || Imm32Is16BitMode()))
return NULL;
pImeDpi = ImmLockImeDpi(hKL);
@@ -311,7 +311,7 @@ ImeDpi_Escape(PIMEDPI pImeDpi, HIMC hIMC, UINT uSubFunc, LPVOID
lpData, HKL hKL)
if (IS_IME_HKL(hKL))
return pImeDpi->ImeEscape(hIMC, uSubFunc, lpData);
- if (Imm32IsCiceroMode() && pImeDpi->CtfImeEscapeEx)
+ if (IS_CICERO_MODE() && pImeDpi->CtfImeEscapeEx)
return pImeDpi->CtfImeEscapeEx(hIMC, uSubFunc, lpData, hKL);
return 0;
@@ -886,7 +886,7 @@ ImmGetImeInfoEx(PIMEINFOEX pImeInfoEx, IMEINFOEXCLASS SearchType,
PVOID pvSearch
if (!IS_IME_HKL(hKL))
{
if (!CtfImmIsTextFrameServiceDisabled() ||
- !Imm32IsCiceroMode() || Imm32Is16BitMode())
+ !IS_CICERO_MODE() || Imm32Is16BitMode())
{
return FALSE;
}
@@ -997,7 +997,7 @@ BOOL WINAPI ImmLoadIME(HKL hKL)
{
PIMEDPI pImeDpi;
- if (!IS_IME_HKL(hKL) && (!Imm32IsCiceroMode() || Imm32Is16BitMode()))
+ if (!IS_IME_HKL(hKL) && (!IS_CICERO_MODE() || Imm32Is16BitMode()))
return FALSE;
pImeDpi = Imm32FindImeDpi(hKL);
@@ -1825,7 +1825,7 @@ BOOL WINAPI ImmSetConversionStatus(HIMC hIMC, DWORD fdwConversion,
DWORD fdwSent
TRACE("(%p, 0x%lX, 0x%lX)\n", hIMC, fdwConversion, fdwSentence);
hKL = GetKeyboardLayout(0);
- if (!IS_IME_HKL(hKL) && Imm32IsCiceroMode() && !Imm32Is16BitMode())
+ if (!IS_IME_HKL(hKL) && IS_CICERO_MODE() && !Imm32Is16BitMode())
fUseCicero = TRUE;
if (Imm32IsCrossThreadAccess(hIMC))
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c
index 13512cadb11..b5f288bfa5b 100644
--- a/dll/win32/imm32/imm.c
+++ b/dll/win32/imm32/imm.c
@@ -62,7 +62,7 @@ BOOL WINAPI ImmLoadLayout(HKL hKL, PIMEINFOEX pImeInfoEx)
ZeroMemory(pImeInfoEx, sizeof(IMEINFOEX));
- if (IS_IME_HKL(hKL) || !Imm32IsCiceroMode() || Imm32Is16BitMode())
+ if (IS_IME_HKL(hKL) || !IS_CICERO_MODE() || Imm32Is16BitMode())
{
StringCchPrintfW(szLayout, _countof(szLayout), L"%s\\%08lX",
REGKEY_KEYBOARD_LAYOUTS, HandleToUlong(hKL));
@@ -220,7 +220,7 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC
hIMC)
{
if (IS_IME_HKL(hOldKL))
pOldImeDpi->ImeSelect(hIMC, FALSE);
- else if (Imm32IsCiceroMode() && !Imm32Is16BitMode() &&
pOldImeDpi->CtfImeSelectEx)
+ else if (IS_CICERO_MODE() && !Imm32Is16BitMode() &&
pOldImeDpi->CtfImeSelectEx)
pOldImeDpi->CtfImeSelectEx(hIMC, FALSE, hOldKL);
}
pClientImc->hKL = NULL;
@@ -228,7 +228,7 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC
hIMC)
if (CtfImmIsTextFrameServiceDisabled())
{
- if (IS_IMM_MODE() && !Imm32IsCiceroMode())
+ if (IS_IMM_MODE() && !IS_CICERO_MODE())
{
bIsNewHKLIme = IS_IME_HKL(hNewKL);
bIsOldHKLIme = IS_IME_HKL(hOldKL);
@@ -242,7 +242,7 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC
hIMC)
{
if (IS_IME_HKL(hNewKL))
pNewImeDpi->ImeSelect(hIMC, TRUE);
- else if (Imm32IsCiceroMode() && !Imm32Is16BitMode() &&
pNewImeDpi->CtfImeSelectEx)
+ else if (IS_CICERO_MODE() && !Imm32Is16BitMode() &&
pNewImeDpi->CtfImeSelectEx)
pNewImeDpi->CtfImeSelectEx(hIMC, TRUE, hNewKL);
pClientImc->hKL = hNewKL;
@@ -389,7 +389,7 @@ VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC
hIMC)
{
if (IS_IME_HKL(hNewKL))
pNewImeDpi->ImeSelect(hIMC, TRUE);
- else if (Imm32IsCiceroMode() && !Imm32Is16BitMode() &&
pNewImeDpi->CtfImeSelectEx)
+ else if (IS_CICERO_MODE() && !Imm32Is16BitMode() &&
pNewImeDpi->CtfImeSelectEx)
pNewImeDpi->CtfImeSelectEx(hIMC, TRUE, hNewKL);
pClientImc->hKL = hNewKL;
@@ -681,7 +681,7 @@ BOOL APIENTRY Imm32DestroyInputContext(HIMC hIMC, HKL hKL, BOOL
bKeep)
{
if (IS_IME_HKL(hKL))
pImeDpi->ImeSelect(hIMC, FALSE);
- else if (Imm32IsCiceroMode() && !Imm32Is16BitMode())
+ else if (IS_CICERO_MODE() && !Imm32Is16BitMode())
pImeDpi->CtfImeSelectEx(hIMC, FALSE, hKL);
ImmUnlockImeDpi(pImeDpi);
@@ -781,7 +781,7 @@ Imm32CreateInputContext(HIMC hIMC, LPINPUTCONTEXT pIC, PCLIENTIMC
pClientImc, HK
{
if (IS_IME_HKL(hKL))
pImeDpi->ImeSelect(hIMC, TRUE);
- else if (Imm32IsCiceroMode() && !Imm32Is16BitMode() &&
pImeDpi->CtfImeSelectEx)
+ else if (IS_CICERO_MODE() && !Imm32Is16BitMode() &&
pImeDpi->CtfImeSelectEx)
pImeDpi->CtfImeSelectEx(hIMC, TRUE, hKL);
}
@@ -831,7 +831,7 @@ LPINPUTCONTEXT APIENTRY Imm32InternalLockIMC(HIMC hIMC, BOOL fSelect)
}
dwThreadId = (DWORD)NtUserQueryInputContext(hIMC, QIC_INPUTTHREADID);
- if (dwThreadId == GetCurrentThreadId() && Imm32IsCiceroMode() &&
!Imm32Is16BitMode())
+ if (dwThreadId == GetCurrentThreadId() && IS_CICERO_MODE() &&
!Imm32Is16BitMode())
{
hOldKL = GetKeyboardLayout(0);
LangID = LOWORD(hOldKL);
@@ -1177,7 +1177,7 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive)
hKL = GetKeyboardLayout(0);
- if (Imm32IsCiceroMode() && !Imm32Is16BitMode())
+ if (IS_CICERO_MODE() && !Imm32Is16BitMode())
{
Imm32CiceroSetActiveContext(hIMC, fActive, hWnd, hKL);
hKL = GetKeyboardLayout(0);
diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h
index c87e6fa6e54..5c693eab26f 100644
--- a/dll/win32/imm32/precomp.h
+++ b/dll/win32/imm32/precomp.h
@@ -114,8 +114,6 @@ static inline BOOL Imm32IsCrossProcessAccess(HWND hWnd)
BOOL WINAPI Imm32IsImcAnsi(HIMC hIMC);
#define ImeDpi_IsUnicode(pImeDpi) ((pImeDpi)->ImeInfo.fdwProperty &
IME_PROP_UNICODE)
-#define IS_IMM_MODE() (gpsi && (gpsi->dwSRVIFlags &
SRVINFO_IMM32))
-#define Imm32IsCiceroMode() (gpsi && (gpsi->dwSRVIFlags &
SRVINFO_CICERO_ENABLED))
#define Imm32Is16BitMode() (GetWin32ClientInfo()->dwTIFlags & TIF_16BIT)
DWORD APIENTRY
diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h
index 2a6194841e0..f7d753b5361 100644
--- a/win32ss/include/ntuser.h
+++ b/win32ss/include/ntuser.h
@@ -1201,7 +1201,8 @@ typedef enum IMEINFOEXCLASS
} IMEINFOEXCLASS;
#define IS_IME_HKL(hkl) ((((ULONG_PTR)(hkl)) & 0xF0000000) == 0xE0000000)
-#define IS_CICERO_MODE() (gpsi->dwSRVIFlags & SRVINFO_CICERO_ENABLED)
+#define IS_IMM_MODE() (gpsi && (gpsi->dwSRVIFlags & SRVINFO_IMM32))
+#define IS_CICERO_MODE() (gpsi && (gpsi->dwSRVIFlags &
SRVINFO_CICERO_ENABLED))
typedef struct tagIMEUI
{
diff --git a/win32ss/user/ntuser/ntuser.h b/win32ss/user/ntuser/ntuser.h
index 5060a661305..01232f9323a 100644
--- a/win32ss/user/ntuser/ntuser.h
+++ b/win32ss/user/ntuser/ntuser.h
@@ -4,7 +4,6 @@
#define RETURN(value) { _ret_ = value; goto _cleanup_; }
#define CLEANUP /*unreachable*/ ASSERT(FALSE); _cleanup_
#define END_CLEANUP return _ret_;
-#define IS_IMM_MODE() (gpsi && (gpsi->dwSRVIFlags & SRVINFO_IMM32))
#define UserEnterCo UserEnterExclusive
#define UserLeaveCo UserLeave