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.

537 lines
27 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-1997.
  5. //
  6. // File: aimm.idl
  7. //
  8. // Contents: ActiveIMM interface definitions
  9. //
  10. //
  11. //--------------------------------------------------------------------------
  12. cpp_quote("//=--------------------------------------------------------------------------=")
  13. cpp_quote("// aimm.h")
  14. cpp_quote("//=--------------------------------------------------------------------------=")
  15. cpp_quote("// (C) Copyright 1995-1997 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.2)
  45. ]
  46. library ActiveIMM
  47. {
  48. importlib("stdole2.tlb");
  49. cpp_quote("#ifndef _IMM_")
  50. cpp_quote("#error Must include imm.h!")
  51. cpp_quote("#endif")
  52. cpp_quote("#if 0")
  53. typedef WORD LANGID;
  54. typedef struct
  55. {
  56. LPSTR lpReading;
  57. LPSTR lpWord;
  58. } REGISTERWORDA;
  59. typedef struct
  60. {
  61. LPWSTR lpReading;
  62. LPWSTR lpWord;
  63. } REGISTERWORDW;
  64. #define LF_FACESIZE 32
  65. typedef struct
  66. {
  67. LONG lfHeight;
  68. LONG lfWidth;
  69. LONG lfEscapement;
  70. LONG lfOrientation;
  71. LONG lfWeight;
  72. BYTE lfItalic;
  73. BYTE lfUnderline;
  74. BYTE lfStrikeOut;
  75. BYTE lfCharSet;
  76. BYTE lfOutPrecision;
  77. BYTE lfClipPrecision;
  78. BYTE lfQuality;
  79. BYTE lfPitchAndFamily;
  80. CHAR lfFaceName[LF_FACESIZE];
  81. } LOGFONTA;
  82. typedef struct
  83. {
  84. LONG lfHeight;
  85. LONG lfWidth;
  86. LONG lfEscapement;
  87. LONG lfOrientation;
  88. LONG lfWeight;
  89. BYTE lfItalic;
  90. BYTE lfUnderline;
  91. BYTE lfStrikeOut;
  92. BYTE lfCharSet;
  93. BYTE lfOutPrecision;
  94. BYTE lfClipPrecision;
  95. BYTE lfQuality;
  96. BYTE lfPitchAndFamily;
  97. WCHAR lfFaceName[LF_FACESIZE];
  98. } LOGFONTW;
  99. typedef DWORD HIMC;
  100. typedef DWORD HIMCC;
  101. typedef struct
  102. {
  103. DWORD dwIndex;
  104. DWORD dwStyle;
  105. POINT ptCurrentPos;
  106. RECT rcArea;
  107. } CANDIDATEFORM;
  108. typedef struct
  109. {
  110. DWORD dwStyle;
  111. POINT ptCurrentPos;
  112. RECT rcArea;
  113. } COMPOSITIONFORM;
  114. typedef struct
  115. {
  116. DWORD dwSize;
  117. DWORD dwStyle;
  118. DWORD dwCount;
  119. DWORD dwSelection;
  120. DWORD dwPageStart;
  121. DWORD dwPageSize;
  122. DWORD dwOffset[1];
  123. } CANDIDATELIST;
  124. #define STYLE_DESCRIPTION_SIZE 32
  125. typedef struct
  126. {
  127. DWORD dwStyle;
  128. CHAR szDescription[STYLE_DESCRIPTION_SIZE];
  129. } STYLEBUFA;
  130. typedef struct
  131. {
  132. DWORD dwStyle;
  133. WCHAR szDescription[STYLE_DESCRIPTION_SIZE];
  134. } STYLEBUFW;
  135. typedef WORD ATOM;
  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. // aimm specific
  322. HRESULT Activate([in] BOOL fRestoreLayout);
  323. HRESULT Deactivate();
  324. HRESULT OnDefWindowProc([in] HWND hWnd, [in] UINT Msg, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  325. HRESULT FilterClientWindows([in] ATOM *aaClassList, [in] UINT uSize);
  326. HRESULT GetCodePageA([in] HKL hKL, [out] UINT *uCodePage);
  327. HRESULT GetLangId([in] HKL hKL, [out] LANGID *plid);
  328. // win98/nt5 apis
  329. HRESULT AssociateContextEx([in] HWND hWnd, [in] HIMC hIMC, [in] DWORD dwFlags);
  330. HRESULT DisableIME([in] DWORD idThread);
  331. HRESULT GetImeMenuItemsA([in] HIMC hIMC, [in] DWORD dwFlags, [in] DWORD dwType, [in] IMEMENUITEMINFOA *pImeParentMenu, [out] IMEMENUITEMINFOA *pImeMenu, [in] DWORD dwSize, [out] DWORD *pdwResult);
  332. HRESULT GetImeMenuItemsW([in] HIMC hIMC, [in] DWORD dwFlags, [in] DWORD dwType, [in] IMEMENUITEMINFOW *pImeParentMenu, [out] IMEMENUITEMINFOW *pImeMenu, [in] DWORD dwSize, [out] DWORD *pdwResult);
  333. HRESULT EnumInputContext([in] DWORD idThread, [out] IEnumInputContext **ppEnum);
  334. };
  335. [
  336. object,
  337. uuid(08C03411-F96B-11d0-A475-00AA006BCC59),
  338. pointer_default(unique)
  339. ]
  340. interface IActiveIMMIME : IUnknown
  341. {
  342. HRESULT AssociateContext([in] HWND hWnd, [in] HIMC hIME, [out] HIMC *phPrev);
  343. HRESULT ConfigureIMEA([in] HKL hKL, [in] HWND hWnd, [in] DWORD dwMode, [in] REGISTERWORDA *pData);
  344. HRESULT ConfigureIMEW([in] HKL hKL, [in] HWND hWnd, [in] DWORD dwMode, [in] REGISTERWORDW *pData);
  345. HRESULT CreateContext([out] HIMC *phIMC);
  346. HRESULT DestroyContext([in] HIMC hIME);
  347. HRESULT EnumRegisterWordA([in] HKL hKL, [in] LPSTR szReading, [in] DWORD dwStyle, [in] LPSTR szRegister, [in] LPVOID pData, [out] IEnumRegisterWordA **pEnum);
  348. HRESULT EnumRegisterWordW([in] HKL hKL, [in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szRegister, [in] LPVOID pData, [out] IEnumRegisterWordW **pEnum);
  349. HRESULT EscapeA([in] HKL hKL, [in] HIMC hIMC, [in] UINT uEscape, [in, out] LPVOID pData, [out] LRESULT *plResult);
  350. HRESULT EscapeW([in] HKL hKL, [in] HIMC hIMC, [in] UINT uEscape, [in, out] LPVOID pData, [out] LRESULT *plResult);
  351. HRESULT GetCandidateListA([in] HIMC hIMC, [in] DWORD dwIndex, [in] UINT uBufLen, [out] CANDIDATELIST *pCandList, [out] UINT *puCopied);
  352. HRESULT GetCandidateListW([in] HIMC hIMC, [in] DWORD dwIndex, [in] UINT uBufLen, [out] CANDIDATELIST *pCandList, [out] UINT *puCopied);
  353. HRESULT GetCandidateListCountA([in] HIMC hIMC, [out] DWORD *pdwListSize, [out] DWORD *pdwBufLen);
  354. HRESULT GetCandidateListCountW([in] HIMC hIMC, [out] DWORD *pdwListSize, [out] DWORD *pdwBufLen);
  355. HRESULT GetCandidateWindow([in] HIMC hIMC, [in] DWORD dwIndex, [out] CANDIDATEFORM *pCandidate);
  356. HRESULT GetCompositionFontA([in] HIMC hIMC, [out] LOGFONTA *plf);
  357. HRESULT GetCompositionFontW([in] HIMC hIMC, [out] LOGFONTW *plf);
  358. HRESULT GetCompositionStringA([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LONG *plCopied, [out] LPVOID pBuf);
  359. HRESULT GetCompositionStringW([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LONG *plCopied, [out] LPVOID pBuf);
  360. HRESULT GetCompositionWindow([in] HIMC hIMC, [out] COMPOSITIONFORM *pCompForm);
  361. HRESULT GetContext([in] HWND hWnd, [out] HIMC *phIMC);
  362. HRESULT GetConversionListA([in] HKL hKL, [in] HIMC hIMC, [in] LPSTR pSrc, [in] UINT uBufLen, [in] UINT uFlag, [out] CANDIDATELIST *pDst, [out] UINT *puCopied);
  363. HRESULT GetConversionListW([in] HKL hKL, [in] HIMC hIMC, [in] LPWSTR pSrc, [in] UINT uBufLen, [in] UINT uFlag, [out] CANDIDATELIST *pDst, [out] UINT *puCopied);
  364. HRESULT GetConversionStatus([in] HIMC hIMC, [out] DWORD *pfdwConversion, [out] DWORD *pfdwSentence);
  365. HRESULT GetDefaultIMEWnd([in] HWND hWnd, [out] HWND *phDefWnd);
  366. HRESULT GetDescriptionA([in] HKL hKL, [in] UINT uBufLen, [out] LPSTR szDescription, [out] UINT *puCopied);
  367. HRESULT GetDescriptionW([in] HKL hKL, [in] UINT uBufLen, [out] LPWSTR szDescription, [out] UINT *puCopied);
  368. HRESULT GetGuideLineA([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LPSTR pBuf, [out] DWORD *pdwResult);
  369. HRESULT GetGuideLineW([in] HIMC hIMC, [in] DWORD dwIndex, [in] DWORD dwBufLen, [out] LPWSTR pBuf, [out] DWORD *pdwResult);
  370. HRESULT GetIMEFileNameA([in] HKL hKL, [in] UINT uBufLen, [out] LPSTR szFileName, [out] UINT *puCopied);
  371. HRESULT GetIMEFileNameW([in] HKL hKL, [in] UINT uBufLen, [out] LPWSTR szFileName, [out] UINT *puCopied);
  372. HRESULT GetOpenStatus([in] HIMC hIMC);
  373. HRESULT GetProperty([in] HKL hKL, [in] DWORD fdwIndex, [out] DWORD *pdwProperty);
  374. HRESULT GetRegisterWordStyleA([in] HKL hKL, [in] UINT nItem, [out] STYLEBUFA *pStyleBuf, [out] UINT *puCopied);
  375. HRESULT GetRegisterWordStyleW([in] HKL hKL, [in] UINT nItem, [out] STYLEBUFW *pStyleBuf, [out] UINT *puCopied);
  376. HRESULT GetStatusWindowPos([in] HIMC hIMC, [out] POINT *pptPos);
  377. HRESULT GetVirtualKey([in] HWND hWnd, [out] UINT *puVirtualKey);
  378. HRESULT InstallIMEA([in] LPSTR szIMEFileName, [in] LPSTR szLayoutText, [out] HKL *phKL);
  379. HRESULT InstallIMEW([in] LPWSTR szIMEFileName, [in] LPWSTR szLayoutText, [out] HKL *phKL);
  380. HRESULT IsIME([in] HKL hKL);
  381. HRESULT IsUIMessageA([in] HWND hWndIME, [in] UINT msg, [in] WPARAM wParam, [in] LPARAM lParam);
  382. HRESULT IsUIMessageW([in] HWND hWndIME, [in] UINT msg, [in] WPARAM wParam, [in] LPARAM lParam);
  383. HRESULT NotifyIME([in] HIMC hIMC, [in] DWORD dwAction, [in] DWORD dwIndex, [in] DWORD dwValue);
  384. HRESULT RegisterWordA([in] HKL hKL, [in] LPSTR szReading, [in] DWORD dwStyle, [in] LPSTR szRegister);
  385. HRESULT RegisterWordW([in] HKL hKL, [in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szRegister);
  386. HRESULT ReleaseContext([in] HWND hWnd, [in] HIMC hIMC);
  387. HRESULT SetCandidateWindow([in] HIMC hIMC, [in] CANDIDATEFORM *pCandidate);
  388. HRESULT SetCompositionFontA([in] HIMC hIMC, [in] LOGFONTA *plf);
  389. HRESULT SetCompositionFontW([in] HIMC hIMC, [in] LOGFONTW *plf);
  390. HRESULT SetCompositionStringA([in] HIMC hIMC, [in] DWORD dwIndex, [in] LPVOID pComp, [in] DWORD dwCompLen, [in] LPVOID pRead, [in] DWORD dwReadLen);
  391. HRESULT SetCompositionStringW([in] HIMC hIMC, [in] DWORD dwIndex, [in] LPVOID pComp, [in] DWORD dwCompLen, [in] LPVOID pRead, [in] DWORD dwReadLen);
  392. HRESULT SetCompositionWindow([in] HIMC hIMC, [in] COMPOSITIONFORM *pCompForm);
  393. HRESULT SetConversionStatus([in] HIMC hIMC, [in] DWORD fdwConversion, [in] DWORD fdwSentence);
  394. HRESULT SetOpenStatus([in] HIMC hIMC, [in] BOOL fOpen);
  395. HRESULT SetStatusWindowPos([in] HIMC hIMC, [in] POINT *pptPos);
  396. HRESULT SimulateHotKey([in] HWND hWnd, [in] DWORD dwHotKeyID);
  397. HRESULT UnregisterWordA([in] HKL hKL, [in] LPSTR szReading, [in] DWORD dwStyle, [in] LPSTR szUnregister);
  398. HRESULT UnregisterWordW([in] HKL hKL, [in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szUnregister);
  399. // ime helper methods
  400. HRESULT GenerateMessage([in] HIMC hIMC);
  401. // HIMC and HIMCC management api's
  402. HRESULT LockIMC([in] HIMC hIMC, [out] INPUTCONTEXT **ppIMC);
  403. HRESULT UnlockIMC([in] HIMC hIMC);
  404. HRESULT GetIMCLockCount([in] HIMC hIMC, [out] DWORD *pdwLockCount);
  405. HRESULT CreateIMCC([in] DWORD dwSize, [out] HIMCC *phIMCC);
  406. HRESULT DestroyIMCC([in] HIMCC hIMCC);
  407. HRESULT LockIMCC([in] HIMCC hIMCC, [out] void **ppv);
  408. HRESULT UnlockIMCC([in] HIMCC hIMCC);
  409. HRESULT ReSizeIMCC([in] HIMCC hIMCC, [in] DWORD dwSize, [out] HIMCC *phIMCC);
  410. HRESULT GetIMCCSize([in] HIMCC hIMCC, [out] DWORD *pdwSize);
  411. HRESULT GetIMCCLockCount([in] HIMCC hIMCC, [out] DWORD *pdwLockCount);
  412. // hot key manipulation api's
  413. HRESULT GetHotKey([in] DWORD dwHotKeyID, [out] UINT *puModifiers, [out] UINT *puVKey, [out] HKL *phKL);
  414. HRESULT SetHotKey([in] DWORD dwHotKeyID, [in] UINT uModifiers, [in] UINT uVKey, [in] HKL hKL);
  415. // soft keyboard api's
  416. HRESULT CreateSoftKeyboard([in] UINT uType, [in] HWND hOwner, [in] int x, [in] int y, [out] HWND *phSoftKbdWnd);
  417. HRESULT DestroySoftKeyboard([in] HWND hSoftKbdWnd);
  418. HRESULT ShowSoftKeyboard([in] HWND hSoftKbdWnd, [in] int nCmdShow);
  419. // aimm specific
  420. HRESULT GetCodePageA([in] HKL hKL, [out] UINT *uCodePage);
  421. HRESULT GetLangId([in] HKL hKL, [out] LANGID *plid);
  422. HRESULT KeybdEvent([in] LANGID lgidIME, [in] BYTE bVk, [in] BYTE bScan, [in] DWORD dwFlags, [in] DWORD dwExtraInfo);
  423. HRESULT LockModal();
  424. HRESULT UnlockModal();
  425. // win98/nt5 apis
  426. HRESULT AssociateContextEx([in] HWND hWnd, [in] HIMC hIMC, [in] DWORD dwFlags);
  427. HRESULT DisableIME([in] DWORD idThread);
  428. HRESULT GetImeMenuItemsA([in] HIMC hIMC, [in] DWORD dwFlags, [in] DWORD dwType, [in] IMEMENUITEMINFOA *pImeParentMenu, [out] IMEMENUITEMINFOA *pImeMenu, [in] DWORD dwSize, [out] DWORD *pdwResult);
  429. HRESULT GetImeMenuItemsW([in] HIMC hIMC, [in] DWORD dwFlags, [in] DWORD dwType, [in] IMEMENUITEMINFOW *pImeParentMenu, [out] IMEMENUITEMINFOW *pImeMenu, [in] DWORD dwSize, [out] DWORD *pdwResult);
  430. HRESULT EnumInputContext([in] DWORD idThread, [out] IEnumInputContext **ppEnum);
  431. HRESULT RequestMessageA([in] HIMC hIMC, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  432. HRESULT RequestMessageW([in] HIMC hIMC, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  433. HRESULT SendIMCA([in] HWND hWnd, [in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  434. HRESULT SendIMCW([in] HWND hWnd, [in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam, [out] LRESULT *plResult);
  435. HRESULT IsSleeping();
  436. };
  437. [
  438. object,
  439. uuid(6FE20962-D077-11d0-8FE7-00AA006BCC59),
  440. pointer_default(unique)
  441. ]
  442. interface IActiveIME : IUnknown
  443. {
  444. HRESULT Inquire([in] DWORD dwSystemInfoFlags, [out] IMEINFO *pIMEInfo, [out] LPWSTR szWndClass, [out] DWORD *pdwPrivate);
  445. HRESULT ConversionList([in] HIMC hIMC, [in] LPWSTR szSource, [in] UINT uFlag, [in] UINT uBufLen, [out] CANDIDATELIST *pDest, [out] UINT *puCopied);
  446. HRESULT Configure([in] HKL hKL, [in] HWND hWnd, [in] DWORD dwMode, [in] REGISTERWORDW *pRegisterWord);
  447. HRESULT Destroy([in] UINT uReserved);
  448. HRESULT Escape([in] HIMC hIMC, [in] UINT uEscape, [in, out] void *pData, [out] LRESULT *plResult);
  449. HRESULT SetActiveContext([in] HIMC hIMC, [in] BOOL fFlag);
  450. HRESULT ProcessKey([in] HIMC hIMC, [in] UINT uVirKey, [in] DWORD lParam, [in] BYTE *pbKeyState);
  451. HRESULT Notify([in] HIMC hIMC, [in] DWORD dwAction, [in] DWORD dwIndex, [in] DWORD dwValue);
  452. HRESULT Select([in] HIMC hIMC, [in] BOOL fSelect);
  453. HRESULT SetCompositionString([in] HIMC hIMC, [in] DWORD dwIndex, [in] void *pComp, [in] DWORD dwCompLen, [in] void *pRead, [in] DWORD dwReadLen);
  454. HRESULT ToAsciiEx([in] UINT uVirKey, [in] UINT uScanCode, [in] BYTE *pbKeyState, [in] UINT fuState, [in] HIMC hIMC, [out] DWORD *pdwTransBuf, [out] UINT *puSize);
  455. HRESULT RegisterWord([in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szString);
  456. HRESULT UnregisterWord([in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szString);
  457. HRESULT GetRegisterWordStyle([in] UINT nItem, [out] STYLEBUFW *pStyleBuf, [out] UINT *puBufSize);
  458. HRESULT EnumRegisterWord([in] LPWSTR szReading, [in] DWORD dwStyle, [in] LPWSTR szRegister, [in] LPVOID pData, [out] IEnumRegisterWordW **ppEnum);
  459. HRESULT GetCodePageA([out] UINT *uCodePage);
  460. HRESULT GetLangId([out] LANGID *plid);
  461. };
  462. [
  463. object,
  464. uuid(e1c4bf0e-2d53-11d2-93e1-0060b067b86e),
  465. pointer_default(unique)
  466. ]
  467. interface IActiveIME2 : IActiveIME
  468. {
  469. HRESULT Sleep();
  470. HRESULT Unsleep([in] BOOL fDead);
  471. };
  472. [
  473. uuid(4955DD33-B159-11d0-8FCF-00AA006BCC59),
  474. ]
  475. coclass CActiveIMM
  476. {
  477. [default] interface IActiveIMMApp;
  478. interface IActiveIMMIME;
  479. interface IActiveIMMRegistrar;
  480. interface IActiveIMMMessagePumpOwner;
  481. };
  482. }