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.

344 lines
9.5 KiB

  1. //
  2. // %%Title: IMEAPP
  3. // %%Unit: COM
  4. // %%Contact: TakeshiF/SeijiA
  5. // %%Date: 97/06/20
  6. // %%File: imeapp.h
  7. //
  8. // Private API / Message service
  9. //
  10. #ifndef __IMEUP_H__
  11. #define __IMEUP_H__
  12. #ifdef __cplusplus
  13. extern "C" { /* Assume C declarations for C++ */
  14. #endif /* __cplusplus */
  15. #ifndef RC_INVOKED
  16. #pragma pack(1) /* Assume byte packing throughout */
  17. #endif /* !RC_INVOKED */
  18. #include "actdict.h"
  19. //// START
  20. /***********************************************************************
  21. Msg: WM_MSIME_SERVICE
  22. Desc: service functions
  23. Owner: seijia
  24. ***********************************************************************/
  25. // Label for RegisterWindowMessage
  26. #define RWM_SERVICE TEXT("MSIMEService")
  27. #define VERSION_ID_JAPAN 0x01000000
  28. #define VERSION_ID_KOREA 0x02000000
  29. #define VERSION_ID_TC 0x04000000
  30. #define VERSION_ID_PRC 0x08000000
  31. #define VERSION_ID_IMEJP98 (VERSION_ID_JAPAN | 0x980)
  32. #define VERSION_ID_IMEJP98A (VERSION_ID_JAPAN | 0x98a)
  33. /***********************************************************************
  34. Msg: WM_MSIME_AUTOCOMPLETE
  35. Desc: use IImeActiveDict to support auto-complete
  36. Owner: seijia
  37. ***********************************************************************/
  38. // Label for RegisterWindowMessage
  39. #define RWM_AUTOCOMPLETE TEXT("MSIMEAutoComplete")
  40. // AutoComplete Version
  41. #define VERSION_AUTOCOMPETE 1
  42. // Dictionary Structure
  43. typedef struct _IMEDICT
  44. {
  45. int cbSize; //size of this structure
  46. HIMC hIMC; //IME context
  47. IImeActiveDict *pdict; //program dictionary
  48. } IMEDICT;
  49. //WParam definition
  50. #define FID_AUTO_VERSION 1
  51. #define FID_AUTO_ACTIVATE 2
  52. #define FID_AUTO_DEACTIVATE 3
  53. /***********************************************************************
  54. Msg: WM_MSIME_WORDSTAT
  55. Desc: use IImeActiveDict to get word statistics
  56. Owner: seijia
  57. ***********************************************************************/
  58. // Label for RegisterWindowMessage
  59. #define RWM_WORDSTAT TEXT("MSIMEWordStatistics")
  60. // WordStat Version
  61. #define VERSION_WORDSTAT 1
  62. // WParam definition
  63. #define FID_STAT_VERSION 1
  64. #define FID_STAT_GIVESTAT 2
  65. /***********************************************************************
  66. Msg: WM_MSIME_DOCKDICT
  67. Desc: use IImeActiveDict to dock dictionary
  68. Owner: seijia
  69. ***********************************************************************/
  70. // Label for RegisterWindowMessage
  71. #define RWM_DOCKDICT TEXT("MSIMEDockActiveDict")
  72. // Dictionary Docking Version
  73. #define VERSION_DOCKDICT 1
  74. // WParam definition
  75. #define FID_DOCK_VERSION 1
  76. #define FID_DOCK_ACTIVATE 2
  77. #define FID_DOCK_DEACTIVATE 3
  78. /***********************************************************************
  79. Msg: WM_MSIME_MOUSE
  80. Desc: mouse operation definition
  81. Owner: kentu
  82. ***********************************************************************/
  83. // Label for RegisterWindowMessage
  84. #define RWM_MOUSE TEXT("MSIMEMouseOperation")
  85. // Mouse Operation Version (return value of IMEMOUSE_VERSION)
  86. #define VERSION_MOUSE_OPERATION 1
  87. // Mouse operation result
  88. #define IMEMOUSERET_NOTHANDLED (-1)
  89. //WParam definition for WM_IME_MOUSE.
  90. #define IMEMOUSE_VERSION 0xff // mouse supported?
  91. #define IMEMOUSE_NONE 0x00 // no mouse button was pushed
  92. #define IMEMOUSE_LDOWN 0x01
  93. #define IMEMOUSE_RDOWN 0x02
  94. #define IMEMOUSE_MDOWN 0x04
  95. #define IMEMOUSE_WUP 0x10 // wheel up
  96. #define IMEMOUSE_WDOWN 0x20 // wheel down
  97. /***********************************************************************
  98. Msg: WM_MSIME_RECONVERT/WM_MSIME_RECONVERTREQUEST
  99. Desc: reconversion
  100. Owner: takeshif
  101. ***********************************************************************/
  102. // wParam of WM_MSIME_RECONVERTREQUEST
  103. #define FID_RECONVERT_VERSION 0x10000000
  104. // Private reconversion Version
  105. #define VERSION_RECONVERSION 1
  106. // Label for RegisterWindowMessage
  107. #define RWM_RECONVERT TEXT("MSIMEReconvert")
  108. #define RWM_RECONVERTREQUEST TEXT("MSIMEReconvertRequest")
  109. /***********************************************************************
  110. Msg: WM_MSIME_DOCUMENTFEED
  111. Desc: reconversion
  112. Owner: takeshif
  113. Usage: SendMessage( hwndApp, WM_MSIME_DOCUMENTFEED, VERSION_DOCUMENTFEED,
  114. (RECONVERTSTRING*)pReconv );
  115. wParam: VERSION_DOCUMENTFEED
  116. lParam: Pointer of RECONVERTSTRING structure
  117. return: size of RECONVERTSTRING structure
  118. ***********************************************************************/
  119. // wParam of WM_MSIME_DOCUMENTFEED (set current docfeed version)
  120. #define VERSION_DOCUMENTFEED 1
  121. // lParam is pointer of RECONVERTSTRING structure
  122. // Label for RegisterWindowMessage
  123. #define RWM_DOCUMENTFEED TEXT("MSIMEDocumentFeed")
  124. /***********************************************************************
  125. Msg: WM_MSIME_QUERYHIDECARET
  126. Desc: composition UI
  127. Owner: takeshif
  128. Usage: SendMessage( hwndDefUI, WM_MSIME_QUERYHIDECARET, 0, 0 );
  129. wParam: reserved
  130. lParam: reserved
  131. return: Non-zero = shows caret. Zero = hide caret.
  132. ***********************************************************************/
  133. // wParam of WM_MSIME_QUERYHIDECARET
  134. #define VERSION_QUERYHIDECARET 1
  135. // Label for RegisterWindowMessage
  136. #define RWM_QUERYHIDECARET TEXT("MSIMEQueryHideCaret")
  137. /***********************************************************************
  138. Msg: WM_MSIME_QUERYPOSITION
  139. Desc: composition UI
  140. Owner: takeshif
  141. Usage: SendMessage( hwndApp, WM_MSIME_QUERYPOSITION, 0, (IMEPOSITION*)pPs );
  142. wParam: reserved. must be 0.
  143. lParam: pointer of IMEPOSITION structure
  144. return: Non-zero = accepted. Zero = not accepted.
  145. ***********************************************************************/
  146. // wParam of WM_MSIME_QUERYPOSITION
  147. #define VERSION_QUERYPOSITION 1
  148. // Label for RegisterWindowMessage
  149. #define RWM_QUERYPOSITION TEXT("MSIMEQueryPosition")
  150. /***********************************************************************
  151. Msg: WM_MSIME_MODEBIAS
  152. Desc: input mode bias
  153. Owner: takeshif
  154. Usage: SendMessage( hwndDefUI, WM_MSIME_MODEBIAS, MODEBIAS_xxxx, 0 );
  155. wParam: see below MODEBIAS_xxxx
  156. lParam: reserved
  157. return: Non-zero = accepted. Zero = not accepted.
  158. ***********************************************************************/
  159. // Label for RegisterWindowMessage
  160. #define RWM_MODEBIAS TEXT("MSIMEModeBias")
  161. // wParam - bias setting
  162. #define MODEBIAS_DEFAULT 0x00000000 // reset all of bias setting
  163. #define MODEBIAS_FILENAME 0x00000001
  164. #define MODEBIAS_URL 0x00000002
  165. #define MODEBIAS_DISABLEAUTOCONV 0x00000010
  166. /***********************************************************************
  167. Msg: WM_MSIME_SHOWIMEPAD
  168. Desc: show ImePad
  169. Owner: toshiaK
  170. Usage: SendMessage( hwndDefUI, WM_MSIME_SHOWIMEPAD, 0, 0 );
  171. wParam: reserved
  172. lParam: reserved
  173. return: Non-zero = accepted. Zero = not accepted.
  174. ***********************************************************************/
  175. // Label for RegisterWindowMessage
  176. #define RWM_SHOWIMEPAD TEXT("MSIMEShowImePad")
  177. /***********************************************************************
  178. Msg: WM_MSIME_KEYMAP
  179. Desc: key map sharing with apps
  180. Owner: HiroakiK
  181. ***********************************************************************/
  182. // Label for RegisterWindowMessage
  183. #define RWM_KEYMAP TEXT("MSIMEKeyMap")
  184. #define RWM_CHGKEYMAP TEXT("MSIMEChangeKeyMap")
  185. #define RWM_NTFYKEYMAP TEXT("MSIMENotifyKeyMap")
  186. #define FID_MSIME_KMS_VERSION 1
  187. #define FID_MSIME_KMS_INIT 2
  188. #define FID_MSIME_KMS_TERM 3
  189. #define FID_MSIME_KMS_DEL_KEYLIST 4
  190. #define FID_MSIME_KMS_NOTIFY 5
  191. #define FID_MSIME_KMS_GETMAP 6
  192. #define FID_MSIME_KMS_INVOKE 7
  193. #define FID_MSIME_KMS_SETMAP 8
  194. #define IMEKMS_NOCOMPOSITION 0
  195. #define IMEKMS_COMPOSITION 1
  196. #define IMEKMS_SELECTION 2
  197. #define IMEKMS_IMEOFF 3
  198. #define IMEKMS_2NDLEVEL 4
  199. #define IMEKMS_INPTGL 5
  200. typedef struct tagIMEKMSINIT {
  201. INT cbSize;
  202. HWND hWnd; // Window which receives notification from IME.
  203. // If hWnd is NULL, no notification is posted
  204. // to Input context.
  205. } IMEKMSINIT;
  206. typedef struct tagIMEKMSKEY {
  207. DWORD dwStatus; //Shift-Control combination status.
  208. //Any combination of constants below
  209. //(defined in IMM.H)
  210. // 0x0000 (default)
  211. // MOD_CONTROL 0x0002
  212. // MOD_SHIFT 0x0004
  213. // Alt key and Win key is not processed by IME.
  214. DWORD dwCompStatus; //Composition string status
  215. //One of the constants below
  216. // IMEKMS_NOCOMPOSITION No composition string
  217. // IMEKMS_COMPOSITION Some composition string
  218. // IMEKMS_SELECTION Selection exists in apps
  219. // IMEKMS_IMEOFF IME Off state
  220. // IMEKMS_2NDLEVEL 2nd stage on 2 stroke key operation
  221. DWORD dwVKEY; // VKEY code defined in IMM.H
  222. union {
  223. DWORD dwControl;// IME Functionality ID
  224. DWORD dwNotUsed;
  225. };
  226. union {
  227. WCHAR pwszDscr[31];// The pointer to string of description of this functionalify
  228. WCHAR pwszNoUse[31];
  229. };
  230. } IMEKMSKEY;
  231. typedef struct tagIMEKMS {
  232. INT cbSize;
  233. HIMC hIMC;
  234. LANGID idLang;
  235. DWORD cKeyList;
  236. IMEKMSKEY *pKeyList;
  237. } IMEKMS;
  238. typedef struct tagIMEKMSNTFY {
  239. INT cbSize;
  240. HIMC hIMC;
  241. BOOL fSelect;
  242. } IMEKMSNTFY;
  243. typedef struct tagIMEKMSKMP {
  244. INT cbSize; //[in] size of this structure
  245. HIMC hIMC; //[in] Input context
  246. WORD wVKStart; //[in] VKEY start
  247. WORD wVKEnd; //[in] VKEY end
  248. INT cKeyList; //[out] number of IMEKMSKEY
  249. IMEKMSKEY *pKeyList; //[out] retrieve buffer of IMEKMSKEY
  250. // Must be GlobalMemFree by clients
  251. } IMEKMSKMP;
  252. typedef struct tagIMEKMSINVK {
  253. INT cbSize;
  254. HIMC hIMC;
  255. DWORD dwControl;
  256. } IMEKMSINVK;
  257. //// END
  258. #ifndef RC_INVOKED
  259. #pragma pack()
  260. #endif /* !RC_INVOKED */
  261. #ifdef __cplusplus
  262. } /* end of 'extern "C" {' */
  263. #endif // __cplusplus
  264. #endif // __IMEUP_H__