mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[IMM32][SDK] Add CtfAImmIsIME, CtfImmSetAppCompatFlags etc. (#5862)
- Add CtfAImmIsIME, CtfImmIsCiceroStartedInThread and CtfImmSetAppCompatFlags functions. - Implement CtfImmDispatchDefImeMessage function. - Modify imm32.spec. - Add the prototypes of ImmGetAppCompatFlags, CtfAImmIsIME, CtfImmIsCiceroStartedInThread, CtfImmSetAppCompatFlags, and CtfImmDispatchDefImeMessage into <imm32_undoc.h>. CORE-19268
This commit is contained in:
parent
64997887eb
commit
dabb3f4d61
5 changed files with 82 additions and 4 deletions
|
@ -29,6 +29,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm);
|
||||||
* this folder.
|
* this folder.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* "Active IMM" compatibility flags */
|
||||||
|
DWORD g_aimm_compat_flags = 0;
|
||||||
|
|
||||||
/* The instance of the CTF IME file */
|
/* The instance of the CTF IME file */
|
||||||
HINSTANCE g_hCtfIme = NULL;
|
HINSTANCE g_hCtfIme = NULL;
|
||||||
|
|
||||||
|
@ -192,6 +195,45 @@ CtfImeDestroyThreadMgr(VOID)
|
||||||
return CTF_IME_FN(CtfImeDestroyThreadMgr)();
|
return CTF_IME_FN(CtfImeDestroyThreadMgr)();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CtfAImmIsIME (IMM32.@)
|
||||||
|
*
|
||||||
|
* @return TRUE if CTF IME or IMM IME is enabled.
|
||||||
|
*/
|
||||||
|
BOOL WINAPI
|
||||||
|
CtfAImmIsIME(_In_ HKL hKL)
|
||||||
|
{
|
||||||
|
TRACE("(%p)\n", hKL);
|
||||||
|
if (!Imm32LoadCtfIme())
|
||||||
|
return ImmIsIME(hKL);
|
||||||
|
return CTF_IME_FN(CtfImeIsIME)(hKL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CtfImmIsCiceroStartedInThread (IMM32.@)
|
||||||
|
*
|
||||||
|
* @return TRUE if Cicero is started in the current thread.
|
||||||
|
*/
|
||||||
|
BOOL WINAPI
|
||||||
|
CtfImmIsCiceroStartedInThread(VOID)
|
||||||
|
{
|
||||||
|
TRACE("()\n");
|
||||||
|
return !!(GetWin32ClientInfo()->CI_flags & 0x200);
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CtfImmSetAppCompatFlags (IMM32.@)
|
||||||
|
*
|
||||||
|
* Sets the application compatibility flags.
|
||||||
|
*/
|
||||||
|
VOID WINAPI
|
||||||
|
CtfImmSetAppCompatFlags(_In_ DWORD dwFlags)
|
||||||
|
{
|
||||||
|
TRACE("(0x%08X)\n", dwFlags);
|
||||||
|
if (!(dwFlags & 0xF0FFFFFF))
|
||||||
|
g_aimm_compat_flags = dwFlags;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* This function calls the same name function of the CTF IME side.
|
* This function calls the same name function of the CTF IME side.
|
||||||
*/
|
*/
|
||||||
|
@ -361,6 +403,18 @@ CtfImmHideToolbarWnd(VOID)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL Imm32InsideLoaderLock(VOID)
|
||||||
|
{
|
||||||
|
return (NtCurrentTeb()->ProcessEnvironmentBlock->LoaderLock->OwningThread ==
|
||||||
|
NtCurrentTeb()->ClientId.UniqueThread);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME: Use RTL */
|
||||||
|
BOOL WINAPI RtlDllShutdownInProgress(VOID)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CtfImmDispatchDefImeMessage(IMM32.@)
|
* CtfImmDispatchDefImeMessage(IMM32.@)
|
||||||
*/
|
*/
|
||||||
|
@ -371,8 +425,12 @@ CtfImmDispatchDefImeMessage(
|
||||||
_In_ WPARAM wParam,
|
_In_ WPARAM wParam,
|
||||||
_In_ LPARAM lParam)
|
_In_ LPARAM lParam)
|
||||||
{
|
{
|
||||||
/* FIXME("(%p, %u, %p, %p)\n", hWnd, uMsg, wParam, lParam); */
|
TRACE("(%p, %u, %p, %p)\n", hWnd, uMsg, wParam, lParam);
|
||||||
return 0;
|
|
||||||
|
if (RtlDllShutdownInProgress() || Imm32InsideLoaderLock() || !Imm32LoadCtfIme())
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return CTF_IME_FN(CtfImeDispatchDefImeMessage)(hWnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
@ stdcall CtfAImmActivate(ptr)
|
@ stdcall CtfAImmActivate(ptr)
|
||||||
@ stdcall CtfAImmDeactivate(long)
|
@ stdcall CtfAImmDeactivate(long)
|
||||||
|
@ stdcall CtfAImmIsIME(ptr)
|
||||||
@ stdcall CtfImmIsCiceroEnabled()
|
@ stdcall CtfImmIsCiceroEnabled()
|
||||||
|
@ stdcall CtfImmIsCiceroStartedInThread()
|
||||||
@ stdcall CtfImmIsTextFrameServiceDisabled()
|
@ stdcall CtfImmIsTextFrameServiceDisabled()
|
||||||
@ stdcall CtfImmTIMActivate(ptr)
|
@ stdcall CtfImmTIMActivate(ptr)
|
||||||
@ stdcall CtfImmRestoreToolbarWnd(long)
|
@ stdcall CtfImmRestoreToolbarWnd(long)
|
||||||
|
@ -8,6 +10,7 @@
|
||||||
@ stdcall CtfImmDispatchDefImeMessage(ptr long ptr ptr)
|
@ stdcall CtfImmDispatchDefImeMessage(ptr long ptr ptr)
|
||||||
@ stdcall CtfImmIsGuidMapEnable(ptr)
|
@ stdcall CtfImmIsGuidMapEnable(ptr)
|
||||||
@ stdcall CtfImmGetGuidAtom(ptr long ptr)
|
@ stdcall CtfImmGetGuidAtom(ptr long ptr)
|
||||||
|
@ stdcall CtfImmSetAppCompatFlags(long)
|
||||||
@ stdcall ImmActivateLayout(ptr)
|
@ stdcall ImmActivateLayout(ptr)
|
||||||
@ stdcall ImmAssociateContext(ptr ptr)
|
@ stdcall ImmAssociateContext(ptr ptr)
|
||||||
@ stdcall ImmAssociateContextEx(ptr ptr long)
|
@ stdcall ImmAssociateContextEx(ptr ptr long)
|
||||||
|
@ -31,6 +34,7 @@
|
||||||
@ stdcall ImmEscapeW(long ptr long ptr)
|
@ stdcall ImmEscapeW(long ptr long ptr)
|
||||||
@ stdcall ImmFreeLayout(long)
|
@ stdcall ImmFreeLayout(long)
|
||||||
@ stdcall ImmGenerateMessage(ptr)
|
@ stdcall ImmGenerateMessage(ptr)
|
||||||
|
@ stdcall ImmGetAppCompatFlags(ptr)
|
||||||
@ stdcall ImmGetCandidateListA(long long ptr long)
|
@ stdcall ImmGetCandidateListA(long long ptr long)
|
||||||
@ stdcall ImmGetCandidateListCountA(long ptr)
|
@ stdcall ImmGetCandidateListCountA(long ptr)
|
||||||
@ stdcall ImmGetCandidateListCountW(long ptr)
|
@ stdcall ImmGetCandidateListCountW(long ptr)
|
||||||
|
@ -84,7 +88,6 @@
|
||||||
@ stdcall ImmLockIMCC(ptr)
|
@ stdcall ImmLockIMCC(ptr)
|
||||||
@ stdcall ImmLockImeDpi(ptr)
|
@ stdcall ImmLockImeDpi(ptr)
|
||||||
@ stdcall ImmNotifyIME(ptr long long long)
|
@ stdcall ImmNotifyIME(ptr long long long)
|
||||||
@ stub ImmPenAuxInput
|
|
||||||
@ stdcall ImmProcessKey(ptr long long long long)
|
@ stdcall ImmProcessKey(ptr long long long long)
|
||||||
@ stdcall ImmPutImeMenuItemsIntoMappedFile(ptr)
|
@ stdcall ImmPutImeMenuItemsIntoMappedFile(ptr)
|
||||||
@ stdcall ImmReSizeIMCC(ptr long)
|
@ stdcall ImmReSizeIMCC(ptr long)
|
||||||
|
|
|
@ -752,18 +752,23 @@ UINT WINAPI ImmGetVirtualKey(HWND hWnd)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* ImmGetAppCompatFlags (IMM32.@)
|
||||||
|
*/
|
||||||
DWORD WINAPI ImmGetAppCompatFlags(HIMC hIMC)
|
DWORD WINAPI ImmGetAppCompatFlags(HIMC hIMC)
|
||||||
{
|
{
|
||||||
PCLIENTIMC pClientIMC;
|
PCLIENTIMC pClientIMC;
|
||||||
DWORD dwFlags;
|
DWORD dwFlags;
|
||||||
|
|
||||||
|
TRACE("(%p)\n", hIMC);
|
||||||
|
|
||||||
pClientIMC = ImmLockClientImc(hIMC);
|
pClientIMC = ImmLockClientImc(hIMC);
|
||||||
if (IS_NULL_UNEXPECTEDLY(pClientIMC))
|
if (IS_NULL_UNEXPECTEDLY(pClientIMC))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
dwFlags = pClientIMC->dwCompatFlags;
|
dwFlags = pClientIMC->dwCompatFlags;
|
||||||
ImmUnlockClientImc(pClientIMC);
|
ImmUnlockClientImc(pClientIMC);
|
||||||
return dwFlags;
|
return (dwFlags | g_aimm_compat_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -75,6 +75,7 @@ extern PIMEDPI gpImeDpiList;
|
||||||
extern PSERVERINFO gpsi;
|
extern PSERVERINFO gpsi;
|
||||||
extern SHAREDINFO gSharedInfo;
|
extern SHAREDINFO gSharedInfo;
|
||||||
extern HANDLE ghImmHeap;
|
extern HANDLE ghImmHeap;
|
||||||
|
extern DWORD g_aimm_compat_flags;
|
||||||
|
|
||||||
BOOL Imm32GetSystemLibraryPath(LPWSTR pszPath, DWORD cchPath, LPCWSTR pszFileName);
|
BOOL Imm32GetSystemLibraryPath(LPWSTR pszPath, DWORD cchPath, LPCWSTR pszFileName);
|
||||||
VOID APIENTRY LogFontAnsiToWide(const LOGFONTA *plfA, LPLOGFONTW plfW);
|
VOID APIENTRY LogFontAnsiToWide(const LOGFONTA *plfA, LPLOGFONTW plfW);
|
||||||
|
|
|
@ -20,9 +20,20 @@ VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc);
|
||||||
PIMEDPI WINAPI ImmLockImeDpi(HKL hKL);
|
PIMEDPI WINAPI ImmLockImeDpi(HKL hKL);
|
||||||
VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi);
|
VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi);
|
||||||
HRESULT WINAPI CtfImmTIMActivate(HKL hKL);
|
HRESULT WINAPI CtfImmTIMActivate(HKL hKL);
|
||||||
|
DWORD WINAPI ImmGetAppCompatFlags(HIMC hIMC);
|
||||||
|
|
||||||
HRESULT WINAPI CtfAImmActivate(_Out_opt_ HINSTANCE *phinstCtfIme);
|
HRESULT WINAPI CtfAImmActivate(_Out_opt_ HINSTANCE *phinstCtfIme);
|
||||||
HRESULT WINAPI CtfAImmDeactivate(_In_ BOOL bDestroy);
|
HRESULT WINAPI CtfAImmDeactivate(_In_ BOOL bDestroy);
|
||||||
|
BOOL WINAPI CtfAImmIsIME(_In_ HKL hKL);
|
||||||
|
BOOL WINAPI CtfImmIsCiceroStartedInThread(VOID);
|
||||||
|
VOID WINAPI CtfImmSetAppCompatFlags(_In_ DWORD dwFlags);
|
||||||
|
|
||||||
|
LRESULT WINAPI
|
||||||
|
CtfImmDispatchDefImeMessage(
|
||||||
|
_In_ HWND hWnd,
|
||||||
|
_In_ UINT uMsg,
|
||||||
|
_In_ WPARAM wParam,
|
||||||
|
_In_ LPARAM lParam);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|
Loading…
Reference in a new issue