ReactOS  0.4.15-dev-3717-g292e6a4
keymsg.c File Reference
#include "precomp.h"
Include dependency graph for keymsg.c:

Go to the source code of this file.

Classes

struct  IMM_UNKNOWN_PROCESS1
 

Macros

#define MSG_COUNT   0x100
 

Typedefs

typedef struct IMM_UNKNOWN_PROCESS1 IMM_UNKNOWN_PROCESS1
 
typedef struct IMM_UNKNOWN_PROCESS1PIMM_UNKNOWN_PROCESS1
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (imm)
 
BOOL APIENTRY Imm32ImeNonImeToggle (HIMC hIMC, HKL hKL, HWND hWnd, LANGID LangID)
 
BOOL APIENTRY Imm32CShapeToggle (HIMC hIMC, HKL hKL, HWND hWnd)
 
BOOL APIENTRY Imm32CSymbolToggle (HIMC hIMC, HKL hKL, HWND hWnd)
 
BOOL APIENTRY Imm32JCloseOpen (HIMC hIMC, HKL hKL, HWND hWnd)
 
BOOL APIENTRY Imm32KShapeToggle (HIMC hIMC)
 
BOOL APIENTRY Imm32KHanjaConvert (HIMC hIMC)
 
BOOL APIENTRY Imm32KEnglish (HIMC hIMC)
 
BOOL APIENTRY Imm32ProcessHotKey (HWND hWnd, HIMC hIMC, HKL hKL, DWORD dwHotKeyID)
 
static BOOL APIENTRY ImmIsUIMessageAW (HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam, BOOL bAnsi)
 
static DWORD WINAPI Imm32UnknownProcess1Proc (LPVOID arg)
 
LRESULT APIENTRY Imm32UnknownProcess1 (HWND hWnd, BOOL fFlag)
 
static BOOL CALLBACK Imm32SendChangeProc (HIMC hIMC, LPARAM lParam)
 
BOOL APIENTRY Imm32SendChange (BOOL bProcess)
 
VOID APIENTRY Imm32RequestError (DWORD dwError)
 
LRESULT APIENTRY Imm32ProcessRequest (HIMC hIMC, PWND pWnd, DWORD dwCommand, LPVOID pData, BOOL bAnsiAPI)
 
LRESULT APIENTRY Imm32RequestMessageAW (HIMC hIMC, WPARAM wParam, LPARAM lParam, BOOL bAnsi)
 
BOOL WINAPI ImmIsUIMessageA (HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam)
 
BOOL WINAPI ImmIsUIMessageW (HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam)
 
BOOL WINAPI ImmGetHotKey (IN DWORD dwHotKey, OUT LPUINT lpuModifiers, OUT LPUINT lpuVKey, OUT LPHKL lphKL)
 
UINT WINAPI ImmWINNLSGetIMEHotkey (HWND hwndIme)
 
BOOL WINAPI ImmSimulateHotKey (HWND hWnd, DWORD dwHotKeyID)
 
UINT WINAPI ImmGetVirtualKey (HWND hWnd)
 
DWORD WINAPI ImmProcessKey (HWND hWnd, HKL hKL, UINT vKey, LPARAM lParam, DWORD dwHotKeyID)
 
LRESULT WINAPI ImmSystemHandler (HIMC hIMC, WPARAM wParam, LPARAM lParam)
 
BOOL WINAPI ImmGenerateMessage (HIMC hIMC)
 
VOID APIENTRY Imm32PostMessages (HWND hwnd, HIMC hIMC, DWORD dwCount, LPTRANSMSG lpTransMsg)
 
BOOL WINAPI ImmTranslateMessage (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lKeyData)
 
LRESULT WINAPI ImmRequestMessageA (HIMC hIMC, WPARAM wParam, LPARAM lParam)
 
LRESULT WINAPI ImmRequestMessageW (HIMC hIMC, WPARAM wParam, LPARAM lParam)
 

Macro Definition Documentation

◆ MSG_COUNT

#define MSG_COUNT   0x100

Typedef Documentation

◆ IMM_UNKNOWN_PROCESS1

◆ PIMM_UNKNOWN_PROCESS1

Function Documentation

◆ Imm32CShapeToggle()

BOOL APIENTRY Imm32CShapeToggle ( HIMC  hIMC,
HKL  hKL,
HWND  hWnd 
)

Definition at line 48 of file keymsg.c.

49 {
50  LPINPUTCONTEXT pIC;
51  BOOL fOpen;
52  DWORD dwConversion, dwSentence;
53 
54  if (hWnd == NULL || !IS_IME_HKL(hKL))
55  return FALSE;
56 
57  pIC = ImmLockIMC(hIMC);
58  if (pIC == NULL)
59  return TRUE;
60 
61  fOpen = pIC->fOpen;
62  if (fOpen)
63  {
64  dwConversion = (pIC->fdwConversion ^ IME_CMODE_FULLSHAPE);
65  dwSentence = pIC->fdwSentence;
66  }
67 
68  ImmUnlockIMC(hIMC);
69 
70  if (fOpen)
71  ImmSetConversionStatus(hIMC, dwConversion, dwSentence);
72  else
73  ImmSetOpenStatus(hIMC, TRUE);
74 
75  return TRUE;
76 }
#define TRUE
Definition: types.h:120
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
HWND hWnd
Definition: settings.c:17
DWORD fdwConversion
Definition: imm.h:32
BOOL fOpen
Definition: imm.h:29
BOOL WINAPI ImmSetConversionStatus(HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence)
Definition: ime.c:1621
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
Definition: ime.c:1161
#define IME_CMODE_FULLSHAPE
Definition: imm.h:496
#define IS_IME_HKL(hkl)
Definition: ntuser.h:1194
unsigned long DWORD
Definition: ntddk_ex.h:95
#define NULL
Definition: types.h:112
DWORD fdwSentence
Definition: imm.h:33
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038

Referenced by Imm32ProcessHotKey().

◆ Imm32CSymbolToggle()

BOOL APIENTRY Imm32CSymbolToggle ( HIMC  hIMC,
HKL  hKL,
HWND  hWnd 
)

Definition at line 78 of file keymsg.c.

79 {
80  LPINPUTCONTEXT pIC;
81  BOOL fOpen;
82  DWORD dwConversion, dwSentence;
83 
84  if (hWnd == NULL || !IS_IME_HKL(hKL))
85  return FALSE;
86 
87  pIC = ImmLockIMC(hIMC);
88  if (pIC == NULL)
89  return TRUE;
90 
91  fOpen = pIC->fOpen;
92  if (fOpen)
93  {
94  dwConversion = (pIC->fdwConversion ^ IME_CMODE_SYMBOL);
95  dwSentence = pIC->fdwSentence;
96  }
97 
98  ImmUnlockIMC(hIMC);
99 
100  if (fOpen)
101  ImmSetConversionStatus(hIMC, dwConversion, dwSentence);
102  else
103  ImmSetOpenStatus(hIMC, TRUE);
104 
105  return TRUE;
106 }
#define TRUE
Definition: types.h:120
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
HWND hWnd
Definition: settings.c:17
DWORD fdwConversion
Definition: imm.h:32
BOOL fOpen
Definition: imm.h:29
BOOL WINAPI ImmSetConversionStatus(HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence)
Definition: ime.c:1621
#define IME_CMODE_SYMBOL
Definition: imm.h:503
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
Definition: ime.c:1161
#define IS_IME_HKL(hkl)
Definition: ntuser.h:1194
unsigned long DWORD
Definition: ntddk_ex.h:95
#define NULL
Definition: types.h:112
DWORD fdwSentence
Definition: imm.h:33
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038

Referenced by Imm32ProcessHotKey().

◆ Imm32ImeNonImeToggle()

BOOL APIENTRY Imm32ImeNonImeToggle ( HIMC  hIMC,
HKL  hKL,
HWND  hWnd,
LANGID  LangID 
)

Definition at line 17 of file keymsg.c.

