mirror of
https://github.com/reactos/reactos.git
synced 2025-05-27 21:18:15 +00:00
[MSCTFIME] Implement CtfImeDispatchDefImeMessage (#6193)
and add IsMsImeMessage helper funciton. CORE-19360
This commit is contained in:
parent
084fae1eb4
commit
64378a88ba
2 changed files with 44 additions and 2 deletions
|
@ -26,6 +26,20 @@ UINT WM_MSIME_SHOWIMEPAD = 0;
|
||||||
UINT WM_MSIME_MOUSE = 0;
|
UINT WM_MSIME_MOUSE = 0;
|
||||||
UINT WM_MSIME_KEYMAP = 0;
|
UINT WM_MSIME_KEYMAP = 0;
|
||||||
|
|
||||||
|
BOOL IsMsImeMessage(UINT uMsg)
|
||||||
|
{
|
||||||
|
return (uMsg == WM_MSIME_SERVICE ||
|
||||||
|
uMsg == WM_MSIME_UIREADY ||
|
||||||
|
uMsg == WM_MSIME_RECONVERTREQUEST ||
|
||||||
|
uMsg == WM_MSIME_RECONVERT ||
|
||||||
|
uMsg == WM_MSIME_DOCUMENTFEED ||
|
||||||
|
uMsg == WM_MSIME_QUERYPOSITION ||
|
||||||
|
uMsg == WM_MSIME_MODEBIAS ||
|
||||||
|
uMsg == WM_MSIME_SHOWIMEPAD ||
|
||||||
|
uMsg == WM_MSIME_MOUSE ||
|
||||||
|
uMsg == WM_MSIME_KEYMAP);
|
||||||
|
}
|
||||||
|
|
||||||
typedef BOOLEAN (WINAPI *FN_DllShutDownInProgress)(VOID);
|
typedef BOOLEAN (WINAPI *FN_DllShutDownInProgress)(VOID);
|
||||||
|
|
||||||
EXTERN_C BOOLEAN WINAPI
|
EXTERN_C BOOLEAN WINAPI
|
||||||
|
@ -871,6 +885,11 @@ CtfImeProcessCicHotkey(
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CtfImeDispatchDefImeMessage (MSCTFIME.@)
|
||||||
|
*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
EXTERN_C LRESULT WINAPI
|
EXTERN_C LRESULT WINAPI
|
||||||
CtfImeDispatchDefImeMessage(
|
CtfImeDispatchDefImeMessage(
|
||||||
_In_ HWND hWnd,
|
_In_ HWND hWnd,
|
||||||
|
@ -878,8 +897,29 @@ CtfImeDispatchDefImeMessage(
|
||||||
_In_ WPARAM wParam,
|
_In_ WPARAM wParam,
|
||||||
_In_ LPARAM lParam)
|
_In_ LPARAM lParam)
|
||||||
{
|
{
|
||||||
FIXME("stub:(%p, %u, %p, %p)\n", hWnd, uMsg, wParam, lParam);
|
TRACE("(%p, %u, %p, %p)\n", hWnd, uMsg, wParam, lParam);
|
||||||
return 0;
|
|
||||||
|
TLS *pTLS = TLS::GetTLS();
|
||||||
|
if (pTLS)
|
||||||
|
{
|
||||||
|
if (uMsg == WM_CREATE)
|
||||||
|
++pTLS->m_cWnds;
|
||||||
|
else if (uMsg == WM_DESTROY)
|
||||||
|
--pTLS->m_cWnds;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsMsImeMessage(uMsg))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
HKL hKL = GetKeyboardLayout(0);
|
||||||
|
if (IS_IME_HKL(hKL))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
HWND hImeWnd = (HWND)SendMessageW(hWnd, WM_IME_NOTIFY, 0x17, 0);
|
||||||
|
if (!IsWindow(hImeWnd))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return SendMessageW(hImeWnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXTERN_C BOOL WINAPI
|
EXTERN_C BOOL WINAPI
|
||||||
|
|
|
@ -28,4 +28,6 @@
|
||||||
|
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
|
#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == 0xE0000000)
|
||||||
|
|
||||||
extern HINSTANCE g_hInst;
|
extern HINSTANCE g_hInst;
|
||||||
|
|
Loading…
Reference in a new issue