Source code of Windows XP (NT5)
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.

1269 lines
44 KiB

  1. ;null
  2. ########################################################################
  3. # imm.w -- IMM global header file for Windows NT5
  4. #
  5. # Copyright (c) Microsoft Corporation. All rights reserved.
  6. #
  7. # In the effort of cleaning up imm headers:
  8. #
  9. # Three header files are generated from this file:
  10. #
  11. # --------+----------+-------------------------------------------
  12. # TAG | header | role
  13. # --------+----------+-------------------------------------------
  14. # public | imm.x | SDK public header file
  15. # immdev | immdev.x | DDK header for IME developers
  16. # internal| immp.x | private header file for IMM32 and system
  17. # | | components
  18. # --------+----------+-------------------------------------------
  19. #
  20. # Shall be processed by hdevide.exe
  21. #
  22. # Imm.h portion is protected by _IMM_SDK_DEFINED_.
  23. # Immdev.h portion is protected by _IMM_DDK_DEFINED_.
  24. # Immp.h portion is not protected, since it's the final header.
  25. #
  26. # Immdev.x has all the definitions and the declarations in imm.x.
  27. # Immp.x has all definitions and declarations in imm.x and
  28. # the most of immdev.x.
  29. #
  30. # Since immdev.h and immp.h have some conflicts, not all of
  31. # immdev.h is not in immp.h. The system components should not include
  32. # immdev.h.
  33. #
  34. # Nov, 1998 Hiro Yamamoto
  35. ########################################################################
  36. ;imm
  37. /**********************************************************************/
  38. /* imm.h - Input Method Manager definitions */
  39. /* */
  40. /* Copyright (c) Microsoft Corporation. All rights reserved. */
  41. /**********************************************************************/
  42. #ifndef _IMM_
  43. #define _IMM_
  44. ;immdev
  45. /**********************************************************************/
  46. /* immdev.h - Input Method Manager definitions */
  47. /* for IME developers */
  48. /* */
  49. /* Copyright (c) Microsoft Corporation. All rights reserved. */
  50. /**********************************************************************/
  51. #ifndef _IMMDEV_
  52. #define _IMMDEV_
  53. ;internal
  54. /*++ BUILD Version: 0002 // Increment this if a change has global effects
  55. *
  56. * Copyright (c) Microsoft Corporation. All rights reserved.
  57. *
  58. * Module Name:
  59. *
  60. * immp.h
  61. *
  62. * Abstract:
  63. *
  64. * Private
  65. * Procedure declarations, constant definitions and macros for IMM.
  66. *
  67. */
  68. #ifndef _IMMP_
  69. #define _IMMP_
  70. ;all
  71. #ifdef __cplusplus
  72. extern "C" {
  73. #endif
  74. ;null
  75. ########################################################################
  76. # Reference starts from here
  77. ########################################################################
  78. ;all
  79. ;reference_start
  80. ;null
  81. ########################################################################
  82. # Insersion section
  83. ########################################################################
  84. ;immdev
  85. ;insert_imm
  86. ;internal
  87. ;insert_immdev
  88. ;all
  89. ;imm
  90. #ifndef _IMM_SDK_DEFINED_
  91. #define _IMM_SDK_DEFINED_
  92. ;immdev
  93. #ifndef _IMM_DDK_DEFINED_
  94. #define _IMM_DDK_DEFINED_
  95. ;all
  96. ;public
  97. ;begin_winver_40A
  98. DECLARE_HANDLE(HIMC);
  99. DECLARE_HANDLE(HIMCC);
  100. ;else
  101. typedef DWORD HIMC;
  102. typedef DWORD HIMCC;
  103. ;end_winver_40A
  104. typedef HKL FAR *LPHKL;
  105. typedef UINT FAR *LPUINT;
  106. typedef struct tagCOMPOSITIONFORM {
  107. DWORD dwStyle;
  108. POINT ptCurrentPos;
  109. RECT rcArea;
  110. } COMPOSITIONFORM, *PCOMPOSITIONFORM, NEAR *NPCOMPOSITIONFORM, FAR *LPCOMPOSITIONFORM;
  111. typedef struct tagCANDIDATEFORM {
  112. DWORD dwIndex;
  113. DWORD dwStyle;
  114. POINT ptCurrentPos;
  115. RECT rcArea;
  116. } CANDIDATEFORM, *PCANDIDATEFORM, NEAR *NPCANDIDATEFORM, FAR *LPCANDIDATEFORM;
  117. ;immdev
  118. typedef struct tagCOMPOSITIONSTRING {
  119. DWORD dwSize;
  120. DWORD dwCompReadAttrLen;
  121. DWORD dwCompReadAttrOffset;
  122. DWORD dwCompReadClauseLen;
  123. DWORD dwCompReadClauseOffset;
  124. DWORD dwCompReadStrLen;
  125. DWORD dwCompReadStrOffset;
  126. DWORD dwCompAttrLen;
  127. DWORD dwCompAttrOffset;
  128. DWORD dwCompClauseLen;
  129. DWORD dwCompClauseOffset;
  130. DWORD dwCompStrLen;
  131. DWORD dwCompStrOffset;
  132. DWORD dwCursorPos;
  133. DWORD dwDeltaStart;
  134. DWORD dwResultReadClauseLen;
  135. DWORD dwResultReadClauseOffset;
  136. DWORD dwResultReadStrLen;
  137. DWORD dwResultReadStrOffset;
  138. DWORD dwResultClauseLen;
  139. DWORD dwResultClauseOffset;
  140. DWORD dwResultStrLen;
  141. DWORD dwResultStrOffset;
  142. DWORD dwPrivateSize;
  143. DWORD dwPrivateOffset;
  144. } COMPOSITIONSTRING, *PCOMPOSITIONSTRING, NEAR *NPCOMPOSITIONSTRING, FAR *LPCOMPOSITIONSTRING;
  145. ;immdev
  146. typedef struct tagGUIDELINE {
  147. DWORD dwSize;
  148. DWORD dwLevel;
  149. DWORD dwIndex;
  150. DWORD dwStrLen;
  151. DWORD dwStrOffset;
  152. DWORD dwPrivateSize;
  153. DWORD dwPrivateOffset;
  154. } GUIDELINE, *PGUIDELINE, NEAR *NPGUIDELINE, FAR *LPGUIDELINE;
  155. ;public
  156. typedef struct tagCANDIDATELIST {
  157. DWORD dwSize;
  158. DWORD dwStyle;
  159. DWORD dwCount;
  160. DWORD dwSelection;
  161. DWORD dwPageStart;
  162. DWORD dwPageSize;
  163. DWORD dwOffset[1];
  164. } CANDIDATELIST, *PCANDIDATELIST, NEAR *NPCANDIDATELIST, FAR *LPCANDIDATELIST;
  165. ;public
  166. typedef struct tagREGISTERWORD% {
  167. LPTSTR% lpReading;
  168. LPTSTR% lpWord;
  169. } REGISTERWORD%, *PREGISTERWORD%, NEAR *NPREGISTERWORD%, FAR *LPREGISTERWORD%;
  170. ;immdev
  171. ;begin_winver_40a
  172. typedef struct tagTRANSMSG {
  173. UINT message;
  174. WPARAM wParam;
  175. LPARAM lParam;
  176. } TRANSMSG, *PTRANSMSG, NEAR *NPTRANSMSG, FAR *LPTRANSMSG;
  177. typedef struct tagTRANSMSGLIST {
  178. UINT uMsgCount;
  179. TRANSMSG TransMsg[1];
  180. } TRANSMSGLIST, *PTRANSMSGLIST, NEAR *NPTRANSMSGLIST, FAR *LPTRANSMSGLIST;
  181. ;end
  182. ;public
  183. ;begin_winver_40a
  184. typedef struct tagRECONVERTSTRING {
  185. DWORD dwSize;
  186. DWORD dwVersion;
  187. DWORD dwStrLen;
  188. DWORD dwStrOffset;
  189. DWORD dwCompStrLen;
  190. DWORD dwCompStrOffset;
  191. DWORD dwTargetStrLen;
  192. DWORD dwTargetStrOffset;
  193. } RECONVERTSTRING, *PRECONVERTSTRING, NEAR *NPRECONVERTSTRING, FAR *LPRECONVERTSTRING;
  194. ;end_winver_40a
  195. ;immdev
  196. typedef struct tagCANDIDATEINFO {
  197. DWORD dwSize;
  198. DWORD dwCount;
  199. DWORD dwOffset[32];
  200. DWORD dwPrivateSize;
  201. DWORD dwPrivateOffset;
  202. } CANDIDATEINFO, *PCANDIDATEINFO, NEAR *NPCANDIDATEINFO, FAR *LPCANDIDATEINFO;
  203. ;immdev
  204. ;reference_end
  205. ;immdev;internal
  206. #if defined(_WINGDI_) && !defined(NOGDI) @Internal
  207. typedef struct tagINPUTCONTEXT {
  208. HWND hWnd;
  209. BOOL fOpen;
  210. POINT ptStatusWndPos;
  211. POINT ptSoftKbdPos;
  212. DWORD fdwConversion;
  213. DWORD fdwSentence;
  214. union {
  215. LOGFONTA A;
  216. LOGFONTW W;
  217. } lfFont;
  218. COMPOSITIONFORM cfCompForm;
  219. CANDIDATEFORM cfCandForm[4];
  220. HIMCC hCompStr;
  221. HIMCC hCandInfo;
  222. HIMCC hGuideLine;
  223. HIMCC hPrivate;
  224. DWORD dwNumMsgBuf;
  225. HIMCC hMsgBuf;
  226. DWORD fdwInit;
  227. DWORD dwReserve[3];
  228. UINT uSavedVKey; @Internal
  229. BOOL fChgMsg; @Internal
  230. DWORD fdwFlags; @Internal
  231. DWORD fdw31Compat; @Internal
  232. DWORD dwRefCount; @Internal
  233. PVOID pImeModeSaver; @Internal
  234. DWORD fdwDirty; @Internal
  235. #ifdef CUAS_ENABLE @Internal
  236. HIMCC hCtfImeContext; @Internal
  237. #endif // CUAS_ENABLE @Internal
  238. } INPUTCONTEXT, *PINPUTCONTEXT, NEAR *NPINPUTCONTEXT, FAR *LPINPUTCONTEXT;
  239. #endif @Internal
  240. ;immdev
  241. ;reference_start
  242. ;immdev
  243. typedef struct tagIMEINFO {
  244. DWORD dwPrivateDataSize;
  245. DWORD fdwProperty;
  246. DWORD fdwConversionCaps;
  247. DWORD fdwSentenceCaps;
  248. DWORD fdwUICaps;
  249. DWORD fdwSCSCaps;
  250. DWORD fdwSelectCaps;
  251. } IMEINFO, *PIMEINFO, NEAR *NPIMEINFO, FAR *LPIMEINFO;
  252. ;public
  253. #define STYLE_DESCRIPTION_SIZE 32
  254. typedef struct tagSTYLEBUF% {
  255. DWORD dwStyle;
  256. TCHAR% szDescription[STYLE_DESCRIPTION_SIZE];
  257. } STYLEBUF%, *PSTYLEBUF%, NEAR *NPSTYLEBUF%, FAR *LPSTYLEBUF%;
  258. typedef struct tagSOFTKBDDATA { @immdev
  259. UINT uCount; @immdev
  260. WORD wCode[1][256]; @immdev
  261. } SOFTKBDDATA, *PSOFTKBDDATA, NEAR *NPSOFTKBDDATA, FAR * LPSOFTKBDDATA; @immdev
  262. @immdev
  263. @immdev
  264. ;public
  265. ;begin_winver_40a
  266. #define IMEMENUITEM_STRING_SIZE 80
  267. typedef struct tagIMEMENUITEMINFO% {
  268. UINT cbSize;
  269. UINT fType;
  270. UINT fState;
  271. UINT wID;
  272. HBITMAP hbmpChecked;
  273. HBITMAP hbmpUnchecked;
  274. DWORD dwItemData;
  275. TCHAR% szString[IMEMENUITEM_STRING_SIZE];
  276. HBITMAP hbmpItem;
  277. } IMEMENUITEMINFO%, *PIMEMENUITEMINFO%, NEAR *NPIMEMENUITEMINFO%, FAR *LPIMEMENUITEMINFO%;
  278. typedef struct tagIMECHARPOSITION {
  279. DWORD dwSize;
  280. DWORD dwCharPos;
  281. POINT pt;
  282. UINT cLineHeight;
  283. RECT rcDocument;
  284. } IMECHARPOSITION, *PIMECHARPOSITION, NEAR *NPIMECHARPOSITION, FAR *LPIMECHARPOSITION;
  285. typedef BOOL (CALLBACK* IMCENUMPROC)(HIMC, LPARAM);
  286. ;end_winver_40a
  287. ;internal
  288. #ifdef CUAS_ENABLE
  289. /////////////////////////////////////////////////////////////////////////////
  290. // GUID attribute (IME share)
  291. // COMPOSITIONSTRING->dwPrivateSize = sizeof(GUIDMAPATTRIBUTE) + actual data array.
  292. // GUIDMAPATTRIBUTE* = GetOffset(COMPOSITIONSTRING->dwPrivateOffset)
  293. typedef struct tagGUIDMAPATTRIBUTE {
  294. //
  295. // IME share of GUID map attribute.
  296. //
  297. DWORD dwTfGuidAtomLen;
  298. DWORD dwTfGuidAtomOffset; // Offset based on GUIDMAPATTRIBUTE struct.
  299. //
  300. DWORD dwGuidMapAttrLen;
  301. DWORD dwGuidMapAttrOffset; // Offset based on GUIDMAPATTRIBUTE struct.
  302. } GUIDMAPATTRIBUTE, *PGUIDMAPATTRIBUTE;
  303. #endif // CUAS_ENABLE
  304. ;public
  305. // prototype of IMM API
  306. HKL WINAPI ImmInstallIME%(IN LPCTSTR% lpszIMEFileName, IN LPCTSTR% lpszLayoutText);
  307. HWND WINAPI ImmGetDefaultIMEWnd(IN HWND);
  308. UINT WINAPI ImmGetDescription%(IN HKL, OUT LPTSTR%, IN UINT uBufLen);
  309. UINT WINAPI ImmGetIMEFileName%(IN HKL, OUT LPTSTR%, IN UINT uBufLen);
  310. DWORD WINAPI ImmGetProperty(IN HKL, IN DWORD);
  311. BOOL WINAPI ImmIsIME(IN HKL);
  312. BOOL WINAPI ImmGetHotKey(IN DWORD, OUT LPUINT lpuModifiers, OUT LPUINT lpuVKey, OUT LPHKL); @immdev
  313. BOOL WINAPI ImmSetHotKey(IN DWORD, IN UINT, IN UINT, IN HKL); @immdev
  314. BOOL WINAPI ImmSimulateHotKey(IN HWND, IN DWORD);
  315. HIMC WINAPI ImmCreateContext(void);
  316. BOOL WINAPI ImmDestroyContext(IN HIMC);
  317. HIMC WINAPI ImmGetContext(IN HWND);
  318. BOOL WINAPI ImmReleaseContext(IN HWND, IN HIMC);
  319. HIMC WINAPI ImmAssociateContext(IN HWND, IN HIMC);
  320. ;begin_winver_40a
  321. BOOL WINAPI ImmAssociateContextEx(IN HWND, IN HIMC, IN DWORD);
  322. ;end_winver_40a
  323. LONG WINAPI ImmGetCompositionString%(IN HIMC, IN DWORD, OUT LPVOID, IN DWORD);
  324. BOOL WINAPI ImmSetCompositionString%(IN HIMC, IN DWORD dwIndex, IN LPVOID lpComp, IN DWORD, IN LPVOID lpRead, IN DWORD);
  325. DWORD WINAPI ImmGetCandidateListCount%(IN HIMC, OUT LPDWORD lpdwListCount);
  326. DWORD WINAPI ImmGetCandidateList%(IN HIMC, IN DWORD deIndex, OUT LPCANDIDATELIST, IN DWORD dwBufLen);
  327. DWORD WINAPI ImmGetGuideLine%(IN HIMC, IN DWORD dwIndex, OUT LPTSTR%, IN DWORD dwBufLen);
  328. BOOL WINAPI ImmGetConversionStatus(IN HIMC, OUT LPDWORD, OUT LPDWORD);
  329. BOOL WINAPI ImmSetConversionStatus(IN HIMC, IN DWORD, IN DWORD);
  330. BOOL WINAPI ImmGetOpenStatus(IN HIMC);
  331. BOOL WINAPI ImmSetOpenStatus(IN HIMC, IN BOOL);
  332. #if defined(_WINGDI_) && !defined(NOGDI)
  333. BOOL WINAPI ImmGetCompositionFont%(IN HIMC, OUT LPLOGFONT%);
  334. BOOL WINAPI ImmSetCompositionFont%(IN HIMC, IN LPLOGFONT%);
  335. #endif // defined(_WINGDI_) && !defined(NOGDI)
  336. BOOL WINAPI ImmConfigureIME%(IN HKL, IN HWND, IN DWORD, IN LPVOID);
  337. LRESULT WINAPI ImmEscape%(IN HKL, IN HIMC, IN UINT, IN LPVOID);
  338. DWORD WINAPI ImmGetConversionList%(IN HKL, IN HIMC, IN LPCTSTR%, OUT LPCANDIDATELIST, IN DWORD dwBufLen, IN UINT uFlag);
  339. BOOL WINAPI ImmNotifyIME(IN HIMC, IN DWORD dwAction, IN DWORD dwIndex, IN DWORD dwValue);
  340. BOOL WINAPI ImmGetStatusWindowPos(IN HIMC, OUT LPPOINT);
  341. BOOL WINAPI ImmSetStatusWindowPos(IN HIMC, IN LPPOINT);
  342. BOOL WINAPI ImmGetCompositionWindow(IN HIMC, OUT LPCOMPOSITIONFORM);
  343. BOOL WINAPI ImmSetCompositionWindow(IN HIMC, IN LPCOMPOSITIONFORM);
  344. BOOL WINAPI ImmGetCandidateWindow(IN HIMC, IN DWORD, OUT LPCANDIDATEFORM);
  345. BOOL WINAPI ImmSetCandidateWindow(IN HIMC, IN LPCANDIDATEFORM);
  346. BOOL WINAPI ImmIsUIMessage%(IN HWND, IN UINT, IN WPARAM, IN LPARAM);
  347. BOOL WINAPI ImmGenerateMessage(IN HIMC); @immdev
  348. UINT WINAPI ImmGetVirtualKey(IN HWND);
  349. typedef int (CALLBACK *REGISTERWORDENUMPROC%)(LPCTSTR%, DWORD, LPCTSTR%, LPVOID);
  350. BOOL WINAPI ImmRegisterWord%(IN HKL, IN LPCTSTR% lpszReading, IN DWORD, IN LPCTSTR% lpszRegister);
  351. BOOL WINAPI ImmUnregisterWord%(IN HKL, IN LPCTSTR% lpszReading, IN DWORD, IN LPCTSTR% lpszUnregister);
  352. UINT WINAPI ImmGetRegisterWordStyle%(IN HKL, IN UINT nItem, OUT LPSTYLEBUF%);
  353. UINT WINAPI ImmEnumRegisterWord%(IN HKL, IN REGISTERWORDENUMPROC%, IN LPCTSTR% lpszReading, IN DWORD, IN LPCTSTR% lpszRegister, IN LPVOID);
  354. ;begin_winver_40a
  355. BOOL WINAPI ImmDisableIME(IN DWORD);
  356. BOOL WINAPI ImmEnumInputContext(DWORD idThread, IMCENUMPROC lpfn, LPARAM lParam);
  357. DWORD WINAPI ImmGetImeMenuItems%(IN HIMC, IN DWORD, IN DWORD, OUT LPIMEMENUITEMINFO%, OUT LPIMEMENUITEMINFO%, IN DWORD);
  358. BOOL WINAPI ImmDisableTextFrameService(DWORD idThread);
  359. ;end_winver_40a
  360. ;immdev
  361. ;begin_winver_40a
  362. LRESULT WINAPI ImmRequestMessage%(IN HIMC, IN WPARAM, IN LPARAM);
  363. ;end_winver_40a
  364. ;immdev
  365. //
  366. // Prototype of soft keyboard APIs
  367. //
  368. HWND WINAPI ImmCreateSoftKeyboard(IN UINT, IN HWND, IN int, IN int);
  369. BOOL WINAPI ImmDestroySoftKeyboard(IN HWND);
  370. BOOL WINAPI ImmShowSoftKeyboard(IN HWND, IN int);
  371. ;immdev
  372. ;reference_end
  373. #if defined(_WINGDI_) && !defined(NOGDI) @internal
  374. LPINPUTCONTEXT WINAPI ImmLockIMC(IN HIMC);
  375. LPINPUTCONTEXT WINAPI ImmLockIMC(IN HIMC); @internal
  376. ;reference_start
  377. BOOL WINAPI ImmUnlockIMC(IN HIMC);
  378. DWORD WINAPI ImmGetIMCLockCount(IN HIMC);
  379. HIMCC WINAPI ImmCreateIMCC(IN DWORD);
  380. HIMCC WINAPI ImmDestroyIMCC(IN HIMCC);
  381. LPVOID WINAPI ImmLockIMCC(IN HIMCC);
  382. BOOL WINAPI ImmUnlockIMCC(IN HIMCC);
  383. DWORD WINAPI ImmGetIMCCLockCount(IN HIMCC);
  384. HIMCC WINAPI ImmReSizeIMCC(IN HIMCC, IN DWORD);
  385. DWORD WINAPI ImmGetIMCCSize(IN HIMCC);
  386. #endif @internal
  387. ;internal
  388. ;begin_winver_40a
  389. #ifdef CUAS_ENABLE
  390. //
  391. // Prototype of Cicero Unaware
  392. //
  393. HRESULT WINAPI CtfImmGetGuidAtom(IN HIMC, IN BYTE, OUT DWORD*);
  394. BOOL WINAPI CtfImmIsGuidMapEnable(IN HIMC);
  395. BOOL WINAPI CtfImmIsCiceroEnabled();
  396. BOOL WINAPI CtfImmIsTextFrameServiceDisabled();
  397. BOOL WINAPI CtfImmIsCiceroStartedInThread();
  398. HRESULT WINAPI CtfImmSetCiceroStartInThread(BOOL fSet);
  399. UINT WINAPI GetKeyboardLayoutCP(HKL hKL);
  400. DWORD WINAPI ImmGetAppCompatFlags(HIMC hIMC);
  401. VOID WINAPI CtfImmSetAppCompatFlags(DWORD dwFlag);
  402. HRESULT WINAPI CtfAImmActivate(HMODULE* phMod);
  403. HRESULT WINAPI CtfAImmDeactivate(HMODULE hMod);
  404. BOOL WINAPI CtfImmGenerateMessage(IN HIMC, BOOL fSendMsg);
  405. #endif // CUAS_ENABLE
  406. ;end_winver_40a
  407. ;immdev
  408. // the window extra offset
  409. #define IMMGWL_IMC 0
  410. #define IMMGWL_PRIVATE (sizeof(LONG))
  411. #ifdef _WIN64
  412. #undef IMMGWL_IMC
  413. #undef IMMGWL_PRIVATE
  414. #endif /* _WIN64 */
  415. #define IMMGWLP_IMC 0
  416. #define IMMGWLP_PRIVATE (sizeof(LONG_PTR))
  417. ;public
  418. // wParam for WM_IME_CONTROL @+internal
  419. #define IMC_FIRST 0x0000 @internal
  420. @internal
  421. #define IMC_GETCANDIDATEPOS 0x0007
  422. #define IMC_SETCANDIDATEPOS 0x0008
  423. #define IMC_GETCOMPOSITIONFONT 0x0009
  424. #define IMC_SETCOMPOSITIONFONT 0x000A
  425. #define IMC_GETCOMPOSITIONWINDOW 0x000B
  426. #define IMC_SETCOMPOSITIONWINDOW 0x000C
  427. #define IMC_GETSTATUSWINDOWPOS 0x000F
  428. #define IMC_SETSTATUSWINDOWPOS 0x0010
  429. // 0x11 - 0x20 is reserved for soft keyboard @internal
  430. #define IMC_CLOSESTATUSWINDOW 0x0021
  431. #define IMC_OPENSTATUSWINDOW 0x0022
  432. @internal
  433. #define IMC_LAST 0x0022 @internal
  434. @internal
  435. ;internal
  436. // wParam for WM_IME_SYSTEM
  437. #define IMS_DESTROYWINDOW 0x0001
  438. #define IMS_IME31COMPATIBLE 0x0002
  439. #define IMS_SETOPENSTATUS 0x0003
  440. #define IMS_SETACTIVECONTEXT 0x0004
  441. #define IMS_CHANGE_SHOWSTAT 0x0005
  442. #define IMS_WINDOWPOS 0x0006
  443. #define IMS_SENDIMEMSG 0x0007
  444. #define IMS_SENDIMEMSGEX 0x0008
  445. #define IMS_SETCANDIDATEPOS 0x0009
  446. #define IMS_SETCOMPOSITIONFONT 0x000A
  447. #define IMS_SETCOMPOSITIONWINDOW 0x000B
  448. #define IMS_CHECKENABLE 0x000C
  449. #define IMS_CONFIGUREIME 0x000D
  450. #define IMS_CONTROLIMEMSG 0x000E
  451. #define IMS_SETOPENCLOSE 0x000F
  452. #define IMS_ISACTIVATED 0x0010
  453. #define IMS_UNLOADTHREADLAYOUT 0x0011
  454. #define IMS_LCHGREQUEST 0x0012
  455. #define IMS_SETSOFTKBDONOFF 0x0013
  456. #define IMS_GETCONVERSIONMODE 0x0014
  457. #define IMS_IMEHELP 0x0015
  458. #define IMS_IMENT35SENDAPPMSG 0x0016
  459. #define IMS_ACTIVATECONTEXT 0x0017
  460. #define IMS_DEACTIVATECONTEXT 0x0018
  461. #define IMS_ACTIVATETHREADLAYOUT 0x0019
  462. #define IMS_CLOSEPROPERTYWINDOW 0x001a
  463. #define IMS_OPENPROPERTYWINDOW 0x001b
  464. #define IMS_GETIMEMENU 0x001c
  465. #define IMS_ENDIMEMENU 0x001d
  466. #define IMS_GETCONTEXT 0x001e
  467. #define IMS_SENDNOTIFICATION 0x001f
  468. // IMS_SENDNOTIFICATION dirty bits for INPUTCONTEXT
  469. #define IMSS_UPDATE_OPEN 0x0001
  470. #define IMSS_UPDATE_CONVERSION 0x0002
  471. #define IMSS_UPDATE_SENTENCE 0x0004
  472. #define IMSS_INIT_OPEN 0x0100
  473. #define IMS_FINALIZE_COMPSTR 0x0020
  474. #ifdef CUAS_ENABLE
  475. #define IMS_LOADTHREADLAYOUT 0x0021
  476. #define IMS_SETLANGBAND 0x0023
  477. #define IMS_RESETLANGBAND 0x0024
  478. #endif // CUAS_ENABLE
  479. ;immdev
  480. // for NI_CONTEXTUPDATED @+internal
  481. #define IMC_GETCONVERSIONMODE 0x0001 @internal
  482. #define IMC_SETCONVERSIONMODE 0x0002 @immdev
  483. #define IMC_GETSENTENCEMODE 0x0003 @internal
  484. #define IMC_SETSENTENCEMODE 0x0004 @immdev
  485. #define IMC_GETOPENSTATUS 0x0005 @internal
  486. #define IMC_SETOPENSTATUS 0x0006 @immdev
  487. ;immdev
  488. // wParam for WM_IME_CONTROL to the soft keyboard
  489. #define IMC_GETSOFTKBDFONT 0x0011
  490. #define IMC_SETSOFTKBDFONT 0x0012
  491. #define IMC_GETSOFTKBDPOS 0x0013
  492. #define IMC_SETSOFTKBDPOS 0x0014
  493. #define IMC_GETSOFTKBDSUBTYPE 0x0015
  494. #define IMC_SETSOFTKBDSUBTYPE 0x0016
  495. #define IMC_SETSOFTKBDDATA 0x0018
  496. ;public
  497. // dwAction for ImmNotifyIME @+immdev
  498. #define NI_CONTEXTUPDATED 0x0003 @immdev
  499. #define NI_OPENCANDIDATE 0x0010
  500. #define NI_CLOSECANDIDATE 0x0011
  501. #define NI_SELECTCANDIDATESTR 0x0012
  502. #define NI_CHANGECANDIDATELIST 0x0013
  503. #define NI_FINALIZECONVERSIONRESULT 0x0014
  504. #define NI_COMPOSITIONSTR 0x0015
  505. #define NI_SETCANDIDATE_PAGESTART 0x0016
  506. #define NI_SETCANDIDATE_PAGESIZE 0x0017
  507. #define NI_IMEMENUSELECTED 0x0018
  508. // lParam for WM_IME_SETCONTEXT
  509. #define ISC_SHOWUICANDIDATEWINDOW 0x00000001
  510. #define ISC_SHOWUICOMPOSITIONWINDOW 0x80000000
  511. #define ISC_SHOWUIGUIDELINE 0x40000000
  512. #define ISC_SHOWUIALLCANDIDATEWINDOW 0x0000000F
  513. #define ISC_SHOWUIALL 0xC000000F
  514. // dwIndex for ImmNotifyIME/NI_COMPOSITIONSTR
  515. #define CPS_COMPLETE 0x0001
  516. #define CPS_CONVERT 0x0002
  517. #define CPS_REVERT 0x0003
  518. #define CPS_CANCEL 0x0004
  519. ;internal
  520. // the return bits of ImmProcessHotKey
  521. #define IPHK_HOTKEY 0x0001
  522. #define IPHK_PROCESSBYIME 0x0002
  523. #define IPHK_CHECKCTRL 0x0004
  524. // NT only
  525. #define IPHK_SKIPTHISKEY 0x0010
  526. ;public
  527. // the modifiers of hot key @+internal
  528. #define MOD_ALT 0x0001
  529. #define MOD_CONTROL 0x0002
  530. #define MOD_SHIFT 0x0004
  531. #define MOD_WIN 0x0008 @internal
  532. @+internal
  533. #define MOD_LEFT 0x8000
  534. #define MOD_RIGHT 0x4000
  535. #define MOD_ON_KEYUP 0x0800
  536. #define MOD_IGNORE_ALL_MODIFIER 0x0400
  537. ;public
  538. // Windows for Simplified Chinese Edition hot key ID from 0x10 - 0x2F
  539. // IME Hotkeys internal definitions @internal
  540. #define IME_CHOTKEY_FIRST 0x10 @internal
  541. #define IME_CHOTKEY_IME_NONIME_TOGGLE 0x10
  542. #define IME_CHOTKEY_SHAPE_TOGGLE 0x11
  543. #define IME_CHOTKEY_SYMBOL_TOGGLE 0x12
  544. #define IME_CHOTKEY_LAST 0x2f @internal
  545. // Windows for Japanese Edition hot key ID from 0x30 - 0x4F
  546. #define IME_JHOTKEY_FIRST 0x30 @internal
  547. #define IME_JHOTKEY_CLOSE_OPEN 0x30
  548. #define IME_JHOTKEY_LAST 0x4f @internal
  549. // Windows for Korean Edition hot key ID from 0x50 - 0x6F
  550. #define IME_KHOTKEY_FIRST 0x50 @internal
  551. #define IME_KHOTKEY_SHAPE_TOGGLE 0x50
  552. #define IME_KHOTKEY_HANJACONVERT 0x51
  553. #define IME_KHOTKEY_ENGLISH 0x52
  554. #define IME_KHOTKEY_LAST 0x6f @internal
  555. // Windows for Traditional Chinese Edition hot key ID from 0x70 - 0x8F
  556. #define IME_THOTKEY_FIRST 0x70 @internal
  557. #define IME_THOTKEY_IME_NONIME_TOGGLE 0x70
  558. #define IME_THOTKEY_SHAPE_TOGGLE 0x71
  559. #define IME_THOTKEY_SYMBOL_TOGGLE 0x72
  560. #define IME_THOTKEY_LAST 0x8f @internal
  561. // direct switch hot key ID from 0x100 - 0x11F
  562. #define IME_HOTKEY_DSWITCH_FIRST 0x100
  563. #define IME_HOTKEY_DSWITCH_LAST 0x11F
  564. // IME private hot key from 0x200 - 0x21F
  565. #define IME_HOTKEY_PRIVATE_FIRST 0x200
  566. #define IME_ITHOTKEY_RESEND_RESULTSTR 0x200
  567. #define IME_ITHOTKEY_PREVIOUS_COMPOSITION 0x201
  568. #define IME_ITHOTKEY_UISTYLE_TOGGLE 0x202
  569. #define IME_ITHOTKEY_RECONVERTSTRING 0x203
  570. #define IME_HOTKEY_PRIVATE_LAST 0x21F
  571. #define IME_INVALID_HOTKEY 0xffffffff @internal
  572. ;immdev
  573. // dwSystemInfoFlags bits
  574. #define IME_SYSINFO_WINLOGON 0x0001
  575. #define IME_SYSINFO_WOW16 0x0002
  576. ;public
  577. // parameter of ImmGetCompositionString
  578. #define GCS_COMPREADSTR 0x0001
  579. #define GCS_COMPREADATTR 0x0002
  580. #define GCS_COMPREADCLAUSE 0x0004
  581. #define GCS_COMPSTR 0x0008
  582. #define GCS_COMPATTR 0x0010
  583. #define GCS_COMPCLAUSE 0x0020
  584. #define GCS_CURSORPOS 0x0080
  585. #define GCS_DELTASTART 0x0100
  586. #define GCS_RESULTREADSTR 0x0200
  587. #define GCS_RESULTREADCLAUSE 0x0400
  588. #define GCS_RESULTSTR 0x0800
  589. #define GCS_RESULTCLAUSE 0x1000
  590. // style bit flags for WM_IME_COMPOSITION
  591. #define CS_INSERTCHAR 0x2000
  592. #define CS_NOMOVECARET 0x4000
  593. #ifdef CUAS_ENABLE @internal
  594. #define GCS_COMPGUIDATTR 0x8000 @internal
  595. #endif // CUAS_ENABLE @internal
  596. ;immdev
  597. #define GCS_COMP (GCS_COMPSTR|GCS_COMPATTR|GCS_COMPCLAUSE)
  598. #define GCS_COMPREAD (GCS_COMPREADSTR|GCS_COMPREADATTR |GCS_COMPREADCLAUSE)
  599. #define GCS_RESULT (GCS_RESULTSTR|GCS_RESULTCLAUSE)
  600. #define GCS_RESULTREAD (GCS_RESULTREADSTR|GCS_RESULTREADCLAUSE)
  601. ;immdev
  602. // bits of fdwInit of INPUTCONTEXT
  603. #define INIT_STATUSWNDPOS 0x00000001
  604. #define INIT_CONVERSION 0x00000002
  605. #define INIT_SENTENCE 0x00000004
  606. #define INIT_LOGFONT 0x00000008
  607. #define INIT_COMPFORM 0x00000010
  608. #define INIT_SOFTKBDPOS 0x00000020
  609. #ifdef CUAS_ENABLE @internal
  610. // bits of fdwInit of INPUTCONTEXT @internal
  611. #define INIT_GUID_ATOM 0x00000040 @internal
  612. #endif // CUAS_ENABLE @internal
  613. ;internal
  614. // fdw31Compat of INPUTCONTEXT
  615. #define F31COMPAT_NOKEYTOIME 0x00000001
  616. #define F31COMPAT_MCWHIDDEN 0x00000002
  617. #define F31COMPAT_MCWVERTICAL 0x00000004
  618. #define F31COMPAT_CALLFROMWINNLS 0x00000008
  619. #define F31COMPAT_SAVECTRL 0x00010000
  620. #define F31COMPAT_PROCESSEVENT 0x00020000
  621. #define F31COMPAT_ECSETCFS 0x00040000
  622. ;internal
  623. // the return value of ImmGetAppIMECompatFlags
  624. #define IMECOMPAT_UNSYNC31IMEMSG 0x00000001
  625. // the meaning of this bit depend on the same bit in
  626. // IMELinkHdr.ctCountry.fdFlags
  627. #define IMECOMPAT_DUMMYTASK 0x00000002
  628. // For Japanese and Hangeul versions, this bit on
  629. // indicates no dummy task is needed
  630. #define IMECOMPAT_NODUMMYTASK IMECOMPAT_DUMMYTASK
  631. // For Chinese and PRC versions, this bit on indicates
  632. // a dummy tasked is needed
  633. #define IMECOMPAT_NEEDDUMMYTASK IMECOMPAT_DUMMYTASK
  634. #define IMECOMPAT_POSTDUMMY 0x00000004
  635. #define IMECOMPAT_ECNOFLUSH 0x00000008
  636. #define IMECOMPAT_NOINPUTLANGCHGTODLG 0x00000010
  637. #define IMECOMPAT_ECREDRAWPARENT 0x00000020
  638. #define IMECOMPAT_SENDOLDSBM 0x00000040
  639. #define IMECOMPAT_UNSYNC31IMEMSG2 0x00000080
  640. #define IMECOMPAT_NOIMEMSGINTERTASK 0x00000100
  641. #define IMECOMPAT_USEXWANSUNG 0x00000200
  642. #define IMECOMPAT_JXWFORATOK 0x00000400
  643. #define IMECOMPAT_NOIME 0x00000800
  644. #define IMECOMPAT_NOKBDHOOK 0x00001000
  645. #define IMECOMPAT_APPWNDREMOVEIMEMSGS 0x00002000
  646. #define IMECOMPAT_LSTRCMP31COMPATIBLE 0x00004000
  647. #define IMECOMPAT_USEALTSTKFORSHLEXEC 0x00008000
  648. #define IMECOMPAT_NOVKPROCESSKEY 0x00010000
  649. #define IMECOMPAT_NOYIELDWMCHAR 0x00020000
  650. #define IMECOMPAT_SENDSC_RESTORE 0x00040000
  651. #define IMECOMPAT_NOSENDLANGCHG 0x00080000
  652. #define IMECOMPAT_FORCEUNSYNC31IMEMSG 0x00100000
  653. #define IMECOMPAT_CONSOLEIMEPROCESS 0x00200000
  654. //
  655. // KOR only: do not finalize the composition
  656. // string on mouse click
  657. //
  658. #define IMECOMPAT_NOFINALIZECOMPSTR 0x00400000
  659. //
  660. // Terminal Server Client (MSTSC.EXE) only:
  661. // If client machine connected Fujitsu Oasys keyboard, disable NlsKbdSendIMENotification call
  662. //
  663. #define IMECOMPAT_HYDRACLIENT 0x00800000
  664. ;internal
  665. #ifdef CUAS_ENABLE
  666. //
  667. // Cicero Unaware Support
  668. // per process information
  669. //
  670. #define IMECOMPAT_AIMM_LEGACY_CLSID 0x01000000
  671. #define IMECOMPAT_AIMM_TRIDENT55 0x02000000
  672. #define IMECOMPAT_AIMM12_TRIDENT 0x04000000
  673. #define IMECOMPAT_AIMM12 0x08000000
  674. #endif // CUAS_ENABLE
  675. ;internal
  676. #define IMGTF_CANT_SWITCH_LAYOUT 0x00000001
  677. #define IMGTF_CANT_UNLOAD_IME 0x00000002
  678. ;public
  679. // IME version constants
  680. #define IMEVER_0310 0x0003000A
  681. #define IMEVER_0400 0x00040000
  682. ;immdev
  683. // IME property bits @+public
  684. #define IME_PROP_END_UNLOAD 0x00000001
  685. #define IME_PROP_KBD_CHAR_FIRST 0x00000002
  686. #define IME_PROP_IGNORE_UPKEYS 0x00000004
  687. #define IME_PROP_NEED_ALTKEY 0x00000008
  688. #define IME_PROP_NO_KEYS_ON_CLOSE 0x00000010
  689. #define IME_PROP_ACCEPT_WIDE_VKEY 0x00000020
  690. ;public
  691. #define IME_PROP_AT_CARET 0x00010000
  692. #define IME_PROP_SPECIAL_UI 0x00020000
  693. #define IME_PROP_CANDLIST_START_FROM_1 0x00040000
  694. #define IME_PROP_UNICODE 0x00080000
  695. #define IME_PROP_COMPLETE_ON_UNSELECT 0x00100000
  696. // all IME property bits, anyone add a new bit must update this !!! @internal
  697. #define IME_PROP_ALL 0x001F003F @internal
  698. ;public
  699. // IME UICapability bits @+immdev
  700. #define UI_CAP_2700 0x00000001
  701. #define UI_CAP_ROT90 0x00000002
  702. #define UI_CAP_ROTANY 0x00000004
  703. #define UI_CAP_SOFTKBD 0x00010000 @immdev
  704. // all IME UICapability bits, anyone add a new bit must update this !!! @Internal
  705. #define UI_CAP_ALL 0x00010007 @Internal
  706. ;public
  707. // ImmSetCompositionString Capability bits @public;internal
  708. #define SCS_CAP_COMPSTR 0x00000001
  709. #define SCS_CAP_MAKEREAD 0x00000002
  710. #define SCS_CAP_SETRECONVERTSTRING 0x00000004
  711. // all ImmSetCompositionString Capability bits !!! @Internal
  712. #define SCS_CAP_ALL 0x00000007 @Internal
  713. ;public
  714. // IME WM_IME_SELECT inheritance Capability bits
  715. #define SELECT_CAP_CONVERSION 0x00000001
  716. #define SELECT_CAP_SENTENCE 0x00000002
  717. // all IME WM_IME_SELECT inheritance Capability bits !!! @Internal
  718. #define SELECT_CAP_ALL 0x00000003 @Internal
  719. ;public
  720. // ID for deIndex of ImmGetGuideLine
  721. #define GGL_LEVEL 0x00000001
  722. #define GGL_INDEX 0x00000002
  723. #define GGL_STRING 0x00000003
  724. #define GGL_PRIVATE 0x00000004
  725. ;public
  726. // ID for dwLevel of GUIDELINE Structure
  727. #define GL_LEVEL_NOGUIDELINE 0x00000000
  728. #define GL_LEVEL_FATAL 0x00000001
  729. #define GL_LEVEL_ERROR 0x00000002
  730. #define GL_LEVEL_WARNING 0x00000003
  731. #define GL_LEVEL_INFORMATION 0x00000004
  732. ;public
  733. // ID for dwIndex of GUIDELINE Structure
  734. #define GL_ID_UNKNOWN 0x00000000
  735. #define GL_ID_NOMODULE 0x00000001
  736. #define GL_ID_NODICTIONARY 0x00000010
  737. #define GL_ID_CANNOTSAVE 0x00000011
  738. #define GL_ID_NOCONVERT 0x00000020
  739. #define GL_ID_TYPINGERROR 0x00000021
  740. #define GL_ID_TOOMANYSTROKE 0x00000022
  741. #define GL_ID_READINGCONFLICT 0x00000023
  742. #define GL_ID_INPUTREADING 0x00000024
  743. #define GL_ID_INPUTRADICAL 0x00000025
  744. #define GL_ID_INPUTCODE 0x00000026
  745. #define GL_ID_INPUTSYMBOL 0x00000027
  746. #define GL_ID_CHOOSECANDIDATE 0x00000028
  747. #define GL_ID_REVERSECONVERSION 0x00000029
  748. #define GL_ID_PRIVATE_FIRST 0x00008000
  749. #define GL_ID_PRIVATE_LAST 0x0000FFFF
  750. ;public
  751. // ID for dwIndex of ImmGetProperty @+internal
  752. // The value is the offset of IMEINFO structure @internal
  753. #define IGP_GETIMEVERSION (DWORD)(-4)
  754. #define IGP_PROPERTY 0x00000004
  755. #define IGP_CONVERSION 0x00000008
  756. #define IGP_SENTENCE 0x0000000c
  757. #define IGP_UI 0x00000010
  758. #define IGP_SETCOMPSTR 0x00000014
  759. #define IGP_SELECT 0x00000018
  760. // last property index, anyone add a new property index must update this !!! @Internal
  761. #define IGP_LAST IGP_SELECT @Internal
  762. ;public
  763. // dwIndex for ImmSetCompositionString API
  764. #define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
  765. #define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
  766. #define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
  767. #define SCS_SETRECONVERTSTRING 0x00010000
  768. #define SCS_QUERYRECONVERTSTRING 0x00020000
  769. ;public
  770. // attribute for COMPOSITIONSTRING Structure
  771. #define ATTR_INPUT 0x00
  772. #define ATTR_TARGET_CONVERTED 0x01
  773. #define ATTR_CONVERTED 0x02
  774. #define ATTR_TARGET_NOTCONVERTED 0x03
  775. #define ATTR_INPUT_ERROR 0x04
  776. #define ATTR_FIXEDCONVERTED 0x05
  777. ;public
  778. // bit field for IMC_SETCOMPOSITIONWINDOW, IMC_SETCANDIDATEWINDOW @public;internal
  779. #define CFS_DEFAULT 0x0000
  780. #define CFS_RECT 0x0001
  781. #define CFS_POINT 0x0002
  782. #define CFS_SCREEN 0x0004 @Internal
  783. #define CFS_VERTICAL 0x0008 @Internal
  784. #define CFS_HIDDEN 0x0010 @Internal
  785. #define CFS_FORCE_POSITION 0x0020
  786. #define CFS_CANDIDATEPOS 0x0040
  787. #define CFS_EXCLUDE 0x0080
  788. ;public
  789. // conversion direction for ImmGetConversionList
  790. #define GCL_CONVERSION 0x0001
  791. #define GCL_REVERSECONVERSION 0x0002
  792. #define GCL_REVERSE_LENGTH 0x0003
  793. ;public
  794. // bit field for conversion mode
  795. #define IME_CMODE_ALPHANUMERIC 0x0000
  796. #define IME_CMODE_NATIVE 0x0001
  797. #define IME_CMODE_CHINESE IME_CMODE_NATIVE
  798. // IME_CMODE_HANGEUL is old name of IME_CMODE_HANGUL. It will be gone eventually.
  799. #define IME_CMODE_HANGEUL IME_CMODE_NATIVE
  800. #define IME_CMODE_HANGUL IME_CMODE_NATIVE
  801. #define IME_CMODE_JAPANESE IME_CMODE_NATIVE
  802. #define IME_CMODE_KATAKANA 0x0002 // only effect under IME_CMODE_NATIVE
  803. #define IME_CMODE_LANGUAGE 0x0003
  804. #define IME_CMODE_FULLSHAPE 0x0008
  805. #define IME_CMODE_ROMAN 0x0010
  806. #define IME_CMODE_CHARCODE 0x0020
  807. #define IME_CMODE_HANJACONVERT 0x0040
  808. #define IME_CMODE_SOFTKBD 0x0080
  809. #define IME_CMODE_NOCONVERSION 0x0100
  810. #define IME_CMODE_EUDC 0x0200
  811. #define IME_CMODE_SYMBOL 0x0400
  812. #define IME_CMODE_FIXED 0x0800
  813. #define IME_CMODE_RESERVED 0xF0000000
  814. // all conversion mode bits, anyone add a new bit must update this !!! @internal
  815. #define IME_CMODE_ALL 0x0FFF @internal
  816. // @internal
  817. // This is extended NLS mode for console and console IME @internal
  818. // @internal
  819. #define IME_CMODE_OPEN 0x20000000 @internal
  820. #define IME_CMODE_DISABLE 0x40000000 @internal
  821. @internal
  822. #ifdef CUAS_ENABLE @internal
  823. // bit field for extended conversion mode @internal
  824. #define IME_CMODE_GUID_NULL 0x80000000 @internal
  825. #endif // CUAS_ENABLE @internal
  826. ;public
  827. // bit field for sentence mode
  828. #define IME_SMODE_NONE 0x0000
  829. #define IME_SMODE_PLAURALCLAUSE 0x0001
  830. #define IME_SMODE_SINGLECONVERT 0x0002
  831. #define IME_SMODE_AUTOMATIC 0x0004
  832. #define IME_SMODE_PHRASEPREDICT 0x0008
  833. #define IME_SMODE_CONVERSATION 0x0010
  834. #define IME_SMODE_RESERVED 0x0000F000
  835. // all sentence mode bits, anyone add a new bit must update this !!! @internal
  836. #define IME_SMODE_ALL 0x001F @internal
  837. #ifdef CUAS_ENABLE @internal
  838. // bit field for extended conversion mode @internal
  839. #define IME_SMODE_GUID_NULL 0x00008000 @internal
  840. #endif // CUAS_ENABLE @internal
  841. ;public
  842. // style of candidate
  843. #define IME_CAND_UNKNOWN 0x0000
  844. #define IME_CAND_READ 0x0001
  845. #define IME_CAND_CODE 0x0002
  846. #define IME_CAND_MEANING 0x0003
  847. #define IME_CAND_RADICAL 0x0004
  848. #define IME_CAND_STROKE 0x0005
  849. ;public
  850. // wParam of report message WM_IME_NOTIFY
  851. #define IMN_CLOSESTATUSWINDOW 0x0001
  852. #define IMN_OPENSTATUSWINDOW 0x0002
  853. #define IMN_CHANGECANDIDATE 0x0003
  854. #define IMN_CLOSECANDIDATE 0x0004
  855. #define IMN_OPENCANDIDATE 0x0005
  856. #define IMN_SETCONVERSIONMODE 0x0006
  857. #define IMN_SETSENTENCEMODE 0x0007
  858. #define IMN_SETOPENSTATUS 0x0008
  859. #define IMN_SETCANDIDATEPOS 0x0009
  860. #define IMN_SETCOMPOSITIONFONT 0x000A
  861. #define IMN_SETCOMPOSITIONWINDOW 0x000B
  862. #define IMN_SETSTATUSWINDOWPOS 0x000C
  863. #define IMN_GUIDELINE 0x000D
  864. #define IMN_PRIVATE 0x000E
  865. ;public
  866. ;begin_winver_40a
  867. // wParam of report message WM_IME_REQUEST
  868. #define IMR_COMPOSITIONWINDOW 0x0001
  869. #define IMR_CANDIDATEWINDOW 0x0002
  870. #define IMR_COMPOSITIONFONT 0x0003
  871. #define IMR_RECONVERTSTRING 0x0004
  872. #define IMR_CONFIRMRECONVERTSTRING 0x0005
  873. #define IMR_QUERYCHARPOSITION 0x0006
  874. #define IMR_DOCUMENTFEED 0x0007
  875. ;end_winver_40a
  876. ;immdev
  877. #define IMN_SOFTKBDDESTROYED 0x0011
  878. ;public
  879. // error code of ImmGetCompositionString
  880. #define IMM_ERROR_NODATA (-1)
  881. #define IMM_ERROR_GENERAL (-2)
  882. ;public
  883. // dialog mode of ImmConfigureIME
  884. #define IME_CONFIG_GENERAL 1
  885. #define IME_CONFIG_REGISTERWORD 2
  886. #define IME_CONFIG_SELECTDICTIONARY 3
  887. ;public
  888. // flags for ImmEscape @public;immdev
  889. #define IME_ESC_QUERY_SUPPORT 0x0003
  890. #define IME_ESC_RESERVED_FIRST 0x0004
  891. #define IME_ESC_RESERVED_LAST 0x07FF
  892. #define IME_ESC_PRIVATE_FIRST 0x0800
  893. #define IME_ESC_PRIVATE_LAST 0x0FFF
  894. #define IME_ESC_SEQUENCE_TO_INTERNAL 0x1001
  895. #define IME_ESC_GET_EUDC_DICTIONARY 0x1003
  896. #define IME_ESC_SET_EUDC_DICTIONARY 0x1004
  897. #define IME_ESC_MAX_KEY 0x1005
  898. #define IME_ESC_IME_NAME 0x1006
  899. #define IME_ESC_SYNC_HOTKEY 0x1007
  900. #define IME_ESC_HANJA_MODE 0x1008
  901. #define IME_ESC_AUTOMATA 0x1009
  902. #define IME_ESC_PRIVATE_HOTKEY 0x100a
  903. #define IME_ESC_GETHELPFILENAME 0x100b
  904. ;immdev
  905. #define IME_ESC_PENAUXDATA 0x100c
  906. ;public
  907. // style of word registration
  908. #define IME_REGWORD_STYLE_EUDC 0x00000001
  909. #define IME_REGWORD_STYLE_USER_FIRST 0x80000000
  910. #define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
  911. ;public
  912. ;begin_winver_40a
  913. // dwFlags for ImmAssociateContextEx
  914. #define IACE_CHILDREN 0x0001
  915. #define IACE_DEFAULT 0x0010
  916. #define IACE_IGNORENOCONTEXT 0x0020
  917. ;public
  918. // dwFlags for ImmGetImeMenuItems
  919. #define IGIMIF_RIGHTMENU 0x0001
  920. ;public
  921. // dwType for ImmGetImeMenuItems
  922. #define IGIMII_CMODE 0x0001
  923. #define IGIMII_SMODE 0x0002
  924. #define IGIMII_CONFIGURE 0x0004
  925. #define IGIMII_TOOLS 0x0008
  926. #define IGIMII_HELP 0x0010
  927. #define IGIMII_OTHER 0x0020
  928. #define IGIMII_INPUTTOOLS 0x0040
  929. ;public
  930. // fType of IMEMENUITEMINFO structure
  931. #define IMFT_RADIOCHECK 0x00001
  932. #define IMFT_SEPARATOR 0x00002
  933. #define IMFT_SUBMENU 0x00004
  934. ;public
  935. // fState of IMEMENUITEMINFO structure
  936. #define IMFS_GRAYED MFS_GRAYED
  937. #define IMFS_DISABLED MFS_DISABLED
  938. #define IMFS_CHECKED MFS_CHECKED
  939. #define IMFS_HILITE MFS_HILITE
  940. #define IMFS_ENABLED MFS_ENABLED
  941. #define IMFS_UNCHECKED MFS_UNCHECKED
  942. #define IMFS_UNHILITE MFS_UNHILITE
  943. #define IMFS_DEFAULT MFS_DEFAULT
  944. ;end_winver_40a
  945. ;public
  946. // type of soft keyboard
  947. // for Windows Tranditional Chinese Edition
  948. #define SOFTKEYBOARD_TYPE_T1 0x0001
  949. // for Windows Simplified Chinese Edition
  950. #define SOFTKEYBOARD_TYPE_C1 0x0002
  951. ;immdev
  952. // prototype of IME APIs
  953. BOOL WINAPI ImeInquire(IN LPIMEINFO, OUT LPTSTR lpszUIClass, IN DWORD dwSystemInfoFlags);
  954. BOOL WINAPI ImeConfigure(IN HKL, IN HWND, IN DWORD, IN LPVOID);
  955. DWORD WINAPI ImeConversionList(HIMC, LPCTSTR, LPCANDIDATELIST, DWORD dwBufLen, UINT uFlag);
  956. BOOL WINAPI ImeDestroy(UINT);
  957. LRESULT WINAPI ImeEscape(HIMC, UINT, LPVOID);
  958. BOOL WINAPI ImeProcessKey(IN HIMC, IN UINT, IN LPARAM, IN CONST LPBYTE);
  959. BOOL WINAPI ImeSelect(IN HIMC, IN BOOL);
  960. BOOL WINAPI ImeSetActiveContext(IN HIMC, IN BOOL);
  961. ;begin_winver_40a
  962. UINT WINAPI ImeToAsciiEx(IN UINT uVirtKey, IN UINT uScaCode, IN CONST LPBYTE lpbKeyState, OUT LPTRANSMSGLIST lpTransBuf, IN UINT fuState, IN HIMC);
  963. ;else
  964. UINT WINAPI ImeToAsciiEx(IN UINT uVirtKey, IN UINT uScaCode, IN CONST LPBYTE lpbKeyState, OUT LPDWORD lpdwTransBuf, IN UINT fuState, IN HIMC);
  965. ;end
  966. BOOL WINAPI NotifyIME(IN HIMC, IN DWORD, IN DWORD, IN DWORD);
  967. BOOL WINAPI ImeRegisterWord(IN LPCTSTR, IN DWORD, IN LPCTSTR);
  968. BOOL WINAPI ImeUnregisterWord(IN LPCTSTR, IN DWORD, IN LPCTSTR);
  969. UINT WINAPI ImeGetRegisterWordStyle(IN UINT nItem, OUT LPSTYLEBUF);
  970. UINT WINAPI ImeEnumRegisterWord(IN REGISTERWORDENUMPROC, IN LPCTSTR, IN DWORD, IN LPCTSTR, IN LPVOID);
  971. BOOL WINAPI ImeSetCompositionString(IN HIMC, IN DWORD dwIndex, IN LPVOID lpComp, IN DWORD, IN LPVOID lpRead, IN DWORD);
  972. ;internal
  973. ;begin_winver_40a
  974. #ifdef CUAS_ENABLE
  975. // prototype of IME APIs for Cicero Bridge
  976. HRESULT WINAPI CtfImeInquireEx(IN LPIMEINFO, OUT LPTSTR lpszUIClass, IN DWORD dwSystemInfoFlags, HKL hKL);
  977. HRESULT WINAPI CtfImeCreateThreadMgr();
  978. HRESULT WINAPI CtfImeDestroyThreadMgr();
  979. HRESULT WINAPI CtfImeCreateInputContext(HIMC hImc);
  980. HRESULT WINAPI CtfImeDestroyInputContext(HIMC hImc);
  981. HRESULT WINAPI CtfImeSelectEx(HIMC hIMC, BOOL fSelect, HKL hKL);
  982. HRESULT WINAPI CtfImeSetActiveContextAlways(HIMC hIMC, BOOL fOn, HWND hWnd, HKL hkl);
  983. LRESULT WINAPI CtfImeEscapeEx(HIMC hIMC, UINT uSubFunc, LPVOID lpData, HKL hKL);
  984. HRESULT WINAPI CtfImeGetGuidAtom(HIMC hIMC, BYTE bAttr, DWORD* pAtom);
  985. BOOL WINAPI CtfImeIsGuidMapEnable(HIMC hIMC);
  986. BOOL WINAPI CtfImeProcessCicHotkey(HIMC hIMC, UINT uVKey, LPARAM lParam);
  987. #endif // CUAS_ENABLE
  988. ;end
  989. ;internal
  990. //
  991. // nCode for MsctfCicNotify
  992. //
  993. #define CICN_LANGCHANGEHOTKEY 0x0001
  994. ;immdev
  995. //
  996. // Pen Input support
  997. //
  998. typedef struct tagIMEPENDATA {
  999. DWORD dwVersion;
  1000. DWORD dwFlags;
  1001. DWORD dwCount;
  1002. LPVOID lpExtraInfo;
  1003. ULONG_PTR ulReserve;
  1004. union {
  1005. struct {
  1006. LPDWORD lpSymbol;
  1007. LPWORD lpSkip;
  1008. LPWORD lpScore;
  1009. } wd;
  1010. };
  1011. } IMEPENDATA, *PIMEPENDATA, NEAR* NPIMEPENDATA, FAR* LPIMEPENDATA;
  1012. #define IME_PEN_SYMBOL 0x00000010
  1013. #define IME_PEN_SKIP 0x00000020
  1014. #define IME_PEN_SCORE 0x00000040
  1015. ;internal
  1016. //
  1017. // Pen Input support
  1018. //
  1019. #ifndef __cplusplus
  1020. //
  1021. // WM_COPYDATA format with Pen Input service
  1022. //
  1023. typedef struct tagPenInputData {
  1024. DWORD dwVersion;
  1025. DWORD flags;
  1026. DWORD cnt;
  1027. DWORD dwOffsetSymbols;
  1028. DWORD dwOffsetSkip;
  1029. DWORD dwOffsetScore;
  1030. BYTE ab[0];
  1031. } PENINPUTDATA;
  1032. #endif // __cplusplus
  1033. #define LM_IMM_MAGIC 0x672c5c71
  1034. //#define LMDATA_SYMBOL_BYTE 0x00000001
  1035. //#define LMDATA_SYMBOL_WORD 0x00000002
  1036. #define LMDATA_SYMBOL_DWORD 0x00000004
  1037. //#define LMDATA_SYMBOL_QWORD 0x00000008
  1038. //#define LMDATA_SKIP_BYTE 0x00000010
  1039. #define LMDATA_SKIP_WORD 0x00000020
  1040. //#define LMDATA_SCORE_BYTE 0x00000040
  1041. #define LMDATA_SCORE_WORD 0x00000080
  1042. //#define LMDATA_SCORE_DWORD 0x00000100
  1043. //#define LMDATA_SCORE_QWORD 0x00000200
  1044. //#define LMDATA_SCORE_FLOAT 0x00000400
  1045. //#define LMDATA_SCORE_DOUBLE 0x00000800
  1046. //
  1047. // IMM private API for Pen Input
  1048. //
  1049. LRESULT WINAPI ImmSendMessageToActiveDefImeWndW(UINT msg, WPARAM wParam, LPARAM lParam);
  1050. #endif // _IMM_DDK_DEFINED_ @immdev
  1051. #endif // _IMM_SDK_DEFINED_ @imm
  1052. ;all
  1053. ;reference_end
  1054. ;null
  1055. ########################################################################
  1056. # end of Reference area
  1057. ########################################################################
  1058. ;all
  1059. #ifdef __cplusplus
  1060. }
  1061. #endif
  1062. #endif // _IMMDEV_ @immdev
  1063. #endif // _IMMP_ @internal
  1064. #endif // _IMM_ @public