18 {
19  LPINPUTCONTEXT pIC;
20  BOOL fOpen;
21 
22  if (hWnd != NULL)
23  return FALSE;
24 
25  if (!IS_IME_HKL(hKL) || LOWORD(hKL) != LangID)
26  {
27  FIXME("We have to do something here\n");
28  return TRUE;
29  }
30 
31  pIC = ImmLockIMC(hIMC);
32  if (pIC == NULL)
33  return TRUE;
34 
35  fOpen = pIC->fOpen;
36  ImmUnlockIMC(hIMC);
37 
38  if (!fOpen)
39  {
40  ImmSetOpenStatus(hIMC, TRUE);
41  return TRUE;
42  }
43 
44  FIXME("We have to do something here\n");
45  return TRUE;
46 }
#define TRUE
Definition: types.h:120
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
HWND hWnd
Definition: settings.c:17
BOOL fOpen
Definition: imm.h:29
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
Definition: ime.c:1161
#define FIXME(fmt,...)
Definition: debug.h:111
#define IS_IME_HKL(hkl)
Definition: ntuser.h:1194
#define NULL
Definition: types.h:112
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
Definition: wdfusb.h:1075
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038
#define LOWORD(l)
Definition: pedump.c:82

Referenced by Imm32ProcessHotKey().

◆ Imm32JCloseOpen()

BOOL APIENTRY Imm32JCloseOpen ( HIMC  hIMC,
HKL  hKL,
HWND  hWnd 
)

Definition at line 108 of file keymsg.c.

109 {
110  BOOL fOpen;
111 
112  if (ImmIsIME(hKL) && LOWORD(hKL) == LANGID_JAPANESE)
113  {
114  fOpen = ImmGetOpenStatus(hIMC);
115  ImmSetOpenStatus(hIMC, !fOpen);
116  return TRUE;
117  }
118 
119  FIXME("We have to do something here\n");
120  return TRUE;
121 }
#define LANGID_JAPANESE
Definition: precomp.h:58
BOOL WINAPI ImmGetOpenStatus(HIMC hIMC)
Definition: ime.c:1138
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
Definition: ime.c:1161
#define FIXME(fmt,...)
Definition: debug.h:111
BOOL WINAPI ImmIsIME(HKL hKL)
Definition: ime.c:621
#define LOWORD(l)
Definition: pedump.c:82

Referenced by Imm32ProcessHotKey().

◆ Imm32KEnglish()

BOOL APIENTRY Imm32KEnglish ( HIMC  hIMC)

Definition at line 162 of file keymsg.c.

163 {
164  LPINPUTCONTEXT pIC;
165  DWORD dwConversion, dwSentence;
166  BOOL fOpen;
167 
168  pIC = ImmLockIMC(hIMC);
169  if (pIC == NULL)
170  return FALSE;
171 
172  dwConversion = (pIC->fdwConversion ^ IME_CMODE_NATIVE);
173  dwSentence = pIC->fdwSentence;
174  ImmSetConversionStatus(hIMC, dwConversion, dwSentence);
175 
176  fOpen = ((pIC->fdwConversion & (IME_CMODE_FULLSHAPE | IME_CMODE_NATIVE)) != 0);
177  ImmSetOpenStatus(hIMC, fOpen);
178 
179  ImmUnlockIMC(hIMC);
180  return TRUE;
181 }
#define TRUE
Definition: types.h:120
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
DWORD fdwConversion
Definition: imm.h:32
BOOL WINAPI ImmSetConversionStatus(HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence)
Definition: ime.c:1621
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
Definition: ime.c:1161
#define IME_CMODE_FULLSHAPE
Definition: imm.h:496
#define IME_CMODE_NATIVE
Definition: imm.h:488
unsigned long DWORD
Definition: ntddk_ex.h:95
#define NULL
Definition: types.h:112
DWORD fdwSentence
Definition: imm.h:33
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038

Referenced by Imm32ProcessHotKey().

◆ Imm32KHanjaConvert()

BOOL APIENTRY Imm32KHanjaConvert ( HIMC  hIMC)

Definition at line 145 of file keymsg.c.

146 {
147  LPINPUTCONTEXT pIC;
148  DWORD dwConversion, dwSentence;
149 
150  pIC = ImmLockIMC(hIMC);
151  if (!pIC)
152  return FALSE;
153 
154  dwConversion = (pIC->fdwConversion ^ IME_CMODE_HANJACONVERT);
155  dwSentence = pIC->fdwSentence;
156  ImmUnlockIMC(hIMC);
157 
158  ImmSetConversionStatus(hIMC, dwConversion, dwSentence);
159  return TRUE;
160 }
#define TRUE
Definition: types.h:120
#define IME_CMODE_HANJACONVERT
Definition: imm.h:499
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
DWORD fdwConversion
Definition: imm.h:32
BOOL WINAPI ImmSetConversionStatus(HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence)
Definition: ime.c:1621
#define FALSE
Definition: types.h:117
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD fdwSentence
Definition: imm.h:33
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038

Referenced by Imm32ProcessHotKey().

◆ Imm32KShapeToggle()

BOOL APIENTRY Imm32KShapeToggle ( HIMC  hIMC)

Definition at line 123 of file keymsg.c.

124 {
125  LPINPUTCONTEXT pIC;
126  DWORD dwConversion, dwSentence;
127 
128  pIC = ImmLockIMC(hIMC);
129  if (pIC == NULL)
130  return FALSE;
131 
132  dwConversion = (pIC->fdwConversion ^ IME_CMODE_FULLSHAPE);
133  dwSentence = pIC->fdwSentence;
134  ImmSetConversionStatus(hIMC, dwConversion, dwSentence);
135 
137  ImmSetOpenStatus(hIMC, TRUE);
138  else
139  ImmSetOpenStatus(hIMC, FALSE);
140 
141  ImmUnlockIMC(hIMC);
142  return TRUE;
143 }
#define TRUE
Definition: types.h:120
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
DWORD fdwConversion
Definition: imm.h:32
BOOL WINAPI ImmSetConversionStatus(HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence)
Definition: ime.c:1621
#define FALSE
Definition: types.h:117
BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
Definition: ime.c:1161
#define IME_CMODE_FULLSHAPE
Definition: imm.h:496
#define IME_CMODE_NATIVE
Definition: imm.h:488
unsigned long DWORD
Definition: ntddk_ex.h:95
#define NULL
Definition: types.h:112
DWORD fdwSentence
Definition: imm.h:33
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038

Referenced by Imm32ProcessHotKey().

◆ Imm32PostMessages()

VOID APIENTRY Imm32PostMessages ( HWND  hwnd,
HIMC  hIMC,
DWORD  dwCount,
LPTRANSMSG  lpTransMsg 
)

Definition at line 855 of file keymsg.c.

856 {
857  DWORD dwIndex;
858  PCLIENTIMC pClientImc;
859  LPTRANSMSG pNewTransMsg = lpTransMsg, pItem;
860  BOOL bAnsi;
861 
862  pClientImc = ImmLockClientImc(hIMC);
863  if (pClientImc == NULL)
864  return;
865 
866  bAnsi = !(pClientImc->dwFlags & CLIENTIMC_WIDE);
867  ImmUnlockClientImc(pClientImc);
868 
869 #ifdef IMM_WIN3_SUPPORT
870  if (GetWin32ClientInfo()->dwExpWinVer < _WIN32_WINNT_NT4) /* old version (3.x)? */
871  {
873  WORD Lang = PRIMARYLANGID(LangID);
874 
875  /* translate the messages if Japanese or Korean */
876  if (Lang == LANG_JAPANESE ||
877  (Lang == LANG_KOREAN && NtUserGetAppImeLevel(hwnd) == 3))
878  {
879  DWORD cbTransMsg = dwCount * sizeof(TRANSMSG);
880  pNewTransMsg = Imm32HeapAlloc(0, cbTransMsg);
881  if (pNewTransMsg)
882  {
883  RtlCopyMemory(pNewTransMsg, lpTransMsg, cbTransMsg);
884  dwCount = ImmNt3Trans(dwCount, pNewTransMsg, hIMC, bAnsi, Lang);
885  }
886  else
887  {
888  pNewTransMsg = lpTransMsg;
889  }
890  }
891  }
892 #endif
893 
894  /* post them */
895  pItem = pNewTransMsg;
896  for (dwIndex = 0; dwIndex < dwCount; ++dwIndex, ++pItem)
897  {
898  if (bAnsi)
899  PostMessageA(hwnd, pItem->message, pItem->wParam, pItem->lParam);
900  else
901  PostMessageW(hwnd, pItem->message, pItem->wParam, pItem->lParam);
902  }
903 
904 #ifdef IMM_WIN3_SUPPORT
905  if (pNewTransMsg != lpTransMsg)
906  Imm32HeapFree(pNewTransMsg);
907 #endif
908 }
LPVOID APIENTRY Imm32HeapAlloc(DWORD dwFlags, DWORD dwBytes)
Definition: utils.c:193
#define Imm32HeapFree(lpData)
Definition: precomp.h:88
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
WORD LANGID
Definition: typedefs.h:81
#define GetWin32ClientInfo()
Definition: ntuser.h:326
#define CLIENTIMC_WIDE
Definition: ntuser.h:1315
#define LANG_JAPANESE
Definition: nls.h:76
unsigned int BOOL
Definition: ntddk_ex.h:94
#define _WIN32_WINNT_NT4
Definition: sdkddkver.h:20
LCID WINAPI GetSystemDefaultLCID(void)
Definition: lang.c:791
PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc)
Definition: imm.c:905
DWORD NTAPI NtUserGetAppImeLevel(HWND hWnd)
Definition: ime.c:239
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _tagTRANSMSG TRANSMSG
#define LANGIDFROMLCID(l)
Definition: nls.h:18
#define NULL
Definition: types.h:112
DWORD dwFlags
Definition: ntuser.h:1296
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define LANG_KOREAN
Definition: nls.h:84
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
Definition: wdfusb.h:1075
#define PRIMARYLANGID(l)
Definition: nls.h:16
VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc)
Definition: imm.c:952

