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.

438 lines
15 KiB

  1. //
  2. // imepadsv.idl - IDL source for ximepad.
  3. // This is the IDL to test Executable IMEPad.
  4. //
  5. // The MIDL compiler generates proxy/stub code and a type library
  6. // from this file.
  7. //
  8. //
  9. // Interface descriptions
  10. //
  11. import "unknwn.idl" ;
  12. cpp_quote("#pragma pack(8)")
  13. cpp_quote("//////////////////////////////////////////////////////////////////")
  14. cpp_quote("//IMEPad's client IME's substitute INPUT ID ")
  15. cpp_quote("#define IMEINPUTID_DEFAULT 0 //Default IME input ID")
  16. cpp_quote("#define IMEINPUTID_BOPOMOFO 0 //BOPOMOFO IME input ID")
  17. cpp_quote("#define IMEINPUTID_CHANGJIE 1 //Changjie IME input ID")
  18. cpp_quote("")
  19. cpp_quote("#define SZ_IMEPADCLIENTCLASS_IMM TEXT(\"msimePad81IMMCLClass\")")
  20. cpp_quote("#define SZ_IMEPADSERVERCLASS_IMM TEXT(\"msimePad81IMMSVClass\")")
  21. cpp_quote("#define SZ_IMEPADCLIENTCLASS_UIM TEXT(\"msimePad81UIMCLClass\")")
  22. cpp_quote("#define SZ_IMEPADSERVERCLASS_UIM TEXT(\"msimePad81UIMSVClass\")")
  23. cpp_quote("")
  24. cpp_quote("//PassData's Data structure ID")
  25. cpp_quote("#define IMEDATAID_ICONINFO 1")
  26. cpp_quote("#define IMEDATAID_BITMAPINFO 2")
  27. cpp_quote("#define IMEDATAID_CONTROL 10")
  28. cpp_quote("#define IMEDATAID_STRING 11")
  29. cpp_quote("#define IMEDATAID_STRINGCAND 12")
  30. cpp_quote("#define IMEDATAID_COMPOSITION 13")
  31. cpp_quote("#define IMEDATAID_APPINFO 20")
  32. cpp_quote("#define IMEDATAID_CONVSTATUS 30")
  33. cpp_quote("//Command ID")
  34. cpp_quote("#define IMECMDID_INSERTSTRING 10")
  35. cpp_quote("#define IMECMDID_DELETESTRING 11")
  36. cpp_quote("#define IMECMDID_CHANGESTRING 12")
  37. cpp_quote("#define IMECMDID_INSERTSTRINGINFO 13")
  38. cpp_quote("#define IMECMDID_CHANGESTRINGINFO 14")
  39. cpp_quote("#define IMECMDID_INSERTSTRINGCAND 15")
  40. cpp_quote("#define IMECMDID_INSERTSTRINGCANDINFO 16")
  41. cpp_quote("#define IMECMDID_CHANGESTRINGCANDINFO 17")
  42. cpp_quote("#define IMECMDID_GETCOMPOSITIONSTRING 18")
  43. cpp_quote("#define IMECMDID_GETCOMPOSITIONINFO 19")
  44. cpp_quote("#define IMECMDID_GETAPPLHWND 20")
  45. cpp_quote("#define IMECMDID_SENDCTRL 21")
  46. cpp_quote("#define IMECMDID_GETCONVERSIONSTATUS 22")
  47. cpp_quote("#define IMECMDVALUE_DEFAULT_INSERT_POS ((DWORD)~0)")
  48. cpp_quote("//Common data header")
  49. typedef struct tagIMEDATAHEADER {
  50. DWORD dwSize; //Total Data size.
  51. DWORD dwCmdID; //Command ID.
  52. DWORD dwDataID; //Data ID.
  53. DWORD dwDummy; //Dummy Data for pack
  54. }IMEDATAHEADER, *LPIMEDATAHEADER;
  55. typedef struct tagIMEDATACONTROL {
  56. IMEDATAHEADER header;
  57. DWORD dwControl; //imepad.h's IMEPADCTL_XXXX)
  58. DWORD dwReserved1;
  59. DWORD dwReserved2;
  60. }IMEDATACONTROL, *LPIMEDATACONTROL;
  61. typedef struct tagIMEDATASTRING {
  62. IMEDATAHEADER header;
  63. DWORD dwStartPos;
  64. DWORD dwDeleteLength;
  65. BOOL fPreConv;
  66. DWORD dwCharID;
  67. DWORD dwInfoMask;
  68. DWORD dwDummy;
  69. WCHAR wChar[1];
  70. }IMEDATASTRING, *LPIMEDATASTRING;
  71. typedef struct tagIMEDATASTRINGCAND {
  72. IMEDATAHEADER header;
  73. DWORD dwStartPos;
  74. DWORD dwDeleteLength;
  75. BOOL fPreConv;
  76. DWORD dwCharID;
  77. DWORD dwInfoMask;
  78. DWORD dwExtraInfoSize;
  79. DWORD dwExtraInfoOffset;
  80. DWORD dwSelIndex;
  81. DWORD dwStringCount;
  82. DWORD dwOffsetString[1];
  83. }IMEDATASTRINGCAND, *LPIMEDATASTRINGCAND;
  84. typedef struct tagIMEDATACOMPOSITION {
  85. IMEDATAHEADER header;
  86. DWORD dwCaretPos;
  87. DWORD dwUndeterminedStartPos;
  88. DWORD dwUndeterminedLength;
  89. DWORD dwEditStartPos;
  90. DWORD dwEditLength;
  91. DWORD dwStringCount;
  92. DWORD dwOffsetString;
  93. DWORD dwOffsetCharID;
  94. DWORD dwReserved1;
  95. DWORD dwReserved2;
  96. }IMEDATACOMPOSITION, *LPIMEDATACOMPOSITION;
  97. typedef struct tagIMEDATAAPPLINFO {
  98. IMEDATAHEADER header;
  99. HWND hwndApp;
  100. DWORD dwProcessID;
  101. DWORD dwThreadID;
  102. }IMEDATAAPPLINFO, *LPIMEDATAAPPLINFO;
  103. typedef struct tagIMEDATACONVSTATUS {
  104. IMEDATAHEADER header;
  105. DWORD dwConversionMode;
  106. DWORD dwSentenceMode;
  107. }IMEDATACONVSTATUS, *LPIMEDATACONVSTATUS;
  108. cpp_quote("#pragma pack()")
  109. cpp_quote("//////////////////////////////////////////////////////////////////")
  110. cpp_quote("//")
  111. cpp_quote("// IMEPADAPPLETCFG structure")
  112. cpp_quote("//")
  113. cpp_quote("#pragma pack(1)")
  114. cpp_quote("")
  115. cpp_quote("#define IMEPADAPPLETCFGMASK_TITLE 0x0001")
  116. cpp_quote("#define IMEPADAPPLETCFGMASK_TITLEFONTFACE 0x0002")
  117. cpp_quote("#define IMEPADAPPLETCFGMASK_CLSID 0x0004")
  118. cpp_quote("#define IMEPADAPPLETCFGMASK_IID 0x0008")
  119. cpp_quote("#define IMEPADAPPLETCFGMASK_CATID 0x0010")
  120. cpp_quote("#define IMEPADAPPLETCFGMASK_ICON 0x0020")
  121. cpp_quote("#define IMEPADAPPLETCFGMASK_ALL 0x003F")
  122. cpp_quote("")
  123. typedef struct tagIMEPADAPPLETCONFIG {
  124. DWORD dwMask;
  125. WCHAR wchTitle[64];
  126. WCHAR wchTitleFontFace[32]; //set title's font face.
  127. DWORD dwCharSet; //set character set.
  128. CLSID clsId;
  129. IID iid;
  130. DWORD dwCategory;
  131. LPARAM hIcon;
  132. LPARAM lReserved1;
  133. LPARAM lReserved2;
  134. }IMEPADAPPLETCONFIG, *LPIMEPADAPPLETCONFIG;
  135. typedef struct tagIMEPADAPPLYCANDINFO
  136. {
  137. LPWSTR lpwstrDisplay;
  138. LPWSTR lpwstrReading;
  139. }IMEPADAPPLYCANDINFO, *LPIMEPADAPPLYCANDINFO;
  140. cpp_quote("#pragma pack()")
  141. interface IImePadCallback;
  142. // Interface IImePadServer
  143. [
  144. object,
  145. uuid(efb26460-aeba-11d2-83d2-00c04f7a06e5),
  146. helpstring("IImePadServer Interface"),
  147. pointer_default(unique)
  148. ]
  149. interface IImePadServer: IUnknown
  150. {
  151. HRESULT Initialize ([in] DWORD dwProccessID,
  152. [in] DWORD dwThreadID,
  153. [in] DWORD dwImeLangId,
  154. [in] DWORD dwImeSubId,
  155. [in] BOOL fUIM,
  156. [in] IImePadCallback *lpIImePadCallback,
  157. [out] LPARAM * pdwReg,
  158. [in] LPARAM dwReserved1,
  159. [in] LPARAM dwReserved2);
  160. HRESULT Terminate ([in] LPARAM dwReg,
  161. [in] LPARAM dwReserved1);
  162. HRESULT ShowUI ([in] BOOL fShow);
  163. HRESULT IsVisible ([in, out] BOOL *pfVisible);
  164. HRESULT Notify ([in] UINT notify,
  165. [in] WPARAM wParam,
  166. [in] LPARAM lParam);
  167. HRESULT NotifyWithData([in] UINT notify,
  168. [in] DWORD dwCharID,
  169. [in] DWORD dwSelIndex,
  170. [in, string] wchar_t *lpwstrDisplay,
  171. [in, string] wchar_t *lpwstrReading);
  172. HRESULT ActivateApplet([in] UINT activateId,
  173. [in] LPARAM dwActivateParam,
  174. [in, string] wchar_t *lpwstrAppletParam1,
  175. [in, string] wchar_t *lpwstrAppletParam2);
  176. HRESULT GetAppletConfigList([in] DWORD dwMask,
  177. [out] UINT *pCount,
  178. [out, size_is(, *pCount)] IMEPADAPPLETCONFIG **ppCfgList);
  179. };
  180. //Dummy interface to specify Sharedmemory proxy/stbu
  181. //changed uuid for Satori 8.1.0
  182. [
  183. object,
  184. uuid(cefcbea2-bbc2-11d4-84c0-00c04f7a06e5),
  185. helpstring("IImePadServerSHM"),
  186. pointer_default(unique)
  187. ]
  188. interface IImePadServerSHM:IImePadServer
  189. {
  190. };
  191. // Interface IImePadCallback
  192. [
  193. object,
  194. uuid(efb26461-aeba-11d2-83d2-00c04f7a06e5),
  195. helpstring("IImePadCallback Interface"),
  196. pointer_default(unique)
  197. ]
  198. interface IImePadCallback: IUnknown
  199. {
  200. HRESULT OnStart ([in] DWORD dwParam);
  201. HRESULT OnClose ([in] DWORD dwParam);
  202. HRESULT OnPing ([in] DWORD dwParam);
  203. HRESULT PassData ([in] long nSize,
  204. [in, size_is(nSize)] byte *pByte,
  205. [in,out] DWORD *pdwCharID);
  206. HRESULT ReceiveData ([in] DWORD dwCmdID,
  207. [in] DWORD dwDataID,
  208. [out] long *pSize,
  209. [out, size_is(, *pSize)] byte **ppByte);
  210. };
  211. //
  212. // Component descriptions
  213. //
  214. [
  215. //changed uuid for Satori 8.1.0
  216. uuid(cefcbea0-bbc2-11d4-84c0-00c04f7a06e5),
  217. version(1.0),
  218. helpstring("Component1.0 Type Library")
  219. ]
  220. library IImePadServerLib
  221. {
  222. importlib("stdole32.tlb") ;
  223. // Component 1
  224. //changed uuid for Satori 8.1.0
  225. [
  226. uuid(cefcbea1-bbc2-11d4-84c0-00c04f7a06e5),
  227. helpstring("Component 1 Class")
  228. ]
  229. coclass IImePadServerComponent
  230. {
  231. [default] interface IImePadServer;
  232. };
  233. };
  234. // Interface ISHMClassFactory
  235. [
  236. object,
  237. uuid(edc298c2-038d-11d4-8464-00c04f7a06e5),
  238. helpstring("ISHMClassFactory Interface"),
  239. pointer_default(unique)
  240. ]
  241. interface ISHMClassFactory: IUnknown
  242. {
  243. HRESULT CreateObject([in] REFIID refiid,
  244. [out, iid_is(refiid)] void **p);
  245. };
  246. cpp_quote("//define")
  247. cpp_quote("//----------------------------------------------------------------")
  248. cpp_quote("//IImePadApplet category ID")
  249. cpp_quote("//----------------------------------------------------------------")
  250. cpp_quote("#define IPACID_NONE 0x0000")
  251. cpp_quote("#define IPACID_SOFTKEY 0x0001")
  252. cpp_quote("#define IPACID_HANDWRITING 0x0002")
  253. cpp_quote("#define IPACID_STROKESEARCH 0x0003")
  254. cpp_quote("#define IPACID_RADICALSEARCH 0x0004")
  255. cpp_quote("#define IPACID_SYMBOLSEARCH 0x0005")
  256. cpp_quote("#define IPACID_VOICE 0x0006")
  257. cpp_quote("#define IPACID_EPWING 0x0007")
  258. cpp_quote("#define IPACID_OCR 0x0008")
  259. cpp_quote("#define IPACID_USER 0x0100")
  260. cpp_quote("")
  261. cpp_quote("//////////////////////////////////////////////////////////////////")
  262. cpp_quote("//")
  263. cpp_quote("//Notify message for IImePadInternal::Notify()")
  264. cpp_quote("//")
  265. cpp_quote("//----------------------------------------------------------------")
  266. cpp_quote("// Notify composition string's window rect")
  267. cpp_quote("// WPARAM wParam: no use")
  268. cpp_quote("// LPARAM lParam: LPRECT lpRect = (LPRECT)lParam;")
  269. cpp_quote("//----------------------------------------------------------------")
  270. cpp_quote("#define IMEPADNOTIFY_RECTCHANGED 0x0001")
  271. cpp_quote("")
  272. cpp_quote("//----------------------------------------------------------------")
  273. cpp_quote("// Notify context's activation")
  274. cpp_quote("// WPARAM wParam: BOOL fActivate = (BOOL)wParam;")
  275. cpp_quote("// LPARAM lParam: no use")
  276. cpp_quote("//----------------------------------------------------------------")
  277. cpp_quote("#define IMEPADNOTIFY_ACTIVATECONTEXT 0x0002")
  278. cpp_quote("")
  279. cpp_quote("//----------------------------------------------------------------")
  280. cpp_quote("// Notify for mode changed")
  281. cpp_quote("// WPARAM wParam: (INT) convMode = (INT)wParam;")
  282. cpp_quote("// LPARAM lParam: (INT) sentenceMode= (INT)lParam;")
  283. cpp_quote("// conversion mode and sentence mode are IME_CMODE_XX or IME_SMODE_XX ")
  284. cpp_quote("//----------------------------------------------------------------")
  285. cpp_quote("#define IMEPADNOTIFY_MODECHANGED 0x0006")
  286. cpp_quote("")
  287. cpp_quote("//----------------------------------------------------------------")
  288. cpp_quote("// Notify for start composition ")
  289. cpp_quote("// WPARAM wParam: not defined")
  290. cpp_quote("// LPARAM lParam: not defined")
  291. cpp_quote("//----------------------------------------------------------------")
  292. cpp_quote("#define IMEPADNOTIFY_STARTCOMPOSITION 0x0007")
  293. cpp_quote("")
  294. cpp_quote("//----------------------------------------------------------------")
  295. cpp_quote("// Notify for composition")
  296. cpp_quote("// WPARAM wParam: not defined")
  297. cpp_quote("// LPARAM lParam: not defined")
  298. cpp_quote("//----------------------------------------------------------------")
  299. cpp_quote("#define IMEPADNOTIFY_COMPOSITION 0x0008")
  300. cpp_quote("")
  301. cpp_quote("//----------------------------------------------------------------")
  302. cpp_quote("// Notify for end composition ")
  303. cpp_quote("// WPARAM wParam: not defined")
  304. cpp_quote("// LPARAM lParam: not defined")
  305. cpp_quote("//----------------------------------------------------------------")
  306. cpp_quote("#define IMEPADNOTIFY_ENDCOMPOSITION 0x0009")
  307. cpp_quote("")
  308. cpp_quote("//----------------------------------------------------------------")
  309. cpp_quote("// Notify for open candidate")
  310. cpp_quote("// WPARAM wParam: not defined")
  311. cpp_quote("// LPARAM lParam: not defined")
  312. cpp_quote("//----------------------------------------------------------------")
  313. cpp_quote("#define IMEPADNOTIFY_OPENCANDIDATE 0x000A")
  314. cpp_quote("")
  315. cpp_quote("//----------------------------------------------------------------")
  316. cpp_quote("// Notify for close candidate")
  317. cpp_quote("// WPARAM wParam: not defined")
  318. cpp_quote("// LPARAM lParam: not defined")
  319. cpp_quote("//----------------------------------------------------------------")
  320. cpp_quote("#define IMEPADNOTIFY_CLOSECANDIDATE 0x000B")
  321. cpp_quote("")
  322. cpp_quote("//----------------------------------------------------------------")
  323. cpp_quote("// Notify for Candidate Applied")
  324. cpp_quote("// WPARAM wParam: dwCharId = (DWORD)wParam;")
  325. cpp_quote("// LPARAM lParam: iSelIndex = (INT)lParam;")
  326. cpp_quote("//----------------------------------------------------------------")
  327. cpp_quote("#define IMEPADNOTIFY_APPLYCANDIDATE 0x000C")
  328. cpp_quote("")
  329. cpp_quote("//----------------------------------------------------------------")
  330. cpp_quote("// Notify for Querying Candidate")
  331. cpp_quote("// WPARAM wParam: dwCharId = (DWORD)wParam;")
  332. cpp_quote("// LPARAM lParam: 0. not used.")
  333. cpp_quote("//----------------------------------------------------------------")
  334. cpp_quote("#define IMEPADNOTIFY_QUERYCANDIDATE 0x000D")
  335. cpp_quote("")
  336. cpp_quote("")
  337. cpp_quote("//----------------------------------------------------------------")
  338. cpp_quote("// Notify for Candidate Applied")
  339. cpp_quote("// WPARAM wParam: dwCharId = (DWORD)wParam;")
  340. cpp_quote("// LPARAM lParam: lpApplyCandEx = (LPIMEPADAPPLYCANDEX)lParam;")
  341. cpp_quote("//----------------------------------------------------------------")
  342. cpp_quote("#define IMEPADNOTIFY_APPLYCANDIDATE_EX 0x000E")
  343. cpp_quote("")
  344. cpp_quote("")
  345. cpp_quote("")
  346. cpp_quote("//----------------------------------------------------------------")
  347. cpp_quote("//Notify for Destroying ImePad's current thread window")
  348. cpp_quote("//WPARAM wParam: no use ")
  349. cpp_quote("//LPARAM lParam: no use")
  350. cpp_quote("//----------------------------------------------------------------")
  351. cpp_quote("#define IMEPADNOTIFY_ONIMEWINDOWDESTROY 0x0100")
  352. cpp_quote("")
  353. cpp_quote("")
  354. cpp_quote("")
  355. cpp_quote("")
  356. cpp_quote("//////////////////////////////////////////////////////////////////")
  357. cpp_quote("//")
  358. cpp_quote("// ActivateId for IImePadInternal::ActivateApplet()")
  359. cpp_quote("//")
  360. cpp_quote("//----------------------------------------------------------------")
  361. cpp_quote("// IMEPADACTID_ACTIVATEBYCATID requests ImePad to ")
  362. cpp_quote("// Activate Applet by CategoryId.")
  363. cpp_quote("//")
  364. cpp_quote("// UINT activateId: IMEPADACTID_ACTIVATEBYCATID;")
  365. cpp_quote("// LPARAM lParamActivate: IPACID_XXXX;")
  366. cpp_quote("// LPWSTR lpwstrAppletParam1: string passed to applet.")
  367. cpp_quote("// LPWSTR lpwstrAppletParam2: string passed to applet.")
  368. cpp_quote("")
  369. cpp_quote("#define IMEPADACTID_ACTIVATEBYCATID 1000")
  370. cpp_quote("")
  371. cpp_quote("//----------------------------------------------------------------")
  372. cpp_quote("// IMEPADACTID_ACTIVATEBYIID requests ImePad to ")
  373. cpp_quote("// activate applet by Interface ID")
  374. cpp_quote("//")
  375. cpp_quote("// UINT activateId: IMEPADACTID_ACTIVATEBYIID;")
  376. cpp_quote("// DWORD dwActivateParam: (DWORD)(IID *)pIID;")
  377. cpp_quote("// LPWSTR lpwstrAppletParam1: string passed to applet.")
  378. cpp_quote("// LPWSTR lpwstrAppletParam2: string passed to applet.")
  379. cpp_quote("")
  380. cpp_quote("#define IMEPADACTID_ACTIVATEBYIID 1001")
  381. cpp_quote("")
  382. cpp_quote("//----------------------------------------------------------------")
  383. cpp_quote("// IMEPADACTID_ACTIVATEBYNAME requests ImePad to ")
  384. cpp_quote("// activaet applet by applet's title name.")
  385. cpp_quote("//")
  386. cpp_quote("// UINT activateId: IMEPADACTID_ACTIVATEBYNAME")
  387. cpp_quote("// DWORD dwActivateParam: (DWORD)(LPWSTR)lpwstrTitle;")
  388. cpp_quote("// LPWSTR lpwstrAppletParam1: string passed to applet.")
  389. cpp_quote("// LPWSTR lpwstrAppletParam2: string passed to applet.")
  390. cpp_quote("")
  391. cpp_quote("#define IMEPADACTID_ACTIVATEBYNAME 1003")