https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8ea93d2ab28520dcd5e7e…
commit 8ea93d2ab28520dcd5e7ea0a97b48be97353b802
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Feb 13 20:33:14 2024 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Feb 13 20:33:14 2024 +0900
[REACTOS] Standardize <imm.h> and <immdev.h> (#6493)
Improve header compatibility and
code quality.
JIRA issue: CORE-19268
- Improve <imm.h> and <immdev.h>
compatibility by correctly choosing
the items.
- Use <immdev.h> instead of
<ddk/immdev.h>.
- Move INPUTCONTEXTDX, IMEINFOEX,
IMEDPI, and CLIENTIMC into
<imm32_undoc.h>.
- Adapt to these changes.
---
dll/ime/msctfime/msctfime.h | 5 +-
dll/win32/comctl32/edit.c | 1 +
dll/win32/imm32/precomp.h | 4 +-
dll/win32/msctf/utils.cpp | 1 -
dll/win32/msutb/precomp.h | 1 -
dll/win32/riched20/editor.c | 3 +-
modules/rostests/apitests/imm32/precomp.h | 4 +-
modules/rostests/apitests/win32nt/win32nt.h | 2 +
sdk/include/ddk/immdev.h | 362 +++++------
sdk/include/psdk/imm.h | 902 +++++++++++++---------------
sdk/include/reactos/imm32_undoc.h | 211 ++++++-
win32ss/include/ntuser.h | 28 -
win32ss/pch.h | 3 +
win32ss/user/ntuser/focus.c | 2 +-
win32ss/user/ntuser/kbdlayout.c | 2 +-
win32ss/user/ntuser/window.c | 2 +-
win32ss/user/ntuser/winpos.c | 2 +-
win32ss/user/user32/include/user32.h | 2 +
win32ss/user/user32/misc/imm.c | 2 +-
win32ss/user/user32/windows/defwnd.c | 2 +-
win32ss/user/winsrv/winsrv.h | 2 +
21 files changed, 798 insertions(+), 745 deletions(-)
diff --git a/dll/ime/msctfime/msctfime.h b/dll/ime/msctfime/msctfime.h
index 5e677abef8f..697aa8da684 100644
--- a/dll/ime/msctfime/msctfime.h
+++ b/dll/ime/msctfime/msctfime.h
@@ -15,7 +15,8 @@
#include <windows.h>
#include <imm.h>
-#include <ddk/immdev.h>
+#include <immdev.h>
+#include <imm32_undoc.h>
#include <cguid.h>
#include <tchar.h>
#include <msctf.h>
@@ -34,6 +35,4 @@
#include "resource.h"
-#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == 0xE0000000)
-
extern HINSTANCE g_hInst;
diff --git a/dll/win32/comctl32/edit.c b/dll/win32/comctl32/edit.c
index fc6b53755ef..ccd9373b199 100644
--- a/dll/win32/comctl32/edit.c
+++ b/dll/win32/comctl32/edit.c
@@ -47,6 +47,7 @@
#include "imm.h"
#ifdef __REACTOS__
#include <immdev.h>
+ #include <imm32_undoc.h>
#endif
#include "usp10.h"
#include "commctrl.h"
diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h
index 7bb2569777b..1f309737211 100644
--- a/dll/win32/imm32/precomp.h
+++ b/dll/win32/imm32/precomp.h
@@ -27,7 +27,8 @@
#include <winver.h>
#include <imm.h>
-#include <ddk/immdev.h>
+#include <immdev.h>
+#include <imm32_undoc.h>
#define NTOS_MODE_USER
#include <ndk/umtypes.h>
@@ -40,7 +41,6 @@
/* Undocumented user definitions */
#include <undocuser.h>
-#include <imm32_undoc.h>
#include <strsafe.h>
diff --git a/dll/win32/msctf/utils.cpp b/dll/win32/msctf/utils.cpp
index 8e798094af7..1b26fa92684 100644
--- a/dll/win32/msctf/utils.cpp
+++ b/dll/win32/msctf/utils.cpp
@@ -16,7 +16,6 @@
#include <windows.h>
#include <sddl.h>
#include <imm.h>
-#include <ddk/immdev.h>
#include <cguid.h>
#include <tchar.h>
#include <msctf.h>
diff --git a/dll/win32/msutb/precomp.h b/dll/win32/msutb/precomp.h
index 08b64cdd9fb..53e68d549b5 100644
--- a/dll/win32/msutb/precomp.h
+++ b/dll/win32/msutb/precomp.h
@@ -16,7 +16,6 @@
#include <windows.h>
#include <oleacc.h>
#include <imm.h>
-#include <ddk/immdev.h>
#include <undocuser.h>
#include <cguid.h>
#include <msctf.h>
diff --git a/dll/win32/riched20/editor.c b/dll/win32/riched20/editor.c
index bf13c417542..cbc959851ec 100644
--- a/dll/win32/riched20/editor.c
+++ b/dll/win32/riched20/editor.c
@@ -234,7 +234,8 @@
#include "rtf.h"
#include "imm.h"
#ifdef __REACTOS__
- #include "immdev.h"
+ #include <immdev.h>
+ #include <imm32_undoc.h>
#endif
#include "res.h"
diff --git a/modules/rostests/apitests/imm32/precomp.h
b/modules/rostests/apitests/imm32/precomp.h
index dbc03f99384..98d85372e68 100644
--- a/modules/rostests/apitests/imm32/precomp.h
+++ b/modules/rostests/apitests/imm32/precomp.h
@@ -4,13 +4,13 @@
#define WIN32_NO_STATUS
#include <windows.h>
#include <imm.h>
-#include <ddk/immdev.h>
+#include <immdev.h>
+#include <imm32_undoc.h>
#include <pseh/pseh2.h>
#include <ndk/umtypes.h>
#include <ndk/pstypes.h>
#include "../../../win32ss/include/ntuser.h"
#include <undocuser.h>
-#include <imm32_undoc.h>
#include <ndk/rtlfuncs.h>
#include <wine/test.h>
#include <stdio.h>
diff --git a/modules/rostests/apitests/win32nt/win32nt.h
b/modules/rostests/apitests/win32nt/win32nt.h
index 001e15388da..3e5fd818f94 100644
--- a/modules/rostests/apitests/win32nt/win32nt.h
+++ b/modules/rostests/apitests/win32nt/win32nt.h
@@ -14,6 +14,8 @@
#include <wingdi.h>
#include <objbase.h>
#include <imm.h>
+#include <immdev.h>
+#include <imm32_undoc.h>
#include <winddi.h>
#include <prntfont.h>
diff --git a/sdk/include/ddk/immdev.h b/sdk/include/ddk/immdev.h
index 3d3b4b5686a..40639571eee 100644
--- a/sdk/include/ddk/immdev.h
+++ b/sdk/include/ddk/immdev.h
@@ -2,7 +2,7 @@
* PROJECT: ReactOS headers
* LICENSE: LGPL-2.0-or-later (
https://spdx.org/licenses/LGPL-2.0-or-later)
* PURPOSE: Providing DDK-compatible <immdev.h> and IME/IMM development helper
- * COPYRIGHT: Copyright 2021-2022 Katayama Hirofumi MZ
<katayama.hirofumi.mz(a)gmail.com>
+ * COPYRIGHT: Copyright 2021-2024 Katayama Hirofumi MZ
<katayama.hirofumi.mz(a)gmail.com>
*/
#ifndef _IMMDEV_
@@ -17,14 +17,70 @@
extern "C" {
#endif
+typedef struct _tagIMEINFO {
+ DWORD dwPrivateDataSize;
+ DWORD fdwProperty;
+ DWORD fdwConversionCaps;
+ DWORD fdwSentenceCaps;
+ DWORD fdwUICaps;
+ DWORD fdwSCSCaps;
+ DWORD fdwSelectCaps;
+} IMEINFO, *PIMEINFO, NEAR *NPIMEINFO, FAR *LPIMEINFO;
+
+typedef struct tagCANDIDATEINFO {
+ DWORD dwSize;
+ DWORD dwCount;
+ DWORD dwOffset[32];
+ DWORD dwPrivateSize;
+ DWORD dwPrivateOffset;
+} CANDIDATEINFO, *PCANDIDATEINFO, NEAR *NPCANDIDATEINFO, FAR *LPCANDIDATEINFO;
+
+#if (WINVER >= 0x040A)
BOOL WINAPI ImmDisableTextFrameService(_In_ DWORD dwThreadId);
-BOOL WINAPI CtfImmIsCiceroStartedInThread(VOID);
+#endif
-typedef struct tagSOFTKBDDATA
-{
+typedef struct tagSOFTKBDDATA {
UINT uCount;
- WORD wCode[1][256];
-} SOFTKBDDATA, *PSOFTKBDDATA, *LPSOFTKBDDATA;
+ WORD wCode[ANYSIZE_ARRAY][256];
+} SOFTKBDDATA, *PSOFTKBDDATA, NEAR *NPSOFTKBDDATA, FAR *LPSOFTKBDDATA;
+
+typedef struct tagCOMPOSITIONSTRING {
+ DWORD dwSize;
+ DWORD dwCompReadAttrLen;
+ DWORD dwCompReadAttrOffset;
+ DWORD dwCompReadClauseLen;
+ DWORD dwCompReadClauseOffset;
+ DWORD dwCompReadStrLen;
+ DWORD dwCompReadStrOffset;
+ DWORD dwCompAttrLen;
+ DWORD dwCompAttrOffset;
+ DWORD dwCompClauseLen;
+ DWORD dwCompClauseOffset;
+ DWORD dwCompStrLen;
+ DWORD dwCompStrOffset;
+ DWORD dwCursorPos;
+ DWORD dwDeltaStart;
+ DWORD dwResultReadClauseLen;
+ DWORD dwResultReadClauseOffset;
+ DWORD dwResultReadStrLen;
+ DWORD dwResultReadStrOffset;
+ DWORD dwResultClauseLen;
+ DWORD dwResultClauseOffset;
+ DWORD dwResultStrLen;
+ DWORD dwResultStrOffset;
+ DWORD dwPrivateSize;
+ DWORD dwPrivateOffset;
+} COMPOSITIONSTRING, *PCOMPOSITIONSTRING, NEAR *NPCOMPOSITIONSTRING, FAR
*LPCOMPOSITIONSTRING;
+
+typedef struct tagGUIDELINE {
+ DWORD dwSize;
+ DWORD dwLevel;
+ DWORD dwIndex;
+ DWORD dwStrLen;
+ DWORD dwStrOffset;
+ DWORD dwPrivateSize;
+ DWORD dwPrivateOffset;
+} GUIDELINE, *PGUIDELINE, NEAR *NPGUIDELINE, FAR *LPGUIDELINE;
/* wParam for WM_IME_CONTROL */
#define IMC_GETCONVERSIONMODE 0x0001
@@ -90,70 +146,30 @@ typedef struct _tagINPUTCONTEXT {
HIMCC hMsgBuf;
DWORD fdwInit;
DWORD dwReserve[3];
-} INPUTCONTEXT, *PINPUTCONTEXT, *LPINPUTCONTEXT;
+} INPUTCONTEXT, *PINPUTCONTEXT, NEAR *NPINPUTCONTEXT, FAR *LPINPUTCONTEXT;
-#ifdef _WIN64
-C_ASSERT(offsetof(INPUTCONTEXT, hWnd) == 0x0);
-C_ASSERT(offsetof(INPUTCONTEXT, fOpen) == 0x8);
-C_ASSERT(offsetof(INPUTCONTEXT, ptStatusWndPos) == 0xc);
-C_ASSERT(offsetof(INPUTCONTEXT, ptSoftKbdPos) == 0x14);
-C_ASSERT(offsetof(INPUTCONTEXT, fdwConversion) == 0x1c);
-C_ASSERT(offsetof(INPUTCONTEXT, fdwSentence) == 0x20);
-C_ASSERT(offsetof(INPUTCONTEXT, lfFont) == 0x24);
-C_ASSERT(offsetof(INPUTCONTEXT, cfCompForm) == 0x80);
-C_ASSERT(offsetof(INPUTCONTEXT, cfCandForm) == 0x9c);
-C_ASSERT(offsetof(INPUTCONTEXT, hCompStr) == 0x120);
-C_ASSERT(offsetof(INPUTCONTEXT, hCandInfo) == 0x128);
-C_ASSERT(offsetof(INPUTCONTEXT, hGuideLine) == 0x130);
-C_ASSERT(offsetof(INPUTCONTEXT, hPrivate) == 0x138);
-C_ASSERT(offsetof(INPUTCONTEXT, dwNumMsgBuf) == 0x140);
-C_ASSERT(offsetof(INPUTCONTEXT, hMsgBuf) == 0x148);
-C_ASSERT(offsetof(INPUTCONTEXT, fdwInit) == 0x150);
-C_ASSERT(offsetof(INPUTCONTEXT, dwReserve) == 0x154);
-C_ASSERT(sizeof(INPUTCONTEXT) == 0x160);
-#else
+#ifndef _WIN64
C_ASSERT(offsetof(INPUTCONTEXT, hWnd) == 0x0);
C_ASSERT(offsetof(INPUTCONTEXT, fOpen) == 0x4);
C_ASSERT(offsetof(INPUTCONTEXT, ptStatusWndPos) == 0x8);
C_ASSERT(offsetof(INPUTCONTEXT, ptSoftKbdPos) == 0x10);
C_ASSERT(offsetof(INPUTCONTEXT, fdwConversion) == 0x18);
-C_ASSERT(offsetof(INPUTCONTEXT, fdwSentence) == 0x1c);
+C_ASSERT(offsetof(INPUTCONTEXT, fdwSentence) == 0x1C);
C_ASSERT(offsetof(INPUTCONTEXT, lfFont) == 0x20);
-C_ASSERT(offsetof(INPUTCONTEXT, cfCompForm) == 0x7c);
+C_ASSERT(offsetof(INPUTCONTEXT, cfCompForm) == 0x7C);
C_ASSERT(offsetof(INPUTCONTEXT, cfCandForm) == 0x98);
C_ASSERT(offsetof(INPUTCONTEXT, hCompStr) == 0x118);
-C_ASSERT(offsetof(INPUTCONTEXT, hCandInfo) == 0x11c);
+C_ASSERT(offsetof(INPUTCONTEXT, hCandInfo) == 0x11C);
C_ASSERT(offsetof(INPUTCONTEXT, hGuideLine) == 0x120);
C_ASSERT(offsetof(INPUTCONTEXT, hPrivate) == 0x124);
C_ASSERT(offsetof(INPUTCONTEXT, dwNumMsgBuf) == 0x128);
-C_ASSERT(offsetof(INPUTCONTEXT, hMsgBuf) == 0x12c);
+C_ASSERT(offsetof(INPUTCONTEXT, hMsgBuf) == 0x12C);
C_ASSERT(offsetof(INPUTCONTEXT, fdwInit) == 0x130);
C_ASSERT(offsetof(INPUTCONTEXT, dwReserve) == 0x134);
C_ASSERT(sizeof(INPUTCONTEXT) == 0x140);
#endif
-struct IME_STATE;
-
-/* unconfirmed */
-#ifdef __cplusplus
-typedef struct INPUTCONTEXTDX : INPUTCONTEXT
-{
-#else
-typedef struct INPUTCONTEXTDX
-{
- INPUTCONTEXT;
-#endif
- UINT nVKey; // +0x140
- BOOL bNeedsTrans; // +0x144
- DWORD dwUnknown1;
- DWORD dwUIFlags; // +0x14c
- DWORD dwUnknown2;
- struct IME_STATE *pState; // +0x154
- DWORD dwChange; // +0x158
- HIMCC hCtfImeContext;
-} INPUTCONTEXTDX, *PINPUTCONTEXTDX, *LPINPUTCONTEXTDX;
-
-// bits of fdwInit of INPUTCONTEXT
+/* bits of fdwInit of INPUTCONTEXT */
#define INIT_STATUSWNDPOS 0x00000001
#define INIT_CONVERSION 0x00000002
#define INIT_SENTENCE 0x00000004
@@ -162,7 +178,7 @@ typedef struct INPUTCONTEXTDX
#define INIT_SOFTKBDPOS 0x00000020
#define INIT_GUIDMAP 0x00000040
-// bits for INPUTCONTEXTDX.dwChange
+/* bits for INPUTCONTEXTDX.dwChange */
#define INPUTCONTEXTDX_CHANGE_OPEN 0x1
#define INPUTCONTEXTDX_CHANGE_CONVERSION 0x2
#define INPUTCONTEXTDX_CHANGE_SENTENCE 0x4
@@ -172,7 +188,7 @@ typedef struct INPUTCONTEXTDX
#define WM_IME_REPORT 0x280
#endif
-// WM_IME_REPORT wParam
+/* WM_IME_REPORT wParam */
#define IR_STRINGSTART 0x100
#define IR_STRINGEND 0x101
#define IR_OPENCONVERT 0x120
@@ -186,193 +202,110 @@ typedef struct INPUTCONTEXTDX
#define IR_STRINGEX 0x180
#define IR_MODEINFO 0x190
-// for IR_UNDETERMINE
-typedef struct tagUNDETERMINESTRUCT
-{
- DWORD dwSize;
- UINT uDefIMESize;
- UINT uDefIMEPos;
- UINT uUndetTextLen;
- UINT uUndetTextPos;
- UINT uUndetAttrPos;
- UINT uCursorPos;
- UINT uDeltaStart;
- UINT uDetermineTextLen;
- UINT uDetermineTextPos;
- UINT uDetermineDelimPos;
- UINT uYomiTextLen;
- UINT uYomiTextPos;
- UINT uYomiDelimPos;
-} UNDETERMINESTRUCT, *PUNDETERMINESTRUCT, *LPUNDETERMINESTRUCT;
-
-LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC);
-
-typedef struct IME_SUBSTATE
-{
- struct IME_SUBSTATE *pNext;
- HKL hKL;
- DWORD dwValue;
-} IME_SUBSTATE, *PIME_SUBSTATE;
+/* IMC */
-#ifndef _WIN64
-C_ASSERT(sizeof(IME_SUBSTATE) == 0xc);
-#endif
+LPINPUTCONTEXT WINAPI ImmLockIMC(_In_ HIMC hIMC);
+BOOL WINAPI ImmUnlockIMC(_In_ HIMC hIMC);
+DWORD WINAPI ImmGetIMCLockCount(_In_ HIMC hIMC);
-typedef struct IME_STATE
-{
- struct IME_STATE *pNext;
- WORD wLang;
- WORD fOpen;
- DWORD dwConversion;
- DWORD dwSentence;
- DWORD dwInit;
- PIME_SUBSTATE pSubState;
-} IME_STATE, *PIME_STATE;
+/* IMCC */
-#ifndef _WIN64
-C_ASSERT(sizeof(IME_STATE) == 0x18);
+HIMCC WINAPI ImmCreateIMCC(_In_ DWORD size);
+HIMCC WINAPI ImmDestroyIMCC(_In_ HIMCC block);
+LPVOID WINAPI ImmLockIMCC(_In_ HIMCC imcc);
+BOOL WINAPI ImmUnlockIMCC(_In_ HIMCC imcc);
+DWORD WINAPI ImmGetIMCCLockCount(_In_ HIMCC imcc);
+HIMCC WINAPI ImmReSizeIMCC(_In_ HIMCC imcc, _In_ DWORD size);
+DWORD WINAPI ImmGetIMCCSize(_In_ HIMCC imcc);
+
+/* Messaging */
+
+BOOL WINAPI ImmGenerateMessage(_In_ HIMC hIMC);
+
+BOOL WINAPI
+ImmTranslateMessage(
+ _In_ HWND hwnd,
+ _In_ UINT msg,
+ _In_ WPARAM wParam,
+ _In_ LPARAM lKeyData);
+
+LRESULT WINAPI ImmRequestMessageA(_In_ HIMC hIMC, _In_ WPARAM wParam, _In_ LPARAM
lParam);
+LRESULT WINAPI ImmRequestMessageW(_In_ HIMC hIMC, _In_ WPARAM wParam, _In_ LPARAM
lParam);
+
+#ifdef UNICODE
+ #define ImmRequestMessage ImmRequestMessageW
+#else
+ #define ImmRequestMessage ImmRequestMessageA
#endif
-typedef struct _tagTRANSMSG
-{
+typedef struct _tagTRANSMSG {
UINT message;
WPARAM wParam;
LPARAM lParam;
-} TRANSMSG, *PTRANSMSG, *LPTRANSMSG;
+} TRANSMSG, *PTRANSMSG, NEAR *NPTRANSMSG, FAR *LPTRANSMSG;
-typedef struct _tagTRANSMSGLIST
-{
+typedef struct _tagTRANSMSGLIST {
UINT uMsgCount;
TRANSMSG TransMsg[ANYSIZE_ARRAY];
-} TRANSMSGLIST, *PTRANSMSGLIST, *LPTRANSMSGLIST;
-
-#define DEFINE_IME_ENTRY(type, name, params, extended) typedef type (WINAPI *FN_##name)
params;
-#include <imetable.h>
-#undef DEFINE_IME_ENTRY
-
-typedef struct IMEDPI
-{
- struct IMEDPI *pNext;
- HINSTANCE hInst;
- HKL hKL;
- IMEINFO ImeInfo;
- UINT uCodePage;
- WCHAR szUIClass[16];
- DWORD cLockObj;
- DWORD dwFlags;
-#define DEFINE_IME_ENTRY(type, name, params, extended) FN_##name name;
-#include <imetable.h>
-#undef DEFINE_IME_ENTRY
-} IMEDPI, *PIMEDPI;
+} TRANSMSGLIST, *PTRANSMSGLIST, NEAR *NPTRANSMSGLIST, FAR *LPTRANSMSGLIST;
-#ifndef _WIN64
-C_ASSERT(offsetof(IMEDPI, pNext) == 0x0);
-C_ASSERT(offsetof(IMEDPI, hInst) == 0x4);
-C_ASSERT(offsetof(IMEDPI, hKL) == 0x8);
-C_ASSERT(offsetof(IMEDPI, ImeInfo) == 0xc);
-C_ASSERT(offsetof(IMEDPI, uCodePage) == 0x28);
-C_ASSERT(offsetof(IMEDPI, szUIClass) == 0x2c);
-C_ASSERT(offsetof(IMEDPI, cLockObj) == 0x4c);
-C_ASSERT(offsetof(IMEDPI, dwFlags) == 0x50);
-C_ASSERT(offsetof(IMEDPI, ImeInquire) == 0x54);
-C_ASSERT(offsetof(IMEDPI, ImeConversionList) == 0x58);
-C_ASSERT(offsetof(IMEDPI, ImeRegisterWord) == 0x5c);
-C_ASSERT(offsetof(IMEDPI, ImeUnregisterWord) == 0x60);
-C_ASSERT(offsetof(IMEDPI, ImeGetRegisterWordStyle) == 0x64);
-C_ASSERT(offsetof(IMEDPI, ImeEnumRegisterWord) == 0x68);
-C_ASSERT(offsetof(IMEDPI, ImeConfigure) == 0x6c);
-C_ASSERT(offsetof(IMEDPI, ImeDestroy) == 0x70);
-C_ASSERT(offsetof(IMEDPI, ImeEscape) == 0x74);
-C_ASSERT(offsetof(IMEDPI, ImeProcessKey) == 0x78);
-C_ASSERT(offsetof(IMEDPI, ImeSelect) == 0x7c);
-C_ASSERT(offsetof(IMEDPI, ImeSetActiveContext) == 0x80);
-C_ASSERT(offsetof(IMEDPI, ImeToAsciiEx) == 0x84);
-C_ASSERT(offsetof(IMEDPI, NotifyIME) == 0x88);
-C_ASSERT(offsetof(IMEDPI, ImeSetCompositionString) == 0x8c);
-C_ASSERT(offsetof(IMEDPI, ImeGetImeMenuItems) == 0x90);
-C_ASSERT(offsetof(IMEDPI, CtfImeInquireExW) == 0x94);
-C_ASSERT(offsetof(IMEDPI, CtfImeSelectEx) == 0x98);
-C_ASSERT(offsetof(IMEDPI, CtfImeEscapeEx) == 0x9c);
-C_ASSERT(offsetof(IMEDPI, CtfImeGetGuidAtom) == 0xa0);
-C_ASSERT(offsetof(IMEDPI, CtfImeIsGuidMapEnable) == 0xa4);
-C_ASSERT(sizeof(IMEDPI) == 0xa8);
-#endif
+/* Soft keyboard */
-/* flags for IMEDPI.dwFlags */
-#define IMEDPI_FLAG_UNLOADED 0x1
-#define IMEDPI_FLAG_LOCKED 0x2
-
-/* unconfirmed */
-typedef struct tagCLIENTIMC
-{
- HANDLE hInputContext; /* LocalAlloc'ed LHND */
- LONG cLockObj;
- DWORD dwFlags;
- DWORD dwCompatFlags;
- RTL_CRITICAL_SECTION cs;
- UINT uCodePage;
- HKL hKL;
- BOOL bCtfIme;
-} CLIENTIMC, *PCLIENTIMC;
+HWND WINAPI
+ImmCreateSoftKeyboard(
+ _In_ UINT uType,
+ _In_ HWND hwndParent,
+ _In_ INT x,
+ _In_ INT y);
-#ifndef _WIN64
-C_ASSERT(offsetof(CLIENTIMC, hInputContext) == 0x0);
-C_ASSERT(offsetof(CLIENTIMC, cLockObj) == 0x4);
-C_ASSERT(offsetof(CLIENTIMC, dwFlags) == 0x8);
-C_ASSERT(offsetof(CLIENTIMC, dwCompatFlags) == 0xc);
-C_ASSERT(offsetof(CLIENTIMC, cs) == 0x10);
-C_ASSERT(offsetof(CLIENTIMC, uCodePage) == 0x28);
-C_ASSERT(offsetof(CLIENTIMC, hKL) == 0x2c);
-C_ASSERT(sizeof(CLIENTIMC) == 0x34);
-#endif
+BOOL WINAPI
+ImmShowSoftKeyboard(
+ _In_ HWND hwndSoftKBD,
+ _In_ INT nCmdShow);
-/* flags for CLIENTIMC */
-#define CLIENTIMC_WIDE 0x1
-#define CLIENTIMC_ACTIVE 0x2
-#define CLIENTIMC_UNKNOWN4 0x20
-#define CLIENTIMC_DESTROY 0x40
-#define CLIENTIMC_DISABLEIME 0x80
-#define CLIENTIMC_UNKNOWN2 0x100
+BOOL WINAPI
+ImmDestroySoftKeyboard(
+ _In_ HWND hwndSoftKBD);
/* IME file interface */
BOOL WINAPI
ImeInquire(
_Out_ LPIMEINFO lpIMEInfo,
- _Out_ LPWSTR lpszWndClass,
+ _Out_ LPTSTR lpszWndClass,
_In_ DWORD dwSystemInfoFlags);
DWORD WINAPI
ImeConversionList(
_In_ HIMC hIMC,
- _In_ LPCWSTR lpSrc,
+ _In_ LPCTSTR lpSrc,
_Out_ LPCANDIDATELIST lpDst,
_In_ DWORD dwBufLen,
_In_ UINT uFlag);
BOOL WINAPI
ImeRegisterWord(
- _In_ LPCWSTR lpszReading,
+ _In_ LPCTSTR lpszReading,
_In_ DWORD dwStyle,
- _In_ LPCWSTR lpszString);
+ _In_ LPCTSTR lpszString);
BOOL WINAPI
ImeUnregisterWord(
- _In_ LPCWSTR lpszReading,
+ _In_ LPCTSTR lpszReading,
_In_ DWORD dwStyle,
- _In_ LPCWSTR lpszString);
+ _In_ LPCTSTR lpszString);
UINT WINAPI
ImeGetRegisterWordStyle(
_In_ UINT nItem,
- _Out_ LPSTYLEBUFW lpStyleBuf);
+ _Out_ LPSTYLEBUF lpStyleBuf);
UINT WINAPI
ImeEnumRegisterWord(
- _In_ REGISTERWORDENUMPROCW lpfnEnumProc,
- _In_opt_ LPCWSTR lpszReading,
+ _In_ REGISTERWORDENUMPROC lpfnEnumProc,
+ _In_opt_ LPCTSTR lpszReading,
_In_ DWORD dwStyle,
- _In_opt_ LPCWSTR lpszString,
+ _In_opt_ LPCTSTR lpszString,
_In_opt_ LPVOID lpData);
BOOL WINAPI
@@ -439,12 +372,41 @@ ImeGetImeMenuItems(
_In_ HIMC hIMC,
_In_ DWORD dwFlags,
_In_ DWORD dwType,
- _Inout_opt_ LPIMEMENUITEMINFOW lpImeParentMenu,
- _Inout_opt_ LPIMEMENUITEMINFOW lpImeMenu,
+ _Inout_opt_ LPIMEMENUITEMINFO lpImeParentMenu,
+ _Inout_opt_ LPIMEMENUITEMINFO lpImeMenu,
_In_ DWORD dwSize);
#ifdef __cplusplus
-} // extern "C"
+} /* extern "C" */
#endif
+/* IME Property bits */
+#define IME_PROP_END_UNLOAD 0x0001
+#define IME_PROP_KBD_CHAR_FIRST 0x0002
+#define IME_PROP_IGNORE_UPKEYS 0x0004
+#define IME_PROP_NEED_ALTKEY 0x0008
+#define IME_PROP_NO_KEYS_ON_CLOSE 0x0010
+#define IME_PROP_ACCEPT_WIDE_VKEY 0x0020
+
+/* for NI_CONTEXTUPDATED */
+#define IMC_SETCONVERSIONMODE 0x0002
+#define IMC_SETSENTENCEMODE 0x0004
+#define IMC_SETOPENSTATUS 0x0006
+
+/* dwAction for ImmNotifyIME */
+#define NI_CONTEXTUPDATED 0x0003
+#define NI_OPENCANDIDATE 0x0010
+#define NI_CLOSECANDIDATE 0x0011
+#define NI_SELECTCANDIDATESTR 0x0012
+#define NI_CHANGECANDIDATELIST 0x0013
+#define NI_FINALIZECONVERSIONRESULT 0x0014
+#define NI_COMPOSITIONSTR 0x0015
+#define NI_SETCANDIDATE_PAGESTART 0x0016
+#define NI_SETCANDIDATE_PAGESIZE 0x0017
+#define NI_IMEMENUSELECTED 0x0018
+
+/* dwSystemInfoFlags bits */
+#define IME_SYSINFO_WINLOGON 0x0001
+#define IME_SYSINFO_WOW16 0x0002
+
#endif /* ndef _IMMDEV_ */
diff --git a/sdk/include/psdk/imm.h b/sdk/include/psdk/imm.h
index 7d63409ad5f..9c2e8df039a 100644
--- a/sdk/include/psdk/imm.h
+++ b/sdk/include/psdk/imm.h
@@ -1,21 +1,9 @@
/*
- * Declarations for IMM32
- *
- * Copyright (C) the Wine project
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ * PROJECT: ReactOS headers
+ * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later)
+ * PURPOSE: Declarations for IMM32
+ * COPYRIGHT: Copyright (C) the Wine project
+ * Copyright (C) 2021-2024 Katayama Hirofumi MZ
<katayama.hirofumi.mz(a)gmail.com>
*/
#ifndef __WINE_IMM_H
@@ -25,116 +13,118 @@
extern "C" {
#endif
-#ifdef __REACTOS__
+#if (WINVER >= 0x040A)
DECLARE_HANDLE(HIMC);
DECLARE_HANDLE(HIMCC);
-typedef HKL *LPHKL;
#else
-typedef HANDLE HIMC;
-typedef HANDLE HIMCC;
+typedef DWORD HIMC;
+typedef DWORD HIMCC;
#endif
+typedef HKL FAR *LPHKL;
+typedef UINT FAR *LPUINT;
+
typedef struct tagREGISTERWORDA {
LPSTR lpReading;
LPSTR lpWord;
-} REGISTERWORDA, *PREGISTERWORDA, *NPREGISTERWORDA, *LPREGISTERWORDA;
+} REGISTERWORDA, *PREGISTERWORDA, NEAR *NPREGISTERWORDA, FAR *LPREGISTERWORDA;
typedef struct tagREGISTERWORDW {
LPWSTR lpReading;
LPWSTR lpWord;
-} REGISTERWORDW, *PREGISTERWORDW, *NPREGISTERWORDW, *LPREGISTERWORDW;
-
-typedef int
-(CALLBACK *REGISTERWORDENUMPROCA)(
- _In_ LPCSTR,
- _In_ DWORD,
- _In_ LPCSTR,
- _In_ LPVOID);
-
-typedef int
-(CALLBACK *REGISTERWORDENUMPROCW)(
- _In_ LPCWSTR,
- _In_ DWORD,
- _In_ LPCWSTR,
- _In_ LPVOID);
-
-typedef struct tagCANDIDATEFORM
-{
- DWORD dwIndex;
- DWORD dwStyle;
- POINT ptCurrentPos;
- RECT rcArea;
-} CANDIDATEFORM, *LPCANDIDATEFORM;
-
-typedef struct tagCANDIDATELIST
-{
- DWORD dwSize;
- DWORD dwStyle;
- DWORD dwCount;
- DWORD dwSelection;
- DWORD dwPageStart;
- DWORD dwPageSize;
- DWORD dwOffset[1];
-} CANDIDATELIST, *LPCANDIDATELIST;
-
-typedef struct tagSTYLEBUFA
-{
- DWORD dwStyle;
- CHAR szDescription[32];
-} STYLEBUFA, *LPSTYLEBUFA;
-
-typedef struct tagSTYLEBUFW
-{
- DWORD dwStyle;
- WCHAR szDescription[32];
-} STYLEBUFW, *LPSTYLEBUFW;
-
-DECL_WINELIB_TYPE_AW(STYLEBUF)
-DECL_WINELIB_TYPE_AW(LPSTYLEBUF)
-
-typedef struct tagRECONVERTSTRING
-{
- DWORD dwSize;
- DWORD dwVersion;
- DWORD dwStrLen;
- DWORD dwStrOffset;
- DWORD dwCompStrLen;
- DWORD dwCompStrOffset;
- DWORD dwTargetStrLen;
- DWORD dwTargetStrOffset;
-} RECONVERTSTRING, *LPRECONVERTSTRING;
+} REGISTERWORDW, *PREGISTERWORDW, NEAR *NPREGISTERWORDW, FAR *LPREGISTERWORDW;
+
+typedef INT (CALLBACK *REGISTERWORDENUMPROCA)(
+ _In_ LPCSTR lpszReading,
+ _In_ DWORD dwStyle,
+ _In_ LPCSTR lpszRegister,
+ _Inout_opt_ LPVOID lpData);
+
+typedef INT (CALLBACK *REGISTERWORDENUMPROCW)(
+ _In_ LPCWSTR lpszReading,
+ _In_ DWORD dwStyle,
+ _In_ LPCWSTR lpszRegister,
+ _Inout_opt_ LPVOID lpData);
+
+typedef struct tagCANDIDATEFORM {
+ DWORD dwIndex;
+ DWORD dwStyle;
+ POINT ptCurrentPos;
+ RECT rcArea;
+} CANDIDATEFORM, *PCANDIDATEFORM, NEAR *NPCANDIDATEFORM, FAR *LPCANDIDATEFORM;
+
+typedef struct tagCANDIDATELIST {
+ DWORD dwSize;
+ DWORD dwStyle;
+ DWORD dwCount;
+ DWORD dwSelection;
+ DWORD dwPageStart;
+ DWORD dwPageSize;
+ DWORD dwOffset[ANYSIZE_ARRAY];
+} CANDIDATELIST, *PCANDIDATELIST, NEAR *NPCANDIDATELIST, FAR *LPCANDIDATELIST;
+
+#define STYLE_DESCRIPTION_SIZE 32
+
+typedef struct tagSTYLEBUFA {
+ DWORD dwStyle;
+ CHAR szDescription[STYLE_DESCRIPTION_SIZE];
+} STYLEBUFA, *PSTYLEBUFA, NEAR *NPSTYLEBUFA, FAR *LPSTYLEBUFA;
+typedef struct tagSTYLEBUFW {
+ DWORD dwStyle;
+ WCHAR szDescription[STYLE_DESCRIPTION_SIZE];
+} STYLEBUFW, *PSTYLEBUFW, NEAR *NPSTYLEBUFW, FAR *LPSTYLEBUFW;
+
+#if (WINVER >= 0x040A)
+
+typedef struct tagRECONVERTSTRING {
+ DWORD dwSize;
+ DWORD dwVersion;
+ DWORD dwStrLen;
+ DWORD dwStrOffset;
+ DWORD dwCompStrLen;
+ DWORD dwCompStrOffset;
+ DWORD dwTargetStrLen;
+ DWORD dwTargetStrOffset;
+} RECONVERTSTRING, *PRECONVERTSTRING, NEAR *NPRECONVERTSTRING, FAR *LPRECONVERTSTRING;
#define IMEMENUITEM_STRING_SIZE 80
-typedef struct tagIMEMENUITEMINFOA
-{
- UINT cbSize;
- UINT fType;
- UINT fState;
- UINT wID;
- HBITMAP hbmpChecked;
- HBITMAP hbmpUnchecked;
- DWORD dwItemData;
- CHAR szString[IMEMENUITEM_STRING_SIZE];
- HBITMAP hbmpItem;
-} IMEMENUITEMINFOA, *LPIMEMENUITEMINFOA;
-
-typedef struct tagIMEMENUITEMINFOW
-{
- UINT cbSize;
- UINT fType;
- UINT fState;
- UINT wID;
- HBITMAP hbmpChecked;
- HBITMAP hbmpUnchecked;
- DWORD dwItemData;
- WCHAR szString[IMEMENUITEM_STRING_SIZE];
- HBITMAP hbmpItem;
-} IMEMENUITEMINFOW, *LPIMEMENUITEMINFOW;
-
-DECL_WINELIB_TYPE_AW(IMEMENUITEMINFO)
-DECL_WINELIB_TYPE_AW(LPIMEMENUITEMINFO)
+typedef struct tagIMEMENUITEMINFOA {
+ UINT cbSize;
+ UINT fType;
+ UINT fState;
+ UINT wID;
+ HBITMAP hbmpChecked;
+ HBITMAP hbmpUnchecked;
+ DWORD dwItemData;
+ CHAR szString[IMEMENUITEM_STRING_SIZE];
+ HBITMAP hbmpItem;
+} IMEMENUITEMINFOA, *PIMEMENUITEMINFOA, NEAR *NPIMEMENUITEMINFOA, FAR
*LPIMEMENUITEMINFOA;
+
+typedef struct tagIMEMENUITEMINFOW {
+ UINT cbSize;
+ UINT fType;
+ UINT fState;
+ UINT wID;
+ HBITMAP hbmpChecked;
+ HBITMAP hbmpUnchecked;
+ DWORD dwItemData;
+ WCHAR szString[IMEMENUITEM_STRING_SIZE];
+ HBITMAP hbmpItem;
+} IMEMENUITEMINFOW, *PIMEMENUITEMINFOW, NEAR *NPIMEMENUITEMINFOW, FAR
*LPIMEMENUITEMINFOW;
+
+#ifdef UNICODE
+ typedef IMEMENUITEMINFOW IMEMENUITEMINFO;
+ typedef PIMEMENUITEMINFOW PIMEMENUITEMINFO;
+ typedef NPIMEMENUITEMINFOW NPIMEMENUITEMINFO;
+ typedef LPIMEMENUITEMINFOW LPIMEMENUITEMINFO;
+#else
+ typedef IMEMENUITEMINFOA IMEMENUITEMINFO;
+ typedef PIMEMENUITEMINFOA PIMEMENUITEMINFO;
+ typedef NPIMEMENUITEMINFOA NPIMEMENUITEMINFO;
+ typedef LPIMEMENUITEMINFOA LPIMEMENUITEMINFO;
+#endif
typedef struct tagIMECHARPOSITION {
DWORD dwSize;
@@ -144,131 +134,15 @@ typedef struct tagIMECHARPOSITION {
RECT rcDocument;
} IMECHARPOSITION, *PIMECHARPOSITION, *NPIMECHARPOSITION, *LPIMECHARPOSITION;
-typedef BOOL (CALLBACK* IMCENUMPROC)(HIMC, LPARAM);
-
-typedef struct _tagCOMPOSITIONFORM
-{
- DWORD dwStyle;
- POINT ptCurrentPos;
- RECT rcArea;
-} COMPOSITIONFORM, *LPCOMPOSITIONFORM;
-
-typedef struct _tagIMEINFO {
- DWORD dwPrivateDataSize;
- DWORD fdwProperty;
- DWORD fdwConversionCaps;
- DWORD fdwSentenceCaps;
- DWORD fdwUICaps;
- DWORD fdwSCSCaps;
- DWORD fdwSelectCaps;
-} IMEINFO, *LPIMEINFO;
-
-typedef struct tagCOMPOSITIONSTRING {
- DWORD dwSize;
- DWORD dwCompReadAttrLen;
- DWORD dwCompReadAttrOffset;
- DWORD dwCompReadClauseLen;
- DWORD dwCompReadClauseOffset;
- DWORD dwCompReadStrLen;
- DWORD dwCompReadStrOffset;
- DWORD dwCompAttrLen;
- DWORD dwCompAttrOffset;
- DWORD dwCompClauseLen;
- DWORD dwCompClauseOffset;
- DWORD dwCompStrLen;
- DWORD dwCompStrOffset;
- DWORD dwCursorPos;
- DWORD dwDeltaStart;
- DWORD dwResultReadClauseLen;
- DWORD dwResultReadClauseOffset;
- DWORD dwResultReadStrLen;
- DWORD dwResultReadStrOffset;
- DWORD dwResultClauseLen;
- DWORD dwResultClauseOffset;
- DWORD dwResultStrLen;
- DWORD dwResultStrOffset;
- DWORD dwPrivateSize;
- DWORD dwPrivateOffset;
-} COMPOSITIONSTRING, *LPCOMPOSITIONSTRING;
-
-typedef struct tagGUIDELINE {
- DWORD dwSize;
- DWORD dwLevel;
- DWORD dwIndex;
- DWORD dwStrLen;
- DWORD dwStrOffset;
- DWORD dwPrivateSize;
- DWORD dwPrivateOffset;
-} GUIDELINE, *LPGUIDELINE;
-
-typedef struct tagCANDIDATEINFO {
- DWORD dwSize;
- DWORD dwCount;
- DWORD dwOffset[32];
- DWORD dwPrivateSize;
- DWORD dwPrivateOffset;
-} CANDIDATEINFO, *LPCANDIDATEINFO;
-
-/* IME Property bits */
-#define IME_PROP_END_UNLOAD 0x0001
-#define IME_PROP_KBD_CHAR_FIRST 0x0002
-#define IME_PROP_IGNORE_UPKEYS 0x0004
-#define IME_PROP_NEED_ALTKEY 0x0008
-#define IME_PROP_NO_KEYS_ON_CLOSE 0x0010
-#define IME_PROP_ACCEPT_WIDE_VKEY 0x0020
-
-/* for NI_CONTEXTUPDATED */
-#define IMC_SETCONVERSIONMODE 0x0002
-#define IMC_SETSENTENCEMODE 0x0004
-#define IMC_SETOPENSTATUS 0x0006
-
-/* dwAction for ImmNotifyIME */
-#define NI_CONTEXTUPDATED 0x0003
-#define NI_OPENCANDIDATE 0x0010
-#define NI_CLOSECANDIDATE 0x0011
-#define NI_SELECTCANDIDATESTR 0x0012
-#define NI_CHANGECANDIDATELIST 0x0013
-#define NI_FINALIZECONVERSIONRESULT 0x0014
-#define NI_COMPOSITIONSTR 0x0015
-#define NI_SETCANDIDATE_PAGESTART 0x0016
-#define NI_SETCANDIDATE_PAGESIZE 0x0017
-#define NI_IMEMENUSELECTED 0x0018
-
-/* dwSystemInfoFlags bits */
-#define IME_SYSINFO_WINLOGON 0x0001
-#define IME_SYSINFO_WOW16 0x0002
-
-BOOL WINAPI ImmUnlockIMC(HIMC);
-DWORD WINAPI ImmGetIMCLockCount(HIMC);
-HIMCC WINAPI ImmCreateIMCC(DWORD);
-HIMCC WINAPI ImmDestroyIMCC(HIMCC);
-LPVOID WINAPI ImmLockIMCC(HIMCC);
-BOOL WINAPI ImmUnlockIMCC(HIMCC);
-DWORD WINAPI ImmGetIMCCLockCount(HIMCC);
-HIMCC WINAPI ImmReSizeIMCC(HIMCC, DWORD);
-DWORD WINAPI ImmGetIMCCSize(HIMCC);
-
-BOOL WINAPI ImmGenerateMessage(HIMC);
-LRESULT WINAPI ImmRequestMessageA(HIMC, WPARAM, LPARAM);
-LRESULT WINAPI ImmRequestMessageW(HIMC, WPARAM, LPARAM);
-#define ImmRequestMessage WINELIB_NAME_AW(ImmRequestMessage);
-BOOL WINAPI ImmTranslateMessage(HWND, UINT, WPARAM, LPARAM);
-
-HWND WINAPI
-ImmCreateSoftKeyboard(
- _In_ UINT uType,
- _In_ HWND hwndParent,
- _In_ INT x,
- _In_ INT y);
+typedef BOOL (CALLBACK *IMCENUMPROC)(_In_ HIMC hIMC, _In_ LPARAM lParam);
-BOOL WINAPI
-ImmShowSoftKeyboard(
- _In_ HWND hwndSoftKBD,
- _In_ INT nCmdShow);
+#endif /* WINVER >= 0x040A */
-BOOL WINAPI
-ImmDestroySoftKeyboard(
- _In_ HWND hwndSoftKBD);
+typedef struct _tagCOMPOSITIONFORM {
+ DWORD dwStyle;
+ POINT ptCurrentPos;
+ RECT rcArea;
+} COMPOSITIONFORM, *PCOMPOSITIONFORM, NEAR *NPCOMPOSITIONFORM, FAR *LPCOMPOSITIONFORM;
/* wParam for WM_IME_CONTROL */
#define IMC_GETCANDIDATEPOS 0x0007
@@ -282,10 +156,7 @@ ImmDestroySoftKeyboard(
#define IMC_CLOSESTATUSWINDOW 0x0021
#define IMC_OPENSTATUSWINDOW 0x0022
-/*
- * wParam for WM_IME_CONTROL to the soft keyboard
- * dwAction for ImmNotifyIME
- */
+/* dwAction for ImmNotifyIME */
#define NI_OPENCANDIDATE 0x0010
#define NI_CLOSECANDIDATE 0x0011
#define NI_SELECTCANDIDATESTR 0x0012
@@ -294,7 +165,7 @@ ImmDestroySoftKeyboard(
#define NI_COMPOSITIONSTR 0x0015
#define NI_SETCANDIDATE_PAGESTART 0x0016
#define NI_SETCANDIDATE_PAGESIZE 0x0017
-#define NI_IMEMENUSELECTED 0x0018
+#define NI_IMEMENUSELECTED 0x0018
/* lParam for WM_IME_SETCONTEXT */
#define ISC_SHOWUICANDIDATEWINDOW 0x00000001
@@ -303,14 +174,12 @@ ImmDestroySoftKeyboard(
#define ISC_SHOWUIALLCANDIDATEWINDOW 0x0000000F
#define ISC_SHOWUIALL 0xC000000F
-
/* dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR */
#define CPS_COMPLETE 0x0001
#define CPS_CONVERT 0x0002
#define CPS_REVERT 0x0003
#define CPS_CANCEL 0x0004
-
/* the modifiers of hot key */
#define MOD_ALT 0x0001
#define MOD_CONTROL 0x0002
@@ -322,7 +191,6 @@ ImmDestroySoftKeyboard(
#define MOD_ON_KEYUP 0x0800
#define MOD_IGNORE_ALL_MODIFIER 0x0400
-
/* Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F */
#define IME_CHOTKEY_IME_NONIME_TOGGLE 0x10
#define IME_CHOTKEY_SHAPE_TOGGLE 0x11
@@ -349,14 +217,10 @@ ImmDestroySoftKeyboard(
#define IME_ITHOTKEY_RESEND_RESULTSTR 0x200
#define IME_ITHOTKEY_PREVIOUS_COMPOSITION 0x201
#define IME_ITHOTKEY_UISTYLE_TOGGLE 0x202
-#define IME_ITHOTKEY_RECONVERTSTRING 0x203
+#define IME_ITHOTKEY_RECONVERTSTRING 0x203
#define IME_HOTKEY_PRIVATE_LAST 0x21F
-
-/*
- * dwSystemInfoFlags bits
- * parameter of ImmGetCompositionString
- */
+/* parameter of ImmGetCompositionString */
#define GCS_COMPREADSTR 0x0001
#define GCS_COMPREADATTR 0x0002
#define GCS_COMPREADCLAUSE 0x0004
@@ -374,11 +238,7 @@ ImmDestroySoftKeyboard(
#define CS_INSERTCHAR 0x2000
#define CS_NOMOVECARET 0x4000
-
-/*
- * bits of fdwInit of INPUTCONTEXT
- * IME version constants
- */
+/* IME version constants */
#define IMEVER_0310 0x0003000A
#define IMEVER_0400 0x00040000
@@ -387,7 +247,7 @@ ImmDestroySoftKeyboard(
#define IME_PROP_SPECIAL_UI 0x00020000
#define IME_PROP_CANDLIST_START_FROM_1 0x00040000
#define IME_PROP_UNICODE 0x00080000
-#define IME_PROP_COMPLETE_ON_UNSELECT 0x00100000
+#define IME_PROP_COMPLETE_ON_UNSELECT 0x00100000
/* IME UICapability bits */
#define UI_CAP_2700 0x00000001
@@ -398,14 +258,13 @@ ImmDestroySoftKeyboard(
/* ImmSetCompositionString Capability bits */
#define SCS_CAP_COMPSTR 0x00000001
#define SCS_CAP_MAKEREAD 0x00000002
-#define SCS_CAP_SETRECONVERTSTRING 0x00000004
+#define SCS_CAP_SETRECONVERTSTRING 0x00000004
/* IME WM_IME_SELECT inheritance Capability bits */
#define SELECT_CAP_CONVERSION 0x00000001
#define SELECT_CAP_SENTENCE 0x00000002
-
-/* ID for deIndex of ImmGetGuideLine */
+/* ID for dwIndex of ImmGetGuideLine */
#define GGL_LEVEL 0x00000001
#define GGL_INDEX 0x00000002
#define GGL_STRING 0x00000003
@@ -440,18 +299,17 @@ ImmDestroySoftKeyboard(
#define IGP_GETIMEVERSION (DWORD)(-4)
#define IGP_PROPERTY 0x00000004
#define IGP_CONVERSION 0x00000008
-#define IGP_SENTENCE 0x0000000c
+#define IGP_SENTENCE 0x0000000C
#define IGP_UI 0x00000010
#define IGP_SETCOMPSTR 0x00000014
#define IGP_SELECT 0x00000018
-
/* dwIndex for ImmSetCompositionString API */
-#define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
-#define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
-#define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
-#define SCS_SETRECONVERTSTRING 0x00010000
-#define SCS_QUERYRECONVERTSTRING 0x00020000
+#define SCS_SETSTR (GCS_COMPREADSTR | GCS_COMPSTR)
+#define SCS_CHANGEATTR (GCS_COMPREADATTR | GCS_COMPATTR)
+#define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE | GCS_COMPCLAUSE)
+#define SCS_SETRECONVERTSTRING 0x00010000
+#define SCS_QUERYRECONVERTSTRING 0x00020000
/* attribute for COMPOSITIONSTRING Structure */
#define ATTR_INPUT 0x00
@@ -459,8 +317,7 @@ ImmDestroySoftKeyboard(
#define ATTR_CONVERTED 0x02
#define ATTR_TARGET_NOTCONVERTED 0x03
#define ATTR_INPUT_ERROR 0x04
-#define ATTR_FIXEDCONVERTED 0x05
-
+#define ATTR_FIXEDCONVERTED 0x05
/* bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW */
#define CFS_DEFAULT 0x0000
@@ -475,7 +332,6 @@ ImmDestroySoftKeyboard(
#define GCL_REVERSECONVERSION 0x0002
#define GCL_REVERSE_LENGTH 0x0003
-
/* bit field for conversion mode */
#define IME_CMODE_ALPHANUMERIC 0x0000
#define IME_CMODE_NATIVE 0x0001
@@ -494,15 +350,15 @@ ImmDestroySoftKeyboard(
#define IME_CMODE_NOCONVERSION 0x0100
#define IME_CMODE_EUDC 0x0200
#define IME_CMODE_SYMBOL 0x0400
-#define IME_CMODE_FIXED 0x0800
-
+#define IME_CMODE_FIXED 0x0800
+/* bit field for sentence mode */
#define IME_SMODE_NONE 0x0000
#define IME_SMODE_PLAURALCLAUSE 0x0001
#define IME_SMODE_SINGLECONVERT 0x0002
#define IME_SMODE_AUTOMATIC 0x0004
#define IME_SMODE_PHRASEPREDICT 0x0008
-#define IME_SMODE_CONVERSATION 0x0010
+#define IME_SMODE_CONVERSATION 0x0010
/* style of candidate */
#define IME_CAND_UNKNOWN 0x0000
@@ -512,7 +368,6 @@ ImmDestroySoftKeyboard(
#define IME_CAND_RADICAL 0x0004
#define IME_CAND_STROKE 0x0005
-
/* wParam of report message WM_IME_NOTIFY */
#define IMN_CLOSESTATUSWINDOW 0x0001
#define IMN_OPENSTATUSWINDOW 0x0002
@@ -529,22 +384,23 @@ ImmDestroySoftKeyboard(
#define IMN_GUIDELINE 0x000D
#define IMN_PRIVATE 0x000E
+#if (WINVER >= 0x040A)
/* wParam of report message WM_IME_REQUEST */
-#define IMR_COMPOSITIONWINDOW 0x0001
-#define IMR_CANDIDATEWINDOW 0x0002
-#define IMR_COMPOSITIONFONT 0x0003
-#define IMR_RECONVERTSTRING 0x0004
-#define IMR_CONFIRMRECONVERTSTRING 0x0005
-#define IMR_QUERYCHARPOSITION 0x0006
-#define IMR_DOCUMENTFEED 0x0007
+#define IMR_COMPOSITIONWINDOW 0x0001
+#define IMR_CANDIDATEWINDOW 0x0002
+#define IMR_COMPOSITIONFONT 0x0003
+#define IMR_RECONVERTSTRING 0x0004
+#define IMR_CONFIRMRECONVERTSTRING 0x0005
+#define IMR_QUERYCHARPOSITION 0x0006
+#define IMR_DOCUMENTFEED 0x0007
+#endif
/* error code of ImmGetCompositionString */
#define IMM_ERROR_NODATA (-1)
#define IMM_ERROR_GENERAL (-2)
-
/* dialog mode of ImmConfigureIME */
#define IME_CONFIG_GENERAL 1
#define IME_CONFIG_REGISTERWORD 2
@@ -564,366 +420,426 @@ ImmDestroySoftKeyboard(
#define IME_ESC_SYNC_HOTKEY 0x1007
#define IME_ESC_HANJA_MODE 0x1008
#define IME_ESC_AUTOMATA 0x1009
-#define IME_ESC_PRIVATE_HOTKEY 0x100a
-#define IME_ESC_GETHELPFILENAME 0x100b
-
+#define IME_ESC_PRIVATE_HOTKEY 0x100A
+#define IME_ESC_GETHELPFILENAME 0x100B
/* style of word registration */
#define IME_REGWORD_STYLE_EUDC 0x00000001
#define IME_REGWORD_STYLE_USER_FIRST 0x80000000
#define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
+#if (WINVER >= 0x040A)
+
/* dwFlags for ImmAssociateContextEx */
#define IACE_CHILDREN 0x0001
#define IACE_DEFAULT 0x0010
#define IACE_IGNORENOCONTEXT 0x0020
/* dwFlags for ImmGetImeMenuItems */
-#define IGIMIF_RIGHTMENU 0x0001
+#define IGIMIF_RIGHTMENU 0x0001
/* dwType for ImmGetImeMenuItems */
-#define IGIMII_CMODE 0x0001
-#define IGIMII_SMODE 0x0002
-#define IGIMII_CONFIGURE 0x0004
-#define IGIMII_TOOLS 0x0008
-#define IGIMII_HELP 0x0010
-#define IGIMII_OTHER 0x0020
-#define IGIMII_INPUTTOOLS 0x0040
+#define IGIMII_CMODE 0x0001
+#define IGIMII_SMODE 0x0002
+#define IGIMII_CONFIGURE 0x0004
+#define IGIMII_TOOLS 0x0008
+#define IGIMII_HELP 0x0010
+#define IGIMII_OTHER 0x0020
+#define IGIMII_INPUTTOOLS 0x0040
/* fType of IMEMENUITEMINFO structure */
-#define IMFT_RADIOCHECK 0x00001
-#define IMFT_SEPARATOR 0x00002
-#define IMFT_SUBMENU 0x00004
+#define IMFT_RADIOCHECK 0x00001
+#define IMFT_SEPARATOR 0x00002
+#define IMFT_SUBMENU 0x00004
/* fState of IMEMENUITEMINFO structure */
-#define IMFS_GRAYED MFS_GRAYED
-#define IMFS_DISABLED MFS_DISABLED
-#define IMFS_CHECKED MFS_CHECKED
-#define IMFS_HILITE MFS_HILITE
-#define IMFS_ENABLED MFS_ENABLED
-#define IMFS_UNCHECKED MFS_UNCHECKED
-#define IMFS_UNHILITE MFS_UNHILITE
-#define IMFS_DEFAULT MFS_DEFAULT
-
-
-/*
- * type of soft keyboard
- * for Windows Tranditional Chinese Edition
- */
-#define SOFTKEYBOARD_TYPE_T1 0x0001
-/* for Windows Simplified Chinese Edition */
-#define SOFTKEYBOARD_TYPE_C1 0x0002
-
-
-HIMC WINAPI ImmAssociateContext(_In_ HWND, _In_ HIMC);
-BOOL WINAPI ImmAssociateContextEx(_In_ HWND, _In_ HIMC, _In_ DWORD);
-
-BOOL WINAPI ImmConfigureIMEA(_In_ HKL, _In_ HWND, _In_ DWORD, _In_ LPVOID);
-BOOL WINAPI ImmConfigureIMEW(_In_ HKL, _In_ HWND, _In_ DWORD, _In_ LPVOID);
-#define ImmConfigureIME WINELIB_NAME_AW(ImmConfigureIME)
+#define IMFS_GRAYED MFS_GRAYED
+#define IMFS_DISABLED MFS_DISABLED
+#define IMFS_CHECKED MFS_CHECKED
+#define IMFS_HILITE MFS_HILITE
+#define IMFS_ENABLED MFS_ENABLED
+#define IMFS_UNCHECKED MFS_UNCHECKED
+#define IMFS_UNHILITE MFS_UNHILITE
+#define IMFS_DEFAULT MFS_DEFAULT
+
+#endif /* WINVER >= 0x040A */
+
+/* types of soft keyboard */
+#define SOFTKEYBOARD_TYPE_T1 0x0001 /* for Tranditional Chinese */
+#define SOFTKEYBOARD_TYPE_C1 0x0002 /* for Simplified Chinese */
+
+HIMC WINAPI ImmAssociateContext(_In_ HWND hWnd, _In_ HIMC hIMC);
+#if (WINVER >= 0x040A)
+BOOL WINAPI ImmAssociateContextEx(_In_ HWND hWnd, _In_ HIMC hIMC, _In_ DWORD dwFlags);
+#endif
-HIMC WINAPI ImmCreateContext(void);
-BOOL WINAPI ImmSetActiveContext(HWND hwnd, HIMC hIMC, BOOL fFlag);
+BOOL WINAPI ImmConfigureIMEA(_In_ HKL hKL, _In_ HWND hWnd, _In_ DWORD dwMode, _In_ LPVOID
lpData);
+BOOL WINAPI ImmConfigureIMEW(_In_ HKL hKL, _In_ HWND hWnd, _In_ DWORD dwMode, _In_ LPVOID
lpData);
+HIMC WINAPI ImmCreateContext(VOID);
BOOL WINAPI ImmDestroyContext(_In_ HIMC hIMC);
+#if (WINVER >= 0x040A)
BOOL WINAPI ImmDisableIME(_In_ DWORD idThread);
-BOOL WINAPI ImmEnumInputContext(_In_ DWORD, _In_ IMCENUMPROC, _In_ LPARAM);
-BOOL WINAPI ImmLoadIME(HKL hKL);
-BOOL WINAPI CtfImmIsTextFrameServiceDisabled(VOID);
+BOOL WINAPI ImmEnumInputContext(_In_ DWORD dwThreadId, _In_ IMCENUMPROC lpfn, _In_ LPARAM
lParam);
+#endif
UINT
WINAPI
ImmEnumRegisterWordA(
- _In_ HKL,
- _In_ REGISTERWORDENUMPROCA,
- _In_opt_ LPCSTR lpszReading,
- _In_ DWORD,
- _In_opt_ LPCSTR lpszRegister,
- _In_ LPVOID);
+ _In_ HKL hKL,
+ _In_ REGISTERWORDENUMPROCA lpfnEnumProc,
+ _In_opt_ LPCSTR lpszReading,
+ _In_ DWORD dwStyle,
+ _In_opt_ LPCSTR lpszRegister,
+ _Inout_opt_ LPVOID lpData);
UINT
WINAPI
ImmEnumRegisterWordW(
- _In_ HKL,
- _In_ REGISTERWORDENUMPROCW,
- _In_opt_ LPCWSTR lpszReading,
- _In_ DWORD,
- _In_opt_ LPCWSTR lpszRegister,
- _In_ LPVOID);
-
-#define ImmEnumRegisterWord WINELIB_NAME_AW(ImmEnumRegisterWord)
-
-LRESULT WINAPI ImmEscapeA(_In_ HKL, _In_ HIMC, _In_ UINT, _In_ LPVOID);
-LRESULT WINAPI ImmEscapeW(_In_ HKL, _In_ HIMC, _In_ UINT, _In_ LPVOID);
-#define ImmEscape WINELIB_NAME_AW(ImmEscape)
+ _In_ HKL hKL,
+ _In_ REGISTERWORDENUMPROCW lpfnEnumProc,
+ _In_opt_ LPCWSTR lpszReading,
+ _In_ DWORD dwStyle,
+ _In_opt_ LPCWSTR lpszRegister,
+ _Inout_opt_ LPVOID lpData);
+
+LRESULT WINAPI
+ImmEscapeA(
+ _In_ HKL hKL,
+ _In_ HIMC hIMC,
+ _In_ UINT uSubFunc,
+ _Inout_opt_ LPVOID lpData);
+
+LRESULT WINAPI
+ImmEscapeW(
+ _In_ HKL hKL,
+ _In_ HIMC hIMC,
+ _In_ UINT uSubFunc,
+ _Inout_opt_ LPVOID lpData);
DWORD
WINAPI
ImmGetCandidateListA(
- _In_ HIMC,
- _In_ DWORD deIndex,
- _Out_writes_bytes_opt_(dwBufLen) LPCANDIDATELIST lpCandList,
- _In_ DWORD dwBufLen);
+ _In_ HIMC hIMC,
+ _In_ DWORD deIndex,
+ _Out_writes_bytes_opt_(dwBufLen) LPCANDIDATELIST lpCandList,
+ _In_ DWORD dwBufLen);
DWORD
WINAPI
ImmGetCandidateListW(
- _In_ HIMC,
- _In_ DWORD deIndex,
- _Out_writes_bytes_opt_(dwBufLen) LPCANDIDATELIST lpCandList,
- _In_ DWORD dwBufLen);
-
-#define ImmGetCandidateList WINELIB_NAME_AW(ImmGetCandidateList)
+ _In_ HIMC hIMC,
+ _In_ DWORD deIndex,
+ _Out_writes_bytes_opt_(dwBufLen) LPCANDIDATELIST lpCandList,
+ _In_ DWORD dwBufLen);
-DWORD WINAPI ImmGetCandidateListCountA(_In_ HIMC, _Out_ LPDWORD);
-DWORD WINAPI ImmGetCandidateListCountW(_In_ HIMC, _Out_ LPDWORD);
-#define ImmGetCandidateListCount WINELIB_NAME_AW(ImmGetCandidateListCount)
+DWORD WINAPI ImmGetCandidateListCountA(_In_ HIMC hIMC, _Out_ LPDWORD lpdwListCount);
+DWORD WINAPI ImmGetCandidateListCountW(_In_ HIMC hIMC, _Out_ LPDWORD lpdwListCount);
BOOL
WINAPI
ImmGetCandidateWindow(
- _In_ HIMC,
- _In_ DWORD,
- _Out_ LPCANDIDATEFORM lpCandidate);
+ _In_ HIMC hIMC,
+ _In_ DWORD dwIndex,
+ _Out_ LPCANDIDATEFORM lpCandidate);
#if defined(_WINGDI_) && !defined(NOGDI)
-BOOL WINAPI ImmGetCompositionFontA(_In_ HIMC, _Out_ LPLOGFONTA);
-BOOL WINAPI ImmGetCompositionFontW(_In_ HIMC, _Out_ LPLOGFONTW);
-#define ImmGetCompositionFont WINELIB_NAME_AW(ImmGetCompositionFont)
+BOOL WINAPI ImmGetCompositionFontA(_In_ HIMC hIMC, _Out_ LPLOGFONTA lplf);
+BOOL WINAPI ImmGetCompositionFontW(_In_ HIMC hIMC, _Out_ LPLOGFONTW lplf);
+
+BOOL WINAPI ImmSetCompositionFontA(_In_ HIMC hIMC, _In_ LPLOGFONTA lplf);
+BOOL WINAPI ImmSetCompositionFontW(_In_ HIMC hIMC, _In_ LPLOGFONTW lplf);
-BOOL WINAPI ImmSetCompositionFontA(_In_ HIMC, _In_ LPLOGFONTA);
-BOOL WINAPI ImmSetCompositionFontW(_In_ HIMC, _In_ LPLOGFONTW);
-#define ImmSetCompositionFont WINELIB_NAME_AW(ImmSetCompositionFont)
+#ifdef UNICODE
+ #define ImmGetCompositionFont ImmGetCompositionFontW
+#else
+ #define ImmGetCompositionFont ImmGetCompositionFontA
+#endif
#endif
LONG
WINAPI
ImmGetCompositionStringA(
- _In_ HIMC,
- _In_ DWORD,
- _Out_writes_bytes_opt_(dwBufLen) LPVOID lpBuf,
- _In_ DWORD dwBufLen);
+ _In_ HIMC hIMC,
+ _In_ DWORD dwIndex,
+ _Out_writes_bytes_opt_(dwBufLen) LPVOID lpBuf,
+ _In_ DWORD dwBufLen);
LONG
WINAPI
ImmGetCompositionStringW(
- _In_ HIMC,
- _In_ DWORD,
- _Out_writes_bytes_opt_(dwBufLen) LPVOID lpBuf,
- _In_ DWORD dwBufLen);
-
-#define ImmGetCompositionString WINELIB_NAME_AW(ImmGetCompositionString)
+ _In_ HIMC hIMC,
+ _In_ DWORD dwIndex,
+ _Out_writes_bytes_opt_(dwBufLen) LPVOID lpBuf,
+ _In_ DWORD dwBufLen);
-BOOL WINAPI ImmGetCompositionWindow(_In_ HIMC, _Out_ LPCOMPOSITIONFORM);
-HIMC WINAPI ImmGetContext(_In_ HWND);
+BOOL WINAPI ImmGetCompositionWindow(_In_ HIMC hIMC, _Out_ LPCOMPOSITIONFORM lpCompForm);
+HIMC WINAPI ImmGetContext(_In_ HWND hWnd);
DWORD
WINAPI
ImmGetConversionListA(
- _In_ HKL,
- _In_ HIMC,
- _In_ LPCSTR lpSrc,
- _Out_writes_bytes_(dwBufLen) LPCANDIDATELIST lpDst,
- _In_ DWORD dwBufLen,
- _In_ UINT uFlag);
+ _In_ HKL hKL,
+ _In_ HIMC hIMC,
+ _In_ LPCSTR lpSrc,
+ _Out_writes_bytes_(dwBufLen) LPCANDIDATELIST lpDst,
+ _In_ DWORD dwBufLen,
+ _In_ UINT uFlag);
DWORD
WINAPI
ImmGetConversionListW(
- _In_ HKL,
- _In_ HIMC,
- _In_ LPCWSTR lpSrc,
- _Out_writes_bytes_(dwBufLen) LPCANDIDATELIST lpDst,
- _In_ DWORD dwBufLen,
- _In_ UINT uFlag);
-
-#define ImmGetConversionList WINELIB_NAME_AW(ImmGetConversionList)
+ _In_ HKL hKL,
+ _In_ HIMC hIMC,
+ _In_ LPCWSTR lpSrc,
+ _Out_writes_bytes_(dwBufLen) LPCANDIDATELIST lpDst,
+ _In_ DWORD dwBufLen,
+ _In_ UINT uFlag);
BOOL
WINAPI
ImmGetConversionStatus(
- _In_ HIMC,
- _Out_opt_ LPDWORD lpfdwConversion,
- _Out_opt_ LPDWORD lpfdwSentence);
+ _In_ HIMC hIMC,
+ _Out_opt_ LPDWORD lpfdwConversion,
+ _Out_opt_ LPDWORD lpfdwSentence);
-HWND WINAPI ImmGetDefaultIMEWnd(_In_ HWND);
+HWND WINAPI ImmGetDefaultIMEWnd(_In_ HWND hWnd);
UINT
WINAPI
ImmGetDescriptionA(
- _In_ HKL,
- _Out_writes_opt_(uBufLen) LPSTR lpszDescription,
- _In_ UINT uBufLen);
+ _In_ HKL hKL,
+ _Out_writes_opt_(uBufLen) LPSTR lpszDescription,
+ _In_ UINT uBufLen);
UINT
WINAPI
ImmGetDescriptionW(
- _In_ HKL,
- _Out_writes_opt_(uBufLen) LPWSTR lpszDescription,
- _In_ UINT uBufLen);
-
-#define ImmGetDescription WINELIB_NAME_AW(ImmGetDescription)
+ _In_ HKL hKL,
+ _Out_writes_opt_(uBufLen) LPWSTR lpszDescription,
+ _In_ UINT uBufLen);
DWORD
WINAPI
ImmGetGuideLineA(
- _In_ HIMC,
- _In_ DWORD dwIndex,
- _Out_writes_bytes_opt_(dwBufLen) LPSTR lpBuf,
- _In_ DWORD dwBufLen);
+ _In_ HIMC hIMC,
+ _In_ DWORD dwIndex,
+ _Out_writes_bytes_opt_(dwBufLen) LPSTR lpBuf,
+ _In_ DWORD dwBufLen);
DWORD
WINAPI
ImmGetGuideLineW(
- _In_ HIMC,
- _In_ DWORD dwIndex,
- _Out_writes_bytes_opt_(dwBufLen) LPWSTR lpBuf,
- _In_ DWORD dwBufLen);
-
-#define ImmGetGuideLine WINELIB_NAME_AW(ImmGetGuideLine)
+ _In_ HIMC hIMC,
+ _In_ DWORD dwIndex,
+ _Out_writes_bytes_opt_(dwBufLen) LPWSTR lpBuf,
+ _In_ DWORD dwBufLen);
UINT
WINAPI
ImmGetIMEFileNameA(
- _In_ HKL,
- _Out_writes_opt_(uBufLen) LPSTR lpszFileName,
- _In_ UINT uBufLen);
+ _In_ HKL hKL,
+ _Out_writes_opt_(uBufLen) LPSTR lpszFileName,
+ _In_ UINT uBufLen);
UINT
WINAPI
ImmGetIMEFileNameW(
- _In_ HKL,
- _Out_writes_opt_(uBufLen) LPWSTR lpszFileName,
- _In_ UINT uBufLen);
+ _In_ HKL hKL,
+ _Out_writes_opt_(uBufLen) LPWSTR lpszFileName,
+ _In_ UINT uBufLen);
-#define ImmGetIMEFileName WINELIB_NAME_AW(ImmGetIMEFileName)
+#if (WINVER >= 0x040A)
DWORD
WINAPI
ImmGetImeMenuItemsA(
- _In_ HIMC,
- _In_ DWORD,
- _In_ DWORD,
- _Out_opt_ LPIMEMENUITEMINFOA lpImeParentMenu,
- _Out_writes_bytes_opt_(dwSize) LPIMEMENUITEMINFOA lpImeMenu,
- _In_ DWORD dwSize);
+ _In_ HIMC hIMC,
+ _In_ DWORD dwFlags,
+ _In_ DWORD dwType,
+ _Out_opt_ LPIMEMENUITEMINFOA lpImeParentMenu,
+ _Out_writes_bytes_opt_(dwSize) LPIMEMENUITEMINFOA lpImeMenu,
+ _In_ DWORD dwSize);
DWORD
WINAPI
ImmGetImeMenuItemsW(
- _In_ HIMC,
- _In_ DWORD,
- _In_ DWORD,
- _Out_opt_ LPIMEMENUITEMINFOW lpImeParentMenu,
- _Out_writes_bytes_opt_(dwSize) LPIMEMENUITEMINFOW lpImeMenu,
- _In_ DWORD dwSize);
+ _In_ HIMC hIMC,
+ _In_ DWORD dwFlags,
+ _In_ DWORD dwType,
+ _Out_opt_ LPIMEMENUITEMINFOW lpImeParentMenu,
+ _Out_writes_bytes_opt_(dwSize) LPIMEMENUITEMINFOW lpImeMenu,
+ _In_ DWORD dwSize);
+
+#ifdef UNICODE
+ #define ImmGetImeMenuItems ImmGetImeMenuItemsW
+#else
+ #define ImmGetImeMenuItems ImmGetImeMenuItemsA
+#endif
-#define ImmGetImeMenuItems WINELIB_NAME_AW(ImmGetImeMenuItems)
+#endif /* WINVER >= 0x040A */
-BOOL WINAPI ImmGetOpenStatus(_In_ HIMC);
-DWORD WINAPI ImmGetProperty(_In_ HKL, _In_ DWORD);
+BOOL WINAPI ImmGetOpenStatus(_In_ HIMC hIMC);
+DWORD WINAPI ImmGetProperty(_In_ HKL hKL, _In_ DWORD fdwIndex);
UINT
WINAPI
ImmGetRegisterWordStyleA(
- _In_ HKL,
- _In_ UINT nItem,
- _Out_writes_(nItem) LPSTYLEBUFA lpStyleBuf);
+ _In_ HKL hKL,
+ _In_ UINT nItem,
+ _Out_writes_(nItem) LPSTYLEBUFA lpStyleBuf);
UINT
WINAPI
ImmGetRegisterWordStyleW(
- _In_ HKL,
- _In_ UINT nItem,
- _Out_writes_(nItem) LPSTYLEBUFW lpStyleBuf);
+ _In_ HKL hKL,
+ _In_ UINT nItem,
+ _Out_writes_(nItem) LPSTYLEBUFW lpStyleBuf);
-#define ImmGetRegisterWordStyle WINELIB_NAME_AW(ImmGetRegisterWordStyle)
+BOOL WINAPI ImmGetStatusWindowPos(_In_ HIMC hIMC, _Out_ LPPOINT lpptPos);
+UINT WINAPI ImmGetVirtualKey(_In_ HWND hWnd);
-BOOL WINAPI ImmGetStatusWindowPos(_In_ HIMC, _Out_ LPPOINT);
-UINT WINAPI ImmGetVirtualKey(_In_ HWND);
+HKL WINAPI ImmInstallIMEA(_In_ LPCSTR lpszIMEFileName, _In_ LPCSTR lpszLayoutText);
+HKL WINAPI ImmInstallIMEW(_In_ LPCWSTR lpszIMEFileName, _In_ LPCWSTR lpszLayoutText);
-HKL WINAPI ImmInstallIMEA(_In_ LPCSTR, _In_ LPCSTR);
-HKL WINAPI ImmInstallIMEW(_In_ LPCWSTR, _In_ LPCWSTR);
-#define ImmInstallIME WINELIB_NAME_AW(ImmInstallIME)
+BOOL WINAPI ImmIsIME(_In_ HKL hKL);
-BOOL WINAPI ImmIsIME(_In_ HKL);
-
-BOOL WINAPI ImmIsUIMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM);
-BOOL WINAPI ImmIsUIMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM);
-#define ImmIsUIMessage WINELIB_NAME_AW(ImmIsUIMessage)
+BOOL WINAPI
+ImmIsUIMessageA(
+ _In_ HWND hWndIME,
+ _In_ UINT msg,
+ _In_ WPARAM wParam,
+ _In_ LPARAM lParam);
-BOOL WINAPI ImmNotifyIME(_In_ HIMC, _In_ DWORD, _In_ DWORD, _In_ DWORD_PTR);
+BOOL WINAPI
+ImmIsUIMessageW(
+ _In_ HWND hWndIME,
+ _In_ UINT msg,
+ _In_ WPARAM wParam,
+ _In_ LPARAM lParam);
-DWORD WINAPI ImmProcessKey(HWND, HKL, UINT, LPARAM, DWORD);
+BOOL WINAPI
+ImmNotifyIME(
+ _In_ HIMC hIMC,
+ _In_ DWORD dwAction,
+ _In_ DWORD dwIndex,
+ _In_ DWORD_PTR dwValue);
BOOL
WINAPI
ImmRegisterWordA(
- _In_ HKL,
- _In_ LPCSTR lpszReading,
- _In_ DWORD,
- _In_ LPCSTR lpszRegister);
+ _In_ HKL hKL,
+ _In_ LPCSTR lpszReading,
+ _In_ DWORD dwStyle,
+ _In_ LPCSTR lpszRegister);
BOOL
WINAPI
ImmRegisterWordW(
- _In_ HKL,
- _In_ LPCWSTR lpszReading,
- _In_ DWORD,
- _In_ LPCWSTR lpszRegister);
-
-#define ImmRegisterWord WINELIB_NAME_AW(ImmRegisterWord)
+ _In_ HKL hKL,
+ _In_ LPCWSTR lpszReading,
+ _In_ DWORD dwStyle,
+ _In_ LPCWSTR lpszRegister);
-BOOL WINAPI ImmReleaseContext(_In_ HWND, _In_ HIMC);
-BOOL WINAPI ImmSetCandidateWindow(_In_ HIMC, _In_ LPCANDIDATEFORM);
+BOOL WINAPI ImmReleaseContext(_In_ HWND hWnd, _In_ HIMC hIMC);
+BOOL WINAPI ImmSetCandidateWindow(_In_ HIMC hIMC, _In_ LPCANDIDATEFORM lpCandidate);
BOOL
WINAPI
ImmSetCompositionStringA(
- _In_ HIMC,
- _In_ DWORD dwIndex,
- _Inout_updates_bytes_opt_(dwCompLen) LPVOID lpComp,
- _In_ DWORD dwCompLen,
- _Inout_updates_bytes_opt_(dwReadLen) LPVOID lpRead,
- _In_ DWORD dwReadLen);
+ _In_ HIMC hIMC,
+ _In_ DWORD dwIndex,
+ _Inout_updates_bytes_opt_(dwCompLen) LPVOID lpComp,
+ _In_ DWORD dwCompLen,
+ _Inout_updates_bytes_opt_(dwReadLen) LPVOID lpRead,
+ _In_ DWORD dwReadLen);
BOOL
WINAPI
ImmSetCompositionStringW(
- _In_ HIMC,
- _In_ DWORD dwIndex,
- _Inout_updates_bytes_opt_(dwCompLen) LPVOID lpComp,
- _In_ DWORD dwCompLen,
- _Inout_updates_bytes_opt_(dwReadLen) LPVOID lpRead,
- _In_ DWORD dwReadLen);
+ _In_ HIMC hIMC,
+ _In_ DWORD dwIndex,
+ _Inout_updates_bytes_opt_(dwCompLen) LPVOID lpComp,
+ _In_ DWORD dwCompLen,
+ _Inout_updates_bytes_opt_(dwReadLen) LPVOID lpRead,
+ _In_ DWORD dwReadLen);
-#define ImmSetCompositionString WINELIB_NAME_AW(ImmSetCompositionString)
+BOOL WINAPI ImmSetCompositionWindow(_In_ HIMC hIMC, _In_ LPCOMPOSITIONFORM lpCompForm);
-BOOL WINAPI ImmSetCompositionWindow(_In_ HIMC, _In_ LPCOMPOSITIONFORM);
-BOOL WINAPI ImmSetConversionStatus(_In_ HIMC, _In_ DWORD, _In_ DWORD);
-BOOL WINAPI ImmSetOpenStatus(_In_ HIMC, _In_ BOOL);
-BOOL WINAPI ImmSetStatusWindowPos(_In_ HIMC, _In_ LPPOINT);
-BOOL WINAPI ImmSimulateHotKey(_In_ HWND, _In_ DWORD);
+BOOL WINAPI
+ImmSetConversionStatus(
+ _In_ HIMC hIMC,
+ _In_ DWORD fdwConversion,
+ _In_ DWORD fdwSentence);
+
+BOOL WINAPI ImmSetOpenStatus(_In_ HIMC hIMC, _In_ BOOL fOpen);
+BOOL WINAPI ImmSetStatusWindowPos(_In_ HIMC hIMC, _In_ LPPOINT lpptPos);
+BOOL WINAPI ImmSimulateHotKey(_In_ HWND hWnd, _In_ DWORD dwHotKeyID);
BOOL
WINAPI
ImmUnregisterWordA(
- _In_ HKL,
- _In_ LPCSTR lpszReading,
- _In_ DWORD,
- _In_ LPCSTR lpszUnregister);
+ _In_ HKL hKL,
+ _In_ LPCSTR lpszReading,
+ _In_ DWORD dwStyle,
+ _In_ LPCSTR lpszUnregister);
BOOL
WINAPI
ImmUnregisterWordW(
- _In_ HKL,
- _In_ LPCWSTR lpszReading,
- _In_ DWORD,
- _In_ LPCWSTR lpszUnregister);
-
-#define ImmUnregisterWord WINELIB_NAME_AW(ImmUnregisterWord)
-
+ _In_ HKL hKL,
+ _In_ LPCWSTR lpszReading,
+ _In_ DWORD dwStyle,
+ _In_ LPCWSTR lpszUnregister);
+
+#ifdef UNICODE
+ #define ImmConfigureIME ImmConfigureIMEW
+ #define ImmEnumRegisterWord ImmEnumRegisterWordW
+ #define ImmEscape ImmEscapeW
+ #define ImmGetCandidateList ImmGetCandidateListW
+ #define ImmGetCandidateListCount ImmGetCandidateListCountW
+ #define ImmGetCompositionString ImmGetCompositionStringW
+ #define ImmGetConversionList ImmGetConversionListW
+ #define ImmGetDescription ImmGetDescriptionW
+ #define ImmGetGuideLine ImmGetGuideLineW
+ #define ImmGetIMEFileName ImmGetIMEFileNameW
+ #define ImmGetRegisterWordStyle ImmGetRegisterWordStyleW
+ #define ImmInstallIME ImmInstallIMEW
+ #define ImmIsUIMessage ImmIsUIMessageW
+ #define ImmRegisterWord ImmRegisterWordW
+ #define ImmSetCompositionFont ImmSetCompositionFontW
+ #define ImmSetCompositionString ImmSetCompositionStringW
+ #define ImmUnregisterWord ImmUnregisterWordW
+ typedef LPSTYLEBUFW LPSTYLEBUF;
+ typedef NPSTYLEBUFW NPSTYLEBUF;
+ typedef PSTYLEBUFW PSTYLEBUF;
+ typedef REGISTERWORDENUMPROCW REGISTERWORDENUMPROC;
+ typedef STYLEBUFW STYLEBUF;
+#else
+ #define ImmConfigureIME ImmConfigureIMEA
+ #define ImmEnumRegisterWord ImmEnumRegisterWordA
+ #define ImmEscape ImmEscapeA
+ #define ImmGetCandidateList ImmGetCandidateListA
+ #define ImmGetCandidateListCount ImmGetCandidateListCountA
+ #define ImmGetCompositionString ImmGetCompositionStringA
+ #define ImmGetConversionList ImmGetConversionListA
+ #define ImmGetDescription ImmGetDescriptionA
+ #define ImmGetGuideLine ImmGetGuideLineA
+ #define ImmGetIMEFileName ImmGetIMEFileNameA
+ #define ImmGetRegisterWordStyle ImmGetRegisterWordStyleA
+ #define ImmInstallIME ImmInstallIMEA
+ #define ImmIsUIMessage ImmIsUIMessageA
+ #define ImmRegisterWord ImmRegisterWordA
+ #define ImmSetCompositionFont ImmSetCompositionFontA
+ #define ImmSetCompositionString ImmSetCompositionStringA
+ #define ImmUnregisterWord ImmUnregisterWordA
+ typedef LPSTYLEBUFA LPSTYLEBUF;
+ typedef NPSTYLEBUFA NPSTYLEBUF;
+ typedef PSTYLEBUFA PSTYLEBUF;
+ typedef REGISTERWORDENUMPROCA REGISTERWORDENUMPROC;
+ typedef STYLEBUFA STYLEBUF;
+#endif
#ifdef __cplusplus
}
diff --git a/sdk/include/reactos/imm32_undoc.h b/sdk/include/reactos/imm32_undoc.h
index 75eb48f5692..a37c8ea4e58 100644
--- a/sdk/include/reactos/imm32_undoc.h
+++ b/sdk/include/reactos/imm32_undoc.h
@@ -11,18 +11,210 @@
extern "C" {
#endif
+#include <immdev.h>
+
+#define IS_IME_HKL(hkl) ((((ULONG_PTR)(hkl)) & 0xF0000000) == 0xE0000000)
+
+typedef struct tagIMEINFOEX
+{
+ HKL hkl;
+ IMEINFO ImeInfo;
+ WCHAR wszUIClass[16];
+ ULONG fdwInitConvMode;
+ INT fInitOpen;
+ INT fLoadFlag;
+ DWORD dwProdVersion;
+ DWORD dwImeWinVersion;
+ WCHAR wszImeDescription[50];
+ WCHAR wszImeFile[80];
+ struct
+ {
+ INT fSysWow64Only:1;
+ INT fCUASLayer:1;
+ };
+} IMEINFOEX, *PIMEINFOEX, NEAR *NPIMEINFOEX, FAR *LPIMEINFOEX;
+
+typedef enum IMEINFOEXCLASS
+{
+ ImeInfoExKeyboardLayout,
+ ImeInfoExKeyboardLayoutTFS,
+ ImeInfoExImeWindow,
+ ImeInfoExImeFileName
+} IMEINFOEXCLASS;
+
+#define DEFINE_IME_ENTRY(type, name, params, extended) typedef type (WINAPI *FN_##name)
params;
+#include <imetable.h>
+#undef DEFINE_IME_ENTRY
+
+typedef struct IMEDPI
+{
+ struct IMEDPI *pNext;
+ HINSTANCE hInst;
+ HKL hKL;
+ IMEINFO ImeInfo;
+ UINT uCodePage;
+ WCHAR szUIClass[16];
+ DWORD cLockObj;
+ DWORD dwFlags;
+#define DEFINE_IME_ENTRY(type, name, params, extended) FN_##name name;
+#include <imetable.h>
+#undef DEFINE_IME_ENTRY
+} IMEDPI, *PIMEDPI, NEAR *NPIMEDPI, FAR *LPIMEDPI;
+
+#ifndef _WIN64
+C_ASSERT(offsetof(IMEDPI, pNext) == 0x0);
+C_ASSERT(offsetof(IMEDPI, hInst) == 0x4);
+C_ASSERT(offsetof(IMEDPI, hKL) == 0x8);
+C_ASSERT(offsetof(IMEDPI, ImeInfo) == 0xc);
+C_ASSERT(offsetof(IMEDPI, uCodePage) == 0x28);
+C_ASSERT(offsetof(IMEDPI, szUIClass) == 0x2c);
+C_ASSERT(offsetof(IMEDPI, cLockObj) == 0x4c);
+C_ASSERT(offsetof(IMEDPI, dwFlags) == 0x50);
+C_ASSERT(offsetof(IMEDPI, ImeInquire) == 0x54);
+C_ASSERT(offsetof(IMEDPI, ImeConversionList) == 0x58);
+C_ASSERT(offsetof(IMEDPI, ImeRegisterWord) == 0x5c);
+C_ASSERT(offsetof(IMEDPI, ImeUnregisterWord) == 0x60);
+C_ASSERT(offsetof(IMEDPI, ImeGetRegisterWordStyle) == 0x64);
+C_ASSERT(offsetof(IMEDPI, ImeEnumRegisterWord) == 0x68);
+C_ASSERT(offsetof(IMEDPI, ImeConfigure) == 0x6c);
+C_ASSERT(offsetof(IMEDPI, ImeDestroy) == 0x70);
+C_ASSERT(offsetof(IMEDPI, ImeEscape) == 0x74);
+C_ASSERT(offsetof(IMEDPI, ImeProcessKey) == 0x78);
+C_ASSERT(offsetof(IMEDPI, ImeSelect) == 0x7c);
+C_ASSERT(offsetof(IMEDPI, ImeSetActiveContext) == 0x80);
+C_ASSERT(offsetof(IMEDPI, ImeToAsciiEx) == 0x84);
+C_ASSERT(offsetof(IMEDPI, NotifyIME) == 0x88);
+C_ASSERT(offsetof(IMEDPI, ImeSetCompositionString) == 0x8c);
+C_ASSERT(offsetof(IMEDPI, ImeGetImeMenuItems) == 0x90);
+C_ASSERT(offsetof(IMEDPI, CtfImeInquireExW) == 0x94);
+C_ASSERT(offsetof(IMEDPI, CtfImeSelectEx) == 0x98);
+C_ASSERT(offsetof(IMEDPI, CtfImeEscapeEx) == 0x9c);
+C_ASSERT(offsetof(IMEDPI, CtfImeGetGuidAtom) == 0xa0);
+C_ASSERT(offsetof(IMEDPI, CtfImeIsGuidMapEnable) == 0xa4);
+C_ASSERT(sizeof(IMEDPI) == 0xa8);
+#endif
+
+/* flags for IMEDPI.dwFlags */
+#define IMEDPI_FLAG_UNLOADED 0x1
+#define IMEDPI_FLAG_LOCKED 0x2
+
+PIMEDPI WINAPI ImmLockImeDpi(_In_ HKL hKL);
+VOID WINAPI ImmUnlockImeDpi(_Inout_ PIMEDPI pImeDpi);
+
+/* unconfirmed */
+typedef struct tagCLIENTIMC
+{
+ HANDLE hInputContext; /* LocalAlloc'ed LHND */
+ LONG cLockObj;
+ DWORD dwFlags;
+ DWORD dwCompatFlags;
+ RTL_CRITICAL_SECTION cs;
+ UINT uCodePage;
+ HKL hKL;
+ BOOL bCtfIme;
+} CLIENTIMC, *PCLIENTIMC, NEAR *NPCLIENTIMC, FAR *LPCLIENTIMC;
+
+#ifndef _WIN64
+C_ASSERT(offsetof(CLIENTIMC, hInputContext) == 0x0);
+C_ASSERT(offsetof(CLIENTIMC, cLockObj) == 0x4);
+C_ASSERT(offsetof(CLIENTIMC, dwFlags) == 0x8);
+C_ASSERT(offsetof(CLIENTIMC, dwCompatFlags) == 0xc);
+C_ASSERT(offsetof(CLIENTIMC, cs) == 0x10);
+C_ASSERT(offsetof(CLIENTIMC, uCodePage) == 0x28);
+C_ASSERT(offsetof(CLIENTIMC, hKL) == 0x2c);
+C_ASSERT(sizeof(CLIENTIMC) == 0x34);
+#endif
+
+/* flags for CLIENTIMC */
+#define CLIENTIMC_WIDE 0x1
+#define CLIENTIMC_ACTIVE 0x2
+#define CLIENTIMC_UNKNOWN4 0x20
+#define CLIENTIMC_DESTROY 0x40
+#define CLIENTIMC_DISABLEIME 0x80
+#define CLIENTIMC_UNKNOWN2 0x100
+
+PCLIENTIMC WINAPI ImmLockClientImc(_In_ HIMC hImc);
+VOID WINAPI ImmUnlockClientImc(_Inout_ PCLIENTIMC pClientImc);
+
+struct IME_STATE;
+
+/* unconfirmed */
+#ifdef __cplusplus
+typedef struct INPUTCONTEXTDX : INPUTCONTEXT
+{
+#else
+typedef struct INPUTCONTEXTDX
+{
+ INPUTCONTEXT;
+#endif
+ UINT nVKey; // +0x140
+ BOOL bNeedsTrans; // +0x144
+ DWORD dwUnknown1;
+ DWORD dwUIFlags; // +0x14c
+ DWORD dwUnknown2;
+ struct IME_STATE *pState; // +0x154
+ DWORD dwChange; // +0x158
+ HIMCC hCtfImeContext;
+} INPUTCONTEXTDX, *PINPUTCONTEXTDX, NEAR *NPINPUTCONTEXTDX, FAR *LPINPUTCONTEXTDX;
+
+typedef struct IME_SUBSTATE
+{
+ struct IME_SUBSTATE *pNext;
+ HKL hKL;
+ DWORD dwValue;
+} IME_SUBSTATE, *PIME_SUBSTATE, NEAR *NPIME_SUBSTATE, FAR *PIME_SUBSTATE;
+
+#ifndef _WIN64
+C_ASSERT(sizeof(IME_SUBSTATE) == 0xc);
+#endif
+
+typedef struct IME_STATE
+{
+ struct IME_STATE *pNext;
+ WORD wLang;
+ WORD fOpen;
+ DWORD dwConversion;
+ DWORD dwSentence;
+ DWORD dwInit;
+ PIME_SUBSTATE pSubState;
+} IME_STATE, *PIME_STATE, NEAR *NPIME_STATE, FAR *LPIME_STATE;
+
+#ifndef _WIN64
+C_ASSERT(sizeof(IME_STATE) == 0x18);
+#endif
+
+/* for WM_IME_REPORT IR_UNDETERMINE */
+typedef struct tagUNDETERMINESTRUCT
+{
+ DWORD dwSize;
+ UINT uDefIMESize;
+ UINT uDefIMEPos;
+ UINT uUndetTextLen;
+ UINT uUndetTextPos;
+ UINT uUndetAttrPos;
+ UINT uCursorPos;
+ UINT uDeltaStart;
+ UINT uDetermineTextLen;
+ UINT uDetermineTextPos;
+ UINT uDetermineDelimPos;
+ UINT uYomiTextLen;
+ UINT uYomiTextPos;
+ UINT uYomiDelimPos;
+} UNDETERMINESTRUCT, *PUNDETERMINESTRUCT, *LPUNDETERMINESTRUCT;
+
UINT WINAPI GetKeyboardLayoutCP(_In_ LANGID wLangId);
BOOL WINAPI
-ImmGetImeInfoEx(PIMEINFOEX pImeInfoEx, IMEINFOEXCLASS SearchType, PVOID pvSearchKey);
+ImmGetImeInfoEx(
+ _Out_ PIMEINFOEX pImeInfoEx,
+ _In_ IMEINFOEXCLASS SearchType,
+ _In_ PVOID pvSearchKey);
-BOOL WINAPI ImmLoadLayout(HKL hKL, PIMEINFOEX pImeInfoEx);
-PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc);
-VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc);
-PIMEDPI WINAPI ImmLockImeDpi(HKL hKL);
-VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi);
-HRESULT WINAPI CtfImmTIMActivate(HKL hKL);
-DWORD WINAPI ImmGetAppCompatFlags(HIMC hIMC);
+BOOL WINAPI ImmLoadLayout(_In_ HKL hKL, _Inout_ PIMEINFOEX pImeInfoEx);
+DWORD WINAPI ImmGetAppCompatFlags(_In_ HIMC hIMC);
+BOOL WINAPI ImmSetActiveContext(_In_ HWND hwnd, _In_ HIMC hIMC, _In_ BOOL fFlag);
+BOOL WINAPI ImmLoadIME(_In_ HKL hKL);
+DWORD WINAPI ImmProcessKey(_In_ HWND, _In_ HKL, _In_ UINT, _In_ LPARAM, _In_ DWORD);
HRESULT WINAPI CtfAImmActivate(_Out_opt_ HINSTANCE *phinstCtfIme);
HRESULT WINAPI CtfAImmDeactivate(_In_ BOOL bDestroy);
@@ -37,6 +229,9 @@ VOID WINAPI CtfImmCoUninitialize(VOID);
VOID WINAPI CtfImmEnterCoInitCountSkipMode(VOID);
BOOL WINAPI CtfImmLeaveCoInitCountSkipMode(VOID);
HRESULT WINAPI CtfImmLastEnabledWndDestroy(_In_ BOOL bCreate);
+BOOL WINAPI CtfImmIsCiceroStartedInThread(VOID);
+HRESULT WINAPI CtfImmTIMActivate(_In_ HKL hKL);
+BOOL WINAPI CtfImmIsTextFrameServiceDisabled(VOID);
LRESULT WINAPI
CtfImmDispatchDefImeMessage(
diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h
index 4299e769a69..6c5691bbe8d 100644
--- a/win32ss/include/ntuser.h
+++ b/win32ss/include/ntuser.h
@@ -1206,34 +1206,6 @@ typedef struct tagCURSORDATA
#define CURSORF_LINKED 0x0100
#define CURSORF_CURRENT 0x0200
-typedef struct tagIMEINFOEX
-{
- HKL hkl;
- IMEINFO ImeInfo;
- WCHAR wszUIClass[16];
- ULONG fdwInitConvMode;
- INT fInitOpen;
- INT fLoadFlag;
- DWORD dwProdVersion;
- DWORD dwImeWinVersion;
- WCHAR wszImeDescription[50];
- WCHAR wszImeFile[80];
- struct
- {
- INT fSysWow64Only:1;
- INT fCUASLayer:1;
- };
-} IMEINFOEX, *PIMEINFOEX;
-
-typedef enum IMEINFOEXCLASS
-{
- ImeInfoExKeyboardLayout,
- ImeInfoExKeyboardLayoutTFS,
- ImeInfoExImeWindow,
- ImeInfoExImeFileName
-} IMEINFOEXCLASS;
-
-#define IS_IME_HKL(hkl) ((((ULONG_PTR)(hkl)) & 0xF0000000) == 0xE0000000)
#define IS_IMM_MODE() (gpsi && (gpsi->dwSRVIFlags & SRVINFO_IMM32))
#define IS_CICERO_MODE() (gpsi && (gpsi->dwSRVIFlags &
SRVINFO_CICERO_ENABLED))
#define IS_16BIT_MODE() (GetWin32ClientInfo()->dwTIFlags & TIF_16BIT)
diff --git a/win32ss/pch.h b/win32ss/pch.h
index 2cc72405405..dd49055606b 100644
--- a/win32ss/pch.h
+++ b/win32ss/pch.h
@@ -59,10 +59,13 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES,
*LPSECURITY_ATTRIBUTES;
#include <winddi.h>
#define OEMRESOURCE
#include <winuser.h>
+#include <ndk/rtltypes.h>
#include <prntfont.h>
#define _NOCSECT_TYPE
#include <ddrawi.h>
#include <imm.h>
+#include <immdev.h>
+#include <imm32_undoc.h>
#include <dbt.h>
/* NDK headers */
diff --git a/win32ss/user/ntuser/focus.c b/win32ss/user/ntuser/focus.c
index 108ef8414dd..d641e163e0d 100644
--- a/win32ss/user/ntuser/focus.c
+++ b/win32ss/user/ntuser/focus.c
@@ -7,7 +7,7 @@
*/
#include <win32k.h>
-#include <ddk/immdev.h>
+#include <immdev.h>
DBG_DEFAULT_CHANNEL(UserFocus);
PUSER_MESSAGE_QUEUE gpqForeground = NULL;
diff --git a/win32ss/user/ntuser/kbdlayout.c b/win32ss/user/ntuser/kbdlayout.c
index 4efe2eec044..08ea9ee531e 100644
--- a/win32ss/user/ntuser/kbdlayout.c
+++ b/win32ss/user/ntuser/kbdlayout.c
@@ -10,7 +10,7 @@
*/
#include <win32k.h>
-#include <ddk/immdev.h>
+#include <immdev.h>
// Was included only because of CP_ACP and required the
// definition of SYSTEMTIME in ndk\rtltypes.h
diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c
index 49200a53d9d..ea1d33624c3 100644
--- a/win32ss/user/ntuser/window.c
+++ b/win32ss/user/ntuser/window.c
@@ -8,7 +8,7 @@
*/
#include <win32k.h>
-#include <ddk/immdev.h>
+#include <immdev.h>
DBG_DEFAULT_CHANNEL(UserWnd);
INT gNestedWindowLimit = 50;
diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c
index 80984a1d173..2e5822994f3 100644
--- a/win32ss/user/ntuser/winpos.c
+++ b/win32ss/user/ntuser/winpos.c
@@ -7,7 +7,7 @@
*/
#include <win32k.h>
-#include <ddk/immdev.h>
+#include <immdev.h>
DBG_DEFAULT_CHANNEL(UserWinpos);
/* GLOBALS *******************************************************************/
diff --git a/win32ss/user/user32/include/user32.h b/win32ss/user/user32/include/user32.h
index 2615fb61549..18aaf54f892 100644
--- a/win32ss/user/user32/include/user32.h
+++ b/win32ss/user/user32/include/user32.h
@@ -28,6 +28,8 @@
#include <winreg.h>
#include <winuser.h>
#include <imm.h>
+#include <immdev.h>
+#include <imm32_undoc.h>
#include <ddeml.h>
#include <dde.h>
#include <windowsx.h>
diff --git a/win32ss/user/user32/misc/imm.c b/win32ss/user/user32/misc/imm.c
index 451f49e4c7c..640902bbabf 100644
--- a/win32ss/user/user32/misc/imm.c
+++ b/win32ss/user/user32/misc/imm.c
@@ -9,7 +9,7 @@
#include <user32.h>
#include <strsafe.h>
-#include <ddk/immdev.h>
+#include <immdev.h>
WINE_DEFAULT_DEBUG_CHANNEL(user32);
diff --git a/win32ss/user/user32/windows/defwnd.c b/win32ss/user/user32/windows/defwnd.c
index dbc5b43e9ff..852f2281dd9 100644
--- a/win32ss/user/user32/windows/defwnd.c
+++ b/win32ss/user/user32/windows/defwnd.c
@@ -10,7 +10,7 @@
*/
#include <user32.h>
-#include <ddk/immdev.h>
+#include <immdev.h>
WINE_DEFAULT_DEBUG_CHANNEL(user32);
diff --git a/win32ss/user/winsrv/winsrv.h b/win32ss/user/winsrv/winsrv.h
index d439add6709..1a614b28e5c 100644
--- a/win32ss/user/winsrv/winsrv.h
+++ b/win32ss/user/winsrv/winsrv.h
@@ -23,6 +23,8 @@
#include <winreg.h>
#include <winuser.h>
#include <imm.h>
+#include <immdev.h>
+#include <imm32_undoc.h>
/* Undocumented user definitions */
#include <undocuser.h>