Referenced by ImmTranslateMessage().

◆ Imm32ProcessHotKey()

BOOL APIENTRY Imm32ProcessHotKey ( HWND  hWnd,
HIMC  hIMC,
HKL  hKL,
DWORD  dwHotKeyID 
)

Definition at line 183 of file keymsg.c.

184 {
185  PIMEDPI pImeDpi;
186  BOOL ret;
187 
188  if (hIMC && Imm32IsCrossThreadAccess(hIMC))
189  return FALSE;
190 
191  switch (dwHotKeyID)
192  {
195 
197  return Imm32CShapeToggle(hIMC, hKL, hWnd);
198 
200  return Imm32CSymbolToggle(hIMC, hKL, hWnd);
201 
203  return Imm32JCloseOpen(hIMC, hKL, hWnd);
204 
206  return Imm32KShapeToggle(hIMC);
207 
209  return Imm32KHanjaConvert(hIMC);
210 
211  case IME_KHOTKEY_ENGLISH:
212  return Imm32KEnglish(hIMC);
213 
216 
218  return Imm32CShapeToggle(hIMC, hKL, hWnd);
219 
221  return Imm32CSymbolToggle(hIMC, hKL, hWnd);
222 
223  default:
224  break;
225  }
226 
227  if (dwHotKeyID < IME_HOTKEY_PRIVATE_FIRST || IME_HOTKEY_PRIVATE_LAST < dwHotKeyID)
228  return FALSE;
229 
230  pImeDpi = ImmLockImeDpi(hKL);
231  if (pImeDpi == NULL)
232  return FALSE;
233 
234  ret = (BOOL)pImeDpi->ImeEscape(hIMC, IME_ESC_PRIVATE_HOTKEY, &dwHotKeyID);
235  ImmUnlockImeDpi(pImeDpi);
236  return ret;
237 }
VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi)
Definition: ime.c:752
#define LANGID_CHINESE_SIMPLIFIED
Definition: precomp.h:56
#define IME_HOTKEY_PRIVATE_FIRST
Definition: imm.h:355
#define IME_CHOTKEY_SYMBOL_TOGGLE
Definition: imm.h:336
BOOL APIENTRY Imm32KEnglish(HIMC hIMC)
Definition: keymsg.c:162
#define LANGID_CHINESE_TRADITIONAL
Definition: precomp.h:57
HWND hWnd
Definition: settings.c:17
BOOL APIENTRY Imm32CShapeToggle(HIMC hIMC, HKL hKL, HWND hWnd)
Definition: keymsg.c:48
#define IME_KHOTKEY_HANJACONVERT
Definition: imm.h:343
BOOL APIENTRY Imm32ImeNonImeToggle(HIMC hIMC, HKL hKL, HWND hWnd, LANGID LangID)
Definition: keymsg.c:17
BOOL APIENTRY Imm32JCloseOpen(HIMC hIMC, HKL hKL, HWND hWnd)
Definition: keymsg.c:108
BOOL APIENTRY Imm32KShapeToggle(HIMC hIMC)
Definition: keymsg.c:123
#define BOOL
Definition: nt_native.h:43
#define IME_THOTKEY_SYMBOL_TOGGLE
Definition: imm.h:348
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL APIENTRY Imm32CSymbolToggle(HIMC hIMC, HKL hKL, HWND hWnd)
Definition: keymsg.c:78
#define IME_KHOTKEY_ENGLISH
Definition: imm.h:344
PIMEDPI WINAPI ImmLockImeDpi(HKL hKL)
Definition: ime.c:723
#define IME_HOTKEY_PRIVATE_LAST
Definition: imm.h:360
static BOOL Imm32IsCrossThreadAccess(HIMC hIMC)
Definition: precomp.h:98
int ret
#define IME_CHOTKEY_IME_NONIME_TOGGLE
Definition: imm.h:334
#define IME_JHOTKEY_CLOSE_OPEN
Definition: imm.h:339
#define IME_THOTKEY_IME_NONIME_TOGGLE
Definition: imm.h:346
#define NULL
Definition: types.h:112
#define IME_ESC_PRIVATE_HOTKEY
Definition: imm.h:574
#define IME_KHOTKEY_SHAPE_TOGGLE
Definition: imm.h:342
#define IME_THOTKEY_SHAPE_TOGGLE
Definition: imm.h:347
BOOL APIENTRY Imm32KHanjaConvert(HIMC hIMC)
Definition: keymsg.c:145
#define IME_CHOTKEY_SHAPE_TOGGLE
Definition: imm.h:335

Referenced by ImmProcessKey(), and ImmSimulateHotKey().

◆ Imm32ProcessRequest()

LRESULT APIENTRY Imm32ProcessRequest ( HIMC  hIMC,
PWND  pWnd,
DWORD  dwCommand,
LPVOID  pData,
BOOL  bAnsiAPI 
)

Definition at line 359 of file keymsg.c.

