ReactOS  0.4.13-dev-242-g611e6d7
imm.c File Reference
#include <user32.h>
#include <winnls32.h>
#include <strsafe.h>
Include dependency graph for imm.c:

Go to the source code of this file.

Macros

#define IMM_INIT_MAGIC   0x19650412
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (user32)
 
BOOL WINAPI IMM_ImmIsIME (HKL hKL)
 
HIMC WINAPI IMM_ImmAssociateContext (HWND hwnd, HIMC himc)
 
BOOL WINAPI IMM_ImmReleaseContext (HWND hwnd, HIMC himc)
 
LRESULT WINAPI IMM_ImmEscapeAW (HKL hkl, HIMC himc, UINT uint, LPVOID lpvoid)
 
LONG WINAPI IMM_ImmGetCompositionStringAW (HIMC himc, DWORD dword1, LPVOID lpvoid, DWORD dword2)
 
BOOL WINAPI IMM_ImmGetCompositionFontA (HIMC himc, LPLOGFONTA lplf)
 
BOOL WINAPI IMM_ImmGetCompositionFontW (HIMC himc, LPLOGFONTW lplf)
 
BOOL WINAPI IMM_ImmSetCompositionFontA (HIMC himc, LPLOGFONTA lplf)
 
BOOL WINAPI IMM_ImmSetCompositionFontW (HIMC himc, LPLOGFONTW lplf)
 
BOOL WINAPI IMM_ImmSetGetCompositionWindow (HIMC himc, LPCOMPOSITIONFORM lpcf)
 
HIMC WINAPI IMM_ImmGetContext (HWND hwnd)
 
HWND WINAPI IMM_ImmGetDefaultIMEWnd (HWND hwnd)
 
BOOL WINAPI IMM_ImmNotifyIME (HIMC himc, DWORD dword1, DWORD dword2, DWORD dword3)
 
BOOL WINAPI IMM_ImmRegisterClient (PVOID ptr, HINSTANCE hMod)
 
UINT WINAPI IMM_ImmProcessKey (HWND hwnd, HKL hkl, UINT Vk, LPARAM lParam, DWORD HotKey)
 
HRESULT WINAPI GetImmFileName (PWSTR lpBuffer, UINT uSize)
 
BOOL WINAPI IntInitializeImmEntryTable (VOID)
 
BOOL WINAPI InitializeImmEntryTable (VOID)
 
BOOL WINAPI User32InitializeImmEntryTable (DWORD magic)
 
