[IMM32] s/Imm32IsCiceroMode/IS_CICERO_MODE/

CORE-11700
This commit is contained in:
Katayama Hirofumi MZ 2022-09-08 09:40:50 +09:00
parent f47c261ad0
commit 5b87c95e23
6 changed files with 21 additions and 23 deletions

View file

@ -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);

View file

@ -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))

View file

@ -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);

View file

@ -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

View file

@ -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
{

View file

@ -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