360 {
361  HWND hWnd;
362  DWORD ret = 0, dwCharPos, cchCompStr;
363  LPVOID pCS, pTempData = pData;
364  LPRECONVERTSTRING pRS;
365  LPIMECHARPOSITION pICP;
366  PCLIENTIMC pClientImc;
367  UINT uCodePage = CP_ACP;
368  BOOL bAnsiWnd = !!(pWnd->state & WNDS_ANSIWINDOWPROC);
369  static const size_t acbData[7 * 2] =
370  {
371  /* UNICODE */
372  sizeof(COMPOSITIONFORM), sizeof(CANDIDATEFORM), sizeof(LOGFONTW),
373  sizeof(RECONVERTSTRING), sizeof(RECONVERTSTRING),
374  sizeof(IMECHARPOSITION), sizeof(RECONVERTSTRING),
375  /* ANSI */
376  sizeof(COMPOSITIONFORM), sizeof(CANDIDATEFORM), sizeof(LOGFONTA),
377  sizeof(RECONVERTSTRING), sizeof(RECONVERTSTRING),
378  sizeof(IMECHARPOSITION), sizeof(RECONVERTSTRING),
379  };
380 
381  if (dwCommand == 0 || dwCommand > IMR_DOCUMENTFEED)
382  return 0; /* Out of range */
383 
384  if (pData && IsBadWritePtr(pData, acbData[bAnsiAPI * 7 + dwCommand - 1]))
385  return 0; /* Invalid pointer */
386 
387  /* Sanity check */
388  switch (dwCommand)
389  {
391  pRS = pData;
392  if (pRS && (pRS->dwVersion != 0 || pRS->dwSize < sizeof(RECONVERTSTRING)))
393  {
395  return 0;
396  }
397  break;
398 
400  pRS = pData;
401  if (!pRS || pRS->dwVersion != 0)
402  {
404  return 0;
405  }
406  break;
407 
408  default:
409  if (!pData)
410  {
412  return 0;
413  }
414  break;
415  }
416 
417  pClientImc = ImmLockClientImc(hIMC);
418  if (pClientImc)
419  {
420  uCodePage = pClientImc->uCodePage;
421  ImmUnlockClientImc(pClientImc);
422  }
423 
424  /* Prepare */
425  switch (dwCommand)
426  {
427  case IMR_COMPOSITIONFONT:
428  if (bAnsiAPI == bAnsiWnd)
429  goto DoIt;
430  if (bAnsiWnd)
431  pTempData = Imm32HeapAlloc(0, sizeof(LOGFONTA));
432  else
433  pTempData = Imm32HeapAlloc(0, sizeof(LOGFONTW));
434  if (!pTempData)
435  return 0;
436  break;
437 
439  if (bAnsiAPI == bAnsiWnd || !pData)
440  goto DoIt;
441 
442  if (bAnsiWnd)
443  ret = Imm32ReconvertAnsiFromWide(NULL, pData, uCodePage);
444  else
445  ret = Imm32ReconvertWideFromAnsi(NULL, pData, uCodePage);
446 
447  pTempData = Imm32HeapAlloc(0, ret + sizeof(WCHAR));
448  if (!pTempData)
449  return 0;
450 
451  pRS = pTempData;
452  pRS->dwSize = ret;
453  pRS->dwVersion = 0;
454 
455  if (dwCommand == IMR_CONFIRMRECONVERTSTRING)
456  {
457  if (bAnsiWnd)
458  ret = Imm32ReconvertAnsiFromWide(pTempData, pData, uCodePage);
459  else
460  ret = Imm32ReconvertWideFromAnsi(pTempData, pData, uCodePage);
461  }
462  break;
463 
465  if (bAnsiAPI == bAnsiWnd)
466  goto DoIt;
467 
468  pICP = pData;
469  dwCharPos = pICP->dwCharPos;
470 
471  if (bAnsiAPI)
472  {
473  cchCompStr = ImmGetCompositionStringA(hIMC, GCS_COMPSTR, NULL, 0);
474  if (!cchCompStr)
475  return 0;
476 
477  pCS = Imm32HeapAlloc(0, (cchCompStr + 1) * sizeof(CHAR));
478  if (!pCS)
479  return 0;
480 
481  ImmGetCompositionStringA(hIMC, GCS_COMPSTR, pCS, cchCompStr);
482  pICP->dwCharPos = IchWideFromAnsi(pICP->dwCharPos, pCS, uCodePage);
483  }
484  else
485  {
486  cchCompStr = ImmGetCompositionStringW(hIMC, GCS_COMPSTR, NULL, 0);
487  if (!cchCompStr)
488  return 0;
489 
490  pCS = Imm32HeapAlloc(0, (cchCompStr + 1) * sizeof(WCHAR));
491  if (!pCS)
492  return 0;
493 
494  ImmGetCompositionStringW(hIMC, GCS_COMPSTR, pCS, cchCompStr);
495  pICP->dwCharPos = IchAnsiFromWide(pICP->dwCharPos, pCS, uCodePage);
496  }
497 
498  Imm32HeapFree(pCS);
499  break;
500 
501  default:
502  break;
503  }
504 
505 DoIt:
506  /* The main task */
507  hWnd = pWnd->head.h;
508  if (bAnsiWnd)
509  ret = SendMessageA(hWnd, WM_IME_REQUEST, dwCommand, (LPARAM)pTempData);
510  else
511  ret = SendMessageW(hWnd, WM_IME_REQUEST, dwCommand, (LPARAM)pTempData);
512 
513  if (bAnsiAPI == bAnsiWnd)
514  goto Quit;
515 
516  /* Get back to caller */
517  switch (dwCommand)
518  {
519  case IMR_COMPOSITIONFONT:
520  if (bAnsiAPI)
521  LogFontWideToAnsi(pTempData, pData);
522  else
523  LogFontAnsiToWide(pTempData, pData);
524  break;
525 
527  if (!ret)
528  break;
529 
530  if (ret < sizeof(RECONVERTSTRING))
531  {
532  ret = 0;
533  break;
534  }
535 
536  if (pTempData)
537  {
538  if (bAnsiWnd)
539  ret = Imm32ReconvertWideFromAnsi(pData, pTempData, uCodePage);
540  else
541  ret = Imm32ReconvertAnsiFromWide(pData, pTempData, uCodePage);
542  }
543  break;
544 
546  pICP->dwCharPos = dwCharPos;
547  break;
548 
549  default:
550  break;
551  }
552 
553 Quit:
554  if (pTempData != pData)
555  Imm32HeapFree(pTempData);
556  return ret;
557 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
LONG WINAPI ImmGetCompositionStringA(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen)
Definition: compstr.c:848
#define IMR_DOCUMENTFEED
Definition: imm.h:547
#define IMR_RECONVERTSTRING
Definition: imm.h:544
BOOL NTAPI IsBadWritePtr(IN LPVOID lp, IN UINT_PTR ucb)
Definition: except.c:881
LPVOID APIENTRY Imm32HeapAlloc(DWORD dwFlags, DWORD dwBytes)
Definition: utils.c:193
DWORD APIENTRY Imm32ReconvertAnsiFromWide(LPRECONVERTSTRING pDest, const RECONVERTSTRING *pSrc, UINT uCodePage)
Definition: utils.c:455
DWORD dwSize
Definition: imm.h:97
#define Imm32HeapFree(lpData)
Definition: precomp.h:88
VOID APIENTRY LogFontAnsiToWide(const LOGFONTA *plfA, LPLOGFONTW plfW)
Definition: utils.c:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CP_ACP
Definition: compat.h:109
char CHAR
Definition: xmlstorage.h:175
struct tagIMECHARPOSITION IMECHARPOSITION
HWND hWnd
Definition: settings.c:17
struct _tagCOMPOSITIONFORM COMPOSITIONFORM
#define IMR_QUERYCHARPOSITION
Definition: imm.h:546
DWORD dwVersion
Definition: imm.h:98
DWORD APIENTRY Imm32ReconvertWideFromAnsi(LPRECONVERTSTRING pDest, const RECONVERTSTRING *pSrc, UINT uCodePage)
Definition: utils.c:399
unsigned int BOOL
Definition: ntddk_ex.h:94
THRDESKHEAD head
Definition: ntuser.h:665
LONG_PTR LPARAM
Definition: windef.h:208
PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc)
Definition: imm.c:905
struct tagRECONVERTSTRING RECONVERTSTRING
#define WM_IME_REQUEST
Definition: winuser.h:1823
UINT uCodePage
Definition: ntuser.h:1299
#define IMR_CONFIRMRECONVERTSTRING
Definition: imm.h:545
LONG WINAPI ImmGetCompositionStringW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen)
Definition: compstr.c:890
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define IMR_COMPOSITIONFONT
Definition: imm.h:543
struct tagLOGFONTW LOGFONTW
VOID APIENTRY LogFontWideToAnsi(const LOGFONTW *plfW, LPLOGFONTA plfA)
Definition: utils.c:132
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwCharPos
Definition: imm.h:141
int ret
LONG APIENTRY IchWideFromAnsi(LONG cchAnsi, LPCSTR pchAnsi, UINT uCodePage)
Definition: utils.c:79
LONG APIENTRY IchAnsiFromWide(LONG cchWide, LPCWSTR pchWide, UINT uCodePage)
Definition: utils.c:99
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WNDS_ANSIWINDOWPROC
Definition: ntuser.h:598
DWORD state
Definition: ntuser.h:671
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
VOID APIENTRY Imm32RequestError(DWORD dwError)
Definition: keymsg.c:352
struct tagCANDIDATEFORM CANDIDATEFORM
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define GCS_COMPSTR
Definition: imm.h:370
VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc)
Definition: imm.c:952

Referenced by Imm32RequestMessageAW().

◆ Imm32RequestError()

VOID APIENTRY Imm32RequestError ( DWORD  dwError)

Definition at line 352 of file keymsg.c.

