ReactOS 0.4.15-dev-8096-ga0eec98
imm32_undoc.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Private header for imm32.dll
5 * COPYRIGHT: Copyright 2021 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#pragma once
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include <immdev.h>
15
16#define IME_MASK (0xE0000000UL)
17#define SUBST_MASK (0xD0000000UL)
18#define SPECIAL_MASK (0xF0000000UL)
19
20#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK)
21#define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK)
22#define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF))
23
24#define IS_IME_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK)
25#define IS_SUBST_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK)
26
27typedef struct tagIMEINFOEX
28{
39 struct
40 {
43 };
45
46typedef enum IMEINFOEXCLASS
47{
53
54#define DEFINE_IME_ENTRY(type, name, params, extended) typedef type (WINAPI *FN_##name) params;
55#include <imetable.h>
56#undef DEFINE_IME_ENTRY
57
58typedef struct IMEDPI
59{
60 struct IMEDPI *pNext;
68#define DEFINE_IME_ENTRY(type, name, params, extended) FN_##name name;
69#include <imetable.h>
70#undef DEFINE_IME_ENTRY
72
73#ifndef _WIN64
103C_ASSERT(sizeof(IMEDPI) == 0xa8);
104#endif
105
106/* flags for IMEDPI.dwFlags */
107#define IMEDPI_FLAG_UNLOADED 0x1
108#define IMEDPI_FLAG_LOCKED 0x2
109
112
113/* unconfirmed */
114typedef struct tagCLIENTIMC
115{
116 HANDLE hInputContext; /* LocalAlloc'ed LHND */
125
126#ifndef _WIN64
127C_ASSERT(offsetof(CLIENTIMC, hInputContext) == 0x0);
128C_ASSERT(offsetof(CLIENTIMC, cLockObj) == 0x4);
130C_ASSERT(offsetof(CLIENTIMC, dwCompatFlags) == 0xc);
132C_ASSERT(offsetof(CLIENTIMC, uCodePage) == 0x28);
134C_ASSERT(sizeof(CLIENTIMC) == 0x34);
135#endif
136
137/* flags for CLIENTIMC */
138#define CLIENTIMC_WIDE 0x1
139#define CLIENTIMC_ACTIVE 0x2
140#define CLIENTIMC_UNKNOWN4 0x20
141#define CLIENTIMC_DESTROY 0x40
142#define CLIENTIMC_DISABLEIME 0x80
143#define CLIENTIMC_UNKNOWN2 0x100
144
147
148struct IME_STATE;
149
150/* unconfirmed */
151#ifdef __cplusplus
152typedef struct INPUTCONTEXTDX : INPUTCONTEXT
153{
154#else
155typedef struct INPUTCONTEXTDX
156{
158#endif
159 UINT nVKey; // +0x140
160 BOOL bNeedsTrans; // +0x144
162 DWORD dwUIFlags; // +0x14c
164 struct IME_STATE *pState; // +0x154
165 DWORD dwChange; // +0x158
168
169typedef struct IME_SUBSTATE
170{
175
176#ifndef _WIN64
177C_ASSERT(sizeof(IME_SUBSTATE) == 0xc);
178#endif
179
180typedef struct IME_STATE
181{
190
191#ifndef _WIN64
192C_ASSERT(sizeof(IME_STATE) == 0x18);
193#endif
194
195/* for WM_IME_REPORT IR_UNDETERMINE */
197{
213
215
218 _Out_ PIMEINFOEX pImeInfoEx,
219 _In_ IMEINFOEXCLASS SearchType,
220 _In_ PVOID pvSearchKey);
221
227
244
247 _In_ HWND hWnd,
248 _In_ UINT uMsg,
251
252#ifdef __cplusplus
253} // extern "C"
254#endif
HWND hWnd
Definition: settings.c:17
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
DWORD HIMCC
Definition: dimm.idl:76
DWORD HIMC
Definition: dimm.idl:75
#define FAR
Definition: zlib.h:34
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
#define cs
Definition: i386-dis.c:442
struct tagCLIENTIMC * PCLIENTIMC
HRESULT WINAPI CtfAImmActivate(_Out_opt_ HINSTANCE *phinstCtfIme)
Definition: ctf.c:1009
struct IME_SUBSTATE * NPIME_SUBSTATE
HRESULT WINAPI CtfImmLastEnabledWndDestroy(_In_ BOOL bCreate)
Definition: ctf.c:996
struct tagUNDETERMINESTRUCT * PUNDETERMINESTRUCT
DWORD WINAPI ImmProcessKey(_In_ HWND, _In_ HKL, _In_ UINT, _In_ LPARAM, _In_ DWORD)
struct tagIMEINFOEX * PIMEINFOEX
VOID WINAPI ImmUnlockImeDpi(_Inout_ PIMEDPI pImeDpi)
struct tagCLIENTIMC * LPCLIENTIMC
VOID WINAPI CtfImmEnterCoInitCountSkipMode(VOID)
Definition: ctf.c:381
DWORD WINAPI ImmGetAppCompatFlags(_In_ HIMC hIMC)
struct IME_SUBSTATE * PIME_SUBSTATE
UINT WINAPI GetKeyboardLayoutCP(_In_ LANGID wLangId)
Definition: imm.c:1250
VOID WINAPI CtfImmRestoreToolbarWnd(_In_ LPVOID pUnused, _In_ DWORD dwShowFlags)
Definition: ctf.c:1391
struct tagIMEINFOEX * NPIMEINFOEX
BOOL WINAPI CtfImmIsCiceroStartedInThread(VOID)
Definition: ctf.c:781
LRESULT WINAPI CtfImmDispatchDefImeMessage(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
Definition: ctf.c:1416
struct tagIMEINFOEX IMEINFOEX
VOID WINAPI CtfImmSetAppCompatFlags(_In_ DWORD dwFlags)
Definition: ctf.c:805
struct IMEDPI * NPIMEDPI
BOOL WINAPI ImmLoadIME(_In_ HKL hKL)
PCLIENTIMC WINAPI ImmLockClientImc(_In_ HIMC hImc)
struct IME_STATE * LPIME_STATE
HRESULT WINAPI CtfImmTIMActivate(_In_ HKL hKL)
Definition: ctf.c:1123
BOOL WINAPI CtfImmGenerateMessage(_In_ HIMC hIMC, _In_ BOOL bSend)
Definition: ctf.c:1272
VOID WINAPI CtfImmCoUninitialize(VOID)
Definition: ctf.c:614
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX
struct IMEDPI * LPIMEDPI
struct tagIMEINFOEX * LPIMEINFOEX
DWORD WINAPI CtfImmHideToolbarWnd(VOID)
Definition: ctf.c:1362
BOOL WINAPI CtfImmIsTextFrameServiceDisabled(VOID)
Definition: ctf.c:1079
PIMEDPI WINAPI ImmLockImeDpi(_In_ HKL hKL)
HRESULT WINAPI CtfAImmDeactivate(_In_ BOOL bDestroy)
Definition: ctf.c:1044
struct tagUNDETERMINESTRUCT * LPUNDETERMINESTRUCT
BOOL WINAPI CtfImmLeaveCoInitCountSkipMode(VOID)
Definition: ctf.c:395
struct IME_STATE * NPIME_STATE
BOOL WINAPI ImmGetImeInfoEx(_Out_ PIMEINFOEX pImeInfoEx, _In_ IMEINFOEXCLASS SearchType, _In_ PVOID pvSearchKey)
struct INPUTCONTEXTDX * NPINPUTCONTEXTDX
VOID WINAPI CtfImmSetCiceroStartInThread(_In_ BOOL bStarted)
Definition: ctf.c:790
IMEINFOEXCLASS
Definition: imm32_undoc.h:47
@ ImeInfoExImeFileName
Definition: imm32_undoc.h:51
@ ImeInfoExKeyboardLayoutTFS
Definition: imm32_undoc.h:49
@ ImeInfoExKeyboardLayout
Definition: imm32_undoc.h:48
@ ImeInfoExImeWindow
Definition: imm32_undoc.h:50
struct IMEDPI * PIMEDPI
BOOL WINAPI CtfAImmIsIME(_In_ HKL hKL)
Definition: ctf.c:767
struct IME_STATE * PIME_STATE
struct tagUNDETERMINESTRUCT UNDETERMINESTRUCT
struct tagCLIENTIMC CLIENTIMC
VOID WINAPI ImmUnlockClientImc(_Inout_ PCLIENTIMC pClientImc)
struct tagCLIENTIMC * NPCLIENTIMC
BOOL WINAPI ImmLoadLayout(_In_ HKL hKL, _Inout_ PIMEINFOEX pImeInfoEx)
BOOL WINAPI ImmSetActiveContext(_In_ HWND hwnd, _In_ HIMC hIMC, _In_ BOOL fFlag)
struct INPUTCONTEXTDX * PINPUTCONTEXTDX
DWORD WINAPI ImeGetImeMenuItems(_In_ HIMC hIMC, _In_ DWORD dwFlags, _In_ DWORD dwType, _Inout_opt_ LPIMEMENUITEMINFO lpImeParentMenu, _Inout_opt_ LPIMEMENUITEMINFO lpImeMenu, _In_ DWORD dwSize)
#define C_ASSERT(e)
Definition: intsafe.h:73
USHORT LANGID
Definition: mui.h:9
#define _Out_opt_
Definition: ms_sal.h:346
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
UINT_PTR HKL
Definition: msctf.idl:143
EXTERN_C UINT WINAPI ImeEnumRegisterWord(_In_ REGISTERWORDENUMPROCW lpfnEnumProc, _In_opt_ LPCWSTR lpszReading, _In_ DWORD dwStyle, _In_opt_ LPCWSTR lpszString, _In_opt_ LPVOID lpData)
Definition: msctfime.cpp:272
EXTERN_C BOOL WINAPI ImeSetCompositionString(_In_ HIMC hIMC, _In_ DWORD dwIndex, _In_opt_ LPCVOID lpComp, _In_ DWORD dwCompLen, _In_opt_ LPCVOID lpRead, _In_ DWORD dwReadLen)
Definition: msctfime.cpp:517
EXTERN_C DWORD WINAPI ImeConversionList(_In_ HIMC hIMC, _In_ LPCWSTR lpSrc, _Out_ LPCANDIDATELIST lpDst, _In_ DWORD dwBufLen, _In_ UINT uFlag)
Definition: msctfime.cpp:195
EXTERN_C UINT WINAPI ImeGetRegisterWordStyle(_In_ UINT nItem, _Out_ LPSTYLEBUFW lpStyleBuf)
Definition: msctfime.cpp:254
EXTERN_C HRESULT WINAPI CtfImeInquireExW(_Out_ LPIMEINFO lpIMEInfo, _Out_ LPWSTR lpszWndClass, _In_ DWORD dwSystemInfoFlags, _In_ HKL hKL)
Definition: msctfime.cpp:547
EXTERN_C LRESULT WINAPI ImeEscape(_In_ HIMC hIMC, _In_ UINT uEscape, _Inout_opt_ LPVOID lpData)
Definition: msctfime.cpp:353
EXTERN_C BOOL WINAPI ImeProcessKey(_In_ HIMC hIMC, _In_ UINT uVirtKey, _In_ LPARAM lParam, _In_ CONST LPBYTE lpbKeyState)
Definition: msctfime.cpp:369
EXTERN_C BOOL WINAPI CtfImeIsGuidMapEnable(_In_ HIMC hIMC)
Definition: msctfime.cpp:652
EXTERN_C BOOL WINAPI ImeDestroy(_In_ UINT uReserved)
Definition: msctfime.cpp:322
EXTERN_C BOOL WINAPI ImeSetActiveContext(_In_ HIMC hIMC, _In_ BOOL fFlag)
Definition: msctfime.cpp:441
EXTERN_C BOOL WINAPI NotifyIME(_In_ HIMC hIMC, _In_ DWORD dwAction, _In_ DWORD dwIndex, _In_ DWORD_PTR dwValue)
Definition: msctfime.cpp:489
EXTERN_C BOOL WINAPI ImeInquire(_Out_ LPIMEINFO lpIMEInfo, _Out_ LPWSTR lpszWndClass, _In_ DWORD dwSystemInfoFlags)
Definition: msctfime.cpp:176
EXTERN_C BOOL WINAPI CtfImeSelectEx(_In_ HIMC hIMC, _In_ BOOL fSelect, _In_ HKL hKL)
Definition: msctfime.cpp:576
EXTERN_C BOOL WINAPI ImeRegisterWord(_In_ LPCWSTR lpszReading, _In_ DWORD dwStyle, _In_ LPCWSTR lpszString)
Definition: msctfime.cpp:216
EXTERN_C LRESULT WINAPI CtfImeEscapeEx(_In_ HIMC hIMC, _In_ UINT uSubFunc, _Inout_opt_ LPVOID lpData, _In_ HKL hKL)
Definition: msctfime.cpp:601
EXTERN_C BOOL WINAPI ImeConfigure(_In_ HKL hKL, _In_ HWND hWnd, _In_ DWORD dwMode, _Inout_opt_ LPVOID lpData)
Definition: msctfime.cpp:291
EXTERN_C BOOL WINAPI ImeSelect(_In_ HIMC hIMC, _In_ BOOL fSelect)
Definition: msctfime.cpp:423
EXTERN_C UINT WINAPI ImeToAsciiEx(_In_ UINT uVirtKey, _In_ UINT uScanCode, _In_ CONST LPBYTE lpbKeyState, _Out_ LPTRANSMSGLIST lpTransMsgList, _In_ UINT fuState, _In_ HIMC hIMC)
Definition: msctfime.cpp:456
EXTERN_C HRESULT WINAPI CtfImeGetGuidAtom(_In_ HIMC hIMC, _In_ DWORD dwUnknown, _Out_opt_ LPDWORD pdwGuidAtom)
Definition: msctfime.cpp:625
EXTERN_C BOOL WINAPI ImeUnregisterWord(_In_ LPCWSTR lpszReading, _In_ DWORD dwStyle, _In_ LPCWSTR lpszString)
Definition: msctfime.cpp:235
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
#define offsetof(TYPE, MEMBER)
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1512
IMEINFO ImeInfo
Definition: imm32_undoc.h:63
DWORD dwFlags
Definition: imm32_undoc.h:67
HINSTANCE hInst
Definition: imm32_undoc.h:61
HKL hKL
Definition: imm32_undoc.h:62
struct IMEDPI * pNext
Definition: imm32_undoc.h:60
WCHAR szUIClass[16]
Definition: imm32_undoc.h:65
UINT uCodePage
Definition: imm32_undoc.h:64
DWORD cLockObj
Definition: imm32_undoc.h:66
DWORD dwConversion
Definition: imm32_undoc.h:185
WORD fOpen
Definition: imm32_undoc.h:184
WORD wLang
Definition: imm32_undoc.h:183
PIME_SUBSTATE pSubState
Definition: imm32_undoc.h:188
DWORD dwInit
Definition: imm32_undoc.h:187
DWORD dwSentence
Definition: imm32_undoc.h:186
struct IME_STATE * pNext
Definition: imm32_undoc.h:182
struct IME_SUBSTATE * pNext
Definition: imm32_undoc.h:171
struct IME_STATE * pState
Definition: imm32_undoc.h:164
HIMCC hCtfImeContext
Definition: imm32_undoc.h:166
RTL_CRITICAL_SECTION cs
Definition: imm32_undoc.h:120
DWORD dwCompatFlags
Definition: imm32_undoc.h:119
HANDLE hInputContext
Definition: imm32_undoc.h:116
DWORD dwProdVersion
Definition: imm32_undoc.h:35
IMEINFO ImeInfo
Definition: imm32_undoc.h:30
WCHAR wszImeDescription[50]
Definition: imm32_undoc.h:37
INT fSysWow64Only
Definition: imm32_undoc.h:41
WCHAR wszImeFile[80]
Definition: imm32_undoc.h:38
WCHAR wszUIClass[16]
Definition: imm32_undoc.h:31
DWORD dwImeWinVersion
Definition: imm32_undoc.h:36
ULONG fdwInitConvMode
Definition: imm32_undoc.h:32
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define NEAR
Definition: windef.h:146
#define WINAPI
Definition: msvc.h:6
__wchar_t WCHAR
Definition: xmlstorage.h:180