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.

538 lines
26 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-1998.
  5. //
  6. // File: dimm.idl
  7. //
  8. // Contents: ActiveIMM interface definitions
  9. //
  10. //
  11. //--------------------------------------------------------------------------
  12. cpp_quote("//=--------------------------------------------------------------------------=")
  13. cpp_quote("// dimm.h")
  14. cpp_quote("//=--------------------------------------------------------------------------=")
  15. cpp_quote("// (C) Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.")
  16. cpp_quote("//")
  17. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  18. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  19. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  20. cpp_quote("// PARTICULAR PURPOSE.")
  21. cpp_quote("//=--------------------------------------------------------------------------=")
  22. cpp_quote("")
  23. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  24. cpp_quote("")
  25. cpp_quote("//--------------------------------------------------------------------------")
  26. cpp_quote("// IActiveIMM Interfaces.")
  27. cpp_quote("")
  28. /*
  29. Disable a warning about lack of polymorphic type support for the following reasons
  30. - the only reason to have library block in the file is to make midl accept coclass
  31. statement and generate CLSID for CActiveIMM.
  32. - the generated dimm_i.c has the clsid and that file is used to have clsid available
  33. - the dimm.tlb is not used at all
  34. - on top of it, there is no plans to port the app using dimm.idl to 64b platform.
  35. */
  36. midl_pragma warning( disable: 2395) // polymorphic types not supported in the TLB
  37. #ifndef DO_NO_IMPORTS
  38. import "unknwn.idl";
  39. #endif
  40. [
  41. uuid(4955DD30-B159-11d0-8FCF-00AA006BCC59),
  42. helpstring("ActiveIMM"),
  43. lcid(0x0000),
  44. version(0.1)
  45. ]
  46. library ActiveIMM
  47. {
  48. importlib("stdole2.tlb");
  49. cpp_quote("#include <imm.h>")
  50. cpp_quote("#if 0")
  51. typedef WORD LANGID;
  52. typedef struct
  53. {
  54. LPSTR lpReading;
  55. LPSTR lpWord;
  56. } REGISTERWORDA;
  57. typedef struct
  58. {
  59. LPWSTR lpReading;
  60. LPWSTR lpWord;
  61. } REGISTERWORDW;
  62. #define LF_FACESIZE 32
  63. typedef struct
  64. {
  65. LONG lfHeight;
  66. LONG lfWidth;
  67. LONG lfEscapement;
  68. LONG lfOrientation;
  69. LONG lfWeight;
  70. BYTE lfItalic;
  71. BYTE lfUnderline;
  72. BYTE lfStrikeOut;
  73. BYTE lfCharSet;
  74. BYTE lfOutPrecision;
  75. BYTE lfClipPrecision;
  76. BYTE lfQuality;
  77. BYTE lfPitchAndFamily;
  78. CHAR lfFaceName[LF_FACESIZE];
  79. } LOGFONTA;
  80. typedef struct
  81. {
  82. LONG lfHeight;
  83. LONG lfWidth;
  84. LONG lfEscapement;
  85. LONG lfOrientation;
  86. LONG lfWeight;
  87. BYTE lfItalic;
  88. BYTE lfUnderline;
  89. BYTE lfStrikeOut;
  90. BYTE lfCharSet;
  91. BYTE lfOutPrecision;
  92. BYTE lfClipPrecision;
  93. BYTE lfQuality;
  94. BYTE lfPitchAndFamily;
  95. WCHAR lfFaceName[LF_FACESIZE];
  96. } LOGFONTW;
  97. typedef DWORD HIMC;
  98. typedef DWORD HIMCC;
  99. typedef struct
  100. {
  101. DWORD dwIndex;
  102. DWORD dwStyle;
  103. POINT ptCurrentPos;
  104. RECT rcArea;
  105. } CANDIDATEFORM;
  106. typedef struct
  107. {
  108. DWORD dwStyle;
  109. POINT ptCurrentPos;
  110. RECT rcArea;
  111. } COMPOSITIONFORM;
  112. typedef struct
  113. {
  114. DWORD dwSize;
  115. DWORD dwStyle;
  116. DWORD dwCount;
  117. DWORD dwSelection;
  118. DWORD dwPageStart;
  119. DWORD dwPageSize;
  120. DWORD dwOffset[1];
  121. } CANDIDATELIST;
  122. #define STYLE_DESCRIPTION_SIZE 32
  123. typedef struct
  124. {
  125. DWORD dwStyle;
  126. CHAR szDescription[STYLE_DESCRIPTION_SIZE];
  127. } STYLEBUFA;
  128. typedef struct
  129. {
  130. DWORD dwStyle;
  131. WCHAR szDescription[STYLE_DESCRIPTION_SIZE];
  132. } STYLEBUFW;
  133. typedef WORD ATOM;
  134. cpp_quote("#endif")
  135. cpp_quote("#if (WINVER < 0x040A)")
  136. #define IMEMENUITEM_STRING_SIZE 80
  137. typedef struct
  138. {
  139. UINT cbSize;
  140. UINT fType;
  141. UINT fState;
  142. UINT wID;
  143. HBITMAP hbmpChecked;
  144. HBITMAP hbmpUnchecked;
  145. DWORD dwItemData;
  146. CHAR szString[IMEMENUITEM_STRING_SIZE];
  147. HBITMAP hbmpItem;
  148. } IMEMENUITEMINFOA;
  149. typedef struct
  150. {
  151. UINT cbSize;
  152. UINT fType;
  153. UINT fState;
  154. UINT wID;
  155. HBITMAP hbmpChecked;
  156. HBITMAP hbmpUnchecked;
  157. DWORD dwItemData;
  158. WCHAR szString[IMEMENUITEM_STRING_SIZE];
  159. HBITMAP hbmpItem;
  160. } IMEMENUITEMINFOW;
  161. cpp_quote("#endif")
  162. cpp_quote("#ifndef _DDKIMM_H_")
  163. typedef struct
  164. {
  165. HWND hWnd;
  166. BOOL fOpen;
  167. POINT ptStatusWndPos;
  168. POINT ptSoftKbdPos;
  169. DWORD fdwConversion;
  170. DWORD fdwSentence;
  171. union
  172. {
  173. LOGFONTA A;
  174. LOGFONTW W;
  175. } lfFont;
  176. COMPOSITIONFORM cfCompForm;
  177. CANDIDATEFORM cfCandForm[4];
  178. HIMCC hCompStr;
  179. HIMCC hCandInfo;
  180. HIMCC hGuideLine;
  181. HIMCC hPrivate;
  182. DWORD dwNumMsgBuf;
  183. HIMCC hMsgBuf;
  184. DWORD fdwInit;
  185. DWORD dwReserve[3];
  186. } INPUTCONTEXT;
  187. typedef struct
  188. {
  189. DWORD dwPrivateDataSize;
  190. DWORD fdwProperty;
  191. DWORD fdwConversionCaps;
  192. DWORD fdwSentenceCaps;
  193. DWORD fdwUICaps;
  194. DWORD fdwSCSCaps;
  195. DWORD fdwSelectCaps;
  196. } IMEINFO;
  197. cpp_quote("#endif")
  198. [
  199. object,
  200. uuid(08C03412-F96B-11d0-A475-00AA006BCC59),
  201. pointer_default(unique)
  202. ]
  203. interface IEnumRegisterWordA : IUnknown
  204. {
  205. HRESULT Clone([out] IEnumRegisterWordA **ppEnum);
  206. HRESULT Next([in] ULONG ulCount, [out] REGISTERWORDA *rgRegisterWord, [out] ULONG *pcFetched);
  207. HRESULT Reset();
  208. HRESULT Skip([in] ULONG ulCount);
  209. };
  210. [
  211. object,
  212. uuid(4955DD31-B159-11d0-8FCF-00AA006BCC59),
  213. pointer_default(unique)
  214. ]
  215. interface IEnumRegisterWordW : IUnknown
  216. {
  217. HRESULT Clone([out] IEnumRegisterWordW **ppEnum);
  218. HRESULT Next([in] ULONG ulCount, [out] REGISTERWORDW *rgRegisterWord, [out] ULONG *pcFetched);
  219. HRESULT Reset();
  220. HRESULT Skip([in] ULONG ulCount);
  221. };
  222. [
  223. object,
  224. uuid(09b5eab0-f997-11d1-93d4-0060b067b86e),
  225. pointer_default(unique)
  226. ]
  227. interface IEnumInputContext : IUnknown
  228. {
  229. HRESULT Clone([out] IEnumInputContext **ppEnum);
  230. HRESULT Next([in] ULONG ulCount, [out] HIMC *rgInputContext, [out] ULONG *pcFetched);
  231. HRESULT Reset();
  232. HRESULT Skip([in] ULONG ulCount);
  233. };
  234. [
  235. object,
  236. uuid(b3458082-bd00-11d1-939b-0060b067b86e),
  237. pointer_default(unique)
  238. ]
  239. interface IActiveIMMRegistrar : IUnknown
  240. {
  241. HRESULT RegisterIME([in] REFCLSID rclsid, [in] LANGID lgid, [in] LPCWSTR pszIconFile, [in] LPCWSTR pszDesc);
  242. HRESULT UnregisterIME([in] REFCLSID rclsid);
  243. };
  244. [
  245. object,
  246. uuid(b5cf2cfa-8aeb-11d1-9364-0060b067b86e),
  247. pointer_default(unique)
  248. ]
  249. interface IActiveIMMMessagePumpOwner : IUnknown
  250. {
  251. HRESULT Start();
  252. HRESULT End();
  253. HRESULT OnTranslateMessage([in] const MSG *pMsg);
  254. HRESULT Pause([out] DWORD *pdwCookie);
  255. HRESULT Resume([in] DWORD dwCookie);
  256. }
  257. [
  258. object,
  259. uuid(08c0e040-62d1-11d1-9326-0060b067b86e),
  260. pointer_default(unique)
  261. ]
  262. interface IActiveIMMApp : IUnknown
  263. {
  264. HRESULT AssociateContext([in] HWND hWnd, [in] HIMC hIME, [out] HIMC *phPrev);
  265. HRESULT ConfigureIMEA([in] HKL hKL, [in] HWND hWnd, [in] DWORD dwMode, [in] REGISTERWORDA *pData);
  266. HRESULT ConfigureIMEW([in] HKL hKL, [in] HWND hWnd, [in] DWORD dwMode, [in] REGISTERWORDW *pData);
  267. HRESULT CreateContext([out] HIMC *phIMC);
  268. HRESULT DestroyContext([in] HIMC hIME);
  269. HRESULT EnumRegisterWordA([in] HKL hKL, [in] LPSTR szReading, [in] DWORD dwStyle, [in] LPSTR szRegister, [in] LPVOID pData, [out] IEnumRegisterWordA **pEnum);
  270. HRESULT EnumRegisterWordW([in] HKL hKL, [in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szRegister, [in] LPVOID pData, [out] IEnumRegisterWordW **pEnum);
  271. HRESULT EscapeA([in] HKL hKL, [in] HIMC hIMC, [in] UINT uEscape, [in, out] LPVOID pData, [out] LRESULT *plResult);
  272. HRESULT EscapeW([in] HKL hKL, [in] HIMC hIMC, [in] UINT uEscape, [in, out] LPVOID pData, [out] LRESULT *plResult);
  273. HRESULT GetCandidateListA([in] HIMC hIMC, [in] DWORD dwIndex, [in] UINT uBufLen, [out] CANDIDATELIST *pCandList, [out] UINT *puCopied);
  274. HRESULT GetCandidateListW([in] HIMC hIMC, [in] DWORD dwIndex, [in] UINT uBufLen, [out] CANDIDATELIST *pCandList, [out] UINT *puCopied);
  275. HRESULT GetCandidateListCountA([in] HIMC hIMC, [out] DWORD *pdwListSize, [out] DWORD *pdwBufLen);
  276. HRESULT GetCandidateListCountW([in] HIMC hIMC, [out] DWORD *pdwListSize, [out] DWORD *pdwBufLen);
  277. HRESULT GetCandidateWindow([in] HIMC hIMC, [in] DWORD dwIndex, [out] CANDIDATEFORM *pCandidate);
  278. HRESULT GetCompositionFontA([in] HIMC hIMC, [out] LOGFONTA *plf);
  279. HRESULT GetCompositionFontW([in] HIMC hIMC, [out] LOGFONTW *plf);
  280. HRESULT GetCompositionStringA([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LONG *plCopied, [out] LPVOID pBuf);
  281. HRESULT GetCompositionStringW([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LONG *plCopied, [out] LPVOID pBuf);
  282. HRESULT GetCompositionWindow([in] HIMC hIMC, [out] COMPOSITIONFORM *pCompForm);
  283. HRESULT GetContext([in] HWND hWnd, [out] HIMC *phIMC);
  284. HRESULT GetConversionListA([in] HKL hKL, [in] HIMC hIMC, [in] LPSTR pSrc, [in] UINT uBufLen, [in] UINT uFlag, [out] CANDIDATELIST *pDst, [out] UINT *puCopied);
  285. HRESULT GetConversionListW([in] HKL hKL, [in] HIMC hIMC, [in] LPWSTR pSrc, [in] UINT uBufLen, [in] UINT uFlag, [out] CANDIDATELIST *pDst, [out] UINT *puCopied);
  286. HRESULT GetConversionStatus([in] HIMC hIMC, [out] DWORD *pfdwConversion, [out] DWORD *pfdwSentence);
  287. HRESULT GetDefaultIMEWnd([in] HWND hWnd, [out] HWND *phDefWnd);
  288. HRESULT GetDescriptionA([in] HKL hKL, [in] UINT uBufLen, [out] LPSTR szDescription, [out] UINT *puCopied);
  289. HRESULT GetDescriptionW([in] HKL hKL, [in] UINT uBufLen, [out] LPWSTR szDescription, [out] UINT *puCopied);
  290. HRESULT GetGuideLineA([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LPSTR pBuf, [out] DWORD *pdwResult);
  291. HRESULT GetGuideLineW([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LPWSTR pBuf, [out] DWORD *pdwResult);
  292. HRESULT GetIMEFileNameA([in] HKL hKL, [in] UINT uBufLen, [out] LPSTR szFileName, [out] UINT *puCopied);
  293. HRESULT GetIMEFileNameW([in] HKL hKL, [in] UINT uBufLen, [out] LPWSTR szFileName, [out] UINT *puCopied);
  294. HRESULT GetOpenStatus([in] HIMC hIMC);
  295. HRESULT GetProperty([in] HKL hKL, [in] DWORD fdwIndex, [out] DWORD *pdwProperty);
  296. HRESULT GetRegisterWordStyleA([in] HKL hKL, [in] UINT nItem, [out] STYLEBUFA *pStyleBuf, [out] UINT *puCopied);
  297. HRESULT GetRegisterWordStyleW([in] HKL hKL, [in] UINT nItem, [out] STYLEBUFW *pStyleBuf, [out] UINT *puCopied);
  298. HRESULT GetStatusWindowPos([in] HIMC hIMC, [out] POINT *pptPos);
  299. HRESULT GetVirtualKey([in] HWND hWnd, [out] UINT *puVirtualKey);
  300. HRESULT InstallIMEA([in] LPSTR szIMEFileName, [in] LPSTR szLayoutText, [out] HKL *phKL);
  301. HRESULT InstallIMEW([in] LPWSTR szIMEFileName, [in] LPWSTR szLayoutText, [out] HKL *phKL);
  302. HRESULT IsIME([in] HKL hKL);
  303. HRESULT IsUIMessageA([in] HWND hWndIME, [in] UINT msg, [in] WPARAM wParam, [in] LPARAM lParam);
  304. HRESULT IsUIMessageW([in] HWND hWndIME, [in] UINT msg, [in] WPARAM wParam, [in] LPARAM lParam);
  305. HRESULT NotifyIME([in] HIMC hIMC, [in] DWORD dwAction, [in] DWORD dwIndex, [in] DWORD dwValue);
  306. HRESULT RegisterWordA([in] HKL hKL, [in] LPSTR szReading, [in] DWORD dwStyle, [in] LPSTR szRegister);
  307. HRESULT RegisterWordW([in] HKL hKL, [in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szRegister);
  308. HRESULT ReleaseContext([in] HWND hWnd, [in] HIMC hIMC);
  309. HRESULT SetCandidateWindow([in] HIMC hIMC, [in] CANDIDATEFORM *pCandidate);
  310. HRESULT SetCompositionFontA([in] HIMC hIMC, [in] LOGFONTA *plf);
  311. HRESULT SetCompositionFontW([in] HIMC hIMC, [in] LOGFONTW *plf);
  312. HRESULT SetCompositionStringA([in] HIMC hIMC, [in] DWORD dwIndex, [in] LPVOID pComp, [in] DWORD dwCompLen, [in] LPVOID pRead, [in] DWORD dwReadLen);
  313. HRESULT SetCompositionStringW([in] HIMC hIMC, [in] DWORD dwIndex, [in] LPVOID pComp, [in] DWORD dwCompLen, [in] LPVOID pRead, [in] DWORD dwReadLen);
  314. HRESULT SetCompositionWindow([in] HIMC hIMC, [in] COMPOSITIONFORM *pCompForm);
  315. HRESULT SetConversionStatus([in] HIMC hIMC, [in] DWORD fdwConversion, [in] DWORD fdwSentence);
  316. HRESULT SetOpenStatus([in] HIMC hIMC, [in] BOOL fOpen);
  317. HRESULT SetStatusWindowPos([in] HIMC hIMC, [in] POINT *pptPos);
  318. HRESULT SimulateHotKey([in] HWND hWnd, [in] DWORD dwHotKeyID);
  319. HRESULT UnregisterWordA([in] HKL hKL, [in] LPSTR szReading, [in] DWORD dwStyle, [in] LPSTR szUnregister);
  320. HRESULT UnregisterWordW([in] HKL hKL, [in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szUnregister);
  321. HRESULT Activate([in] BOOL fRestoreLayout);
  322. HRESULT Deactivate();
  323. HRESULT OnDefWindowProc([in] HWND hWnd, [in] UINT Msg, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  324. HRESULT FilterClientWindows([in] ATOM *aaClassList, [in] UINT uSize);
  325. HRESULT GetCodePageA([in] HKL hKL, [out] UINT *uCodePage);
  326. HRESULT GetLangId([in] HKL hKL, [out] LANGID *plid);
  327. // win98/nt5 apis
  328. HRESULT AssociateContextEx([in] HWND hWnd, [in] HIMC hIMC, [in] DWORD dwFlags);
  329. HRESULT DisableIME([in] DWORD idThread);
  330. HRESULT GetImeMenuItemsA([in] HIMC hIMC, [in] DWORD dwFlags, [in] DWORD dwType, [in] IMEMENUITEMINFOA *pImeParentMenu, [out] IMEMENUITEMINFOA *pImeMenu, [in] DWORD dwSize, [out] DWORD *pdwResult);
  331. HRESULT GetImeMenuItemsW([in] HIMC hIMC, [in] DWORD dwFlags, [in] DWORD dwType, [in] IMEMENUITEMINFOW *pImeParentMenu, [out] IMEMENUITEMINFOW *pImeMenu, [in] DWORD dwSize, [out] DWORD *pdwResult);
  332. HRESULT EnumInputContext([in] DWORD idThread, [out] IEnumInputContext **ppEnum);
  333. };
  334. [
  335. object,
  336. uuid(08C03411-F96B-11d0-A475-00AA006BCC59),
  337. pointer_default(unique)
  338. ]
  339. interface IActiveIMMIME : IUnknown
  340. {
  341. HRESULT AssociateContext([in] HWND hWnd, [in] HIMC hIME, [out] HIMC *phPrev);
  342. HRESULT ConfigureIMEA([in] HKL hKL, [in] HWND hWnd, [in] DWORD dwMode, [in] REGISTERWORDA *pData);
  343. HRESULT ConfigureIMEW([in] HKL hKL, [in] HWND hWnd, [in] DWORD dwMode, [in] REGISTERWORDW *pData);
  344. HRESULT CreateContext([out] HIMC *phIMC);
  345. HRESULT DestroyContext([in] HIMC hIME);
  346. HRESULT EnumRegisterWordA([in] HKL hKL, [in] LPSTR szReading, [in] DWORD dwStyle, [in] LPSTR szRegister, [in] LPVOID pData, [out] IEnumRegisterWordA **pEnum);
  347. HRESULT EnumRegisterWordW([in] HKL hKL, [in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szRegister, [in] LPVOID pData, [out] IEnumRegisterWordW **pEnum);
  348. HRESULT EscapeA([in] HKL hKL, [in] HIMC hIMC, [in] UINT uEscape, [in, out] LPVOID pData, [out] LRESULT *plResult);
  349. HRESULT EscapeW([in] HKL hKL, [in] HIMC hIMC, [in] UINT uEscape, [in, out] LPVOID pData, [out] LRESULT *plResult);
  350. HRESULT GetCandidateListA([in] HIMC hIMC, [in] DWORD dwIndex, [in] UINT uBufLen, [out] CANDIDATELIST *pCandList, [out] UINT *puCopied);
  351. HRESULT GetCandidateListW([in] HIMC hIMC, [in] DWORD dwIndex, [in] UINT uBufLen, [out] CANDIDATELIST *pCandList, [out] UINT *puCopied);
  352. HRESULT GetCandidateListCountA([in] HIMC hIMC, [out] DWORD *pdwListSize, [out] DWORD *pdwBufLen);
  353. HRESULT GetCandidateListCountW([in] HIMC hIMC, [out] DWORD *pdwListSize, [out] DWORD *pdwBufLen);
  354. HRESULT GetCandidateWindow([in] HIMC hIMC, [in] DWORD dwIndex, [out] CANDIDATEFORM *pCandidate);
  355. HRESULT GetCompositionFontA([in] HIMC hIMC, [out] LOGFONTA *plf);
  356. HRESULT GetCompositionFontW([in] HIMC hIMC, [out] LOGFONTW *plf);
  357. HRESULT GetCompositionStringA([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LONG *plCopied, [out] LPVOID pBuf);
  358. HRESULT GetCompositionStringW([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LONG *plCopied, [out] LPVOID pBuf);
  359. HRESULT GetCompositionWindow([in] HIMC hIMC, [out] COMPOSITIONFORM *pCompForm);
  360. HRESULT GetContext([in] HWND hWnd, [out] HIMC *phIMC);
  361. HRESULT GetConversionListA([in] HKL hKL, [in] HIMC hIMC, [in] LPSTR pSrc, [in] UINT uBufLen, [in] UINT uFlag, [out] CANDIDATELIST *pDst, [out] UINT *puCopied);
  362. HRESULT GetConversionListW([in] HKL hKL, [in] HIMC hIMC, [in] LPWSTR pSrc, [in] UINT uBufLen, [in] UINT uFlag, [out] CANDIDATELIST *pDst, [out] UINT *puCopied);
  363. HRESULT GetConversionStatus([in] HIMC hIMC, [out] DWORD *pfdwConversion, [out] DWORD *pfdwSentence);
  364. HRESULT GetDefaultIMEWnd([in] HWND hWnd, [out] HWND *phDefWnd);
  365. HRESULT GetDescriptionA([in] HKL hKL, [in] UINT uBufLen, [out] LPSTR szDescription, [out] UINT *puCopied);
  366. HRESULT GetDescriptionW([in] HKL hKL, [in] UINT uBufLen, [out] LPWSTR szDescription, [out] UINT *puCopied);
  367. HRESULT GetGuideLineA([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LPSTR pBuf, [out] DWORD *pdwResult);
  368. HRESULT GetGuideLineW([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LPWSTR pBuf, [out] DWORD *pdwResult);
  369. HRESULT GetIMEFileNameA([in] HKL hKL, [in] UINT uBufLen, [out] LPSTR szFileName, [out] UINT *puCopied);
  370. HRESULT GetIMEFileNameW([in] HKL hKL, [in] UINT uBufLen, [out] LPWSTR szFileName, [out] UINT *puCopied);
  371. HRESULT GetOpenStatus([in] HIMC hIMC);
  372. HRESULT GetProperty([in] HKL hKL, [in] DWORD fdwIndex, [out] DWORD *pdwProperty);
  373. HRESULT GetRegisterWordStyleA([in] HKL hKL, [in] UINT nItem, [out] STYLEBUFA *pStyleBuf, [out] UINT *puCopied);
  374. HRESULT GetRegisterWordStyleW([in] HKL hKL, [in] UINT nItem, [out] STYLEBUFW *pStyleBuf, [out] UINT *puCopied);
  375. HRESULT GetStatusWindowPos([in] HIMC hIMC, [out] POINT *pptPos);
  376. HRESULT GetVirtualKey([in] HWND hWnd, [out] UINT *puVirtualKey);
  377. HRESULT InstallIMEA([in] LPSTR szIMEFileName, [in] LPSTR szLayoutText, [out] HKL *phKL);
  378. HRESULT InstallIMEW([in] LPWSTR szIMEFileName, [in] LPWSTR szLayoutText, [out] HKL *phKL);
  379. HRESULT IsIME([in] HKL hKL);
  380. HRESULT IsUIMessageA([in] HWND hWndIME, [in] UINT msg, [in] WPARAM wParam, [in] LPARAM lParam);
  381. HRESULT IsUIMessageW([in] HWND hWndIME, [in] UINT msg, [in] WPARAM wParam, [in] LPARAM lParam);
  382. HRESULT NotifyIME([in] HIMC hIMC, [in] DWORD dwAction, [in] DWORD dwIndex, [in] DWORD dwValue);
  383. HRESULT RegisterWordA([in] HKL hKL, [in] LPSTR szReading, [in] DWORD dwStyle, [in] LPSTR szRegister);
  384. HRESULT RegisterWordW([in] HKL hKL, [in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szRegister);
  385. HRESULT ReleaseContext([in] HWND hWnd, [in] HIMC hIMC);
  386. HRESULT SetCandidateWindow([in] HIMC hIMC, [in] CANDIDATEFORM *pCandidate);
  387. HRESULT SetCompositionFontA([in] HIMC hIMC, [in] LOGFONTA *plf);
  388. HRESULT SetCompositionFontW([in] HIMC hIMC, [in] LOGFONTW *plf);
  389. HRESULT SetCompositionStringA([in] HIMC hIMC, [in] DWORD dwIndex, [in] LPVOID pComp, [in] DWORD dwCompLen, [in] LPVOID pRead, [in] DWORD dwReadLen);
  390. HRESULT SetCompositionStringW([in] HIMC hIMC, [in] DWORD dwIndex, [in] LPVOID pComp, [in] DWORD dwCompLen, [in] LPVOID pRead, [in] DWORD dwReadLen);
  391. HRESULT SetCompositionWindow([in] HIMC hIMC, [in] COMPOSITIONFORM *pCompForm);
  392. HRESULT SetConversionStatus([in] HIMC hIMC, [in] DWORD fdwConversion, [in] DWORD fdwSentence);
  393. HRESULT SetOpenStatus([in] HIMC hIMC, [in] BOOL fOpen);
  394. HRESULT SetStatusWindowPos([in] HIMC hIMC, [in] POINT *pptPos);
  395. HRESULT SimulateHotKey([in] HWND hWnd, [in] DWORD dwHotKeyID);
  396. HRESULT UnregisterWordA([in] HKL hKL, [in] LPSTR szReading, [in] DWORD dwStyle, [in] LPSTR szUnregister);
  397. HRESULT UnregisterWordW([in] HKL hKL, [in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szUnregister);
  398. // ime helper methods
  399. HRESULT GenerateMessage([in] HIMC hIMC);
  400. // HIMC and HIMCC management api's
  401. HRESULT LockIMC([in] HIMC hIMC, [out] INPUTCONTEXT **ppIMC);
  402. HRESULT UnlockIMC([in] HIMC hIMC);
  403. HRESULT GetIMCLockCount([in] HIMC hIMC, [out] DWORD *pdwLockCount);
  404. HRESULT CreateIMCC([in] DWORD dwSize, [out] HIMCC *phIMCC);
  405. HRESULT DestroyIMCC([in] HIMCC hIMCC);
  406. HRESULT LockIMCC([in] HIMCC hIMCC, [out] void **ppv);
  407. HRESULT UnlockIMCC([in] HIMCC hIMCC);
  408. HRESULT ReSizeIMCC([in] HIMCC hIMCC, [in] DWORD dwSize, [out] HIMCC *phIMCC);
  409. HRESULT GetIMCCSize([in] HIMCC hIMCC, [out] DWORD *pdwSize);
  410. HRESULT GetIMCCLockCount([in] HIMCC hIMCC, [out] DWORD *pdwLockCount);
  411. // hot key manipulation api's
  412. HRESULT GetHotKey([in] DWORD dwHotKeyID, [out] UINT *puModifiers, [out] UINT *puVKey, [out] HKL *phKL);
  413. HRESULT SetHotKey([in] DWORD dwHotKeyID, [in] UINT uModifiers, [in] UINT uVKey, [in] HKL hKL);
  414. // soft keyboard api's
  415. HRESULT CreateSoftKeyboard([in] UINT uType, [in] HWND hOwner, [in] int x, [in] int y, [out] HWND *phSoftKbdWnd);
  416. HRESULT DestroySoftKeyboard([in] HWND hSoftKbdWnd);
  417. HRESULT ShowSoftKeyboard([in] HWND hSoftKbdWnd, [in] int nCmdShow);
  418. HRESULT GetCodePageA([in] HKL hKL, [out] UINT *uCodePage);
  419. HRESULT GetLangId([in] HKL hKL, [out] LANGID *plid);
  420. HRESULT KeybdEvent([in] LANGID lgidIME, [in] BYTE bVk, [in] BYTE bScan, [in] DWORD dwFlags, [in] DWORD dwExtraInfo);
  421. HRESULT LockModal();
  422. HRESULT UnlockModal();
  423. // win98/nt5 apis
  424. HRESULT AssociateContextEx([in] HWND hWnd, [in] HIMC hIMC, [in] DWORD dwFlags);
  425. HRESULT DisableIME([in] DWORD idThread);
  426. HRESULT GetImeMenuItemsA([in] HIMC hIMC, [in] DWORD dwFlags, [in] DWORD dwType, [in] IMEMENUITEMINFOA *pImeParentMenu, [out] IMEMENUITEMINFOA *pImeMenu, [in] DWORD dwSize, [out] DWORD *pdwResult);
  427. HRESULT GetImeMenuItemsW([in] HIMC hIMC, [in] DWORD dwFlags, [in] DWORD dwType, [in] IMEMENUITEMINFOW *pImeParentMenu, [out] IMEMENUITEMINFOW *pImeMenu, [in] DWORD dwSize, [out] DWORD *pdwResult);
  428. HRESULT EnumInputContext([in] DWORD idThread, [out] IEnumInputContext **ppEnum);
  429. HRESULT RequestMessageA([in] HIMC hIMC, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  430. HRESULT RequestMessageW([in] HIMC hIMC, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  431. HRESULT SendIMCA([in] HWND hWnd, [in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  432. HRESULT SendIMCW([in] HWND hWnd, [in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  433. HRESULT IsSleeping();
  434. };
  435. [
  436. object,
  437. uuid(6FE20962-D077-11d0-8FE7-00AA006BCC59),
  438. pointer_default(unique)
  439. ]
  440. interface IActiveIME : IUnknown
  441. {
  442. HRESULT Inquire([in] DWORD dwSystemInfoFlags, [out] IMEINFO *pIMEInfo, [out] LPWSTR szWndClass, [out] DWORD *pdwPrivate);
  443. HRESULT ConversionList([in] HIMC hIMC, [in] LPWSTR szSource, [in] UINT uFlag, [in] UINT uBufLen, [out] CANDIDATELIST *pDest, [out] UINT *puCopied);
  444. HRESULT Configure([in] HKL hKL, [in] HWND hWnd, [in] DWORD dwMode, [in] REGISTERWORDW *pRegisterWord);
  445. HRESULT Destroy([in] UINT uReserved);
  446. HRESULT Escape([in] HIMC hIMC, [in] UINT uEscape, [in, out] void *pData, [out] LRESULT *plResult);
  447. HRESULT SetActiveContext([in] HIMC hIMC, [in] BOOL fFlag);
  448. HRESULT ProcessKey([in] HIMC hIMC, [in] UINT uVirKey, [in] DWORD lParam, [in] BYTE *pbKeyState);
  449. HRESULT Notify([in] HIMC hIMC, [in] DWORD dwAction, [in] DWORD dwIndex, [in] DWORD dwValue);
  450. HRESULT Select([in] HIMC hIMC, [in] BOOL fSelect);
  451. HRESULT SetCompositionString([in] HIMC hIMC, [in] DWORD dwIndex, [in] void *pComp, [in] DWORD dwCompLen, [in] void *pRead, [in] DWORD dwReadLen);
  452. HRESULT ToAsciiEx([in] UINT uVirKey, [in] UINT uScanCode, [in] BYTE *pbKeyState, [in] UINT fuState, [in] HIMC hIMC, [out] DWORD *pdwTransBuf, [out] UINT *puSize);
  453. HRESULT RegisterWord([in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szString);
  454. HRESULT UnregisterWord([in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szString);
  455. HRESULT GetRegisterWordStyle([in] UINT nItem, [out] STYLEBUFW *pStyleBuf, [out] UINT *puBufSize);
  456. HRESULT EnumRegisterWord([in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szRegister, [in] LPVOID pData, [out] IEnumRegisterWordW **ppEnum);
  457. HRESULT GetCodePageA([out] UINT *uCodePage);
  458. HRESULT GetLangId([out] LANGID *plid);
  459. };
  460. [
  461. object,
  462. uuid(e1c4bf0e-2d53-11d2-93e1-0060b067b86e),
  463. pointer_default(unique)
  464. ]
  465. interface IActiveIME2 : IActiveIME
  466. {
  467. HRESULT Sleep();
  468. HRESULT Unsleep([in] BOOL fDead);
  469. };
  470. [
  471. uuid(4955DD33-B159-11d0-8FCF-00AA006BCC59),
  472. ]
  473. coclass CActiveIMM
  474. {
  475. [default] interface IActiveIMMApp;
  476. interface IActiveIMMIME;
  477. interface IActiveIMMRegistrar;
  478. interface IActiveIMMMessagePumpOwner;
  479. };
  480. }