ReactOS 0.4.16-dev-1163-gec5b142
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#include <winnls32.h> /* For IMEPROA/W */
16
17#define IME_MASK (0xE0000000UL)
18#define SUBST_MASK (0xD0000000UL)
19#define SPECIAL_MASK (0xF0000000UL)
20
21#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK)
22#define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK)
23#define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF))
24
25#define IS_IME_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK)
26#define IS_SUBST_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK)
27
28/* The special values for ImmFreeLayout hKL */
29#define HKL_SWITCH_TO_NON_IME ((HKL)UlongToHandle(1))
30#define HKL_RELEASE_IME ((HKL)UlongToHandle(2))
31
32typedef struct tagIMEINFOEX
33{
44 struct
45 {
48 };
50
51typedef enum IMEINFOEXCLASS
52{
58
59#define DEFINE_IME_ENTRY(type, name, params, extended) typedef type (WINAPI *FN_##name) params;
60#include <imetable.h>
61#undef DEFINE_IME_ENTRY
62
63typedef struct IMEDPI
64{
65 struct IMEDPI *pNext;
73#define DEFINE_IME_ENTRY(type, name, params, extended) FN_##name name;
74#include <imetable.h>
75#undef DEFINE_IME_ENTRY
77
78#ifndef _WIN64
108C_ASSERT(sizeof(IMEDPI) == 0xa8);
109#endif
110
111/* flags for IMEDPI.dwFlags */
112#define IMEDPI_FLAG_UNLOADED 0x1
113#define IMEDPI_FLAG_LOCKED 0x2
114
117
118/* unconfirmed */
119typedef struct tagCLIENTIMC
120{
121 HANDLE hInputContext; /* LocalAlloc'ed LHND */
130
131#ifndef _WIN64
132C_ASSERT(offsetof(CLIENTIMC, hInputContext) == 0x0);
133C_ASSERT(offsetof(CLIENTIMC, cLockObj) == 0x4);
135C_ASSERT(offsetof(CLIENTIMC, dwCompatFlags) == 0xc);
137C_ASSERT(offsetof(CLIENTIMC, uCodePage) == 0x28);
139C_ASSERT(sizeof(CLIENTIMC) == 0x34);
140#endif
141
142/* flags for CLIENTIMC */
143#define CLIENTIMC_WIDE 0x1
144#define CLIENTIMC_ACTIVE 0x2
145#define CLIENTIMC_UNKNOWN4 0x20
146#define CLIENTIMC_DESTROY 0x40
147#define CLIENTIMC_DISABLEIME 0x80
148#define CLIENTIMC_UNKNOWN2 0x100
149
152
153struct IME_STATE;
154
155/* unconfirmed */
156#ifdef __cplusplus
157typedef struct INPUTCONTEXTDX : INPUTCONTEXT
158{
159#else
160typedef struct INPUTCONTEXTDX
161{
163#endif
164 UINT nVKey; // +0x140
165 BOOL bNeedsTrans; // +0x144
167 DWORD dwUIFlags; // +0x14c
169 struct IME_STATE *pState; // +0x154
170 DWORD dwChange; // +0x158
173
174typedef struct IME_SUBSTATE
175{
180
181#ifndef _WIN64
182C_ASSERT(sizeof(IME_SUBSTATE) == 0xc);
183#endif
184
185typedef struct IME_STATE
186{
195
196#ifndef _WIN64
197C_ASSERT(sizeof(IME_STATE) == 0x18);
198#endif
199
200/* for WM_IME_REPORT IR_UNDETERMINE */
202{
218
220
223 _Out_ PIMEINFOEX pImeInfoEx,
224 _In_ IMEINFOEXCLASS SearchType,
225 _In_ PVOID pvSearchKey);
226
233
236
253
256 _In_ HWND hWnd,
257 _In_ UINT uMsg,
260
261#ifdef UNICODE
262 #define ImmIMPGetIME ImmIMPGetIMEW
263#else
264 #define ImmIMPGetIME ImmIMPGetIMEA
265#endif
266
267#ifdef __cplusplus
268} // extern "C"
269#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)
BOOL WINAPI ImmIMPGetIMEW(_In_opt_ HWND hWnd, _Out_ LPIMEPROW pImePro)
Definition: imepro.c:84
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 ImmIMPGetIMEA(_In_opt_ HWND hWnd, _Out_ LPIMEPROA pImePro)
Definition: imepro.c:59
BOOL WINAPI ImmLoadIME(_In_ HKL hKL)
LRESULT WINAPI ImmPutImeMenuItemsIntoMappedFile(_In_ HIMC hIMC)
Definition: imemenu.c:377
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:52
@ ImeInfoExImeFileName
Definition: imm32_undoc.h:56
@ ImeInfoExKeyboardLayoutTFS
Definition: imm32_undoc.h:54
@ ImeInfoExKeyboardLayout
Definition: imm32_undoc.h:53
@ ImeInfoExImeWindow
Definition: imm32_undoc.h:55
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
#define _In_opt_
Definition: no_sal2.h:212
long LONG
Definition: pedump.c:60
#define offsetof(TYPE, MEMBER)
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1528
IMEINFO ImeInfo
Definition: imm32_undoc.h:68
DWORD dwFlags
Definition: imm32_undoc.h:72
HINSTANCE hInst
Definition: imm32_undoc.h:66
HKL hKL
Definition: imm32_undoc.h:67
struct IMEDPI * pNext
Definition: imm32_undoc.h:65
WCHAR szUIClass[16]
Definition: imm32_undoc.h:70
UINT uCodePage
Definition: imm32_undoc.h:69
DWORD cLockObj
Definition: imm32_undoc.h:71
DWORD dwConversion
Definition: imm32_undoc.h:190
WORD fOpen
Definition: imm32_undoc.h:189
WORD wLang
Definition: imm32_undoc.h:188
PIME_SUBSTATE pSubState
Definition: imm32_undoc.h:193
DWORD dwInit
Definition: imm32_undoc.h:192
DWORD dwSentence
Definition: imm32_undoc.h:191
struct IME_STATE * pNext
Definition: imm32_undoc.h:187
struct IME_SUBSTATE * pNext
Definition: imm32_undoc.h:176
struct IME_STATE * pState
Definition: imm32_undoc.h:169
HIMCC hCtfImeContext
Definition: imm32_undoc.h:171
RTL_CRITICAL_SECTION cs
Definition: imm32_undoc.h:125
DWORD dwCompatFlags
Definition: imm32_undoc.h:124
HANDLE hInputContext
Definition: imm32_undoc.h:121
DWORD dwProdVersion
Definition: imm32_undoc.h:40
IMEINFO ImeInfo
Definition: imm32_undoc.h:35
WCHAR wszImeDescription[50]
Definition: imm32_undoc.h:42
INT fSysWow64Only
Definition: imm32_undoc.h:46
WCHAR wszImeFile[80]
Definition: imm32_undoc.h:43
WCHAR wszUIClass[16]
Definition: imm32_undoc.h:36
DWORD dwImeWinVersion
Definition: imm32_undoc.h:41
ULONG fdwInitConvMode
Definition: imm32_undoc.h:37
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