353 {
354  FIXME("()\n");
355  SetLastError(dwError);
356 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define SetLastError(x)
Definition: compat.h:611

Referenced by Imm32ProcessRequest().

◆ Imm32RequestMessageAW()

LRESULT APIENTRY Imm32RequestMessageAW ( HIMC  hIMC,
WPARAM  wParam,
LPARAM  lParam,
BOOL  bAnsi 
)

Definition at line 559 of file keymsg.c.

560 {
561  LRESULT ret = 0;
562  LPINPUTCONTEXT pIC;
563  HWND hWnd;
564  PWND pWnd = NULL;
565 
566  if (!hIMC || Imm32IsCrossThreadAccess(hIMC))
567  return FALSE;
568 
569  pIC = ImmLockIMC(hIMC);
570  if (!pIC)
571  return FALSE;
572 
573  hWnd = pIC->hWnd;
574  if (hWnd)
575  pWnd = ValidateHwndNoErr(hWnd);
576 
577  if (pWnd && pWnd->head.pti == NtCurrentTeb()->Win32ThreadInfo)
578  ret = Imm32ProcessRequest(hIMC, pWnd, (DWORD)wParam, (LPVOID)lParam, bAnsi);
579 
580  ImmUnlockIMC(hIMC);
581  return ret;
582 }
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
HWND hWnd
Definition: settings.c:17
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
THRDESKHEAD head
Definition: ntuser.h:665
LRESULT APIENTRY Imm32ProcessRequest(HIMC hIMC, PWND pWnd, DWORD dwCommand, LPVOID pData, BOOL bAnsiAPI)
Definition: keymsg.c:359
unsigned long DWORD
Definition: ntddk_ex.h:95
HWND hWnd
Definition: imm.h:28
static BOOL Imm32IsCrossThreadAccess(HIMC hIMC)
Definition: precomp.h:98
int ret
PWND FASTCALL ValidateHwndNoErr(HWND hwnd)
Definition: utils.c:171
Definition: ntuser.h:663
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
#define NULL
Definition: types.h:112
LONG_PTR LRESULT
Definition: windef.h:209
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038
LPARAM lParam
Definition: combotst.c:139

Referenced by ImmRequestMessageA(), and ImmRequestMessageW().

◆ Imm32SendChange()

BOOL APIENTRY Imm32SendChange ( BOOL  bProcess)

Definition at line 347 of file keymsg.c.

348 {
349  return ImmEnumInputContext((bProcess ? -1 : 0), Imm32SendChangeProc, 0);
350 }
BOOL WINAPI ImmEnumInputContext(DWORD dwThreadId, IMCENUMPROC lpfn, LPARAM lParam)
Definition: imm.c:1107
static BOOL CALLBACK Imm32SendChangeProc(HIMC hIMC, LPARAM lParam)
Definition: keymsg.c:320

Referenced by ImmSystemHandler().

◆ Imm32SendChangeProc()

static BOOL CALLBACK Imm32SendChangeProc ( HIMC  hIMC,
LPARAM  lParam 
)
static

Definition at line 320 of file keymsg.c.

321 {
322  HWND hWnd;
323  LPINPUTCONTEXTDX pIC;
324 
325  pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
326  if (!pIC)
327  return TRUE;
328 
329  hWnd = pIC->hWnd;
330  if (!IsWindow(hWnd))
331  goto Quit;
332 
338  NtUserNotifyIMEStatus(hWnd, pIC->fOpen, pIC->fdwConversion);
341 Quit:
342  pIC->dwChange = 0;
343  ImmUnlockIMC(hIMC); // ??? Windows doesn't unlock here
344  return TRUE;
345 }
#define WM_IME_NOTIFY
Definition: winuser.h:1817
#define IMN_SETCONVERSIONMODE
Definition: imm.h:529
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define IMN_SETOPENSTATUS
Definition: imm.h:531
#define TRUE
Definition: types.h:120
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
HWND hWnd
Definition: settings.c:17
DWORD NTAPI NtUserNotifyIMEStatus(HWND hwnd, BOOL fOpen, DWORD dwConversion)
Definition: ime.c:139
DWORD dwChange
Definition: imm.h:101
#define INPUTCONTEXTDX_CHANGE_OPEN
Definition: imm.h:123
#define IMN_SETSENTENCEMODE
Definition: imm.h:530
#define INPUTCONTEXTDX_CHANGE_CONVERSION
Definition: imm.h:124
#define INPUTCONTEXTDX_CHANGE_SENTENCE
Definition: imm.h:125
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX

Referenced by Imm32SendChange().

◆ Imm32UnknownProcess1()

LRESULT APIENTRY Imm32UnknownProcess1 ( HWND  hWnd,
BOOL  fFlag 
)

Definition at line 288 of file keymsg.c.

289 {
290  HANDLE hThread;
291  PWND pWnd = NULL;
292  PIMM_UNKNOWN_PROCESS1 pUnknown1;
293  DWORD_PTR lResult = 0;
294 
295  if (hWnd && g_psi)
296  pWnd = ValidateHwndNoErr(hWnd);
297 
298  if (!pWnd)
299  return 0;
300 
302  {
303  SendMessageTimeoutW(hWnd, 0x505, 0, fFlag, 3, 5000, &lResult);
304  return lResult;
305  }
306 
307  pUnknown1 = Imm32HeapAlloc(0, sizeof(IMM_UNKNOWN_PROCESS1));
308  if (!pUnknown1)
309  return 0;
310 
311  pUnknown1->hWnd = hWnd;
312  pUnknown1->fFlag = fFlag;
313 
314  hThread = CreateThread(NULL, 0, Imm32UnknownProcess1Proc, pUnknown1, 0, NULL);
315  if (hThread)
317  return 0;
318 }
#define CloseHandle
Definition: compat.h:598
LPVOID APIENTRY Imm32HeapAlloc(DWORD dwFlags, DWORD dwBytes)
Definition: utils.c:193
PSERVERINFO g_psi
Definition: imm.c:18
HWND hWnd
Definition: settings.c:17
static DWORD WINAPI Imm32UnknownProcess1Proc(LPVOID arg)
Definition: keymsg.c:269
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:136
#define WNDS2_WMCREATEMSGPROCESSED
Definition: ntuser.h:644
PWND FASTCALL ValidateHwndNoErr(HWND hwnd)
Definition: utils.c:171
uint32_t DWORD_PTR
Definition: typedefs.h:65
Definition: ntuser.h:663
#define NULL
Definition: types.h:112
HANDLE hThread
Definition: wizard.c:28
LRESULT WINAPI SendMessageTimeoutW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM, _In_ UINT, _In_ UINT, _Out_opt_ PDWORD_PTR)
DWORD state2
Definition: ntuser.h:672

Referenced by ImmSystemHandler().

◆ Imm32UnknownProcess1Proc()

static DWORD WINAPI Imm32UnknownProcess1Proc ( LPVOID  arg)
static

Definition at line 269 of file keymsg.c.

270 {
271  HWND hwndDefIME;
272  UINT uValue;
273  DWORD_PTR lResult;
275 
276  Sleep(3000);
277  hwndDefIME = ImmGetDefaultIMEWnd(pUnknown->hWnd);
278  if (hwndDefIME)
279  {
280  uValue = (pUnknown->fFlag ? 0x23 : 0x24);
281  SendMessageTimeoutW(hwndDefIME, WM_IME_SYSTEM, uValue, (LPARAM)pUnknown->hWnd,
282  SMTO_BLOCK | SMTO_ABORTIFHUNG, 5000, &lResult);
283  }
285  return FALSE;
286 }
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
#define Imm32HeapFree(lpData)
Definition: precomp.h:88
void * arg
Definition: msvc.h:10
#define SMTO_ABORTIFHUNG
Definition: winuser.h:1213
#define FALSE
Definition: types.h:117
LONG_PTR LPARAM
Definition: windef.h:208
#define WM_IME_SYSTEM
Definition: undocuser.h:59
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
uint32_t DWORD_PTR
Definition: typedefs.h:65
HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd)
Definition: ime.c:631
unsigned int UINT
Definition: ndis.h:50
LRESULT WINAPI SendMessageTimeoutW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM, _In_ UINT, _In_ UINT, _Out_opt_ PDWORD_PTR)
#define SMTO_BLOCK
Definition: winuser.h:1214

Referenced by Imm32UnknownProcess1().

◆ ImmGenerateMessage()

BOOL WINAPI ImmGenerateMessage ( HIMC  hIMC)

Definition at line 777 of file keymsg.c.

