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.

610 lines
23 KiB

  1. /******************************************************************************
  2. * *
  3. * imepad.h - - Interface for the Windows IMEPAD, IMEPADAPPLET *
  4. * *
  5. * Version 8.1 *
  6. * *
  7. * Copyright (c) 1995-2000, Microsoft Corp. All rights reserved. *
  8. * *
  9. ******************************************************************************/
  10. #ifndef _IME_PAD_H_
  11. #define _IME_PAD_H_
  12. #include <windows.h>
  13. #include <objbase.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. //----------------------------------------------------------------
  18. // ImePadApplet's Category ID
  19. //----------------------------------------------------------------
  20. // {4A0F8E31-C3EE-11d1-AFEF-00805F0C8B6D}
  21. DEFINE_GUID(CATID_MSIME_IImePadApplet_VER7,
  22. 0x4a0f8e31, 0xc3ee, 0x11d1, 0xaf, 0xef, 0x0, 0x80, 0x5f, 0xc, 0x8b, 0x6d);
  23. //----------------------------------------------------------------
  24. // ImePadApplet's Category ID version 8.0.0
  25. //----------------------------------------------------------------
  26. // {56F7A792-FEF1-11d3-8463-00C04F7A06E5}
  27. DEFINE_GUID(CATID_MSIME_IImePadApplet_VER80,
  28. 0x56f7a792, 0xfef1, 0x11d3, 0x84, 0x63, 0x0, 0xc0, 0x4f, 0x7a, 0x6, 0xe5);
  29. //----------------------------------------------------------------
  30. // ImePadApplet's Category ID version 8.1.0
  31. //----------------------------------------------------------------
  32. // {656520B0-BB88-11d4-84C0-00C04F7A06E5}
  33. DEFINE_GUID(CATID_MSIME_IImePadApplet,
  34. 0x656520b0, 0xbb88, 0x11d4, 0x84, 0xc0, 0x0, 0xc0, 0x4f, 0x7a, 0x6, 0xe5);
  35. //----------------------------------------------------------------
  36. // Interface ID
  37. //----------------------------------------------------------------
  38. // {5D8E643A-C3A9-11d1-AFEF-00805F0C8B6D}
  39. DEFINE_GUID(IID_IImePad,
  40. 0x5d8e643a, 0xc3a9, 0x11d1, 0xaf, 0xef, 0x0, 0x80, 0x5f, 0xc, 0x8b, 0x6d);
  41. // {5D8E643B-C3A9-11d1-AFEF-00805F0C8B6D}
  42. DEFINE_GUID(IID_IImePadApplet,
  43. 0x5d8e643b, 0xc3a9, 0x11d1, 0xaf, 0xef, 0x0, 0x80, 0x5f, 0xc, 0x8b, 0x6d);
  44. // {5D8E643C-C3A9-11d1-AFEF-00805F0C8B6D}
  45. DEFINE_GUID(IID_IImeSpecifyApplets,
  46. 0x5d8e643c, 0xc3a9, 0x11d1, 0xaf, 0xef, 0x0, 0x80, 0x5f, 0xc, 0x8b, 0x6d);
  47. #ifdef _WIN64
  48. #pragma pack(8)
  49. #else //!_WIN64
  50. #pragma pack(1)
  51. #endif
  52. typedef struct tagAPPLETIDLIST {
  53. INT count;
  54. IID *pIIDList;
  55. }APPLETIDLIST, *LPAPPLETIDLIST;
  56. //structure for IMEPADREQ_INSERTSTRINGCANDIDATE
  57. typedef struct tagIMESTRINGCANDIDATE {
  58. UINT uCount;
  59. LPWSTR lpwstr[1];
  60. }IMESTRINGCANDIDATE, *LPIMESTRINGCANDIDATE;
  61. //structure for IMEPADREQ_INSERTITEMCANDIDATE
  62. typedef struct tagIMEITEM {
  63. INT cbSize;
  64. INT iType;
  65. LPVOID lpItemData;
  66. }IMEITEM, *LPIMEITEM;
  67. typedef struct tagIMEITEMCANDIDATE {
  68. UINT uCount;
  69. IMEITEM imeItem[1];
  70. }IMEITEMCANDIDATE, *LPIMEITEMCANDIDATE;
  71. //----------------------------------------------------------------
  72. // Character Id in FarEast
  73. //----------------------------------------------------------------
  74. #define FEID_NONE 0x00
  75. #define FEID_CHINESE_TRADITIONAL 0x01
  76. #define FEID_CHINESE_SIMPLIFIED 0x02
  77. #define FEID_CHINESE_HONGKONG 0x03
  78. #define FEID_CHINESE_SINGAPORE 0x04
  79. #define FEID_JAPANESE 0x05
  80. #define FEID_KOREAN 0x06
  81. #define FEID_KOREAN_JOHAB 0x07
  82. //----------------------------------------------------------------
  83. // String with FarEast id
  84. //----------------------------------------------------------------
  85. typedef struct tabIMESTRINGINFO {
  86. DWORD dwFarEastId;
  87. LPWSTR lpwstr;
  88. }IMESTRINGINFO, *LPIMESTRINGINFO;
  89. #define INFOMASK_NONE 0x00000000
  90. #define INFOMASK_QUERY_CAND 0x00000001
  91. #define INFOMASK_APPLY_CAND 0x00000002
  92. #define INFOMASK_APPLY_CAND_EX 0x00000004
  93. #define INFOMASK_STRING_FIX 0x00010000
  94. #define INFOMASK_HIDE_CAND 0x00020000
  95. #define INFOMASK_BLOCK_CAND 0x00040000
  96. //----------------------------------------------------------------
  97. //FarEast data type
  98. //----------------------------------------------------------------
  99. #define IMEFAREASTINFO_TYPE_DEFAULT 0
  100. #define IMEFAREASTINFO_TYPE_READING 1
  101. #define IMEFAREASTINFO_TYPE_COMMENT 2
  102. #define IMEFAREASTINFO_TYPE_COSTTIME 3
  103. //----------------------------------------------------------------
  104. //FarEast specified data.
  105. //----------------------------------------------------------------
  106. typedef struct tabIMEFAREASTINFO {
  107. DWORD dwSize; //total structure size.
  108. DWORD dwType; //Data type.
  109. DWORD dwData[1]; //fareast spec data.
  110. }IMEFAREASTINFO, *LPIMEFAREASTINFO;
  111. //----------------------------------------------------------------
  112. // String candidate info
  113. //----------------------------------------------------------------
  114. typedef struct tagIMESTRINGCANDIDATEINFO {
  115. DWORD dwFarEastId;
  116. LPIMEFAREASTINFO lpFarEastInfo;
  117. DWORD fInfoMask;
  118. INT iSelIndex;
  119. UINT uCount;
  120. LPWSTR lpwstr[1];
  121. }IMESTRINGCANDIDATEINFO, *LPIMESTRINGCANDIDATEINFO;
  122. //----------------------------------------------------------------
  123. //Composition string's information
  124. //----------------------------------------------------------------
  125. typedef struct tagIMECOMPOSITIONSTRINGINFO {
  126. INT iCompStrLen;
  127. INT iCaretPos;
  128. INT iEditStart;
  129. INT iEditLen;
  130. INT iTargetStart;
  131. INT iTargetLen;
  132. }IMECOMPOSITIONSTRINGINFO, *LPIMECOMPOSITIONSTRINGINFO;
  133. //----------------------------------------------------------------
  134. //Composition string's each character
  135. //----------------------------------------------------------------
  136. typedef struct tagIMECHARINFO {
  137. WCHAR wch;
  138. DWORD dwCharInfo;
  139. }IMECHARINFO, *LPIMECHARINFO;
  140. //----------------------------------------------------------------
  141. //IMECHARINFO's dwCharInfo bit mask
  142. //----------------------------------------------------------------
  143. #define CHARINFO_APPLETID_MASK 0xFF000000
  144. #define CHARINFO_FEID_MASK 0x00F00000
  145. #define CHARINFO_CHARID_MASK 0x0000FFFF
  146. #define APPLETIDFROMCHARINFO(charInfo) (((DWORD)(charInfo) & CHARINFO_APPLETID_MASK) >> 24)
  147. #define FEIDFROMCHARINFO(charInfo) (((DWORD)(charInfo) & CHARINFO_FEID_MASK) >> 20)
  148. #define CHARIDFROMCHARINFO(charInfo) ((DWORD)(charInfo) & CHARINFO_CHARID_MASK)
  149. //===== IImePadApplet Configuration ===============================
  150. #define MAX_APPLETTITLE 64
  151. #define MAX_FONTFACE 32
  152. typedef struct tagAPPLETCFG {
  153. DWORD dwConfig; //set combination of IPACFG_XXXX
  154. WCHAR wchTitle[MAX_APPLETTITLE]; //set applet's title name;
  155. WCHAR wchTitleFontFace[MAX_FONTFACE]; //set title's font face.
  156. DWORD dwCharSet; //set character set.
  157. INT iCategory; //set IPACID_XXXX
  158. HICON hIcon; //set Icon Handle for ImePad Appelt's menu.
  159. LANGID langID; //set Applet langID.
  160. WORD dummy;
  161. LPARAM lReserved1;
  162. }IMEAPPLETCFG, *LPIMEAPPLETCFG;
  163. //----------------------------------------------------------------
  164. // APPLETCFG dwConfig mask
  165. //
  166. #define IPACFG_NONE 0x00000000L
  167. #define IPACFG_PROPERTY 0x00000001L //Applet has property.
  168. #define IPACFG_HELP 0x00000002L //Applet has help.
  169. #define IPACFG_TITLE 0x00010000L //Title is set.
  170. #define IPACFG_TITLEFONTFACE 0x00020000L //wchFontFace, dwCharSet is valid.
  171. #define IPACFG_CATEGORY 0x00040000L //category has set.
  172. #define IPACFG_LANG 0x00000010L //LangID has set.
  173. //----------------------------------------------------------------
  174. // APPLETCFG iCategory
  175. //
  176. #define IPACID_NONE 0x0000
  177. #define IPACID_SOFTKEY 0x0001
  178. #define IPACID_HANDWRITING 0x0002
  179. #define IPACID_STROKESEARCH 0x0003
  180. #define IPACID_RADICALSEARCH 0x0004
  181. #define IPACID_SYMBOLSEARCH 0x0005
  182. #define IPACID_VOICE 0x0006
  183. #define IPACID_EPWING 0x0007
  184. #define IPACID_OCR 0x0008
  185. #define IPACID_USER 0x0100
  186. typedef struct tagIMEAPPLETUI {
  187. HWND hwnd; //Window handle of Applet.
  188. DWORD dwStyle; //set combination of IPAWS_XXX.
  189. INT width; //set Applet's initial width.
  190. INT height; //set Applet's initial height.
  191. INT minWidth; //set min width. Valid only IPAWS_MINSIZEFIXED style has set.
  192. INT minHeight; //set min height. Valid only IPAWS_MINSIZEFIXED style has set.
  193. INT maxWidth; //set max width. Valid only IPAWS_MAXSIZEFIXED style has set.
  194. INT maxHeight; //set max height. Valid only IPAWS_MAXSIZEFIXED style has set.
  195. LPARAM lReserved1; //reserved area.
  196. LPARAM lReserved2; //reserved area.
  197. }IMEAPPLETUI, *LPIMEAPPLETUI;
  198. #pragma pack()
  199. //Default insert position
  200. #define IPR_DEFAULT_INSERTPOS ((WORD)0xFFFF)
  201. //==== IImePad Request ID ==========================================
  202. #define IMEPADREQ_FIRST 0x1000
  203. //----------------------------------------------------------------
  204. // IMEPADREQ_INSERTSTRING
  205. // wParam = (WPARMA)(LPWSTR)lpwstr; //address of Unicode text string.
  206. // lParam = 0; //not used.
  207. //----------------------------------------------------------------
  208. #define IMEPADREQ_INSERTSTRING (IMEPADREQ_FIRST + 1)
  209. //----------------------------------------------------------------
  210. // IMEPADREQ_INSERTSTRINGCANDIDATE
  211. // wParam = (WPARAM)(LPIMESTRINGCANDIDATE)lpStrCand; //address of IMESTRINGCANDIDATE
  212. // lParam = 0; //not used.
  213. //----------------------------------------------------------------
  214. #define IMEPADREQ_INSERTSTRINGCANDIDATE (IMEPADREQ_FIRST + 2)
  215. //----------------------------------------------------------------
  216. // IMEPADREQ_INSERTITEMCANDIDATE
  217. // Not implemented in version 7.1.0
  218. // wParam = 0;
  219. // lParam = 0;
  220. //----------------------------------------------------------------
  221. #define IMEPADREQ_INSERTITEMCANDIDATE (IMEPADREQ_FIRST + 3)
  222. //----------------------------------------------------------------
  223. // IMEPADREQ_SENDCONTROL
  224. // wParam = (WPARAM)imePadCtrl; //control code (IMEPADCTRL_XXXX)
  225. // lParam = 0; //not used.
  226. //----------------------------------------------------------------
  227. #define IMEPADREQ_SENDCONTROL (IMEPADREQ_FIRST + 4)
  228. //----------------------------------------------------------------
  229. // IMEPADREQ_SENDKEYCONTROL
  230. // wParam = MAKEWPARAM(ctlMask, updown);
  231. // ctlMask is IMEKEYCTRLMASK_XXX combination
  232. // upDown is IMEKEYCTRL_UP or DOWN
  233. // lParam = (LPARAM)wvKey; //Virtual keycode.
  234. //----------------------------------------------------------------
  235. #define IMEPADREQ_SENDKEYCONTROL (IMEPADREQ_FIRST + 5)
  236. //----------------------------------------------------------------
  237. // IMEPADREQ_GETCOMPOSITIONSTRING
  238. // wParam = (WPARAM)(LPWSTR)lpwstr; //address of Unicode string buffer.
  239. // lParam = (LPARAM)(UINT)cchMax; //buffer max count.
  240. //----------------------------------------------------------------
  241. #define IMEPADREQ_GETCOMPOSITIONSTRING (IMEPADREQ_FIRST + 6)
  242. //----------------------------------------------------------------
  243. // IMEPADREQ_GETSELECTEDSTRING
  244. // Not implemented in version 6.0.0
  245. // wParam = 0;
  246. // lParam = 0;
  247. //----------------------------------------------------------------
  248. #define IMEPADREQ_GETSELECTEDSTRING (IMEPADREQ_FIRST + 7)
  249. //----------------------------------------------------------------
  250. // IMEPADREQ_SETAPPLETSIZE
  251. // wParam = MAKEWPARAM(width, height); // Applet's width & height
  252. // lParam = 0; // not used.
  253. //----------------------------------------------------------------
  254. #define IMEPADREQ_SETAPPLETSIZE (IMEPADREQ_FIRST + 8)
  255. //----------------------------------------------------------------
  256. // IMEPADREQ_SETAPPLETDATA
  257. // wParam = (WPARAM)(PBYTE)pByte; //address of applet's data.
  258. // lParam = (LPARAM)(INT)size; //byte size of pByte.
  259. //----------------------------------------------------------------
  260. #define IMEPADREQ_SETAPPLETDATA (IMEPADREQ_FIRST + 9)
  261. //----------------------------------------------------------------
  262. // IMEPADREQ_GETAPPLETDATA
  263. // wParam = (WPARAM)(PBYTE)pByte; //address of applet's data.
  264. // lParam = (LPARAM)(INT)size; //byte size of pByte.
  265. //----------------------------------------------------------------
  266. #define IMEPADREQ_GETAPPLETDATA (IMEPADREQ_FIRST + 10)
  267. //----------------------------------------------------------------
  268. // IMEPADREQ_SETTITLEFONT
  269. // wParam = (WPARAM)(LPWSTR)lpwstrFontFace; //FontFace name
  270. // lParam = (LPARAM)(INT)charSet; //character set
  271. //----------------------------------------------------------------
  272. #define IMEPADREQ_SETTITLEFONT (IMEPADREQ_FIRST + 11)
  273. //----------------------------------------------------------------
  274. // IMEPADREQ_GETCOMPOSITIONSTRINGINFO
  275. // wParam = (WPARAM)(LPIMECOMPOSITIONSTRINGINFO)lpImeCompInfo.
  276. // //IMECOMPOSITIONSTRINGINFO struct address.
  277. // lParam = 0; //no use.
  278. //----------------------------------------------------------------
  279. #define IMEPADREQ_GETCOMPOSITIONSTRINGINFO (IMEPADREQ_FIRST + 12)
  280. //----------------------------------------------------------------
  281. // IMEPADREQ_GETCOMPOSITIONSTRINGID
  282. // wParam = (WPARAM)(LPIMECHARINFO)lpCharInfo;
  283. // lParam = (LPARAM)(INT)dwMaxLen;
  284. //----------------------------------------------------------------
  285. #define IMEPADREQ_GETCOMPOSITIONSTRINGID (IMEPADREQ_FIRST + 13)
  286. //----------------------------------------------------------------
  287. // IMEPADREQ_INSERTSTRINGCANDIDATEINFO
  288. // wParam = (WPARAM)(LPIMESTRINGCANDIDATEINFO)lpCandInfo;
  289. // lParam = (LPARAM)(WORD)wStartPos;
  290. //----------------------------------------------------------------
  291. #define IMEPADREQ_INSERTSTRINGCANDIDATEINFO (IMEPADREQ_FIRST + 14)
  292. //----------------------------------------------------------------
  293. // IMEPADREQ_CHANGESTRINGCANDIDATEINFO
  294. // wParam = (WPARAM)(LPIMESTRINGCANDIDATEINFO)lpCandInfo;
  295. // lParam = MAKELPARAM(startPos, length);
  296. //----------------------------------------------------------------
  297. #define IMEPADREQ_CHANGESTRINGCANDIDATEINFO (IMEPADREQ_FIRST + 15)
  298. //----------------------------------------------------------------
  299. // IMEPADREQ_DELETESTRING
  300. // wParam = MAKEWPARAM(wStartPos, wLength);
  301. // lParam = 0; //not used.
  302. //----------------------------------------------------------------
  303. #define IMEPADREQ_DELETESTRING (IMEPADREQ_FIRST + 16)
  304. //----------------------------------------------------------------
  305. // IMEPADREQ_CHANGESTRING
  306. // wParam = (WPARAM)(LPWSTR)lpwstr;
  307. // lParam = MAKELPARAM(wStartPos, wLength);
  308. //----------------------------------------------------------------
  309. #define IMEPADREQ_CHANGESTRING (IMEPADREQ_FIRST + 17)
  310. //----------------------------------------------------------------
  311. // IMEPADREQ_INSERTSTRINGINFO
  312. // wParam = (WPARAM)(LPIMESTRINGINFO)lpStrInfo;
  313. // lParam = dwStartPos
  314. //----------------------------------------------------------------
  315. #define IMEPADREQ_INSERTSTRINGINFO (IMEPADREQ_FIRST + 18)
  316. //----------------------------------------------------------------
  317. // IMEPADREQ_CHANGESTRINGINFO
  318. // wParam = (WPARAM)(LPIMESTRINGINFO)lpStrInfo;
  319. // lParam = MAKELPARAM(wStartPos, wLength);
  320. //----------------------------------------------------------------
  321. #define IMEPADREQ_CHANGESTRINGINFO (IMEPADREQ_FIRST + 19)
  322. //----------------------------------------------------------------
  323. // IMEPADREQ_GETAPPLHWND
  324. // wParam = (WPARAM)(HWND *)lpHwnd;
  325. // lParam = 0; not used.
  326. //----------------------------------------------------------------
  327. #define IMEPADREQ_GETAPPLHWND (IMEPADREQ_FIRST + 20)
  328. //----------------------------------------------------------------
  329. // IMEPADREQ_FORCEIMEPADWINDOWSHOW
  330. // wParam = (WPARAM)(BOOL)fShowForce
  331. // lParam = 0; not used.
  332. //----------------------------------------------------------------
  333. #define IMEPADREQ_FORCEIMEPADWINDOWSHOW (IMEPADREQ_FIRST + 21)
  334. //----------------------------------------------------------------
  335. // IMEPADREQ_POSTMODALNOTIFY
  336. // wParam = (WPARAM)notifycode
  337. // lParam = (LPARAM)dwData.
  338. //----------------------------------------------------------------
  339. #define IMEPADREQ_POSTMODALNOTIFY (IMEPADREQ_FIRST + 22)
  340. //----------------------------------------------------------------
  341. // IMEPADREQ_GETDEFAULTUILANGID
  342. // wParam = (WPARAM)(LANGID *)pLangID;
  343. // lParam = 0; not used
  344. //----------------------------------------------------------------
  345. #define IMEPADREQ_GETDEFAULTUILANGID (IMEPADREQ_FIRST + 23)
  346. //----------------------------------------------------------------
  347. // IMEPADREQ_GETCURRENTUILANGID
  348. // wParam = (WPARAM)(LANGID *)pLangID;
  349. // lParam = 0; not used
  350. //----------------------------------------------------------------
  351. #define IMEPADREQ_GETCURRENTUILANGID (IMEPADREQ_FIRST + 24)
  352. //----------------------------------------------------------------
  353. // IMEPADREQ_GETAPPLETUISTYLE
  354. // wParam = (WPARAM)(DWORD *)pdwStyle;
  355. // lParam = 0; not used.
  356. //----------------------------------------------------------------
  357. #define IMEPADREQ_GETAPPLETUISTYLE (IMEPADREQ_FIRST + 25)
  358. //----------------------------------------------------------------
  359. // IMEPADREQ_SETAPPLETUISTYLE
  360. // wParam = (WPARAM)(DWORD)dwStyle;
  361. // lParam = 0; not used.
  362. //----------------------------------------------------------------
  363. #define IMEPADREQ_SETAPPLETUISTYLE (IMEPADREQ_FIRST + 26)
  364. //----------------------------------------------------------------
  365. // IMEPADREQ_ISAPPLETACTIVE
  366. // wParam = (WPARAM)(BOOL *)pfActive;
  367. // lParam = 0; not used.
  368. //----------------------------------------------------------------
  369. #define IMEPADREQ_ISAPPLETACTIVE (IMEPADREQ_FIRST + 27)
  370. //----------------------------------------------------------------
  371. // IMEPADREQ_ISIMEPADWINDOWVISIBLE
  372. // wParam = (WPARAM)(BOOL *)pfVisible;
  373. // lParam = 0; not used.
  374. //----------------------------------------------------------------
  375. #define IMEPADREQ_ISIMEPADWINDOWVISIBLE (IMEPADREQ_FIRST + 28)
  376. //----------------------------------------------------------------
  377. // IMEPADREQ_SETAPPLETMINMAXSIZE
  378. // wParam = MAKEWPARAM(width, height); // Applet's width & height
  379. // lParam = MAKELPARAM(fMax, fNoMove); // Set Max size or Min size,
  380. // // And move or not move.
  381. //----------------------------------------------------------------
  382. #define IMEPADREQ_SETAPPLETMINMAXSIZE (IMEPADREQ_FIRST + 29)
  383. //----------------------------------------------------------------
  384. // IMEPADREQ_GETCONVERSIONSTATUS
  385. // wParam = (WPARAM)(DWORD *)pdwConversionMode; //conversion mode.
  386. // lParam = (LPARAM)(DWORD *)pdwSentenceMode; //sentence mode.
  387. //----------------------------------------------------------------
  388. #define IMEPADREQ_GETCONVERSIONSTATUS (IMEPADREQ_FIRST + 30)
  389. //----------------------------------------------------------------
  390. // IMEPADREQ_GETVERSION
  391. // wParam = (WPARAM)(DWORD *)pdwVerMS;
  392. // lParam = (LPARAM)(DWORD *)pdwVerLS;
  393. //----------------------------------------------------------------
  394. #define IMEPADREQ_GETVERSION (IMEPADREQ_FIRST + 31)
  395. //----------------------------------------------------------------
  396. // IMEPADREQ_GETCURRENTIMEINFO
  397. // wParam = (WPARAM)(DWORD *)pdwImeLangID;
  398. // lParam = (LPARAM)(DWORD *)pdwImeInputID;
  399. //----------------------------------------------------------------
  400. #define IMEPADREQ_GETCURRENTIMEINFO (IMEPADREQ_FIRST + 32)
  401. //===== IMEPADREQ_SENDCONTROL reques parameter ======================
  402. #define IMEPADCTRL_CONVERTALL 1
  403. #define IMEPADCTRL_DETERMINALL 2
  404. #define IMEPADCTRL_DETERMINCHAR 3
  405. #define IMEPADCTRL_CLEARALL 4
  406. #define IMEPADCTRL_CARETSET 5
  407. #define IMEPADCTRL_CARETLEFT 6
  408. #define IMEPADCTRL_CARETRIGHT 7
  409. #define IMEPADCTRL_CARETTOP 8
  410. #define IMEPADCTRL_CARETBOTTOM 9
  411. #define IMEPADCTRL_CARETBACKSPACE 10
  412. #define IMEPADCTRL_CARETDELETE 11
  413. #define IMEPADCTRL_PHRASEDELETE 12
  414. #define IMEPADCTRL_INSERTSPACE 13
  415. #define IMEPADCTRL_INSERTFULLSPACE 14
  416. #define IMEPADCTRL_INSERTHALFSPACE 15
  417. #define IMEPADCTRL_ONIME 16
  418. #define IMEPADCTRL_OFFIME 17
  419. #define IMEPADCTRL_ONPRECONVERSION 18
  420. #define IMEPADCTRL_OFFPRECONVERSION 19
  421. #define IMEPADCTRL_PHONETICCANDIDATE 20
  422. //hot key definition
  423. #define IMEKEYCTRLMASK_ALT 0x0001
  424. #define IMEKEYCTRLMASK_CTRL 0x0002
  425. #define IMEKEYCTRLMASK_SHIFT 0x0004
  426. #define IMEKEYCTRL_UP 1
  427. #define IMEKEYCTRL_DOWN 0
  428. //===== IImePadApplet Notify ID =====================================
  429. #define IMEPN_FIRST 0x0100
  430. #define IMEPN_ACTIVATE (IMEPN_FIRST + 1)
  431. #define IMEPN_INACTIVATE (IMEPN_FIRST + 2)
  432. #define IMEPN_SHOW (IMEPN_FIRST + 4)
  433. #define IMEPN_HIDE (IMEPN_FIRST + 5)
  434. #define IMEPN_SIZECHANGING (IMEPN_FIRST + 6)
  435. #define IMEPN_SIZECHANGED (IMEPN_FIRST + 7)
  436. #define IMEPN_CONFIG (IMEPN_FIRST + 8)
  437. #define IMEPN_HELP (IMEPN_FIRST + 9)
  438. #define IMEPN_QUERYCAND (IMEPN_FIRST +10)
  439. #define IMEPN_APPLYCAND (IMEPN_FIRST +11)
  440. #define IMEPN_APPLYCANDEX (IMEPN_FIRST +12)
  441. #define IMEPN_SETTINGCHANGED (IMEPN_FIRST +13)
  442. #define IMEPN_USER (IMEPN_FIRST + 100)
  443. typedef struct tagAPPLYCANDEXPARAM
  444. {
  445. DWORD dwSize;
  446. LPWSTR lpwstrDisplay;
  447. LPWSTR lpwstrReading;
  448. DWORD dwReserved;
  449. } APPLYCANDEXPARAM, *LPAPPLYCANDEXPARAM;
  450. //===== IImePadApplet window style ================================
  451. #define IPAWS_ENABLED 0x00000001L //Show Applet as Enabled window.
  452. #define IPAWS_SIZINGNOTIFY 0x00000004L //send IMEPN_SIZECHANGING(ED) notify to applet.
  453. #define IPAWS_VERTICALFIXED 0x00000100L //Vertically fixed.
  454. #define IPAWS_HORIZONTALFIXED 0x00000200L //Horizontally fixed.
  455. #define IPAWS_SIZEFIXED 0x00000300L //size is fixed.
  456. #define IPAWS_MAXWIDTHFIXED 0x00001000L //max width is fixed.
  457. #define IPAWS_MAXHEIGHTFIXED 0x00002000L //max height is fixed.
  458. #define IPAWS_MAXSIZEFIXED 0x00003000L //max size is fixed.
  459. #define IPAWS_MINWIDTHFIXED 0x00010000L //min width is fixed.
  460. #define IPAWS_MINHEIGHTFIXED 0x00020000L //min height is fixed.
  461. #define IPAWS_MINSIZEFIXED 0x00030000L //min size is fixed.
  462. //======IImePad IImePadApplet Interface definition===============
  463. DECLARE_INTERFACE(IImePad);
  464. DECLARE_INTERFACE(IImePadApplet);
  465. DECLARE_INTERFACE(IImeSpecifyApplets);
  466. DECLARE_INTERFACE_(IImePad, IUnknown)
  467. {
  468. /*** IUnknown methods ***/
  469. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  470. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  471. STDMETHOD_(ULONG, Release)(THIS) PURE;
  472. /*** IImePad methods ***/
  473. STDMETHOD(Request)(THIS_
  474. IImePadApplet *pIImePadApplet,
  475. INT reqId,
  476. WPARAM wParam,
  477. LPARAM lParam) PURE;
  478. };
  479. DECLARE_INTERFACE_(IImeSpecifyApplets, IUnknown)
  480. {
  481. /*** IUnknown methods ***/
  482. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  483. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  484. STDMETHOD_(ULONG, Release)(THIS) PURE;
  485. /*** IImeSpecifyApplet methods ***/
  486. STDMETHOD(GetAppletIIDList)(THIS_
  487. REFIID refiid,
  488. LPAPPLETIDLIST lpIIDList) PURE;
  489. };
  490. DECLARE_INTERFACE_(IImePadApplet, IUnknown)
  491. {
  492. /*** IUnknown methods ***/
  493. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  494. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  495. STDMETHOD_(ULONG, Release) (THIS) PURE;
  496. /*** IImePadApplet methods ***/
  497. STDMETHOD(Initialize)(THIS_ IUnknown *lpIImePad) PURE;
  498. STDMETHOD(Terminate) (THIS) PURE;
  499. STDMETHOD(GetAppletConfig)(THIS_ LPIMEAPPLETCFG lpAppletCfg) PURE;
  500. STDMETHOD(CreateUI)(THIS_
  501. HWND hwndParent,
  502. LPIMEAPPLETUI lpImeAppletUI) PURE;
  503. STDMETHOD(Notify)(THIS_
  504. IUnknown *lpImePad,
  505. INT notify,
  506. WPARAM wParam,
  507. LPARAM lParam) PURE;
  508. };
  509. #ifdef __cplusplus
  510. };
  511. #endif
  512. #endif //_IME_PAD_H_