Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

943 lines
34 KiB

  1. /**********************************************************************/
  2. /* immdev.h - Input Method Manager definitions */
  3. /* for IME developers */
  4. /* */
  5. /* Copyright (c) Microsoft Corporation. All rights reserved. */
  6. /**********************************************************************/
  7. #ifndef _IMMDEV_
  8. #define _IMMDEV_
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #ifndef _IMM_SDK_DEFINED_
  13. #define _IMM_SDK_DEFINED_
  14. #if (WINVER >= 0x040A)
  15. DECLARE_HANDLE(HIMC);
  16. DECLARE_HANDLE(HIMCC);
  17. #else
  18. typedef DWORD HIMC;
  19. typedef DWORD HIMCC;
  20. #endif /* WINVER >= 0x040A */
  21. typedef HKL FAR *LPHKL;
  22. typedef UINT FAR *LPUINT;
  23. typedef struct tagCOMPOSITIONFORM {
  24. DWORD dwStyle;
  25. POINT ptCurrentPos;
  26. RECT rcArea;
  27. } COMPOSITIONFORM, *PCOMPOSITIONFORM, NEAR *NPCOMPOSITIONFORM, FAR *LPCOMPOSITIONFORM;
  28. typedef struct tagCANDIDATEFORM {
  29. DWORD dwIndex;
  30. DWORD dwStyle;
  31. POINT ptCurrentPos;
  32. RECT rcArea;
  33. } CANDIDATEFORM, *PCANDIDATEFORM, NEAR *NPCANDIDATEFORM, FAR *LPCANDIDATEFORM;
  34. typedef struct tagCANDIDATELIST {
  35. DWORD dwSize;
  36. DWORD dwStyle;
  37. DWORD dwCount;
  38. DWORD dwSelection;
  39. DWORD dwPageStart;
  40. DWORD dwPageSize;
  41. DWORD dwOffset[1];
  42. } CANDIDATELIST, *PCANDIDATELIST, NEAR *NPCANDIDATELIST, FAR *LPCANDIDATELIST;
  43. typedef struct tagREGISTERWORDA {
  44. LPSTR lpReading;
  45. LPSTR lpWord;
  46. } REGISTERWORDA, *PREGISTERWORDA, NEAR *NPREGISTERWORDA, FAR *LPREGISTERWORDA;
  47. typedef struct tagREGISTERWORDW {
  48. LPWSTR lpReading;
  49. LPWSTR lpWord;
  50. } REGISTERWORDW, *PREGISTERWORDW, NEAR *NPREGISTERWORDW, FAR *LPREGISTERWORDW;
  51. #ifdef UNICODE
  52. typedef REGISTERWORDW REGISTERWORD;
  53. typedef PREGISTERWORDW PREGISTERWORD;
  54. typedef NPREGISTERWORDW NPREGISTERWORD;
  55. typedef LPREGISTERWORDW LPREGISTERWORD;
  56. #else
  57. typedef REGISTERWORDA REGISTERWORD;
  58. typedef PREGISTERWORDA PREGISTERWORD;
  59. typedef NPREGISTERWORDA NPREGISTERWORD;
  60. typedef LPREGISTERWORDA LPREGISTERWORD;
  61. #endif // UNICODE
  62. #if (WINVER >= 0x040A)
  63. typedef struct tagRECONVERTSTRING {
  64. DWORD dwSize;
  65. DWORD dwVersion;
  66. DWORD dwStrLen;
  67. DWORD dwStrOffset;
  68. DWORD dwCompStrLen;
  69. DWORD dwCompStrOffset;
  70. DWORD dwTargetStrLen;
  71. DWORD dwTargetStrOffset;
  72. } RECONVERTSTRING, *PRECONVERTSTRING, NEAR *NPRECONVERTSTRING, FAR *LPRECONVERTSTRING;
  73. #endif /* WINVER >= 0x040A */
  74. #define STYLE_DESCRIPTION_SIZE 32
  75. typedef struct tagSTYLEBUFA {
  76. DWORD dwStyle;
  77. CHAR szDescription[STYLE_DESCRIPTION_SIZE];
  78. } STYLEBUFA, *PSTYLEBUFA, NEAR *NPSTYLEBUFA, FAR *LPSTYLEBUFA;
  79. typedef struct tagSTYLEBUFW {
  80. DWORD dwStyle;
  81. WCHAR szDescription[STYLE_DESCRIPTION_SIZE];
  82. } STYLEBUFW, *PSTYLEBUFW, NEAR *NPSTYLEBUFW, FAR *LPSTYLEBUFW;
  83. #ifdef UNICODE
  84. typedef STYLEBUFW STYLEBUF;
  85. typedef PSTYLEBUFW PSTYLEBUF;
  86. typedef NPSTYLEBUFW NPSTYLEBUF;
  87. typedef LPSTYLEBUFW LPSTYLEBUF;
  88. #else
  89. typedef STYLEBUFA STYLEBUF;
  90. typedef PSTYLEBUFA PSTYLEBUF;
  91. typedef NPSTYLEBUFA NPSTYLEBUF;
  92. typedef LPSTYLEBUFA LPSTYLEBUF;
  93. #endif // UNICODE
  94. #if (WINVER >= 0x040A)
  95. #define IMEMENUITEM_STRING_SIZE 80
  96. typedef struct tagIMEMENUITEMINFOA {
  97. UINT cbSize;
  98. UINT fType;
  99. UINT fState;
  100. UINT wID;
  101. HBITMAP hbmpChecked;
  102. HBITMAP hbmpUnchecked;
  103. DWORD dwItemData;
  104. CHAR szString[IMEMENUITEM_STRING_SIZE];
  105. HBITMAP hbmpItem;
  106. } IMEMENUITEMINFOA, *PIMEMENUITEMINFOA, NEAR *NPIMEMENUITEMINFOA, FAR *LPIMEMENUITEMINFOA;
  107. typedef struct tagIMEMENUITEMINFOW {
  108. UINT cbSize;
  109. UINT fType;
  110. UINT fState;
  111. UINT wID;
  112. HBITMAP hbmpChecked;
  113. HBITMAP hbmpUnchecked;
  114. DWORD dwItemData;
  115. WCHAR szString[IMEMENUITEM_STRING_SIZE];
  116. HBITMAP hbmpItem;
  117. } IMEMENUITEMINFOW, *PIMEMENUITEMINFOW, NEAR *NPIMEMENUITEMINFOW, FAR *LPIMEMENUITEMINFOW;
  118. #ifdef UNICODE
  119. typedef IMEMENUITEMINFOW IMEMENUITEMINFO;
  120. typedef PIMEMENUITEMINFOW PIMEMENUITEMINFO;
  121. typedef NPIMEMENUITEMINFOW NPIMEMENUITEMINFO;
  122. typedef LPIMEMENUITEMINFOW LPIMEMENUITEMINFO;
  123. #else
  124. typedef IMEMENUITEMINFOA IMEMENUITEMINFO;
  125. typedef PIMEMENUITEMINFOA PIMEMENUITEMINFO;
  126. typedef NPIMEMENUITEMINFOA NPIMEMENUITEMINFO;
  127. typedef LPIMEMENUITEMINFOA LPIMEMENUITEMINFO;
  128. #endif // UNICODE
  129. typedef struct tagIMECHARPOSITION {
  130. DWORD dwSize;
  131. DWORD dwCharPos;
  132. POINT pt;
  133. UINT cLineHeight;
  134. RECT rcDocument;
  135. } IMECHARPOSITION, *PIMECHARPOSITION, NEAR *NPIMECHARPOSITION, FAR *LPIMECHARPOSITION;
  136. typedef BOOL (CALLBACK* IMCENUMPROC)(HIMC, LPARAM);
  137. #endif /* WINVER >= 0x040A */
  138. // prototype of IMM API
  139. HKL WINAPI ImmInstallIMEA(IN LPCSTR lpszIMEFileName, IN LPCSTR lpszLayoutText);
  140. HKL WINAPI ImmInstallIMEW(IN LPCWSTR lpszIMEFileName, IN LPCWSTR lpszLayoutText);
  141. #ifdef UNICODE
  142. #define ImmInstallIME ImmInstallIMEW
  143. #else
  144. #define ImmInstallIME ImmInstallIMEA
  145. #endif // !UNICODE
  146. HWND WINAPI ImmGetDefaultIMEWnd(IN HWND);
  147. UINT WINAPI ImmGetDescriptionA(IN HKL, OUT LPSTR, IN UINT uBufLen);
  148. UINT WINAPI ImmGetDescriptionW(IN HKL, OUT LPWSTR, IN UINT uBufLen);
  149. #ifdef UNICODE
  150. #define ImmGetDescription ImmGetDescriptionW
  151. #else
  152. #define ImmGetDescription ImmGetDescriptionA
  153. #endif // !UNICODE
  154. UINT WINAPI ImmGetIMEFileNameA(IN HKL, OUT LPSTR, IN UINT uBufLen);
  155. UINT WINAPI ImmGetIMEFileNameW(IN HKL, OUT LPWSTR, IN UINT uBufLen);
  156. #ifdef UNICODE
  157. #define ImmGetIMEFileName ImmGetIMEFileNameW
  158. #else
  159. #define ImmGetIMEFileName ImmGetIMEFileNameA
  160. #endif // !UNICODE
  161. DWORD WINAPI ImmGetProperty(IN HKL, IN DWORD);
  162. BOOL WINAPI ImmIsIME(IN HKL);
  163. BOOL WINAPI ImmSimulateHotKey(IN HWND, IN DWORD);
  164. HIMC WINAPI ImmCreateContext(void);
  165. BOOL WINAPI ImmDestroyContext(IN HIMC);
  166. HIMC WINAPI ImmGetContext(IN HWND);
  167. BOOL WINAPI ImmReleaseContext(IN HWND, IN HIMC);
  168. HIMC WINAPI ImmAssociateContext(IN HWND, IN HIMC);
  169. #if (WINVER >= 0x040A)
  170. BOOL WINAPI ImmAssociateContextEx(IN HWND, IN HIMC, IN DWORD);
  171. #endif /* WINVER >= 0x040A */
  172. LONG WINAPI ImmGetCompositionStringA(IN HIMC, IN DWORD, OUT LPVOID, IN DWORD);
  173. LONG WINAPI ImmGetCompositionStringW(IN HIMC, IN DWORD, OUT LPVOID, IN DWORD);
  174. #ifdef UNICODE
  175. #define ImmGetCompositionString ImmGetCompositionStringW
  176. #else
  177. #define ImmGetCompositionString ImmGetCompositionStringA
  178. #endif // !UNICODE
  179. BOOL WINAPI ImmSetCompositionStringA(IN HIMC, IN DWORD dwIndex, IN LPVOID lpComp, IN DWORD, IN LPVOID lpRead, IN DWORD);
  180. BOOL WINAPI ImmSetCompositionStringW(IN HIMC, IN DWORD dwIndex, IN LPVOID lpComp, IN DWORD, IN LPVOID lpRead, IN DWORD);
  181. #ifdef UNICODE
  182. #define ImmSetCompositionString ImmSetCompositionStringW
  183. #else
  184. #define ImmSetCompositionString ImmSetCompositionStringA
  185. #endif // !UNICODE
  186. DWORD WINAPI ImmGetCandidateListCountA(IN HIMC, OUT LPDWORD lpdwListCount);
  187. DWORD WINAPI ImmGetCandidateListCountW(IN HIMC, OUT LPDWORD lpdwListCount);
  188. #ifdef UNICODE
  189. #define ImmGetCandidateListCount ImmGetCandidateListCountW
  190. #else
  191. #define ImmGetCandidateListCount ImmGetCandidateListCountA
  192. #endif // !UNICODE
  193. DWORD WINAPI ImmGetCandidateListA(IN HIMC, IN DWORD deIndex, OUT LPCANDIDATELIST, IN DWORD dwBufLen);
  194. DWORD WINAPI ImmGetCandidateListW(IN HIMC, IN DWORD deIndex, OUT LPCANDIDATELIST, IN DWORD dwBufLen);
  195. #ifdef UNICODE
  196. #define ImmGetCandidateList ImmGetCandidateListW
  197. #else
  198. #define ImmGetCandidateList ImmGetCandidateListA
  199. #endif // !UNICODE
  200. DWORD WINAPI ImmGetGuideLineA(IN HIMC, IN DWORD dwIndex, OUT LPSTR, IN DWORD dwBufLen);
  201. DWORD WINAPI ImmGetGuideLineW(IN HIMC, IN DWORD dwIndex, OUT LPWSTR, IN DWORD dwBufLen);
  202. #ifdef UNICODE
  203. #define ImmGetGuideLine ImmGetGuideLineW
  204. #else
  205. #define ImmGetGuideLine ImmGetGuideLineA
  206. #endif // !UNICODE
  207. BOOL WINAPI ImmGetConversionStatus(IN HIMC, OUT LPDWORD, OUT LPDWORD);
  208. BOOL WINAPI ImmSetConversionStatus(IN HIMC, IN DWORD, IN DWORD);
  209. BOOL WINAPI ImmGetOpenStatus(IN HIMC);
  210. BOOL WINAPI ImmSetOpenStatus(IN HIMC, IN BOOL);
  211. #if defined(_WINGDI_) && !defined(NOGDI)
  212. BOOL WINAPI ImmGetCompositionFontA(IN HIMC, OUT LPLOGFONTA);
  213. BOOL WINAPI ImmGetCompositionFontW(IN HIMC, OUT LPLOGFONTW);
  214. #ifdef UNICODE
  215. #define ImmGetCompositionFont ImmGetCompositionFontW
  216. #else
  217. #define ImmGetCompositionFont ImmGetCompositionFontA
  218. #endif // !UNICODE
  219. BOOL WINAPI ImmSetCompositionFontA(IN HIMC, IN LPLOGFONTA);
  220. BOOL WINAPI ImmSetCompositionFontW(IN HIMC, IN LPLOGFONTW);
  221. #ifdef UNICODE
  222. #define ImmSetCompositionFont ImmSetCompositionFontW
  223. #else
  224. #define ImmSetCompositionFont ImmSetCompositionFontA
  225. #endif // !UNICODE
  226. #endif // defined(_WINGDI_) && !defined(NOGDI)
  227. BOOL WINAPI ImmConfigureIMEA(IN HKL, IN HWND, IN DWORD, IN LPVOID);
  228. BOOL WINAPI ImmConfigureIMEW(IN HKL, IN HWND, IN DWORD, IN LPVOID);
  229. #ifdef UNICODE
  230. #define ImmConfigureIME ImmConfigureIMEW
  231. #else
  232. #define ImmConfigureIME ImmConfigureIMEA
  233. #endif // !UNICODE
  234. LRESULT WINAPI ImmEscapeA(IN HKL, IN HIMC, IN UINT, IN LPVOID);
  235. LRESULT WINAPI ImmEscapeW(IN HKL, IN HIMC, IN UINT, IN LPVOID);
  236. #ifdef UNICODE
  237. #define ImmEscape ImmEscapeW
  238. #else
  239. #define ImmEscape ImmEscapeA
  240. #endif // !UNICODE
  241. DWORD WINAPI ImmGetConversionListA(IN HKL, IN HIMC, IN LPCSTR, OUT LPCANDIDATELIST, IN DWORD dwBufLen, IN UINT uFlag);
  242. DWORD WINAPI ImmGetConversionListW(IN HKL, IN HIMC, IN LPCWSTR, OUT LPCANDIDATELIST, IN DWORD dwBufLen, IN UINT uFlag);
  243. #ifdef UNICODE
  244. #define ImmGetConversionList ImmGetConversionListW
  245. #else
  246. #define ImmGetConversionList ImmGetConversionListA
  247. #endif // !UNICODE
  248. BOOL WINAPI ImmNotifyIME(IN HIMC, IN DWORD dwAction, IN DWORD dwIndex, IN DWORD dwValue);
  249. BOOL WINAPI ImmGetStatusWindowPos(IN HIMC, OUT LPPOINT);
  250. BOOL WINAPI ImmSetStatusWindowPos(IN HIMC, IN LPPOINT);
  251. BOOL WINAPI ImmGetCompositionWindow(IN HIMC, OUT LPCOMPOSITIONFORM);
  252. BOOL WINAPI ImmSetCompositionWindow(IN HIMC, IN LPCOMPOSITIONFORM);
  253. BOOL WINAPI ImmGetCandidateWindow(IN HIMC, IN DWORD, OUT LPCANDIDATEFORM);
  254. BOOL WINAPI ImmSetCandidateWindow(IN HIMC, IN LPCANDIDATEFORM);
  255. BOOL WINAPI ImmIsUIMessageA(IN HWND, IN UINT, IN WPARAM, IN LPARAM);
  256. BOOL WINAPI ImmIsUIMessageW(IN HWND, IN UINT, IN WPARAM, IN LPARAM);
  257. #ifdef UNICODE
  258. #define ImmIsUIMessage ImmIsUIMessageW
  259. #else
  260. #define ImmIsUIMessage ImmIsUIMessageA
  261. #endif // !UNICODE
  262. UINT WINAPI ImmGetVirtualKey(IN HWND);
  263. typedef int (CALLBACK *REGISTERWORDENUMPROCA)(LPCSTR, DWORD, LPCSTR, LPVOID);
  264. typedef int (CALLBACK *REGISTERWORDENUMPROCW)(LPCWSTR, DWORD, LPCWSTR, LPVOID);
  265. #ifdef UNICODE
  266. #define REGISTERWORDENUMPROC REGISTERWORDENUMPROCW
  267. #else
  268. #define REGISTERWORDENUMPROC REGISTERWORDENUMPROCA
  269. #endif // !UNICODE
  270. BOOL WINAPI ImmRegisterWordA(IN HKL, IN LPCSTR lpszReading, IN DWORD, IN LPCSTR lpszRegister);
  271. BOOL WINAPI ImmRegisterWordW(IN HKL, IN LPCWSTR lpszReading, IN DWORD, IN LPCWSTR lpszRegister);
  272. #ifdef UNICODE
  273. #define ImmRegisterWord ImmRegisterWordW
  274. #else
  275. #define ImmRegisterWord ImmRegisterWordA
  276. #endif // !UNICODE
  277. BOOL WINAPI ImmUnregisterWordA(IN HKL, IN LPCSTR lpszReading, IN DWORD, IN LPCSTR lpszUnregister);
  278. BOOL WINAPI ImmUnregisterWordW(IN HKL, IN LPCWSTR lpszReading, IN DWORD, IN LPCWSTR lpszUnregister);
  279. #ifdef UNICODE
  280. #define ImmUnregisterWord ImmUnregisterWordW
  281. #else
  282. #define ImmUnregisterWord ImmUnregisterWordA
  283. #endif // !UNICODE
  284. UINT WINAPI ImmGetRegisterWordStyleA(IN HKL, IN UINT nItem, OUT LPSTYLEBUFA);
  285. UINT WINAPI ImmGetRegisterWordStyleW(IN HKL, IN UINT nItem, OUT LPSTYLEBUFW);
  286. #ifdef UNICODE
  287. #define ImmGetRegisterWordStyle ImmGetRegisterWordStyleW
  288. #else
  289. #define ImmGetRegisterWordStyle ImmGetRegisterWordStyleA
  290. #endif // !UNICODE
  291. UINT WINAPI ImmEnumRegisterWordA(IN HKL, IN REGISTERWORDENUMPROCA, IN LPCSTR lpszReading, IN DWORD, IN LPCSTR lpszRegister, IN LPVOID);
  292. UINT WINAPI ImmEnumRegisterWordW(IN HKL, IN REGISTERWORDENUMPROCW, IN LPCWSTR lpszReading, IN DWORD, IN LPCWSTR lpszRegister, IN LPVOID);
  293. #ifdef UNICODE
  294. #define ImmEnumRegisterWord ImmEnumRegisterWordW
  295. #else
  296. #define ImmEnumRegisterWord ImmEnumRegisterWordA
  297. #endif // !UNICODE
  298. #if (WINVER >= 0x040A)
  299. BOOL WINAPI ImmDisableIME(IN DWORD);
  300. BOOL WINAPI ImmEnumInputContext(DWORD idThread, IMCENUMPROC lpfn, LPARAM lParam);
  301. DWORD WINAPI ImmGetImeMenuItemsA(IN HIMC, IN DWORD, IN DWORD, OUT LPIMEMENUITEMINFOA, OUT LPIMEMENUITEMINFOA, IN DWORD);
  302. DWORD WINAPI ImmGetImeMenuItemsW(IN HIMC, IN DWORD, IN DWORD, OUT LPIMEMENUITEMINFOW, OUT LPIMEMENUITEMINFOW, IN DWORD);
  303. #ifdef UNICODE
  304. #define ImmGetImeMenuItems ImmGetImeMenuItemsW
  305. #else
  306. #define ImmGetImeMenuItems ImmGetImeMenuItemsA
  307. #endif // !UNICODE
  308. BOOL WINAPI ImmDisableTextFrameService(DWORD idThread);
  309. #endif /* WINVER >= 0x040A */
  310. // wParam for WM_IME_CONTROL
  311. #define IMC_GETCANDIDATEPOS 0x0007
  312. #define IMC_SETCANDIDATEPOS 0x0008
  313. #define IMC_GETCOMPOSITIONFONT 0x0009
  314. #define IMC_SETCOMPOSITIONFONT 0x000A
  315. #define IMC_GETCOMPOSITIONWINDOW 0x000B
  316. #define IMC_SETCOMPOSITIONWINDOW 0x000C
  317. #define IMC_GETSTATUSWINDOWPOS 0x000F
  318. #define IMC_SETSTATUSWINDOWPOS 0x0010
  319. #define IMC_CLOSESTATUSWINDOW 0x0021
  320. #define IMC_OPENSTATUSWINDOW 0x0022
  321. // dwAction for ImmNotifyIME
  322. #define NI_OPENCANDIDATE 0x0010
  323. #define NI_CLOSECANDIDATE 0x0011
  324. #define NI_SELECTCANDIDATESTR 0x0012
  325. #define NI_CHANGECANDIDATELIST 0x0013
  326. #define NI_FINALIZECONVERSIONRESULT 0x0014
  327. #define NI_COMPOSITIONSTR 0x0015
  328. #define NI_SETCANDIDATE_PAGESTART 0x0016
  329. #define NI_SETCANDIDATE_PAGESIZE 0x0017
  330. #define NI_IMEMENUSELECTED 0x0018
  331. // lParam for WM_IME_SETCONTEXT
  332. #define ISC_SHOWUICANDIDATEWINDOW 0x00000001
  333. #define ISC_SHOWUICOMPOSITIONWINDOW 0x80000000
  334. #define ISC_SHOWUIGUIDELINE 0x40000000
  335. #define ISC_SHOWUIALLCANDIDATEWINDOW 0x0000000F
  336. #define ISC_SHOWUIALL 0xC000000F
  337. // dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR
  338. #define CPS_COMPLETE 0x0001
  339. #define CPS_CONVERT 0x0002
  340. #define CPS_REVERT 0x0003
  341. #define CPS_CANCEL 0x0004
  342. // the modifiers of hot key
  343. #define MOD_ALT 0x0001
  344. #define MOD_CONTROL 0x0002
  345. #define MOD_SHIFT 0x0004
  346. #define MOD_LEFT 0x8000
  347. #define MOD_RIGHT 0x4000
  348. #define MOD_ON_KEYUP 0x0800
  349. #define MOD_IGNORE_ALL_MODIFIER 0x0400
  350. // Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F
  351. #define IME_CHOTKEY_IME_NONIME_TOGGLE 0x10
  352. #define IME_CHOTKEY_SHAPE_TOGGLE 0x11
  353. #define IME_CHOTKEY_SYMBOL_TOGGLE 0x12
  354. // Windows for Japanese Edition hot key ID from 0x30 - 0x4F
  355. #define IME_JHOTKEY_CLOSE_OPEN 0x30
  356. // Windows for Korean Edition hot key ID from 0x50 - 0x6F
  357. #define IME_KHOTKEY_SHAPE_TOGGLE 0x50
  358. #define IME_KHOTKEY_HANJACONVERT 0x51
  359. #define IME_KHOTKEY_ENGLISH 0x52
  360. // Windows for Traditional Chinese Edition hot key ID from 0x70 - 0x8F
  361. #define IME_THOTKEY_IME_NONIME_TOGGLE 0x70
  362. #define IME_THOTKEY_SHAPE_TOGGLE 0x71
  363. #define IME_THOTKEY_SYMBOL_TOGGLE 0x72
  364. // direct switch hot key ID from 0x100 - 0x11F
  365. #define IME_HOTKEY_DSWITCH_FIRST 0x100
  366. #define IME_HOTKEY_DSWITCH_LAST 0x11F
  367. // IME private hot key from 0x200 - 0x21F
  368. #define IME_HOTKEY_PRIVATE_FIRST 0x200
  369. #define IME_ITHOTKEY_RESEND_RESULTSTR 0x200
  370. #define IME_ITHOTKEY_PREVIOUS_COMPOSITION 0x201
  371. #define IME_ITHOTKEY_UISTYLE_TOGGLE 0x202
  372. #define IME_ITHOTKEY_RECONVERTSTRING 0x203
  373. #define IME_HOTKEY_PRIVATE_LAST 0x21F
  374. // parameter of ImmGetCompositionString
  375. #define GCS_COMPREADSTR 0x0001
  376. #define GCS_COMPREADATTR 0x0002
  377. #define GCS_COMPREADCLAUSE 0x0004
  378. #define GCS_COMPSTR 0x0008
  379. #define GCS_COMPATTR 0x0010
  380. #define GCS_COMPCLAUSE 0x0020
  381. #define GCS_CURSORPOS 0x0080
  382. #define GCS_DELTASTART 0x0100
  383. #define GCS_RESULTREADSTR 0x0200
  384. #define GCS_RESULTREADCLAUSE 0x0400
  385. #define GCS_RESULTSTR 0x0800
  386. #define GCS_RESULTCLAUSE 0x1000
  387. // style bit flags for WM_IME_COMPOSITION
  388. #define CS_INSERTCHAR 0x2000
  389. #define CS_NOMOVECARET 0x4000
  390. // IME version constants
  391. #define IMEVER_0310 0x0003000A
  392. #define IMEVER_0400 0x00040000
  393. // IME property bits
  394. #define IME_PROP_AT_CARET 0x00010000
  395. #define IME_PROP_SPECIAL_UI 0x00020000
  396. #define IME_PROP_CANDLIST_START_FROM_1 0x00040000
  397. #define IME_PROP_UNICODE 0x00080000
  398. #define IME_PROP_COMPLETE_ON_UNSELECT 0x00100000
  399. // IME UICapability bits
  400. #define UI_CAP_2700 0x00000001
  401. #define UI_CAP_ROT90 0x00000002
  402. #define UI_CAP_ROTANY 0x00000004
  403. // ImmSetCompositionString Capability bits
  404. #define SCS_CAP_COMPSTR 0x00000001
  405. #define SCS_CAP_MAKEREAD 0x00000002
  406. #define SCS_CAP_SETRECONVERTSTRING 0x00000004
  407. // IME WM_IME_SELECT inheritance Capability bits
  408. #define SELECT_CAP_CONVERSION 0x00000001
  409. #define SELECT_CAP_SENTENCE 0x00000002
  410. // ID for deIndex of ImmGetGuideLine
  411. #define GGL_LEVEL 0x00000001
  412. #define GGL_INDEX 0x00000002
  413. #define GGL_STRING 0x00000003
  414. #define GGL_PRIVATE 0x00000004
  415. // ID for dwLevel of GUIDELINE Structure
  416. #define GL_LEVEL_NOGUIDELINE 0x00000000
  417. #define GL_LEVEL_FATAL 0x00000001
  418. #define GL_LEVEL_ERROR 0x00000002
  419. #define GL_LEVEL_WARNING 0x00000003
  420. #define GL_LEVEL_INFORMATION 0x00000004
  421. // ID for dwIndex of GUIDELINE Structure
  422. #define GL_ID_UNKNOWN 0x00000000
  423. #define GL_ID_NOMODULE 0x00000001
  424. #define GL_ID_NODICTIONARY 0x00000010
  425. #define GL_ID_CANNOTSAVE 0x00000011
  426. #define GL_ID_NOCONVERT 0x00000020
  427. #define GL_ID_TYPINGERROR 0x00000021
  428. #define GL_ID_TOOMANYSTROKE 0x00000022
  429. #define GL_ID_READINGCONFLICT 0x00000023
  430. #define GL_ID_INPUTREADING 0x00000024
  431. #define GL_ID_INPUTRADICAL 0x00000025
  432. #define GL_ID_INPUTCODE 0x00000026
  433. #define GL_ID_INPUTSYMBOL 0x00000027
  434. #define GL_ID_CHOOSECANDIDATE 0x00000028
  435. #define GL_ID_REVERSECONVERSION 0x00000029
  436. #define GL_ID_PRIVATE_FIRST 0x00008000
  437. #define GL_ID_PRIVATE_LAST 0x0000FFFF
  438. // ID for dwIndex of ImmGetProperty
  439. #define IGP_GETIMEVERSION (DWORD)(-4)
  440. #define IGP_PROPERTY 0x00000004
  441. #define IGP_CONVERSION 0x00000008
  442. #define IGP_SENTENCE 0x0000000c
  443. #define IGP_UI 0x00000010
  444. #define IGP_SETCOMPSTR 0x00000014
  445. #define IGP_SELECT 0x00000018
  446. // dwIndex for ImmSetCompositionString API
  447. #define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
  448. #define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
  449. #define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
  450. #define SCS_SETRECONVERTSTRING 0x00010000
  451. #define SCS_QUERYRECONVERTSTRING 0x00020000
  452. // attribute for COMPOSITIONSTRING Structure
  453. #define ATTR_INPUT 0x00
  454. #define ATTR_TARGET_CONVERTED 0x01
  455. #define ATTR_CONVERTED 0x02
  456. #define ATTR_TARGET_NOTCONVERTED 0x03
  457. #define ATTR_INPUT_ERROR 0x04
  458. #define ATTR_FIXEDCONVERTED 0x05
  459. // bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW
  460. #define CFS_DEFAULT 0x0000
  461. #define CFS_RECT 0x0001
  462. #define CFS_POINT 0x0002
  463. #define CFS_FORCE_POSITION 0x0020
  464. #define CFS_CANDIDATEPOS 0x0040
  465. #define CFS_EXCLUDE 0x0080
  466. // conversion direction for ImmGetConversionList
  467. #define GCL_CONVERSION 0x0001
  468. #define GCL_REVERSECONVERSION 0x0002
  469. #define GCL_REVERSE_LENGTH 0x0003
  470. // bit field for conversion mode
  471. #define IME_CMODE_ALPHANUMERIC 0x0000
  472. #define IME_CMODE_NATIVE 0x0001
  473. #define IME_CMODE_CHINESE IME_CMODE_NATIVE
  474. // IME_CMODE_HANGEUL is old name of IME_CMODE_HANGUL. It will be gone eventually.
  475. #define IME_CMODE_HANGEUL IME_CMODE_NATIVE
  476. #define IME_CMODE_HANGUL IME_CMODE_NATIVE
  477. #define IME_CMODE_JAPANESE IME_CMODE_NATIVE
  478. #define IME_CMODE_KATAKANA 0x0002 // only effect under IME_CMODE_NATIVE
  479. #define IME_CMODE_LANGUAGE 0x0003
  480. #define IME_CMODE_FULLSHAPE 0x0008
  481. #define IME_CMODE_ROMAN 0x0010
  482. #define IME_CMODE_CHARCODE 0x0020
  483. #define IME_CMODE_HANJACONVERT 0x0040
  484. #define IME_CMODE_SOFTKBD 0x0080
  485. #define IME_CMODE_NOCONVERSION 0x0100
  486. #define IME_CMODE_EUDC 0x0200
  487. #define IME_CMODE_SYMBOL 0x0400
  488. #define IME_CMODE_FIXED 0x0800
  489. #define IME_CMODE_RESERVED 0xF0000000
  490. // bit field for sentence mode
  491. #define IME_SMODE_NONE 0x0000
  492. #define IME_SMODE_PLAURALCLAUSE 0x0001
  493. #define IME_SMODE_SINGLECONVERT 0x0002
  494. #define IME_SMODE_AUTOMATIC 0x0004
  495. #define IME_SMODE_PHRASEPREDICT 0x0008
  496. #define IME_SMODE_CONVERSATION 0x0010
  497. #define IME_SMODE_RESERVED 0x0000F000
  498. // style of candidate
  499. #define IME_CAND_UNKNOWN 0x0000
  500. #define IME_CAND_READ 0x0001
  501. #define IME_CAND_CODE 0x0002
  502. #define IME_CAND_MEANING 0x0003
  503. #define IME_CAND_RADICAL 0x0004
  504. #define IME_CAND_STROKE 0x0005
  505. // wParam of report message WM_IME_NOTIFY
  506. #define IMN_CLOSESTATUSWINDOW 0x0001
  507. #define IMN_OPENSTATUSWINDOW 0x0002
  508. #define IMN_CHANGECANDIDATE 0x0003
  509. #define IMN_CLOSECANDIDATE 0x0004
  510. #define IMN_OPENCANDIDATE 0x0005
  511. #define IMN_SETCONVERSIONMODE 0x0006
  512. #define IMN_SETSENTENCEMODE 0x0007
  513. #define IMN_SETOPENSTATUS 0x0008
  514. #define IMN_SETCANDIDATEPOS 0x0009
  515. #define IMN_SETCOMPOSITIONFONT 0x000A
  516. #define IMN_SETCOMPOSITIONWINDOW 0x000B
  517. #define IMN_SETSTATUSWINDOWPOS 0x000C
  518. #define IMN_GUIDELINE 0x000D
  519. #define IMN_PRIVATE 0x000E
  520. #if (WINVER >= 0x040A)
  521. // wParam of report message WM_IME_REQUEST
  522. #define IMR_COMPOSITIONWINDOW 0x0001
  523. #define IMR_CANDIDATEWINDOW 0x0002
  524. #define IMR_COMPOSITIONFONT 0x0003
  525. #define IMR_RECONVERTSTRING 0x0004
  526. #define IMR_CONFIRMRECONVERTSTRING 0x0005
  527. #define IMR_QUERYCHARPOSITION 0x0006
  528. #define IMR_DOCUMENTFEED 0x0007
  529. #endif /* WINVER >= 0x040A */
  530. // error code of ImmGetCompositionString
  531. #define IMM_ERROR_NODATA (-1)
  532. #define IMM_ERROR_GENERAL (-2)
  533. // dialog mode of ImmConfigureIME
  534. #define IME_CONFIG_GENERAL 1
  535. #define IME_CONFIG_REGISTERWORD 2
  536. #define IME_CONFIG_SELECTDICTIONARY 3
  537. // flags for ImmEscape
  538. #define IME_ESC_QUERY_SUPPORT 0x0003
  539. #define IME_ESC_RESERVED_FIRST 0x0004
  540. #define IME_ESC_RESERVED_LAST 0x07FF
  541. #define IME_ESC_PRIVATE_FIRST 0x0800
  542. #define IME_ESC_PRIVATE_LAST 0x0FFF
  543. #define IME_ESC_SEQUENCE_TO_INTERNAL 0x1001
  544. #define IME_ESC_GET_EUDC_DICTIONARY 0x1003
  545. #define IME_ESC_SET_EUDC_DICTIONARY 0x1004
  546. #define IME_ESC_MAX_KEY 0x1005
  547. #define IME_ESC_IME_NAME 0x1006
  548. #define IME_ESC_SYNC_HOTKEY 0x1007
  549. #define IME_ESC_HANJA_MODE 0x1008
  550. #define IME_ESC_AUTOMATA 0x1009
  551. #define IME_ESC_PRIVATE_HOTKEY 0x100a
  552. #define IME_ESC_GETHELPFILENAME 0x100b
  553. // style of word registration
  554. #define IME_REGWORD_STYLE_EUDC 0x00000001
  555. #define IME_REGWORD_STYLE_USER_FIRST 0x80000000
  556. #define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
  557. #if (WINVER >= 0x040A)
  558. // dwFlags for ImmAssociateContextEx
  559. #define IACE_CHILDREN 0x0001
  560. #define IACE_DEFAULT 0x0010
  561. #define IACE_IGNORENOCONTEXT 0x0020
  562. // dwFlags for ImmGetImeMenuItems
  563. #define IGIMIF_RIGHTMENU 0x0001
  564. // dwType for ImmGetImeMenuItems
  565. #define IGIMII_CMODE 0x0001
  566. #define IGIMII_SMODE 0x0002
  567. #define IGIMII_CONFIGURE 0x0004
  568. #define IGIMII_TOOLS 0x0008
  569. #define IGIMII_HELP 0x0010
  570. #define IGIMII_OTHER 0x0020
  571. #define IGIMII_INPUTTOOLS 0x0040
  572. // fType of IMEMENUITEMINFO structure
  573. #define IMFT_RADIOCHECK 0x00001
  574. #define IMFT_SEPARATOR 0x00002
  575. #define IMFT_SUBMENU 0x00004
  576. // fState of IMEMENUITEMINFO structure
  577. #define IMFS_GRAYED MFS_GRAYED
  578. #define IMFS_DISABLED MFS_DISABLED
  579. #define IMFS_CHECKED MFS_CHECKED
  580. #define IMFS_HILITE MFS_HILITE
  581. #define IMFS_ENABLED MFS_ENABLED
  582. #define IMFS_UNCHECKED MFS_UNCHECKED
  583. #define IMFS_UNHILITE MFS_UNHILITE
  584. #define IMFS_DEFAULT MFS_DEFAULT
  585. #endif /* WINVER >= 0x040A */
  586. // type of soft keyboard
  587. // for Windows Tranditional Chinese Edition
  588. #define SOFTKEYBOARD_TYPE_T1 0x0001
  589. // for Windows Simplified Chinese Edition
  590. #define SOFTKEYBOARD_TYPE_C1 0x0002
  591. #endif // _IMM_SDK_DEFINED_
  592. #ifndef _IMM_DDK_DEFINED_
  593. #define _IMM_DDK_DEFINED_
  594. typedef struct tagCOMPOSITIONSTRING {
  595. DWORD dwSize;
  596. DWORD dwCompReadAttrLen;
  597. DWORD dwCompReadAttrOffset;
  598. DWORD dwCompReadClauseLen;
  599. DWORD dwCompReadClauseOffset;
  600. DWORD dwCompReadStrLen;
  601. DWORD dwCompReadStrOffset;
  602. DWORD dwCompAttrLen;
  603. DWORD dwCompAttrOffset;
  604. DWORD dwCompClauseLen;
  605. DWORD dwCompClauseOffset;
  606. DWORD dwCompStrLen;
  607. DWORD dwCompStrOffset;
  608. DWORD dwCursorPos;
  609. DWORD dwDeltaStart;
  610. DWORD dwResultReadClauseLen;
  611. DWORD dwResultReadClauseOffset;
  612. DWORD dwResultReadStrLen;
  613. DWORD dwResultReadStrOffset;
  614. DWORD dwResultClauseLen;
  615. DWORD dwResultClauseOffset;
  616. DWORD dwResultStrLen;
  617. DWORD dwResultStrOffset;
  618. DWORD dwPrivateSize;
  619. DWORD dwPrivateOffset;
  620. } COMPOSITIONSTRING, *PCOMPOSITIONSTRING, NEAR *NPCOMPOSITIONSTRING, FAR *LPCOMPOSITIONSTRING;
  621. typedef struct tagGUIDELINE {
  622. DWORD dwSize;
  623. DWORD dwLevel;
  624. DWORD dwIndex;
  625. DWORD dwStrLen;
  626. DWORD dwStrOffset;
  627. DWORD dwPrivateSize;
  628. DWORD dwPrivateOffset;
  629. } GUIDELINE, *PGUIDELINE, NEAR *NPGUIDELINE, FAR *LPGUIDELINE;
  630. #if (WINVER >= 0x040A)
  631. typedef struct tagTRANSMSG {
  632. UINT message;
  633. WPARAM wParam;
  634. LPARAM lParam;
  635. } TRANSMSG, *PTRANSMSG, NEAR *NPTRANSMSG, FAR *LPTRANSMSG;
  636. typedef struct tagTRANSMSGLIST {
  637. UINT uMsgCount;
  638. TRANSMSG TransMsg[1];
  639. } TRANSMSGLIST, *PTRANSMSGLIST, NEAR *NPTRANSMSGLIST, FAR *LPTRANSMSGLIST;
  640. #endif /* WINVER >= 0x040A */
  641. typedef struct tagCANDIDATEINFO {
  642. DWORD dwSize;
  643. DWORD dwCount;
  644. DWORD dwOffset[32];
  645. DWORD dwPrivateSize;
  646. DWORD dwPrivateOffset;
  647. } CANDIDATEINFO, *PCANDIDATEINFO, NEAR *NPCANDIDATEINFO, FAR *LPCANDIDATEINFO;
  648. typedef struct tagINPUTCONTEXT {
  649. HWND hWnd;
  650. BOOL fOpen;
  651. POINT ptStatusWndPos;
  652. POINT ptSoftKbdPos;
  653. DWORD fdwConversion;
  654. DWORD fdwSentence;
  655. union {
  656. LOGFONTA A;
  657. LOGFONTW W;
  658. } lfFont;
  659. COMPOSITIONFORM cfCompForm;
  660. CANDIDATEFORM cfCandForm[4];
  661. HIMCC hCompStr;
  662. HIMCC hCandInfo;
  663. HIMCC hGuideLine;
  664. HIMCC hPrivate;
  665. DWORD dwNumMsgBuf;
  666. HIMCC hMsgBuf;
  667. DWORD fdwInit;
  668. DWORD dwReserve[3];
  669. } INPUTCONTEXT, *PINPUTCONTEXT, NEAR *NPINPUTCONTEXT, FAR *LPINPUTCONTEXT;
  670. typedef struct tagIMEINFO {
  671. DWORD dwPrivateDataSize;
  672. DWORD fdwProperty;
  673. DWORD fdwConversionCaps;
  674. DWORD fdwSentenceCaps;
  675. DWORD fdwUICaps;
  676. DWORD fdwSCSCaps;
  677. DWORD fdwSelectCaps;
  678. } IMEINFO, *PIMEINFO, NEAR *NPIMEINFO, FAR *LPIMEINFO;
  679. typedef struct tagSOFTKBDDATA {
  680. UINT uCount;
  681. WORD wCode[1][256];
  682. } SOFTKBDDATA, *PSOFTKBDDATA, NEAR *NPSOFTKBDDATA, FAR * LPSOFTKBDDATA;
  683. BOOL WINAPI ImmGetHotKey(IN DWORD, OUT LPUINT lpuModifiers, OUT LPUINT lpuVKey, OUT LPHKL);
  684. BOOL WINAPI ImmSetHotKey(IN DWORD, IN UINT, IN UINT, IN HKL);
  685. BOOL WINAPI ImmGenerateMessage(IN HIMC);
  686. #if (WINVER >= 0x040A)
  687. LRESULT WINAPI ImmRequestMessageA(IN HIMC, IN WPARAM, IN LPARAM);
  688. LRESULT WINAPI ImmRequestMessageW(IN HIMC, IN WPARAM, IN LPARAM);
  689. #ifdef UNICODE
  690. #define ImmRequestMessage ImmRequestMessageW
  691. #else
  692. #define ImmRequestMessage ImmRequestMessageA
  693. #endif // !UNICODE
  694. #endif /* WINVER >= 0x040A */
  695. //
  696. // Prototype of soft keyboard APIs
  697. //
  698. HWND WINAPI ImmCreateSoftKeyboard(IN UINT, IN HWND, IN int, IN int);
  699. BOOL WINAPI ImmDestroySoftKeyboard(IN HWND);
  700. BOOL WINAPI ImmShowSoftKeyboard(IN HWND, IN int);
  701. LPINPUTCONTEXT WINAPI ImmLockIMC(IN HIMC);
  702. BOOL WINAPI ImmUnlockIMC(IN HIMC);
  703. DWORD WINAPI ImmGetIMCLockCount(IN HIMC);
  704. HIMCC WINAPI ImmCreateIMCC(IN DWORD);
  705. HIMCC WINAPI ImmDestroyIMCC(IN HIMCC);
  706. LPVOID WINAPI ImmLockIMCC(IN HIMCC);
  707. BOOL WINAPI ImmUnlockIMCC(IN HIMCC);
  708. DWORD WINAPI ImmGetIMCCLockCount(IN HIMCC);
  709. HIMCC WINAPI ImmReSizeIMCC(IN HIMCC, IN DWORD);
  710. DWORD WINAPI ImmGetIMCCSize(IN HIMCC);
  711. // the window extra offset
  712. #define IMMGWL_IMC 0
  713. #define IMMGWL_PRIVATE (sizeof(LONG))
  714. #ifdef _WIN64
  715. #undef IMMGWL_IMC
  716. #undef IMMGWL_PRIVATE
  717. #endif /* _WIN64 */
  718. #define IMMGWLP_IMC 0
  719. #define IMMGWLP_PRIVATE (sizeof(LONG_PTR))
  720. // for NI_CONTEXTUPDATED
  721. #define IMC_SETCONVERSIONMODE 0x0002
  722. #define IMC_SETSENTENCEMODE 0x0004
  723. #define IMC_SETOPENSTATUS 0x0006
  724. // wParam for WM_IME_CONTROL to the soft keyboard
  725. #define IMC_GETSOFTKBDFONT 0x0011
  726. #define IMC_SETSOFTKBDFONT 0x0012
  727. #define IMC_GETSOFTKBDPOS 0x0013
  728. #define IMC_SETSOFTKBDPOS 0x0014
  729. #define IMC_GETSOFTKBDSUBTYPE 0x0015
  730. #define IMC_SETSOFTKBDSUBTYPE 0x0016
  731. #define IMC_SETSOFTKBDDATA 0x0018
  732. // dwAction for ImmNotifyIME
  733. #define NI_CONTEXTUPDATED 0x0003
  734. // dwSystemInfoFlags bits
  735. #define IME_SYSINFO_WINLOGON 0x0001
  736. #define IME_SYSINFO_WOW16 0x0002
  737. #define GCS_COMP (GCS_COMPSTR|GCS_COMPATTR|GCS_COMPCLAUSE)
  738. #define GCS_COMPREAD (GCS_COMPREADSTR|GCS_COMPREADATTR |GCS_COMPREADCLAUSE)
  739. #define GCS_RESULT (GCS_RESULTSTR|GCS_RESULTCLAUSE)
  740. #define GCS_RESULTREAD (GCS_RESULTREADSTR|GCS_RESULTREADCLAUSE)
  741. // bits of fdwInit of INPUTCONTEXT
  742. #define INIT_STATUSWNDPOS 0x00000001
  743. #define INIT_CONVERSION 0x00000002
  744. #define INIT_SENTENCE 0x00000004
  745. #define INIT_LOGFONT 0x00000008
  746. #define INIT_COMPFORM 0x00000010
  747. #define INIT_SOFTKBDPOS 0x00000020
  748. // IME property bits
  749. #define IME_PROP_END_UNLOAD 0x00000001
  750. #define IME_PROP_KBD_CHAR_FIRST 0x00000002
  751. #define IME_PROP_IGNORE_UPKEYS 0x00000004
  752. #define IME_PROP_NEED_ALTKEY 0x00000008
  753. #define IME_PROP_NO_KEYS_ON_CLOSE 0x00000010
  754. #define IME_PROP_ACCEPT_WIDE_VKEY 0x00000020
  755. // IME UICapability bits
  756. #define UI_CAP_SOFTKBD 0x00010000
  757. #define IMN_SOFTKBDDESTROYED 0x0011
  758. // flags for ImmEscape
  759. // prototype of IME APIs
  760. BOOL WINAPI ImeInquire(IN LPIMEINFO, OUT LPTSTR lpszUIClass, IN DWORD dwSystemInfoFlags);
  761. BOOL WINAPI ImeConfigure(IN HKL, IN HWND, IN DWORD, IN LPVOID);
  762. DWORD WINAPI ImeConversionList(HIMC, LPCTSTR, LPCANDIDATELIST, DWORD dwBufLen, UINT uFlag);
  763. BOOL WINAPI ImeDestroy(UINT);
  764. LRESULT WINAPI ImeEscape(HIMC, UINT, LPVOID);
  765. BOOL WINAPI ImeProcessKey(IN HIMC, IN UINT, IN LPARAM, IN CONST LPBYTE);
  766. BOOL WINAPI ImeSelect(IN HIMC, IN BOOL);
  767. BOOL WINAPI ImeSetActiveContext(IN HIMC, IN BOOL);
  768. #if (WINVER >= 0x040A)
  769. UINT WINAPI ImeToAsciiEx(IN UINT uVirtKey, IN UINT uScaCode, IN CONST LPBYTE lpbKeyState, OUT LPTRANSMSGLIST lpTransBuf, IN UINT fuState, IN HIMC);
  770. #else
  771. UINT WINAPI ImeToAsciiEx(IN UINT uVirtKey, IN UINT uScaCode, IN CONST LPBYTE lpbKeyState, OUT LPDWORD lpdwTransBuf, IN UINT fuState, IN HIMC);
  772. #endif /* WINVER >= 0x040A */
  773. BOOL WINAPI NotifyIME(IN HIMC, IN DWORD, IN DWORD, IN DWORD);
  774. BOOL WINAPI ImeRegisterWord(IN LPCTSTR, IN DWORD, IN LPCTSTR);
  775. BOOL WINAPI ImeUnregisterWord(IN LPCTSTR, IN DWORD, IN LPCTSTR);
  776. UINT WINAPI ImeGetRegisterWordStyle(IN UINT nItem, OUT LPSTYLEBUF);
  777. UINT WINAPI ImeEnumRegisterWord(IN REGISTERWORDENUMPROC, IN LPCTSTR, IN DWORD, IN LPCTSTR, IN LPVOID);
  778. BOOL WINAPI ImeSetCompositionString(IN HIMC, IN DWORD dwIndex, IN LPVOID lpComp, IN DWORD, IN LPVOID lpRead, IN DWORD);
  779. #endif // _IMM_DDK_DEFINED_
  780. #ifdef __cplusplus
  781. }
  782. #endif
  783. #endif // _IMMDEV_