778 {
779  PCLIENTIMC pClientImc;
780  LPINPUTCONTEXT pIC;
781  LPTRANSMSG pMsgs, pTrans = NULL, pItem;
782  HWND hWnd;
783  DWORD dwIndex, dwCount, cbTrans;
784  HIMCC hMsgBuf = NULL;
785  BOOL bAnsi;
786 
787  TRACE("(%p)\n", hIMC);
788 
789  if (Imm32IsCrossThreadAccess(hIMC))
790  return FALSE;
791 
792  pClientImc = ImmLockClientImc(hIMC);
793  if (pClientImc == NULL)
794  return FALSE;
795 
796  bAnsi = !(pClientImc->dwFlags & CLIENTIMC_WIDE);
797  ImmUnlockClientImc(pClientImc);
798 
799  pIC = ImmLockIMC(hIMC);
800  if (pIC == NULL)
801  return FALSE;
802 
803  dwCount = pIC->dwNumMsgBuf;
804  if (dwCount == 0)
805  goto Quit;
806 
807  hMsgBuf = pIC->hMsgBuf;
808  pMsgs = ImmLockIMCC(hMsgBuf);
809  if (pMsgs == NULL)
810  goto Quit;
811 
812  cbTrans = dwCount * sizeof(TRANSMSG);
813  pTrans = Imm32HeapAlloc(0, cbTrans);
814  if (pTrans == NULL)
815  goto Quit;
816 
817  RtlCopyMemory(pTrans, pMsgs, cbTrans);
818 
819 #ifdef IMM_WIN3_SUPPORT
820  if (GetWin32ClientInfo()->dwExpWinVer < _WIN32_WINNT_NT4) /* old version (3.x)? */
821  {
823  WORD wLang = PRIMARYLANGID(LangID);
824 
825  /* translate the messages if Japanese or Korean */
826  if (wLang == LANG_JAPANESE ||
827  (wLang == LANG_KOREAN && NtUserGetAppImeLevel(pIC->hWnd) == 3))
828  {
829  dwCount = ImmNt3Trans(dwCount, pTrans, hIMC, bAnsi, wLang);
830  }
831  }
832 #endif
833 
834  /* send them */
835  hWnd = pIC->hWnd;
836  pItem = pTrans;
837  for (dwIndex = 0; dwIndex < dwCount; ++dwIndex, ++pItem)
838  {
839  if (bAnsi)
840  SendMessageA(hWnd, pItem->message, pItem->wParam, pItem->lParam);
841  else
842  SendMessageW(hWnd, pItem->message, pItem->wParam, pItem->lParam);
843  }
844 
845 Quit:
846  Imm32HeapFree(pTrans);
847  if (hMsgBuf)
848  ImmUnlockIMCC(hMsgBuf);
849  pIC->dwNumMsgBuf = 0; /* done */
850  ImmUnlockIMC(hIMC);
851  return TRUE;
852 }
DWORD HIMCC
Definition: dimm.idl:76
LPVOID APIENTRY Imm32HeapAlloc(DWORD dwFlags, DWORD dwBytes)
Definition: utils.c:193
#define Imm32HeapFree(lpData)
Definition: precomp.h:88
#define TRUE
Definition: types.h:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
HWND hWnd
Definition: settings.c:17
LPVOID WINAPI ImmLockIMCC(HIMCC imcc)
Definition: utils.c:937
WORD LANGID
Definition: typedefs.h:81
#define GetWin32ClientInfo()
Definition: ntuser.h:326
#define CLIENTIMC_WIDE
Definition: ntuser.h:1315
#define LANG_JAPANESE
Definition: nls.h:76
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define _WIN32_WINNT_NT4
Definition: sdkddkver.h:20
LCID WINAPI GetSystemDefaultLCID(void)
Definition: lang.c:791
PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc)
Definition: imm.c:905
DWORD NTAPI NtUserGetAppImeLevel(HWND hWnd)
Definition: ime.c:239
#define TRACE(s)
Definition: solgame.cpp:4
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _tagTRANSMSG TRANSMSG
HWND hWnd
Definition: imm.h:28
static BOOL Imm32IsCrossThreadAccess(HIMC hIMC)
Definition: precomp.h:98
BOOL WINAPI ImmUnlockIMCC(HIMCC imcc)
Definition: utils.c:947
HIMCC hMsgBuf
Definition: imm.h:45
#define LANGIDFROMLCID(l)
Definition: nls.h:18
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
DWORD dwNumMsgBuf
Definition: imm.h:44
#define NULL
Definition: types.h:112
DWORD dwFlags
Definition: ntuser.h:1296
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define LANG_KOREAN
Definition: nls.h:84
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
Definition: wdfusb.h:1075
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038
#define PRIMARYLANGID(l)
Definition: nls.h:16
VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc)
Definition: imm.c:952

Referenced by test_ImmMessages(), and test_InvalidIMC().

◆ ImmGetHotKey()

BOOL WINAPI ImmGetHotKey ( IN DWORD  dwHotKey,
OUT LPUINT  lpuModifiers,
OUT LPUINT  lpuVKey,
OUT LPHKL  lphKL 
)

Definition at line 606 of file keymsg.c.

608 {
609  TRACE("(0x%lX, %p, %p, %p)\n", dwHotKey, lpuModifiers, lpuVKey, lphKL);
610  if (lpuModifiers && lpuVKey)
611  return NtUserGetImeHotKey(dwHotKey, lpuModifiers, lpuVKey, lphKL);
612  return FALSE;
613 }
#define FALSE
Definition: types.h:117
#define TRACE(s)
Definition: solgame.cpp:4
BOOL NTAPI NtUserGetImeHotKey(IN DWORD dwHotKey, OUT LPUINT lpuModifiers, OUT LPUINT lpuVKey, OUT LPHKL lphKL)
Definition: ime.c:127

◆ ImmGetVirtualKey()

UINT WINAPI ImmGetVirtualKey ( HWND  hWnd)

Definition at line 648 of file keymsg.c.

649 {
650  HIMC hIMC;
651  LPINPUTCONTEXTDX pIC;
653 
654  TRACE("(%p)\n", hWnd);
655 
656  hIMC = ImmGetContext(hWnd);
657  pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
658  if (!pIC)
659  return ret;
660 
661  if (pIC->bNeedsTrans)
662  ret = pIC->nVKey;
663 
664  ImmUnlockIMC(hIMC);
665  return ret;
666 }
#define VK_PROCESSKEY
Definition: winuser.h:2307
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
HWND hWnd
Definition: settings.c:17
BOOL bNeedsTrans
Definition: imm.h:96
UINT nVKey
Definition: imm.h:95
DWORD HIMC
Definition: dimm.idl:75
#define TRACE(s)
Definition: solgame.cpp:4
HIMC WINAPI ImmGetContext(HWND hWnd)
Definition: imm.c:1008
int ret
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX

Referenced by ActiveIMMApp_GetVirtualKey().

◆ ImmIsUIMessageA()

