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.

408 lines
12 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. IME Version IDs
  22. ***********************************************************************/
  23. #define VERSION_ID_JAPANESE 0x01000000
  24. #define VERSION_ID_KOREAN 0x02000000
  25. #define VERSION_ID_CHINESE_TRADITIONAL 0x04000000
  26. #define VERSION_ID_CHINESE_SIMPLIFIED 0x08000000
  27. #define VERSION_ID_IMEJP98 (VERSION_ID_JAPANESE | 0x980)
  28. #define VERSION_ID_IMEJP98A (VERSION_ID_JAPANESE | 0x98a)
  29. /***********************************************************************
  30. Msg: WM_MSIME_SERVICE
  31. Desc: service functions
  32. Dir: Apps to IME
  33. wParam: reserved
  34. lParam: reserved
  35. ***********************************************************************/
  36. // Label for RegisterWindowMessage
  37. #define RWM_SERVICE TEXT("MSIMEService")
  38. //getting version number (wParam)
  39. #define FID_MSIME_VERSION 0
  40. /***********************************************************************
  41. Msg: WM_MSIME_UIREADY
  42. Desc: service functions
  43. Dir: IME to Apps
  44. wParam: Version ID
  45. lParam: reserved
  46. ***********************************************************************/
  47. // Label for RegisterWindowMessage
  48. #define RWM_UIREADY TEXT("MSIMEUIReady")
  49. //getting class id
  50. #define FID_MSIME_GETCLSID 2
  51. typedef struct _IMECLSID
  52. {
  53. int cbSize; //size of this structure
  54. CLSID clsid; //class id
  55. } IMECLSID;
  56. /***********************************************************************
  57. Msg: WM_MSIME_AUTOCOMPLETE
  58. Desc: use IImeActiveDict to support auto-complete
  59. Owner: seijia
  60. ***********************************************************************/
  61. // Label for RegisterWindowMessage
  62. #define RWM_AUTOCOMPLETE TEXT("MSIMEAutoComplete")
  63. // AutoComplete Version
  64. #define VERSION_AUTOCOMPETE 1
  65. // Dictionary Structure
  66. typedef struct _IMEDICT
  67. {
  68. int cbSize; //size of this structure
  69. HIMC hIMC; //IME context
  70. IImeActiveDict *pdict; //program dictionary
  71. } IMEDICT;
  72. //WParam definition
  73. #define FID_AUTO_VERSION 1
  74. #define FID_AUTO_ACTIVATE 2
  75. #define FID_AUTO_DEACTIVATE 3
  76. /***********************************************************************
  77. Msg: WM_MSIME_WORDSTAT
  78. Desc: use IImeActiveDict to get word statistics
  79. Owner: seijia
  80. ***********************************************************************/
  81. // Label for RegisterWindowMessage
  82. #define RWM_WORDSTAT TEXT("MSIMEWordStatistics")
  83. // WordStat Version
  84. #define VERSION_WORDSTAT 1
  85. // WParam definition
  86. #define FID_STAT_VERSION 1
  87. #define FID_STAT_GIVESTAT 2
  88. /***********************************************************************
  89. Msg: WM_MSIME_DOCKDICT
  90. Desc: use IImeActiveDict to dock dictionary
  91. Owner: seijia
  92. ***********************************************************************/
  93. // Label for RegisterWindowMessage
  94. #define RWM_DOCKDICT TEXT("MSIMEDockActiveDict")
  95. // Dictionary Docking Version
  96. #define VERSION_DOCKDICT 1
  97. // WParam definition
  98. #define FID_DOCK_VERSION 1
  99. #define FID_DOCK_ACTIVATE 2
  100. #define FID_DOCK_DEACTIVATE 3
  101. /***********************************************************************
  102. Msg: WM_MSIME_MOUSE
  103. Desc: mouse operation definition
  104. Owner: kentu
  105. ***********************************************************************/
  106. // Label for RegisterWindowMessage
  107. #define RWM_MOUSE TEXT("MSIMEMouseOperation")
  108. // Mouse Operation Version (return value of IMEMOUSE_VERSION)
  109. #define VERSION_MOUSE_OPERATION 1
  110. // Mouse operation result
  111. #define IMEMOUSERET_NOTHANDLED (-1)
  112. //WParam definition for WM_IME_MOUSE.
  113. #define IMEMOUSE_VERSION 0xff // mouse supported?
  114. #define IMEMOUSE_NONE 0x00 // no mouse button was pushed
  115. #define IMEMOUSE_LDOWN 0x01
  116. #define IMEMOUSE_RDOWN 0x02
  117. #define IMEMOUSE_MDOWN 0x04
  118. #define IMEMOUSE_WUP 0x10 // wheel up
  119. #define IMEMOUSE_WDOWN 0x20 // wheel down
  120. /***********************************************************************
  121. Msg: WM_MSIME_RECONVERT/WM_MSIME_RECONVERTREQUEST
  122. Desc: reconversion
  123. Owner: takeshif
  124. ***********************************************************************/
  125. // wParam of WM_MSIME_RECONVERTREQUEST
  126. #define FID_RECONVERT_VERSION 0x10000000
  127. // Private reconversion Version
  128. #define VERSION_RECONVERSION 1
  129. // Label for RegisterWindowMessage
  130. #define RWM_RECONVERT TEXT("MSIMEReconvert")
  131. #define RWM_RECONVERTREQUEST TEXT("MSIMEReconvertRequest")
  132. /***********************************************************************
  133. Msg: WM_MSIME_DOCUMENTFEED
  134. Desc: reconversion
  135. Owner: takeshif
  136. Usage: SendMessage( hwndApp, WM_MSIME_DOCUMENTFEED, VERSION_DOCUMENTFEED,
  137. (RECONVERTSTRING*)pReconv );
  138. wParam: VERSION_DOCUMENTFEED
  139. lParam: Pointer of RECONVERTSTRING structure
  140. return: size of RECONVERTSTRING structure
  141. ***********************************************************************/
  142. // wParam of WM_MSIME_DOCUMENTFEED (set current docfeed version)
  143. #define VERSION_DOCUMENTFEED 1
  144. // lParam is pointer of RECONVERTSTRING structure
  145. // Label for RegisterWindowMessage
  146. #define RWM_DOCUMENTFEED TEXT("MSIMEDocumentFeed")
  147. /***********************************************************************
  148. Msg: WM_MSIME_QUERYHIDECARET
  149. Desc: composition UI
  150. Owner: takeshif
  151. Usage: SendMessage( hwndDefUI, WM_MSIME_QUERYHIDECARET, 0, 0 );
  152. wParam: reserved
  153. lParam: reserved
  154. return: Non-zero = shows caret. Zero = hide caret.
  155. ***********************************************************************/
  156. // wParam of WM_MSIME_QUERYHIDECARET
  157. #define VERSION_QUERYHIDECARET 1
  158. // Label for RegisterWindowMessage
  159. #define RWM_QUERYHIDECARET TEXT("MSIMEQueryHideCaret")
  160. /***********************************************************************
  161. Msg: WM_MSIME_QUERYPOSITION
  162. Desc: composition UI
  163. Owner: takeshif
  164. Usage: SendMessage( hwndApp, WM_MSIME_QUERYPOSITION, VERSION_QUERYPOSITION, (IMEPOSITION*)pPs );
  165. wParam: reserved. must be 0.
  166. lParam: pointer of IMEPOSITION structure
  167. return: Non-zero = success. Zero = error.
  168. ***********************************************************************/
  169. // wParam of WM_MSIME_QUERYPOSITION
  170. #define VERSION_QUERYPOSITION 1
  171. // Label for RegisterWindowMessage
  172. #define RWM_QUERYPOSITION TEXT("MSIMEQueryPosition")
  173. /***********************************************************************
  174. Msg: WM_MSIME_MODEBIAS
  175. Desc: input mode bias
  176. Owner: takeshif
  177. Usage: SendMessage( hwndDefUI, WM_MSIME_MODEBIAS, MODEBIAS_xxxx, MODEBIASMODE_xxxx );
  178. wParam: operation of bias
  179. lParam: bias mode
  180. return: If wParam is MODEBIAS_GETVERSION,returns version number of interface.
  181. If wParam is MODEBIAS_SETVALUE : return non-zero value if succeeded. Returns 0 if fail.
  182. If wParam is MODEBIAS_GETVALUE : returns current bias mode.
  183. ***********************************************************************/
  184. // Label for RegisterWindowMessage
  185. #define RWM_MODEBIAS TEXT("MSIMEModeBias")
  186. // Current version
  187. #define VERSION_MODEBIAS 1
  188. // Set or Get (wParam)
  189. #define MODEBIAS_GETVERSION 0
  190. #define MODEBIAS_SETVALUE 1
  191. #define MODEBIAS_GETVALUE 2
  192. // Bias (lParam)
  193. #define MODEBIASMODE_DEFAULT 0x00000000 // reset all of bias setting
  194. #define MODEBIASMODE_FILENAME 0x00000001 // filename
  195. #define MODEBIASMODE_READING 0x00000002 // reading recommended
  196. #define MODEBIASMODE_DIGIT 0x00000004 // ANSI-Digit Recommended Mode
  197. /***********************************************************************
  198. Msg: WM_MSIME_SHOWIMEPAD
  199. Desc: show ImePad
  200. Owner: toshiaK
  201. Usage: SendMessage( hwndDefUI, WM_MSIME_SHOWIMEPAD, 0, 0 );
  202. wParam: reserved
  203. lParam: reserved
  204. return: Non-zero = accepted. Zero = not accepted.
  205. ***********************************************************************/
  206. // Label for RegisterWindowMessage
  207. #define RWM_SHOWIMEPAD TEXT("MSIMEShowImePad")
  208. /***********************************************************************
  209. Msg: WM_MSIME_KEYMAP
  210. Desc: key map sharing with apps
  211. Owner: HiroakiK
  212. ***********************************************************************/
  213. // Label for RegisterWindowMessage
  214. #define RWM_KEYMAP TEXT("MSIMEKeyMap")
  215. #define RWM_CHGKEYMAP TEXT("MSIMEChangeKeyMap")
  216. #define RWM_NTFYKEYMAP TEXT("MSIMENotifyKeyMap")
  217. #define FID_MSIME_KMS_VERSION 1
  218. #define FID_MSIME_KMS_INIT 2
  219. #define FID_MSIME_KMS_TERM 3
  220. #define FID_MSIME_KMS_DEL_KEYLIST 4
  221. #define FID_MSIME_KMS_NOTIFY 5
  222. #define FID_MSIME_KMS_GETMAP 6
  223. #define FID_MSIME_KMS_INVOKE 7
  224. #define FID_MSIME_KMS_SETMAP 8
  225. #define FID_MSIME_KMS_FUNCDESC 9
  226. #define IMEKMS_NOCOMPOSITION 0
  227. #define IMEKMS_COMPOSITION 1
  228. #define IMEKMS_SELECTION 2
  229. #define IMEKMS_IMEOFF 3
  230. #define IMEKMS_2NDLEVEL 4
  231. #define IMEKMS_INPTGL 5
  232. typedef struct tagIMEKMSINIT {
  233. INT cbSize;
  234. HWND hWnd; // Window which receives notification from IME.
  235. // If hWnd is NULL, no notification is posted
  236. // to Input context.
  237. } IMEKMSINIT;
  238. typedef struct tagIMEKMSKEY {
  239. DWORD dwStatus; //Shift-Control combination status.
  240. //Any combination of constants below
  241. //(defined in IMM.H)
  242. // 0x0000 (default)
  243. // MOD_CONTROL 0x0002
  244. // MOD_SHIFT 0x0004
  245. // Alt key and Win key is not processed by IME.
  246. DWORD dwCompStatus; //Composition string status
  247. //One of the constants below
  248. // IMEKMS_NOCOMPOSITION No composition string
  249. // IMEKMS_COMPOSITION Some composition string
  250. // IMEKMS_SELECTION Selection exists in apps
  251. // IMEKMS_IMEOFF IME Off state
  252. // IMEKMS_2NDLEVEL 2nd stage on 2 stroke key operation
  253. DWORD dwVKEY; // VKEY code defined in IMM.H
  254. union {
  255. DWORD dwControl;// IME Functionality ID
  256. DWORD dwNotUsed;
  257. };
  258. union {
  259. WCHAR pwszDscr[31];// The pointer to string of description of this functionalify
  260. WCHAR pwszNoUse[31];
  261. };
  262. } IMEKMSKEY;
  263. typedef struct tagIMEKMS {
  264. INT cbSize;
  265. HIMC hIMC;
  266. DWORD cKeyList;
  267. IMEKMSKEY *pKeyList;
  268. } IMEKMS;
  269. typedef struct tagIMEKMSNTFY {
  270. INT cbSize;
  271. HIMC hIMC;
  272. BOOL fSelect;
  273. } IMEKMSNTFY;
  274. typedef struct tagIMEKMSKMP {
  275. INT cbSize; //[in] size of this structure
  276. HIMC hIMC; //[in] Input context
  277. LANGID idLang; //[in] Language ID
  278. WORD wVKStart; //[in] VKEY start
  279. WORD wVKEnd; //[in] VKEY end
  280. INT cKeyList; //[out] number of IMEKMSKEY
  281. IMEKMSKEY *pKeyList; //[out] retrieve buffer of IMEKMSKEY
  282. // Must be GlobalMemFree by clients
  283. } IMEKMSKMP;
  284. typedef struct tagIMEKMSINVK {
  285. INT cbSize;
  286. HIMC hIMC;
  287. DWORD dwControl;
  288. } IMEKMSINVK;
  289. typedef struct tagIMEKMSFUNCDESC {
  290. INT cbSize; //[in] size of this structure
  291. LANGID idLang; //[in] Language ID
  292. DWORD dwControl; //[in] IME Functionality ID
  293. WCHAR pwszDescription[128]; //[out] Description of the functionality
  294. } IMEKMSFUNCDESC;
  295. /***********************************************************************
  296. Msg: WM_MSIME_RECONVERTOPTIONS
  297. Desc: Set reconversion options
  298. Usage: SendMessage( hwndDefUI, WM_MSIME_RECONVERTOPTIONS, dwOpt, (LPARAM)(HIMC)hIMC );
  299. wParam: options
  300. lParam: Input context handle
  301. return: Non-zero = accepted. Zero = not accepted.
  302. ***********************************************************************/
  303. // Label for RegisterWindowMessage
  304. #define RWM_RECONVERTOPTIONS TEXT("MSIMEReconvertOptions")
  305. //WParam definition for WM_IME_RECONVERTOPTIONS.
  306. #define RECONVOPT_NONE 0x00000000 // default
  307. #define RECONVOPT_USECANCELNOTIFY 0x00000001 // cancel notify
  308. // parameter of ImmGetCompositionString
  309. #define GCSEX_CANCELRECONVERT 0x10000000
  310. //// END
  311. #ifndef RC_INVOKED
  312. #pragma pack()
  313. #endif /* !RC_INVOKED */
  314. #ifdef __cplusplus
  315. } /* end of 'extern "C" {' */
  316. #endif // __cplusplus
  317. #endif // __IMEUP_H__