ReactOS 0.4.16-dev-401-g45b008d
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
27/* The special values for ImmFreeLayout hKL */
28#define HKL_SWITCH_TO_NON_IME ((HKL)UlongToHandle(1))
29#define HKL_RELEASE_IME ((HKL)UlongToHandle(2))
30
31typedef struct tagIMEINFOEX
32{
43 struct
44 {
47 };
49
50typedef enum IMEINFOEXCLASS
51{
57
58#define DEFINE_IME_ENTRY(type, name, params, extended) typedef type (WINAPI *FN_##name) params;
59#include <imetable.h>
60#undef DEFINE_IME_ENTRY
61
62typedef struct IMEDPI
63{
64 struct IMEDPI *pNext;
72#define DEFINE_IME_ENTRY(type, name, params, extended) FN_##name name;
73#include <imetable.h>
74#undef DEFINE_IME_ENTRY
76
77#ifndef _WIN64
107C_ASSERT(sizeof(IMEDPI) == 0xa8);
108#endif
109
110/* flags for IMEDPI.dwFlags */
111#define IMEDPI_FLAG_UNLOADED 0x1
112#define IMEDPI_FLAG_LOCKED 0x2
113
116
117/* unconfirmed */
118typedef struct tagCLIENTIMC
119{
120 HANDLE hInputContext; /* LocalAlloc'ed LHND */
129
130#ifndef _WIN64
131C_ASSERT(offsetof(CLIENTIMC, hInputContext) == 0x0);
132C_ASSERT(offsetof(CLIENTIMC, cLockObj) == 0x4);
134C_ASSERT(offsetof(CLIENTIMC, dwCompatFlags) == 0xc);
136C_ASSERT(offsetof(CLIENTIMC, uCodePage) == 0x28);
138C_ASSERT(sizeof(CLIENTIMC) == 0x34);
139#endif
140
141/* flags for CLIENTIMC */
142#define CLIENTIMC_WIDE 0x1
143#define CLIENTIMC_ACTIVE 0x2
144#define CLIENTIMC_UNKNOWN4 0x20
145#define CLIENTIMC_DESTROY 0x40
146#define CLIENTIMC_DISABLEIME 0x80
147#define CLIENTIMC_UNKNOWN2 0x100
148
151
152struct IME_STATE;
153
154/* unconfirmed */
155#ifdef __cplusplus
156typedef struct INPUTCONTEXTDX : INPUTCONTEXT
157{
158#else
159typedef struct INPUTCONTEXTDX
160{
162#endif
163 UINT nVKey; // +0x140
164 BOOL bNeedsTrans; // +0x144
166 DWORD dwUIFlags; // +0x14c
168 struct IME_STATE *pState; // +0x154
169 DWORD dwChange; // +0x158
172
173typedef struct IME_SUBSTATE
174{
179
180#ifndef _WIN64
181C_ASSERT(sizeof(IME_SUBSTATE) == 0xc);
182#endif
183
184typedef struct IME_STATE
185{
194
195#ifndef _WIN64
196C_ASSERT(sizeof(IME_STATE) == 0x18);
197#endif
198
199/* for WM_IME_REPORT IR_UNDETERMINE */
201{
217
219
222 _Out_ PIMEINFOEX pImeInfoEx,
223 _In_ IMEINFOEXCLASS SearchType,
224 _In_ PVOID pvSearchKey);
225
231
248
251 _In_ HWND hWnd,
252 _In_ UINT uMsg,
255
256#ifdef __cplusplus
257} // extern "C"
258#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:1251
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:51
@ ImeInfoExImeFileName
Definition: imm32_undoc.h:55
@ ImeInfoExKeyboardLayoutTFS
Definition: imm32_undoc.h:53
@ ImeInfoExKeyboardLayout
Definition: imm32_undoc.h:52
@ ImeInfoExImeWindow
Definition: imm32_undoc.h:54
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
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:267
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:512
EXTERN_C DWORD WINAPI ImeConversionList(_In_ HIMC hIMC, _In_ LPCWSTR lpSrc, _Out_ LPCANDIDATELIST lpDst, _In_ DWORD dwBufLen, _In_ UINT uFlag)
Definition: msctfime.cpp:190
EXTERN_C UINT WINAPI ImeGetRegisterWordStyle(_In_ UINT nItem, _Out_ LPSTYLEBUFW lpStyleBuf)
Definition: msctfime.cpp:249
EXTERN_C HRESULT WINAPI CtfImeInquireExW(_Out_ LPIMEINFO lpIMEInfo, _Out_ LPWSTR lpszWndClass, _In_ DWORD dwSystemInfoFlags, _In_ HKL hKL)
Definition: msctfime.cpp:542
EXTERN_C LRESULT WINAPI ImeEscape(_In_ HIMC hIMC, _In_ UINT uEscape, _Inout_opt_ LPVOID lpData)
Definition: msctfime.cpp:348
EXTERN_C BOOL WINAPI ImeProcessKey(_In_ HIMC hIMC, _In_ UINT uVirtKey, _In_ LPARAM lParam, _In_ CONST LPBYTE lpbKeyState)
Definition: msctfime.cpp:364
EXTERN_C BOOL WINAPI CtfImeIsGuidMapEnable(_In_ HIMC hIMC)
Definition: msctfime.cpp:647
EXTERN_C BOOL WINAPI ImeDestroy(_In_ UINT uReserved)
Definition: msctfime.cpp:317
EXTERN_C BOOL WINAPI ImeSetActiveContext(_In_ HIMC hIMC, _In_ BOOL fFlag)
Definition: msctfime.cpp:436
EXTERN_C BOOL WINAPI NotifyIME(_In_ HIMC hIMC, _In_ DWORD dwAction, _In_ DWORD dwIndex, _In_ DWORD_PTR dwValue)
Definition: msctfime.cpp:484
EXTERN_C BOOL WINAPI ImeInquire(_Out_ LPIMEINFO lpIMEInfo, _Out_ LPWSTR lpszWndClass, _In_ DWORD dwSystemInfoFlags)
Definition: msctfime.cpp:171
EXTERN_C BOOL WINAPI CtfImeSelectEx(_In_ HIMC hIMC, _In_ BOOL fSelect, _In_ HKL hKL)
Definition: msctfime.cpp:571
EXTERN_C BOOL WINAPI ImeRegisterWord(_In_ LPCWSTR lpszReading, _In_ DWORD dwStyle, _In_ LPCWSTR lpszString)
Definition: msctfime.cpp:211
EXTERN_C LRESULT WINAPI CtfImeEscapeEx(_In_ HIMC hIMC, _In_ UINT uSubFunc, _Inout_opt_ LPVOID lpData, _In_ HKL hKL)
Definition: msctfime.cpp:596
EXTERN_C BOOL WINAPI ImeConfigure(_In_ HKL hKL, _In_ HWND hWnd, _In_ DWORD dwMode, _Inout_opt_ LPVOID lpData)
Definition: msctfime.cpp:286
EXTERN_C BOOL WINAPI ImeSelect(_In_ HIMC hIMC, _In_ BOOL fSelect)
Definition: msctfime.cpp:418
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:451
EXTERN_C HRESULT WINAPI CtfImeGetGuidAtom(_In_ HIMC hIMC, _In_ DWORD dwUnknown, _Out_opt_ LPDWORD pdwGuidAtom)
Definition: msctfime.cpp:620
EXTERN_C BOOL WINAPI ImeUnregisterWord(_In_ LPCWSTR lpszReading, _In_ DWORD dwStyle, _In_ LPCWSTR lpszString)
Definition: msctfime.cpp:230
unsigned int UINT
Definition: ndis.h:50
#define _Out_opt_
Definition: no_sal2.h:214
#define _Inout_
Definition: no_sal2.h:162
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
long LONG
Definition: pedump.c:60
#define offsetof(TYPE, MEMBER)
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1520
IMEINFO ImeInfo
Definition: imm32_undoc.h:67
DWORD dwFlags
Definition: imm32_undoc.h:71
HINSTANCE hInst
Definition: imm32_undoc.h:65
HKL hKL
Definition: imm32_undoc.h:66
struct IMEDPI * pNext
Definition: imm32_undoc.h:64
WCHAR szUIClass[16]
Definition: imm32_undoc.h:69
UINT uCodePage
Definition: imm32_undoc.h:68
DWORD cLockObj
Definition: imm32_undoc.h:70
DWORD dwConversion
Definition: imm32_undoc.h:189
WORD fOpen
Definition: imm32_undoc.h:188
WORD wLang
Definition: imm32_undoc.h:187
PIME_SUBSTATE pSubState
Definition: imm32_undoc.h:192
DWORD dwInit
Definition: imm32_undoc.h:191
DWORD dwSentence
Definition: imm32_undoc.h:190
struct IME_STATE * pNext
Definition: imm32_undoc.h:186
struct IME_SUBSTATE * pNext
Definition: imm32_undoc.h:175
struct IME_STATE * pState
Definition: imm32_undoc.h:168
HIMCC hCtfImeContext
Definition: imm32_undoc.h:170
RTL_CRITICAL_SECTION cs
Definition: imm32_undoc.h:124
DWORD dwCompatFlags
Definition: imm32_undoc.h:123
HANDLE hInputContext
Definition: imm32_undoc.h:120
DWORD dwProdVersion
Definition: imm32_undoc.h:39
IMEINFO ImeInfo
Definition: imm32_undoc.h:34
WCHAR wszImeDescription[50]
Definition: imm32_undoc.h:41
INT fSysWow64Only
Definition: imm32_undoc.h:45
WCHAR wszImeFile[80]
Definition: imm32_undoc.h:42
WCHAR wszUIClass[16]
Definition: imm32_undoc.h:35
DWORD dwImeWinVersion
Definition: imm32_undoc.h:40
ULONG fdwInitConvMode
Definition: imm32_undoc.h:36
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