BOOL WINAPI ImmIsUIMessageA ( HWND  hWndIME,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 587 of file keymsg.c.

588 {
589  TRACE("(%p, 0x%X, %p, %p)\n", hWndIME, msg, wParam, lParam);
590  return ImmIsUIMessageAW(hWndIME, msg, wParam, lParam, TRUE);
591 }
#define TRUE
Definition: types.h:120
static BOOL APIENTRY ImmIsUIMessageAW(HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam, BOOL bAnsi)
Definition: keymsg.c:240
WPARAM wParam
Definition: combotst.c:138
#define TRACE(s)
Definition: solgame.cpp:4
#define msg(x)
Definition: auth_time.c:54
LPARAM lParam
Definition: combotst.c:139

Referenced by ActiveIMMApp_IsUIMessageA(), RealDefWindowProcA(), and START_TEST().

◆ ImmIsUIMessageAW()

static BOOL APIENTRY ImmIsUIMessageAW ( HWND  hWndIME,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
BOOL  bAnsi 
)
static

Definition at line 240 of file keymsg.c.

241 {
242  switch (msg)
243  {
244  case WM_IME_STARTCOMPOSITION: case WM_IME_ENDCOMPOSITION:
245  case WM_IME_COMPOSITION: case WM_IME_SETCONTEXT: case WM_IME_NOTIFY:
247  break;
248  default:
249  return FALSE;
250  }
251 
252  if (!hWndIME)
253  return TRUE;
254 
255  if (bAnsi)
256  SendMessageA(hWndIME, msg, wParam, lParam);
257  else
258  SendMessageW(hWndIME, msg, wParam, lParam);
259 
260  return TRUE;
261 }
#define WM_IME_NOTIFY
Definition: winuser.h:1817
#define TRUE
Definition: types.h:120
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_IME_SELECT
Definition: winuser.h:1820
#define WM_IME_COMPOSITIONFULL
Definition: winuser.h:1819
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
#define WM_IME_SYSTEM
Definition: undocuser.h:59
#define WM_IME_SETCONTEXT
Definition: winuser.h:1816
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define msg(x)
Definition: auth_time.c:54
LPARAM lParam
Definition: combotst.c:139

Referenced by ImmIsUIMessageA(), and ImmIsUIMessageW().

◆ ImmIsUIMessageW()

BOOL WINAPI ImmIsUIMessageW ( HWND  hWndIME,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 596 of file keymsg.c.

597 {
598  TRACE("(%p, 0x%X, %p, %p)\n", hWndIME, msg, wParam, lParam);
599  return ImmIsUIMessageAW(hWndIME, msg, wParam, lParam, FALSE);
600 }
static BOOL APIENTRY ImmIsUIMessageAW(HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam, BOOL bAnsi)
Definition: keymsg.c:240
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
#define TRACE(s)
Definition: solgame.cpp:4
#define msg(x)
Definition: auth_time.c:54
LPARAM lParam
Definition: combotst.c:139

Referenced by ActiveIMMApp_IsUIMessageW(), and RealDefWindowProcW().

◆ ImmProcessKey()

DWORD WINAPI ImmProcessKey ( HWND  hWnd,
HKL  hKL,
UINT  vKey,
LPARAM  lParam,
DWORD  dwHotKeyID 
)

Definition at line 673 of file keymsg.c.

674 {
675  DWORD ret = 0;
676  HIMC hIMC;
677  PIMEDPI pImeDpi;
678  LPINPUTCONTEXTDX pIC;
679  BYTE KeyState[256];
680  UINT vk;
681  BOOL bUseIme = TRUE, bSkipThisKey = FALSE, bLowWordOnly = FALSE;
682 
683  TRACE("(%p, %p, 0x%X, %p, 0x%lX)\n", hWnd, hKL, vKey, lParam, dwHotKeyID);
684 
685  hIMC = ImmGetContext(hWnd);
686  pImeDpi = ImmLockImeDpi(hKL);
687  if (pImeDpi)
688  {
689  pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
690  if (pIC)
691  {
692  if (LOBYTE(vKey) == VK_PACKET &&
694  {
695  if (ImeDpi_IsUnicode(pImeDpi))
696  {
697  bLowWordOnly = TRUE;
698  }
699  else
700  {
701  bUseIme = FALSE;
702  if (pIC->fOpen)
703  bSkipThisKey = TRUE;
704  }
705  }
706 
707  if (bUseIme)
708  {
709  if (GetKeyboardState(KeyState))
710  {
711  vk = (bLowWordOnly ? LOWORD(vKey) : vKey);
712  if (pImeDpi->ImeProcessKey(hIMC, vk, lParam, KeyState))
713  {
714  pIC->bNeedsTrans = TRUE;
715  pIC->nVKey = vKey;
717  }
718  }
719  }
720  else if (bSkipThisKey)
721  {
723  }
724 
725  ImmUnlockIMC(hIMC);
726  }
727 
728  ImmUnlockImeDpi(pImeDpi);
729  }
730 
731  if (dwHotKeyID != INVALID_HOTKEY_ID)
732  {
733  if (Imm32ProcessHotKey(hWnd, hIMC, hKL, dwHotKeyID))
734  {
735  if (vKey != VK_KANJI || dwHotKeyID != IME_JHOTKEY_CLOSE_OPEN)
736  ret |= IPHK_HOTKEY;
737  }
738  }
739 
740  if (ret & IPHK_PROCESSBYIME)
741  {
742  FIXME("TODO: We have to do something here.\n");
743  }
744 
745  ImmReleaseContext(hWnd, hIMC);
746  return ret;
747 }
VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi)
Definition: ime.c:752
IMEINFO ImeInfo
Definition: ntuser.h:1244
#define VK_KANJI
Definition: winuser.h:2193
#define LOBYTE(W)
Definition: jmemdos.c:487
#define TRUE
Definition: types.h:120
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
WORD vk
Definition: input.c:77
HWND hWnd
Definition: settings.c:17
BOOL APIENTRY Imm32ProcessHotKey(HWND hWnd, HIMC hIMC, HKL hKL, DWORD dwHotKeyID)
Definition: keymsg.c:183
#define IPHK_PROCESSBYIME
Definition: undocuser.h:139
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL bNeedsTrans
Definition: imm.h:96
UINT nVKey
Definition: imm.h:95
#define FIXME(fmt,...)
Definition: debug.h:111
DWORD HIMC
Definition: dimm.idl:75
#define TRACE(s)
Definition: solgame.cpp:4
DWORD fdwProperty
Definition: imm.h:158
HIMC WINAPI ImmGetContext(HWND hWnd)
Definition: imm.c:1008
PIMEDPI WINAPI ImmLockImeDpi(HKL hKL)
Definition: ime.c:723
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ImeDpi_IsUnicode(pImeDpi)
Definition: precomp.h:113
_Check_return_ BOOL WINAPI GetKeyboardState(_Out_writes_(256) PBYTE lpKeyState)
int ret
unsigned char BYTE
Definition: xxhash.c:193
BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC)
Definition: imm.c:1057
#define IME_JHOTKEY_CLOSE_OPEN
Definition: imm.h:339
#define IPHK_SKIPTHISKEY
Definition: undocuser.h:141
unsigned int UINT
Definition: ndis.h:50
#define IPHK_HOTKEY
Definition: undocuser.h:138
#define INVALID_HOTKEY_ID
Definition: precomp.h:52
#define IME_PROP_ACCEPT_WIDE_VKEY
Definition: imm.h:221
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX

◆ ImmRequestMessageA()

LRESULT WINAPI ImmRequestMessageA ( HIMC  hIMC,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1037 of file keymsg.c.

1038 {
1039  TRACE("(%p, %p, %p)\n", hIMC, wParam, lParam);
1040  return Imm32RequestMessageAW(hIMC, wParam, lParam, TRUE);
1041 }
#define TRUE
Definition: types.h:120
LRESULT APIENTRY Imm32RequestMessageAW(HIMC hIMC, WPARAM wParam, LPARAM lParam, BOOL bAnsi)
Definition: keymsg.c:559
WPARAM wParam
Definition: combotst.c:138
#define TRACE(s)
Definition: solgame.cpp:4
LPARAM lParam
Definition: combotst.c:139

Referenced by test_InvalidIMC().

◆ ImmRequestMessageW()

LRESULT WINAPI ImmRequestMessageW ( HIMC  hIMC,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1046 of file keymsg.c.

1047 {
1048  TRACE("(%p, %p, %p)\n", hIMC, wParam, lParam);
1049  return Imm32RequestMessageAW(hIMC, wParam, lParam, FALSE);
1050 }
LRESULT APIENTRY Imm32RequestMessageAW(HIMC hIMC, WPARAM wParam, LPARAM lParam, BOOL bAnsi)
Definition: keymsg.c:559
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
#define TRACE(s)
Definition: solgame.cpp:4
LPARAM lParam
Definition: combotst.c:139

◆ ImmSimulateHotKey()

BOOL WINAPI ImmSimulateHotKey ( HWND  hWnd,
DWORD  dwHotKeyID 
)

Definition at line 628 of file keymsg.c.

629 {
630  HIMC hIMC;
632  HKL hKL;
633  BOOL ret;
634 
635  TRACE("(%p, 0x%lX)\n", hWnd, dwHotKeyID);
636 
637  hIMC = ImmGetContext(hWnd);
640  ret = Imm32ProcessHotKey(hWnd, hIMC, hKL, dwHotKeyID);
641  ImmReleaseContext(hWnd, hIMC);
642  return ret;
643 }
HWND hWnd
Definition: settings.c:17
BOOL APIENTRY Imm32ProcessHotKey(HWND hWnd, HIMC hIMC, HKL hKL, DWORD dwHotKeyID)
Definition: keymsg.c:183
unsigned int BOOL
Definition: ntddk_ex.h:94
DWORD WINAPI GetWindowThreadProcessId(HWND, PDWORD)
DWORD HIMC
Definition: dimm.idl:75
#define TRACE(s)
Definition: solgame.cpp:4
HIMC WINAPI ImmGetContext(HWND hWnd)
Definition: imm.c:1008
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
DWORD dwThreadId
Definition: fdebug.c:31
UINT_PTR HKL
Definition: msctf.idl:101
BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC)
Definition: imm.c:1057
PKEYBOARD_LAYOUT GetKeyboardLayout()
Definition: utils.c:194
#define NULL
Definition: types.h:112

Referenced by ActiveIMMApp_SimulateHotKey().

◆ ImmSystemHandler()

LRESULT WINAPI ImmSystemHandler ( HIMC  hIMC,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 752 of file keymsg.c.

753 {
754  TRACE("(%p, %p, %p)\n", hIMC, wParam, lParam);
755 
756  switch (wParam)
757  {
758  case 0x1f:
760  return 0;
761 
762  case 0x20:
764  return 0;
765 
766  case 0x23: case 0x24:
767  return Imm32UnknownProcess1((HWND)lParam, (wParam == 0x23));
768 
769  default:
770  return 0;
771  }
772 }
#define CPS_COMPLETE
Definition: imm.h:315
BOOL APIENTRY Imm32SendChange(BOOL bProcess)
Definition: keymsg.c:347
WPARAM wParam
Definition: combotst.c:138
LRESULT APIENTRY Imm32UnknownProcess1(HWND hWnd, BOOL fFlag)
Definition: keymsg.c:288
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI ImmNotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
Definition: ime.c:646
#define TRACE(s)
Definition: solgame.cpp:4
#define NI_COMPOSITIONSTR
Definition: imm.h:301
LPARAM lParam
Definition: combotst.c:139

◆ ImmTranslateMessage()

BOOL WINAPI ImmTranslateMessage ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lKeyData 
)

Definition at line 914 of file keymsg.c.

915 {
916 #define MSG_COUNT 0x100
917  BOOL ret = FALSE;
918  INT kret;
919  LPINPUTCONTEXTDX pIC;
920  PIMEDPI pImeDpi = NULL;
922  LPTRANSMSG pTransMsg;
923  BYTE abKeyState[256];
924  HIMC hIMC;
925  HKL hKL;
926  UINT vk;
927  DWORD dwThreadId, dwCount, cbList;
928  WCHAR wch;
929  WORD wChar;
930 
931  TRACE("(%p, 0x%X, %p, %p)\n", hwnd, msg, wParam, lKeyData);
932 
933  /* filter the message */
934  switch (msg)
935  {
936  case WM_KEYDOWN: case WM_KEYUP: case WM_SYSKEYDOWN: case WM_SYSKEYUP:
937  break;
938  default:
939  return FALSE;
940  }
941 
942  hIMC = ImmGetContext(hwnd);
943  pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
944  if (pIC == NULL)
945  {
946  ImmReleaseContext(hwnd, hIMC);
947  return FALSE;
948  }
949 
950  if (!pIC->bNeedsTrans) /* is translation needed? */
951  {
952  /* directly post them */
953  dwCount = pIC->dwNumMsgBuf;
954  if (dwCount == 0)
955  goto Quit;
956 
957  pTransMsg = ImmLockIMCC(pIC->hMsgBuf);
958  if (pTransMsg)
959  {
960  Imm32PostMessages(hwnd, hIMC, dwCount, pTransMsg);
961  ImmUnlockIMCC(pIC->hMsgBuf);
962  ret = TRUE;
963  }
964  pIC->dwNumMsgBuf = 0; /* done */
965  goto Quit;
966  }
967  pIC->bNeedsTrans = FALSE; /* clear the flag */
968 
971  pImeDpi = ImmLockImeDpi(hKL);
972  if (pImeDpi == NULL)
973  goto Quit;
974 
975  if (!GetKeyboardState(abKeyState)) /* get keyboard ON/OFF status */
976  goto Quit;
977 
978  /* convert a virtual key if IME_PROP_KBD_CHAR_FIRST */
979  vk = pIC->nVKey;
981  {
982  if (ImeDpi_IsUnicode(pImeDpi))
983  {
984  wch = 0;
985  kret = ToUnicode(vk, HIWORD(lKeyData), abKeyState, &wch, 1, 0);
986  if (kret == 1)
987  vk = MAKELONG(LOBYTE(vk), wch);
988  }
989  else
990  {
991  wChar = 0;
992  kret = ToAsciiEx(vk, HIWORD(lKeyData), abKeyState, &wChar, 0, hKL);
993  if (kret > 0)
994  vk = MAKEWORD(vk, wChar);
995  }
996  }
997 
998  /* allocate a list */
999  cbList = offsetof(TRANSMSGLIST, TransMsg) + MSG_COUNT * sizeof(TRANSMSG);
1000  pList = Imm32HeapAlloc(0, cbList);
1001  if (!pList)
1002  goto Quit;
1003 
1004  /* use IME conversion engine and convert the list */
1005  pList->uMsgCount = MSG_COUNT;
1006  kret = pImeDpi->ImeToAsciiEx(vk, HIWORD(lKeyData), abKeyState, pList, 0, hIMC);
1007  if (kret <= 0)
1008  goto Quit;
1009 
1010  /* post them */
1011  if (kret <= MSG_COUNT)
1012  {
1013  Imm32PostMessages(hwnd, hIMC, kret, pList->TransMsg);
1014  ret = TRUE;
1015  }
1016  else
1017  {
1018  pTransMsg = ImmLockIMCC(pIC->hMsgBuf);
1019  if (pTransMsg == NULL)
1020  goto Quit;
1021  Imm32PostMessages(hwnd, hIMC, kret, pTransMsg);
1022  ImmUnlockIMCC(pIC->hMsgBuf);
1023  }
1024 
1025 Quit:
1027  ImmUnlockImeDpi(pImeDpi);
1028  ImmUnlockIMC(hIMC);
1029  ImmReleaseContext(hwnd, hIMC);
1030  return ret;
1031 #undef MSG_COUNT
1032 }
VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi)
Definition: ime.c:752
#define IME_PROP_KBD_CHAR_FIRST
Definition: imm.h:217
IMEINFO ImeInfo
Definition: ntuser.h:1244
LPVOID APIENTRY Imm32HeapAlloc(DWORD dwFlags, DWORD dwBytes)
Definition: utils.c:193
#define LOBYTE(W)
Definition: jmemdos.c:487
#define MAKEWORD(a, b)
Definition: typedefs.h:248
#define Imm32HeapFree(lpData)
Definition: precomp.h:88
#define TRUE
Definition: types.h:120
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
Definition: imm.c:1029
WORD vk
Definition: input.c:77
LPVOID WINAPI ImmLockIMCC(HIMCC imcc)
Definition: utils.c:937
int32_t INT
Definition: typedefs.h:58
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
FxChildList * pList
BOOL bNeedsTrans
Definition: imm.h:96
UINT nVKey
Definition: imm.h:95
DWORD WINAPI GetWindowThreadProcessId(HWND, PDWORD)
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define offsetof(TYPE, MEMBER)
#define WM_KEYDOWN
Definition: winuser.h:1702
DWORD HIMC
Definition: dimm.idl:75
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD fdwProperty
Definition: imm.h:158
HIMC WINAPI ImmGetContext(HWND hWnd)
Definition: imm.c:1008
PIMEDPI WINAPI ImmLockImeDpi(HKL hKL)
Definition: ime.c:723
#define WM_KEYUP
Definition: winuser.h:1703
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _tagTRANSMSG TRANSMSG
#define ImeDpi_IsUnicode(pImeDpi)
Definition: precomp.h:113
_Check_return_ BOOL WINAPI GetKeyboardState(_Out_writes_(256) PBYTE lpKeyState)
#define MSG_COUNT
BOOL WINAPI ImmUnlockIMCC(HIMCC imcc)
Definition: utils.c:947
int ret
DWORD dwThreadId
Definition: fdebug.c:31
UINT_PTR HKL
Definition: msctf.idl:101
unsigned char BYTE
Definition: xxhash.c:193
int WINAPI ToAsciiEx(_In_ UINT, _In_ UINT, _In_reads_opt_(256) CONST BYTE *, _Out_ LPWORD, _In_ UINT, _In_opt_ HKL)
BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC)
Definition: imm.c:1057
#define WM_SYSKEYUP
Definition: winuser.h:1707
PKEYBOARD_LAYOUT GetKeyboardLayout()
Definition: utils.c:194
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
VOID APIENTRY Imm32PostMessages(HWND hwnd, HIMC hIMC, DWORD dwCount, LPTRANSMSG lpTransMsg)
Definition: keymsg.c:855
int WINAPI ToUnicode(_In_ UINT wVirtKey, _In_ UINT wScanCode, _In_reads_bytes_opt_(256) CONST BYTE *lpKeyState, _Out_writes_(cchBuff) LPWSTR pwszBuff, _In_ int cchBuff, _In_ UINT wFlags)
#define msg(x)
Definition: auth_time.c:54
#define WM_SYSKEYDOWN
Definition: winuser.h:1706
#define HIWORD(l)
Definition: typedefs.h:247
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
Definition: imm.c:1038
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX

◆ ImmWINNLSGetIMEHotkey()

UINT WINAPI ImmWINNLSGetIMEHotkey ( HWND  hwndIme)

Definition at line 618 of file keymsg.c.

619 {
620  TRACE("(%p)\n", hwndIme);
621  UNREFERENCED_PARAMETER(hwndIme);
622  return 0; /* This is correct. This function of Windows just returns zero. */
623 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define TRACE(s)
Definition: solgame.cpp:4

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( imm  )