LRESULT WINAPI ImeWndProc_common (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
 
LRESULT WINAPI ImeWndProcA (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
LRESULT WINAPI ImeWndProcW (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
BOOL WINAPI UpdatePerUserImmEnabling (VOID)
 
BOOL WINAPI RegisterIMEClass (VOID)
 
BOOL WINAPI CliImmSetHotKey (DWORD dwID, UINT uModifiers, UINT uVirtualKey, HKL hKl)
 
BOOL WINAPI IMPSetIMEW (HWND hwnd, LPIMEPROW ime)
 
BOOL WINAPI IMPQueryIMEW (LPIMEPROW ime)
 
BOOL WINAPI IMPGetIMEW (HWND hwnd, LPIMEPROW ime)
 
BOOL WINAPI IMPSetIMEA (HWND hwnd, LPIMEPROA ime)
 
BOOL WINAPI IMPQueryIMEA (LPIMEPROA ime)
 
BOOL WINAPI IMPGetIMEA (HWND hwnd, LPIMEPROA ime)
 
LRESULT WINAPI SendIMEMessageExW (HWND hwnd, LPARAM lparam)
 
LRESULT WINAPI SendIMEMessageExA (HWND hwnd, LPARAM lparam)
 
BOOL WINAPI WINNLSEnableIME (HWND hwnd, BOOL enable)
 
BOOL WINAPI WINNLSGetEnableStatus (HWND hwnd)
 
UINT WINAPI WINNLSGetIMEHotkey (HWND hwnd)
 

Variables

Imm32ApiTable gImmApiEntries = {0}
 
HINSTANCE ghImm32 = NULL
 
BOOL bImmInitializing = FALSE
 
BOOL ImmApiTableZero = TRUE
 
static const WCHAR imeW [] = {'I','M','E',0}
 

Macro Definition Documentation

◆ IMM_INIT_MAGIC

#define IMM_INIT_MAGIC   0x19650412

Definition at line 18 of file imm.c.

Function Documentation

◆ CliImmSetHotKey()

BOOL WINAPI CliImmSetHotKey ( DWORD  dwID,
UINT  uModifiers,
UINT  uVirtualKey,
HKL  hKl 
)

Definition at line 345 of file imm.c.

346 {
348  return FALSE;
349 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ GetImmFileName()

HRESULT WINAPI GetImmFileName ( PWSTR  lpBuffer,
UINT  uSize 
)

Definition at line 47 of file imm.c.

48 {
49  UINT length;
50  STRSAFE_LPWSTR Safe = lpBuffer;
51 
53  if ( length && length < uSize )
54  {
55  StringCchCatW(Safe, uSize, L"\\");
56  return StringCchCatW(Safe, uSize, L"imm32.dll");
57  }
58  return StringCchCopyW(Safe, uSize, L"imm32.dll");
59 }
wchar_t * STRSAFE_LPWSTR
Definition: ntstrsafe.h:63
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
static const WCHAR L[]
Definition: oid.c:1250
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2312
unsigned int UINT
Definition: ndis.h:50

Referenced by IntInitializeImmEntryTable(), and User32InitializeImmEntryTable().

◆ ImeWndProc_common()

LRESULT WINAPI ImeWndProc_common ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
BOOL  unicode 
)

Definition at line 224 of file imm.c.

225 {
226  PWND pWnd;
227  PIMEUI pimeui;
228 
229  pWnd = ValidateHwnd(hwnd);
230  if (pWnd)
231  {
232  if (!pWnd->fnid)
233  {
234  if (msg != WM_NCCREATE)
235  {
236  if (unicode)
237  return DefWindowProcW(hwnd, msg, wParam, lParam);
238  return DefWindowProcA(hwnd, msg, wParam, lParam);
239  }
241  pimeui = HeapAlloc( GetProcessHeap(), 0, sizeof(IMEUI) );
242  SetWindowLongPtrW(hwnd, 0, (LONG_PTR)pimeui);
243  }
244  else
245  {
246  if (pWnd->fnid != FNID_IME)
247  {
248  ERR("Wrong window class for Ime! fnId 0x%x\n",pWnd->fnid);
249  return 0;
250  }
251  pimeui = ((PIMEWND)pWnd)->pimeui;
252  if (pimeui == NULL)
253  {
254  ERR("Window is not set to IME!\n");
255  return 0;
256  }
257  }
258  }
259 
260  if (msg==WM_CREATE || msg==WM_NCCREATE)
261  return TRUE;
262 
263  if (msg==WM_NCDESTROY)
264  {
265  HeapFree( GetProcessHeap(), 0, pimeui );
266  SetWindowLongPtrW(hwnd, 0, 0);
268  }
269 
270  if (unicode)
271  return DefWindowProcW(hwnd, msg, wParam, lParam);
272  return DefWindowProcA(hwnd, msg, wParam, lParam);
273 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
#define FNID_DESTROY
Definition: ntuser.h:859
#define WM_NCCREATE
Definition: winuser.h:1665
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
DWORD fnid
Definition: ntuser.h:673
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define WM_NCDESTROY
Definition: winuser.h:1666
PWND FASTCALL ValidateHwnd(HWND hwnd)
Definition: misc.c:369
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define ERR(fmt,...)
Definition: debug.h:109
Definition: ntuser.h:657
struct _IMEWND * PIMEWND
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define msg(x)
Definition: auth_time.c:54
#define WM_CREATE
Definition: winuser.h:1590
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
Definition: window.c:4107
#define SetWindowLongPtrW
Definition: winuser.h:5215
LPARAM lParam
Definition: combotst.c:139
#define HeapFree(x, y, z)
Definition: compat.h:394
#define FNID_IME
Definition: ntuser.h:836

Referenced by ImeWndProcA(), ImeWndProcW(), and RegisterClientPFN().

◆ ImeWndProcA()

LRESULT WINAPI ImeWndProcA ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 275 of file imm.c.

276 {
278 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
LRESULT WINAPI ImeWndProc_common(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:224
WPARAM wParam
Definition: combotst.c:138
#define msg(x)
Definition: auth_time.c:54
LPARAM lParam
Definition: combotst.c:139

Referenced by RegisterClientPFN().

◆ ImeWndProcW()

LRESULT WINAPI ImeWndProcW ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 280 of file imm.c.

281 {
283 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
LRESULT WINAPI ImeWndProc_common(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: imm.c:224
WPARAM wParam
Definition: combotst.c:138
#define msg(x)
Definition: auth_time.c:54
LPARAM lParam
Definition: combotst.c:139

Referenced by RegisterClientPFN(), and RegisterIMEClass().

◆ IMM_ImmAssociateContext()

HIMC WINAPI IMM_ImmAssociateContext ( HWND  hwnd,
HIMC  himc 
)

Definition at line 32 of file imm.c.

32 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmEscapeAW()

LRESULT WINAPI IMM_ImmEscapeAW ( HKL  hkl,
HIMC  himc,
UINT  uint,
LPVOID  lpvoid 
)

Definition at line 34 of file imm.c.

34 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmGetCompositionFontA()

BOOL WINAPI IMM_ImmGetCompositionFontA ( HIMC  himc,
LPLOGFONTA  lplf 
)

Definition at line 36 of file imm.c.

36 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmGetCompositionFontW()

BOOL WINAPI IMM_ImmGetCompositionFontW ( HIMC  himc,
LPLOGFONTW  lplf 
)

Definition at line 37 of file imm.c.

37 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmGetCompositionStringAW()

LONG WINAPI IMM_ImmGetCompositionStringAW ( HIMC  himc,
DWORD  dword1,
LPVOID  lpvoid,
DWORD  dword2 
)

Definition at line 35 of file imm.c.

35 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmGetContext()

HIMC WINAPI IMM_ImmGetContext ( HWND  hwnd)

Definition at line 41 of file imm.c.

41 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmGetDefaultIMEWnd()

HWND WINAPI IMM_ImmGetDefaultIMEWnd ( HWND  hwnd)

Definition at line 42 of file imm.c.

42 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmIsIME()

BOOL WINAPI IMM_ImmIsIME ( HKL  hKL)

Definition at line 31 of file imm.c.

31 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmNotifyIME()

BOOL WINAPI IMM_ImmNotifyIME ( HIMC  himc,
DWORD  dword1,
DWORD  dword2,
DWORD  dword3 
)

Definition at line 43 of file imm.c.

43 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmProcessKey()

UINT WINAPI IMM_ImmProcessKey ( HWND  hwnd,
HKL  hkl,
UINT  Vk,
LPARAM  lParam,
DWORD  HotKey 
)

Definition at line 45 of file imm.c.

45 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmRegisterClient()

BOOL WINAPI IMM_ImmRegisterClient ( PVOID  ptr,
HINSTANCE  hMod 
)

Definition at line 44 of file imm.c.

44 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmReleaseContext()

BOOL WINAPI IMM_ImmReleaseContext ( HWND  hwnd,
HIMC  himc 
)

Definition at line 33 of file imm.c.

33 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmSetCompositionFontA()

BOOL WINAPI IMM_ImmSetCompositionFontA ( HIMC  himc,
LPLOGFONTA  lplf 
)

Definition at line 38 of file imm.c.

38 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmSetCompositionFontW()

BOOL WINAPI IMM_ImmSetCompositionFontW ( HIMC  himc,
LPLOGFONTW  lplf 
)

Definition at line 39 of file imm.c.

39 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMM_ImmSetGetCompositionWindow()

BOOL WINAPI IMM_ImmSetGetCompositionWindow ( HIMC  himc,
LPCOMPOSITIONFORM  lpcf 
)

Definition at line 40 of file imm.c.

40 { return 0; }

Referenced by IntInitializeImmEntryTable().

◆ IMPGetIMEA()

BOOL WINAPI IMPGetIMEA ( HWND  hwnd,
LPIMEPROA  ime 
)

Definition at line 411 of file imm.c.

412 {
414  return FALSE;
415 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ IMPGetIMEW()

BOOL WINAPI IMPGetIMEW ( HWND  hwnd,
LPIMEPROW  ime 
)

Definition at line 378 of file imm.c.

379 {
381  return FALSE;
382 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ IMPQueryIMEA()

BOOL WINAPI IMPQueryIMEA ( LPIMEPROA  ime)

Definition at line 400 of file imm.c.

401 {
403  return FALSE;
404 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ IMPQueryIMEW()

BOOL WINAPI IMPQueryIMEW ( LPIMEPROW  ime)

Definition at line 367 of file imm.c.

368 {
370  return FALSE;
371 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ IMPSetIMEA()

BOOL WINAPI IMPSetIMEA ( HWND  hwnd,
LPIMEPROA  ime 
)

Definition at line 389 of file imm.c.

390 {
392  return FALSE;
393 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ IMPSetIMEW()

BOOL WINAPI IMPSetIMEW ( HWND  hwnd,
LPIMEPROW  ime 
)

Definition at line 356 of file imm.c.

357 {
359  return FALSE;
360 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ InitializeImmEntryTable()

BOOL WINAPI InitializeImmEntryTable ( VOID  )

Definition at line 183 of file imm.c.

184 {
187 }
#define TRUE
Definition: types.h:120
BOOL WINAPI IntInitializeImmEntryTable(VOID)
Definition: imm.c:64
BOOL bImmInitializing
Definition: imm.c:23

Referenced by DllMain().

◆ IntInitializeImmEntryTable()

BOOL WINAPI IntInitializeImmEntryTable ( VOID  )

Definition at line 64 of file imm.c.

65 {
66  WCHAR ImmFile[MAX_PATH];
67  HMODULE imm32 = ghImm32;
68 
69  if (gImmApiEntries.pImmIsIME != 0)
70  {
71  ERR("Imm Api Table Init 1\n");
72  return TRUE;
73  }
74 
75  GetImmFileName(ImmFile, sizeof(ImmFile));
76  TRACE("File %ws\n",ImmFile);
77 
78  if (imm32 == NULL)
79  {
80  imm32 = GetModuleHandleW(ImmFile);
81  }
82 
83  if (imm32 == NULL)
84  {
85  imm32 = ghImm32 = LoadLibraryW(ImmFile);
86  if (imm32 == NULL)
87  {
88  ERR("Did not load!\n");
89  return FALSE;
90  }
91  return TRUE;
92  }
93 
94  if (ImmApiTableZero)
95  {
98  }
99 
100  gImmApiEntries.pImmIsIME = (BOOL (WINAPI*)(HKL)) GetProcAddress(imm32, "ImmIsIME");
101  if (!gImmApiEntries.pImmIsIME)
102  gImmApiEntries.pImmIsIME = IMM_ImmIsIME;
103 
104  gImmApiEntries.pImmEscapeA = (LRESULT (WINAPI*)(HKL, HIMC, UINT, LPVOID)) GetProcAddress(imm32, "ImmEscapeA");
105  if (!gImmApiEntries.pImmEscapeA)
106  gImmApiEntries.pImmEscapeA = IMM_ImmEscapeAW;
107 
108  gImmApiEntries.pImmEscapeW = (LRESULT (WINAPI*)(HKL, HIMC, UINT, LPVOID)) GetProcAddress(imm32, "ImmEscapeW");
109  if (!gImmApiEntries.pImmEscapeW)
110  gImmApiEntries.pImmEscapeW = IMM_ImmEscapeAW;
111 
112  gImmApiEntries.pImmGetCompositionStringA = (LONG (WINAPI*)(HIMC, DWORD, LPVOID, DWORD)) GetProcAddress(imm32, "ImmGetCompositionStringA");
113  if (!gImmApiEntries.pImmGetCompositionStringA)
114  gImmApiEntries.pImmGetCompositionStringA = IMM_ImmGetCompositionStringAW;
115 
116  gImmApiEntries.pImmGetCompositionStringW = (LONG (WINAPI*)(HIMC, DWORD, LPVOID, DWORD)) GetProcAddress(imm32, "ImmGetCompositionStringW");
117  if (!gImmApiEntries.pImmGetCompositionStringW)
118  gImmApiEntries.pImmGetCompositionStringW = IMM_ImmGetCompositionStringAW;
119 
120  gImmApiEntries.pImmGetCompositionFontA = (BOOL (WINAPI*)(HIMC, LPLOGFONTA)) GetProcAddress(imm32, "ImmGetCompositionFontA");
121  if (!gImmApiEntries.pImmGetCompositionFontA)
122  gImmApiEntries.pImmGetCompositionFontA = IMM_ImmGetCompositionFontA;
123 
124  gImmApiEntries.pImmGetCompositionFontW = (BOOL (WINAPI*)(HIMC, LPLOGFONTW)) GetProcAddress(imm32, "ImmGetCompositionFontW");
125  if (!gImmApiEntries.pImmGetCompositionFontW)
126  gImmApiEntries.pImmGetCompositionFontW = IMM_ImmGetCompositionFontW;
127 
128  gImmApiEntries.pImmSetCompositionFontA = (BOOL (WINAPI*)(HIMC, LPLOGFONTA)) GetProcAddress(imm32, "ImmSetCompositionFontA");
129  if (!gImmApiEntries.pImmSetCompositionFontA)
130  gImmApiEntries.pImmSetCompositionFontA = IMM_ImmSetCompositionFontA;
131 
132  gImmApiEntries.pImmSetCompositionFontW = (BOOL (WINAPI*)(HIMC, LPLOGFONTW)) GetProcAddress(imm32, "ImmSetCompositionFontW");
133  if (!gImmApiEntries.pImmSetCompositionFontW)
134  gImmApiEntries.pImmSetCompositionFontW = IMM_ImmSetCompositionFontW;
135 
136  gImmApiEntries.pImmGetCompositionWindow = (BOOL (WINAPI*)(HIMC, LPCOMPOSITIONFORM)) GetProcAddress(imm32, "ImmGetCompositionWindow");
137  if (!gImmApiEntries.pImmGetCompositionWindow)
138  gImmApiEntries.pImmGetCompositionWindow = IMM_ImmSetGetCompositionWindow;
139 
140  gImmApiEntries.pImmSetCompositionWindow = (BOOL (WINAPI*)(HIMC, LPCOMPOSITIONFORM)) GetProcAddress(imm32, "ImmSetCompositionWindow");
141  if (!gImmApiEntries.pImmSetCompositionWindow)
142  gImmApiEntries.pImmSetCompositionWindow = IMM_ImmSetGetCompositionWindow;
143 
144  gImmApiEntries.pImmAssociateContext = (HIMC (WINAPI*)(HWND, HIMC)) GetProcAddress(imm32, "ImmAssociateContext");
145  if (!gImmApiEntries.pImmAssociateContext)
146  gImmApiEntries.pImmAssociateContext = IMM_ImmAssociateContext;
147 
148  gImmApiEntries.pImmReleaseContext = (BOOL (WINAPI*)(HWND, HIMC)) GetProcAddress(imm32, "ImmReleaseContext");
149  if (!gImmApiEntries.pImmReleaseContext)
150  gImmApiEntries.pImmReleaseContext = IMM_ImmReleaseContext;
151 
152  gImmApiEntries.pImmGetContext = (HIMC (WINAPI*)(HWND)) GetProcAddress(imm32, "ImmGetContext");
153  if (!gImmApiEntries.pImmGetContext)
154  gImmApiEntries.pImmGetContext = IMM_ImmGetContext;
155 
156  gImmApiEntries.pImmGetDefaultIMEWnd = (HWND (WINAPI*)(HWND)) GetProcAddress(imm32, "ImmGetDefaultIMEWnd");
157  if (!gImmApiEntries.pImmGetDefaultIMEWnd)
158  gImmApiEntries.pImmGetDefaultIMEWnd = IMM_ImmGetDefaultIMEWnd;
159 
160  gImmApiEntries.pImmNotifyIME = (BOOL (WINAPI*)(HIMC, DWORD, DWORD, DWORD)) GetProcAddress(imm32, "ImmNotifyIME");
161  if (!gImmApiEntries.pImmNotifyIME)
162  gImmApiEntries.pImmNotifyIME = IMM_ImmNotifyIME;
163 
164  /*
165  * TODO: Load more functions from imm32.dll
166  * Function like IMPSetIMEW, IMPQueryIMEW etc. call functions
167  * from imm32.dll through pointers in the structure gImmApiEntries.
168  * I do not know whether it is necessary to initialize a table
169  * of functions to load user32 (DLL_PROCESS_ATTACH)
170  */
171 
172  gImmApiEntries.pImmRegisterClient = (BOOL (WINAPI*)(PVOID, HINSTANCE)) GetProcAddress(imm32, "ImmRegisterClient");
173  if (!gImmApiEntries.pImmRegisterClient)
174  gImmApiEntries.pImmRegisterClient = IMM_ImmRegisterClient;
175 
176  gImmApiEntries.pImmProcessKey = (UINT (WINAPI*)(HWND, HKL, UINT, LPARAM, DWORD)) GetProcAddress(imm32, "ImmProcessKey");
177  if (!gImmApiEntries.pImmProcessKey)
178  gImmApiEntries.pImmProcessKey = IMM_ImmProcessKey;
179 
180  return TRUE;
181 }
BOOL WINAPI IMM_ImmGetCompositionFontA(HIMC himc, LPLOGFONTA lplf)
Definition: imm.c:36
HRESULT WINAPI GetImmFileName(PWSTR lpBuffer, UINT uSize)
Definition: imm.c:47
HWND WINAPI IMM_ImmGetDefaultIMEWnd(HWND hwnd)
Definition: imm.c:42
#define TRUE
Definition: types.h:120
struct tagLOGFONTW * LPLOGFONTW
HANDLE HWND
Definition: compat.h:13
#define ZeroMemory
Definition: winbase.h:1635
HIMC WINAPI IMM_ImmAssociateContext(HWND hwnd, HIMC himc)
Definition: imm.c:32
BOOL WINAPI IMM_ImmReleaseContext(HWND hwnd, HIMC himc)
Definition: imm.c:33
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
long LONG
Definition: pedump.c:60
BOOL WINAPI IMM_ImmSetCompositionFontA(HIMC himc, LPLOGFONTA lplf)
Definition: imm.c:38
UINT WINAPI IMM_ImmProcessKey(HWND hwnd, HKL hkl, UINT Vk, LPARAM lParam, DWORD HotKey)
Definition: imm.c:45
#define LoadLibraryW(x)
Definition: compat.h:404
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
void * PVOID
Definition: retypes.h:9
DWORD HIMC
Definition: dimm.idl:75
BOOL WINAPI IMM_ImmSetCompositionFontW(HIMC himc, LPLOGFONTW lplf)
Definition: imm.c:39
BOOL ImmApiTableZero
Definition: imm.c:24
struct _tagCOMPOSITIONFORM * LPCOMPOSITIONFORM
Imm32ApiTable gImmApiEntries
Definition: imm.c:21
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG WINAPI IMM_ImmGetCompositionStringAW(HIMC himc, DWORD dword1, LPVOID lpvoid, DWORD dword2)
Definition: imm.c:35
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:8
#define LPVOID
Definition: nt_native.h:45
BOOL WINAPI IMM_ImmRegisterClient(PVOID ptr, HINSTANCE hMod)
Definition: imm.c:44
HANDLE HINSTANCE
Definition: typedefs.h:75
#define LRESULT
Definition: ole.h:14
BOOL WINAPI IMM_ImmSetGetCompositionWindow(HIMC himc, LPCOMPOSITIONFORM lpcf)
Definition: imm.c:40
UINT_PTR HKL
Definition: msctf.idl:101
#define ERR(fmt,...)
Definition: debug.h:109
HINSTANCE ghImm32
Definition: imm.c:22
BOOL WINAPI IMM_ImmNotifyIME(HIMC himc, DWORD dword1, DWORD dword2, DWORD dword3)
Definition: imm.c:43
HIMC WINAPI IMM_ImmGetContext(HWND hwnd)
Definition: imm.c:41
BOOL WINAPI IMM_ImmIsIME(HKL hKL)
Definition: imm.c:31
unsigned int UINT
Definition: ndis.h:50
struct tagLOGFONTA * LPLOGFONTA
LRESULT WINAPI IMM_ImmEscapeAW(HKL hkl, HIMC himc, UINT uint, LPVOID lpvoid)
Definition: imm.c:34
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845
#define GetProcAddress(x, y)
Definition: compat.h:410
BOOL WINAPI IMM_ImmGetCompositionFontW(HIMC himc, LPLOGFONTW lplf)
Definition: imm.c:37

Referenced by InitializeImmEntryTable(), and User32InitializeImmEntryTable().

◆ RegisterIMEClass()

BOOL WINAPI RegisterIMEClass ( VOID  )

Definition at line 313 of file imm.c.

314 {
316  ATOM atom;
317 
318  ZeroMemory(&WndClass, sizeof(WndClass));
319 
320  WndClass.cbSize = sizeof(WndClass);
321  WndClass.lpszClassName = imeW;
322  WndClass.style = CS_GLOBALCLASS;
323  WndClass.lpfnWndProc = ImeWndProcW;
324  WndClass.cbWndExtra = sizeof(LONG_PTR);
325  WndClass.hCursor = LoadCursorW(NULL, IDC_ARROW);
326 
327  atom = RegisterClassExWOWW( &WndClass,
328  0,
329  FNID_IME,
330  0,
331  FALSE);
332  if (atom)
333  {
335  TRACE("Register IME Class!\n");
336  return TRUE;
337  }
338  ERR("Failed to register IME Class!\n");
339  return FALSE;
340 }
#define LONG_PTR
Definition: treelist.c:79
#define TRUE
Definition: types.h:120
WORD ATOM
Definition: dimm.idl:113
LRESULT WINAPI ImeWndProcW(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: imm.c:280
#define ZeroMemory
Definition: winbase.h:1635
ATOM WINAPI RegisterClassExWOWW(WNDCLASSEXW *, LPDWORD, WORD, DWORD, BOOL)
Definition: class.c:1411
static const WCHAR imeW[]
Definition: imm.c:309
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define CS_GLOBALCLASS
Definition: winuser.h:647
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
#define ICLS_IME
Definition: ntuser.h:888
#define ERR(fmt,...)
Definition: debug.h:109
#define IDC_ARROW
Definition: winuser.h:682
#define ICLASS_TO_MASK(iCls)
Definition: ntuser.h:863
DWORD RegisterDefaultClasses
Definition: regcontrol.c:13
WCHAR WndClass[]
Definition: capicon.c:23
#define FNID_IME
Definition: ntuser.h:836

Referenced by RegisterSystemControls().

◆ SendIMEMessageExA()

LRESULT WINAPI SendIMEMessageExA ( HWND  hwnd,
LPARAM  lparam 
)

Definition at line 433 of file imm.c.

434 {
436  return FALSE;
437 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ SendIMEMessageExW()

LRESULT WINAPI SendIMEMessageExW ( HWND  hwnd,
LPARAM  lparam 
)

Definition at line 422 of file imm.c.

423 {
425  return FALSE;
426 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ UpdatePerUserImmEnabling()

BOOL WINAPI UpdatePerUserImmEnabling ( VOID  )

Definition at line 287 of file imm.c.

288 {
290  if ( Ret )
291  {
292  if ( gpsi->dwSRVIFlags & SRVINFO_IMM32 )
293  {
294  HMODULE imm32 = GetModuleHandleW(L"imm32.dll");
295  if ( !imm32 )
296  {
297  imm32 = LoadLibraryW(L"imm32.dll");
298  if (!imm32)
299  {
300  ERR("UPUIE: Imm32 not installed!\n");
301  Ret = FALSE;
302  }
303  }
304  }
305  }
306  return Ret;
307 }
PSERVERINFO gpsi
Definition: main.c:27
DWORD dwSRVIFlags
Definition: ntuser.h:1004
unsigned int BOOL
Definition: ntddk_ex.h:94
#define LoadLibraryW(x)
Definition: compat.h:404
static const WCHAR L[]
Definition: oid.c:1250
DWORD_PTR NTAPI NtUserCallNoParam(DWORD Routine)
Definition: simplecall.c:59
#define ERR(fmt,...)
Definition: debug.h:109
#define SRVINFO_IMM32
Definition: ntuser.h:910
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:845

Referenced by UpdatePerUserSystemParameters().

◆ User32InitializeImmEntryTable()

BOOL WINAPI User32InitializeImmEntryTable ( DWORD  magic)

Definition at line 189 of file imm.c.

190 {
191  TRACE("Imm (%x)\n", magic);
192 
193  if (magic != IMM_INIT_MAGIC)
194  return FALSE;
195 
196  if (gImmApiEntries.pImmIsIME != 0)
197  {
198  ERR("Imm Api Table Init 2\n");
199  return TRUE;
200  }
201 
203 
204  if (ghImm32 == NULL && !bImmInitializing)
205  {
206  WCHAR ImmFile[MAX_PATH];
207  GetImmFileName(ImmFile, sizeof(ImmFile));
208  ghImm32 = LoadLibraryW(ImmFile);
209  if (ghImm32 == NULL)
210  {
211  ERR("Did not load! 2\n");
212  return FALSE;
213  }
214  }
215 #if 0 // For real Imm32.dll testing!!!!
216  if (ghImm32 && !gImmApiEntries.pImmRegisterClient(&gSharedInfo, ghImm32))
217  {
218  ERR("Wine is stubed!\n");
219  }
220 #endif
221  return TRUE;
222 }
HRESULT WINAPI GetImmFileName(PWSTR lpBuffer, UINT uSize)
Definition: imm.c:47
#define TRUE
Definition: types.h:120
u32_t magic(void)
#define LoadLibraryW(x)
Definition: compat.h:404
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI IntInitializeImmEntryTable(VOID)
Definition: imm.c:64
Imm32ApiTable gImmApiEntries
Definition: imm.c:21
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
#define ERR(fmt,...)
Definition: debug.h:109
HINSTANCE ghImm32
Definition: imm.c:22
SHAREDINFO gSharedInfo
Definition: dllmain.c:16
BOOL bImmInitializing
Definition: imm.c:23
#define IMM_INIT_MAGIC
Definition: imm.c:18

Referenced by DllMain().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( user32  )

◆ WINNLSEnableIME()

BOOL WINAPI WINNLSEnableIME ( HWND  hwnd,
BOOL  enable 
)

Definition at line 444 of file imm.c.

445 {
447  return FALSE;
448 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ WINNLSGetEnableStatus()

BOOL WINAPI WINNLSGetEnableStatus ( HWND  hwnd)

Definition at line 455 of file imm.c.

456 {
458  return FALSE;
459 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ WINNLSGetIMEHotkey()

UINT WINAPI WINNLSGetIMEHotkey ( HWND  hwnd)

Definition at line 466 of file imm.c.

467 {
468  return FALSE;
469 }

Variable Documentation

◆ bImmInitializing

BOOL bImmInitializing = FALSE

Definition at line 23 of file imm.c.

Referenced by InitializeImmEntryTable(), and User32InitializeImmEntryTable().

◆ ghImm32

HINSTANCE ghImm32 = NULL

Definition at line 22 of file imm.c.

Referenced by DllMain(), IntInitializeImmEntryTable(), and User32InitializeImmEntryTable().

◆ gImmApiEntries

Imm32ApiTable gImmApiEntries = {0}

Definition at line 21 of file imm.c.

Referenced by IntInitializeImmEntryTable(), and User32InitializeImmEntryTable().

◆ imeW

const WCHAR imeW[] = {'I','M','E',0}
static

Definition at line 309 of file imm.c.

Referenced by is_ime_window_proc(), and RegisterIMEClass().

◆ ImmApiTableZero

BOOL ImmApiTableZero = TRUE

Definition at line 24 of file imm.c.

Referenced by IntInitializeImmEntryTable().