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.

531 lines
15 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-2001.
  5. //
  6. // File: ctfutb.idl
  7. //
  8. // Contents: Text Framework declarations.
  9. //
  10. //
  11. //--------------------------------------------------------------------------
  12. cpp_quote("//=--------------------------------------------------------------------------=")
  13. cpp_quote("// ctfutb.h")
  14. cpp_quote("")
  15. cpp_quote("")
  16. cpp_quote("// Text Framework declarations.")
  17. cpp_quote("")
  18. cpp_quote("//=--------------------------------------------------------------------------=")
  19. cpp_quote("// (C) Copyright 1995-2001 Microsoft Corporation. All Rights Reserved.")
  20. cpp_quote("//")
  21. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  22. cpp_quote("// ANY KIND, EITHER EXPRESSED OR TFPLIED, INCLUDING BUT NOT LIMITED TO")
  23. cpp_quote("// THE TFPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  24. cpp_quote("// PARTICULAR PURPOSE.")
  25. cpp_quote("//=--------------------------------------------------------------------------=")
  26. cpp_quote("")
  27. cpp_quote("#ifndef CTFUTB_DEFINED")
  28. cpp_quote("#define CTFUTB_DEFINED")
  29. cpp_quote("")
  30. cpp_quote("#include <windows.h>")
  31. cpp_quote("")
  32. cpp_quote("#ifdef __cplusplus")
  33. cpp_quote("extern \"C\" {")
  34. cpp_quote("#endif /* __cplusplus */")
  35. cpp_quote("")
  36. cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLEW L\"TF_FloatingLangBar_WndTitle\"")
  37. cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLEA \"TF_FloatingLangBar_WndTitle\"")
  38. cpp_quote("#ifdef UNICODE")
  39. cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLE TF_FLOATINGLANGBAR_WNDTITLEW")
  40. cpp_quote("#else")
  41. cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLE TF_FLOATINGLANGBAR_WNDTITLEA")
  42. cpp_quote("#endif")
  43. // for ITfLangBarItemSink::OnUpdate()
  44. cpp_quote("#define TF_LBI_ICON 0x00000001")
  45. cpp_quote("#define TF_LBI_TEXT 0x00000002")
  46. cpp_quote("#define TF_LBI_TOOLTIP 0x00000004")
  47. cpp_quote("#define TF_LBI_BITMAP 0x00000008")
  48. cpp_quote("#define TF_LBI_BALLOON 0x00000010")
  49. cpp_quote("#define TF_LBI_BTNALL (TF_LBI_ICON | TF_LBI_TEXT | TF_LBI_TOOLTIP)")
  50. cpp_quote("#define TF_LBI_BMPBTNALL (TF_LBI_BITMAP | TF_LBI_TEXT | TF_LBI_TOOLTIP)")
  51. cpp_quote("#define TF_LBI_BMPALL (TF_LBI_BITMAP | TF_LBI_TOOLTIP)")
  52. cpp_quote("#define TF_LBI_STATUS 0x00010000")
  53. //
  54. // for ITfLangBarItem::GetInfo()
  55. // Button Style
  56. //
  57. //
  58. // TF_LBI_STYLE_HIDDENSTATUSCONTROL
  59. //
  60. // If this bit is on, the items are not hidden by intellisense or
  61. // there won't be UI to hide.
  62. //
  63. cpp_quote("#define TF_LBI_STYLE_HIDDENSTATUSCONTROL 0x00000001")
  64. //
  65. // TF_LBI_STYLE_SHOWNINTRAY
  66. //
  67. // If this bit is on, the item is shown in tray when Langbat is minimized.
  68. //
  69. cpp_quote("#define TF_LBI_STYLE_SHOWNINTRAY 0x00000002")
  70. //
  71. // TF_LBI_STYLE_HIDEONNOOTHERITEMS
  72. //
  73. // Langbar will be hidden if only items with this bits are in Langbar.
  74. //
  75. cpp_quote("#define TF_LBI_STYLE_HIDEONNOOTHERITEMS 0x00000004")
  76. //
  77. // TF_LBI_STYLE_SHOWNINTRAYONLY
  78. //
  79. // Langbar will be hidden on the floating toolbar but it is shown on tray.
  80. //
  81. cpp_quote("#define TF_LBI_STYLE_SHOWNINTRAYONLY 0x00000008")
  82. //
  83. // TF_LBI_STYLE_HIDDENBYDEFAULT
  84. //
  85. // The item won't be shown in the toolbar face unless the item is
  86. // added from UI.
  87. //
  88. cpp_quote("#define TF_LBI_STYLE_HIDDENBYDEFAULT 0x00000010")
  89. //
  90. // TF_LBI_STYLE_TEXTCOLORICON
  91. //
  92. // The icon of the item with this flag will be drawn with text color.
  93. // This icon must be mono and black part will be changed.
  94. //
  95. cpp_quote("#define TF_LBI_STYLE_TEXTCOLORICON 0x00000020")
  96. cpp_quote("#define TF_LBI_STYLE_BTN_BUTTON 0x00010000")
  97. cpp_quote("#define TF_LBI_STYLE_BTN_MENU 0x00020000")
  98. cpp_quote("#define TF_LBI_STYLE_BTN_TOGGLE 0x00040000")
  99. // for ITfLangBarItem::GetStatus()
  100. cpp_quote("#define TF_LBI_STATUS_HIDDEN 0x00000001")
  101. cpp_quote("#define TF_LBI_STATUS_DISABLED 0x00000002")
  102. // Button Status
  103. cpp_quote("#define TF_LBI_STATUS_BTN_TOGGLED 0x00010000")
  104. // Bitmap Flag
  105. cpp_quote("#define TF_LBI_BMPF_VERTICAL 0x00000001")
  106. // ShowFloating flags
  107. cpp_quote("#define TF_SFT_SHOWNORMAL 0x00000001")
  108. cpp_quote("#define TF_SFT_DOCK 0x00000002")
  109. cpp_quote("#define TF_SFT_MINIMIZED 0x00000004")
  110. cpp_quote("#define TF_SFT_HIDDEN 0x00000008")
  111. cpp_quote("#define TF_SFT_NOTRANSPARENCY 0x00000010")
  112. cpp_quote("#define TF_SFT_LOWTRANSPARENCY 0x00000020")
  113. cpp_quote("#define TF_SFT_HIGHTRANSPARENCY 0x00000040")
  114. cpp_quote("#define TF_SFT_LABELS 0x00000080")
  115. cpp_quote("#define TF_SFT_NOLABELS 0x00000100")
  116. cpp_quote("#define TF_SFT_EXTRAICONSONMINIMIZED 0x00000200")
  117. cpp_quote("#define TF_SFT_NOEXTRAICONSONMINIMIZED 0x00000400")
  118. cpp_quote("#define TF_SFT_DESKBAND 0x00000800")
  119. // OnMenuSelect flags
  120. cpp_quote("#define TF_INVALIDMENUITEM (UINT)(-1)")
  121. // SystemDeviceTypeLangbarItem Flag
  122. cpp_quote("#define TF_DTLBI_USEPROFILEICON 0x00000001")
  123. cpp_quote("#ifdef __cplusplus")
  124. cpp_quote("}")
  125. cpp_quote("#endif /* __cplusplus */")
  126. import "oaidl.idl";
  127. import "msctf.idl";
  128. interface ITfLangBarItem;
  129. interface ITfLangBarEventSink;
  130. interface ITfLangBarItemMgr;
  131. interface ITfInputProcessorProfiles;
  132. interface ITfMenu;
  133. //
  134. // ITfLangBarMgr
  135. //
  136. [
  137. object,
  138. local,
  139. uuid(87955690-e627-11d2-8ddb-00105a2799b5),
  140. pointer_default(unique)
  141. ]
  142. interface ITfLangBarMgr: IUnknown
  143. {
  144. HRESULT AdviseEventSink([in] ITfLangBarEventSink *pSink,
  145. [in] HWND hwnd,
  146. [in] DWORD dwFlags,
  147. [in] DWORD *pdwCookie);
  148. HRESULT UnadviseEventSink([in] DWORD dwCookie);
  149. HRESULT GetThreadMarshalInterface([in] DWORD dwThreadId,
  150. [in] DWORD dwType,
  151. [in] REFIID riid,
  152. [out, iid_is(riid)] IUnknown **ppunk);
  153. HRESULT GetThreadLangBarItemMgr([in] DWORD dwThreadId,
  154. [out] ITfLangBarItemMgr **pplbi,
  155. [out] DWORD *pdwThreadid);
  156. HRESULT GetInputProcessorProfiles([in] DWORD dwThreadId,
  157. [out] ITfInputProcessorProfiles **ppaip,
  158. [out] DWORD *pdwThreadid);
  159. HRESULT RestoreLastFocus([out] DWORD *pdwThreadId,
  160. [in] BOOL fPrev);
  161. HRESULT SetModalInput([in] ITfLangBarEventSink *pSink,
  162. [in] DWORD dwThreadId,
  163. [in] DWORD dwFlags);
  164. HRESULT ShowFloating([in] DWORD dwFlags);
  165. HRESULT GetShowFloatingStatus([out] DWORD *pdwFlags);
  166. }
  167. //
  168. // ITfLangBarEventSink
  169. //
  170. [
  171. object,
  172. uuid(18a4e900-e0ae-11d2-afdd-00105a2799b5),
  173. pointer_default(unique)
  174. ]
  175. interface ITfLangBarEventSink: IUnknown
  176. {
  177. HRESULT OnSetFocus([in] DWORD dwThreadId);
  178. HRESULT OnThreadTerminate([in] DWORD dwThreadId);
  179. HRESULT OnThreadItemChange([in] DWORD dwThreadId);
  180. HRESULT OnModalInput([in] DWORD dwThreadId,
  181. [in] UINT uMsg,
  182. [in] WPARAM wParam,
  183. [in] LPARAM lParam);
  184. HRESULT ShowFloating([in] DWORD dwFlags);
  185. HRESULT GetItemFloatingRect([in] DWORD dwThreadId, [in] REFGUID rguid, [out] RECT *prc);
  186. }
  187. //
  188. // ITfLangBarItemSink
  189. //
  190. [
  191. object,
  192. uuid(57dbe1a0-de25-11d2-afdd-00105a2799b5),
  193. pointer_default(unique),
  194. ]
  195. interface ITfLangBarItemSink : IUnknown
  196. {
  197. HRESULT OnUpdate([in] DWORD dwFlags);
  198. }
  199. //
  200. // IEnumTfLangBarItems
  201. //
  202. [
  203. object,
  204. uuid(583f34d0-de25-11d2-afdd-00105a2799b5),
  205. pointer_default(unique),
  206. ]
  207. interface IEnumTfLangBarItems : IUnknown
  208. {
  209. HRESULT Clone([out] IEnumTfLangBarItems **ppEnum);
  210. HRESULT Next([in] ULONG ulCount,
  211. [out, size_is(ulCount)] ITfLangBarItem **ppItem,
  212. [in, out, unique] ULONG *pcFetched);
  213. HRESULT Reset();
  214. HRESULT Skip([in] ULONG ulCount);
  215. }
  216. const ULONG TF_LBI_DESC_MAXLEN = 32;
  217. typedef [uuid(12a1d29f-a065-440c-9746-eb2002c8bd19)] struct TF_LANGBARITEMINFO
  218. {
  219. CLSID clsidService;
  220. GUID guidItem;
  221. DWORD dwStyle;
  222. ULONG ulSort;
  223. WCHAR szDescription[TF_LBI_DESC_MAXLEN];
  224. } TF_LANGBARITEMINFO;
  225. //
  226. // ITfLangBarItemMgr
  227. //
  228. [
  229. object,
  230. local,
  231. uuid(ba468c55-9956-4fb1-a59d-52a7dd7cc6aa),
  232. pointer_default(unique),
  233. ]
  234. interface ITfLangBarItemMgr : IUnknown
  235. {
  236. HRESULT EnumItems([out] IEnumTfLangBarItems **ppEnum);
  237. HRESULT GetItem([in] REFGUID rguid,
  238. [out] ITfLangBarItem **ppItem);
  239. HRESULT AddItem([in] ITfLangBarItem *punk);
  240. HRESULT RemoveItem([in] ITfLangBarItem *punk);
  241. HRESULT AdviseItemSink([in] ITfLangBarItemSink *punk,
  242. [out] DWORD *pdwCookie,
  243. [in] REFGUID rguidItem);
  244. HRESULT UnadviseItemSink([in] DWORD dwCookie);
  245. HRESULT GetItemFloatingRect([in] DWORD dwThreadId, [in] REFGUID rguid, [out] RECT *prc);
  246. HRESULT GetItemsStatus([in] ULONG ulCount,
  247. [in, size_is(ulCount)] const GUID *prgguid,
  248. [in, out, size_is(ulCount)] DWORD *pdwStatus);
  249. HRESULT GetItemNum([out] ULONG *pulCount);
  250. HRESULT GetItems([in] ULONG ulCount,
  251. [out, size_is(ulCount)] ITfLangBarItem **ppItem,
  252. [out, size_is(ulCount)] TF_LANGBARITEMINFO *pInfo,
  253. [out, size_is(ulCount)] DWORD *pdwStatus,
  254. [in, out, unique] ULONG *pcFetched);
  255. HRESULT AdviseItemsSink([in] ULONG ulCount,
  256. [in, size_is(ulCount)] ITfLangBarItemSink **ppunk,
  257. [in, size_is(ulCount)] const GUID *pguidItem,
  258. [out, size_is(ulCount)] DWORD *pdwCookie);
  259. HRESULT UnadviseItemsSink([in] ULONG ulCount,
  260. [in, size_is(ulCount)] DWORD *pdwCookie);
  261. };
  262. //
  263. // ITfLangBarItem
  264. //
  265. [
  266. object,
  267. uuid(73540d69-edeb-4ee9-96c9-23aa30b25916),
  268. pointer_default(unique),
  269. ]
  270. interface ITfLangBarItem : IUnknown
  271. {
  272. HRESULT GetInfo([out] TF_LANGBARITEMINFO *pInfo);
  273. HRESULT GetStatus([out] DWORD *pdwStatus);
  274. HRESULT Show([in] BOOL fShow);
  275. HRESULT GetTooltipString([out] BSTR *pbstrToolTip);
  276. }
  277. //
  278. // ITfSystemLangBarItemSink
  279. //
  280. [
  281. object,
  282. uuid(1449d9ab-13cf-4687-aa3e-8d8b18574396),
  283. pointer_default(unique),
  284. ]
  285. interface ITfSystemLangBarItemSink : IUnknown
  286. {
  287. HRESULT InitMenu([in] ITfMenu *pMenu);
  288. HRESULT OnMenuSelect([in] UINT wID);
  289. }
  290. //
  291. // ITfSystemLangBarItem
  292. //
  293. [
  294. object,
  295. uuid(1e13e9ec-6b33-4d4a-b5eb-8a92f029f356),
  296. pointer_default(unique),
  297. ]
  298. interface ITfSystemLangBarItem : IUnknown
  299. {
  300. HRESULT SetIcon([in] HICON hIcon);
  301. HRESULT SetTooltipString([in, size_is(cch)] WCHAR *pchToolTip,
  302. [in] ULONG cch);
  303. }
  304. //
  305. // ITfSystemDeviceTypeLangBarItem
  306. //
  307. [
  308. object,
  309. uuid(45672eb9-9059-46a2-838d-4530355f6a77),
  310. pointer_default(unique),
  311. ]
  312. interface ITfSystemDeviceTypeLangBarItem : IUnknown
  313. {
  314. HRESULT SetIconMode([in] DWORD dwFlags);
  315. HRESULT GetIconMode([out] DWORD *pdwFlags);
  316. }
  317. typedef [uuid(8fb5f0ce-dfdd-4f0a-85b9-8988d8dd8ff2)] enum
  318. {
  319. TF_LBI_CLK_RIGHT = 1,
  320. TF_LBI_CLK_LEFT = 2,
  321. } TfLBIClick;
  322. //
  323. // ITfLangBarItemButton
  324. //
  325. [
  326. object,
  327. uuid(28c7f1d0-de25-11d2-afdd-00105a2799b5),
  328. pointer_default(unique),
  329. ]
  330. interface ITfLangBarItemButton : ITfLangBarItem
  331. {
  332. HRESULT OnClick([in] TfLBIClick click,
  333. [in] POINT pt,
  334. [in] const RECT *prcArea);
  335. HRESULT InitMenu([in] ITfMenu *pMenu);
  336. HRESULT OnMenuSelect([in] UINT wID);
  337. HRESULT GetIcon([out] HICON *phIcon);
  338. HRESULT GetText([out] BSTR *pbstrText);
  339. }
  340. //
  341. // ITfLangBarItemBitmapButton
  342. //
  343. [
  344. object,
  345. uuid(a26a0525-3fae-4fa0-89ee-88a964f9f1b5),
  346. pointer_default(unique),
  347. ]
  348. interface ITfLangBarItemBitmapButton : ITfLangBarItem
  349. {
  350. HRESULT OnClick([in] TfLBIClick click,
  351. [in] POINT pt,
  352. [in] const RECT *prcArea);
  353. HRESULT InitMenu([in] ITfMenu *pMenu);
  354. HRESULT OnMenuSelect([in] UINT wID);
  355. HRESULT GetPreferredSize([in] const SIZE *pszDefault,
  356. [out] SIZE *psz);
  357. HRESULT DrawBitmap([in] LONG bmWidth,
  358. [in] LONG bmHeight,
  359. [in] DWORD dwFlags,
  360. [out] HBITMAP *phbmp,
  361. [out] HBITMAP *phbmpMask);
  362. HRESULT GetText([out] BSTR *pbstrText);
  363. }
  364. //
  365. // ITfLangBarItemBitmap
  366. //
  367. [
  368. object,
  369. uuid(73830352-d722-4179-ada5-f045c98df355),
  370. pointer_default(unique),
  371. ]
  372. interface ITfLangBarItemBitmap : ITfLangBarItem
  373. {
  374. HRESULT OnClick([in] TfLBIClick click,
  375. [in] POINT pt,
  376. [in] const RECT *prcArea);
  377. HRESULT GetPreferredSize([in] const SIZE *pszDefault,
  378. [out] SIZE *psz);
  379. HRESULT DrawBitmap([in] LONG bmWidth,
  380. [in] LONG bmHeight,
  381. [in] DWORD dwFlags,
  382. [out] HBITMAP *phbmp,
  383. [out] HBITMAP *phbmpMask);
  384. }
  385. //
  386. // ITfLangBarItemBalloon
  387. //
  388. [
  389. object,
  390. uuid(01C2D285-D3C7-4B7B-B5B5-D97411D0C283),
  391. pointer_default(unique),
  392. ]
  393. interface ITfLangBarItemBalloon : ITfLangBarItem
  394. {
  395. HRESULT OnClick([in] TfLBIClick click,
  396. [in] POINT pt,
  397. [in] const RECT *prcArea);
  398. HRESULT GetPreferredSize([in] const SIZE *pszDefault,
  399. [out] SIZE *psz);
  400. typedef [uuid(f399a969-9e97-4ddd-b974-2bfb934cfbc9)] enum {
  401. TF_LB_BALLOON_RECO = 0,
  402. TF_LB_BALLOON_SHOW = 1,
  403. TF_LB_BALLOON_MISS = 2
  404. } TfLBBalloonStyle;
  405. typedef [uuid(37574483-5c50-4092-a55c-922e3a67e5b8)] struct TF_LBBALLOONINFO
  406. {
  407. TfLBBalloonStyle style;
  408. BSTR bstrText;
  409. } TF_LBBALLOONINFO;
  410. HRESULT GetBalloonInfo([out] TF_LBBALLOONINFO *pInfo);
  411. }
  412. //
  413. // ITfMenu
  414. //
  415. [
  416. object,
  417. uuid(6F8A98E4-AAA0-4F15-8C5B-07E0DF0A3DD8),
  418. pointer_default(unique),
  419. ]
  420. interface ITfMenu : IUnknown
  421. {
  422. const DWORD TF_LBMENUF_CHECKED = 0x0001;
  423. const DWORD TF_LBMENUF_SUBMENU = 0x0002;
  424. const DWORD TF_LBMENUF_SEPARATOR = 0x0004;
  425. const DWORD TF_LBMENUF_RADIOCHECKED = 0x0008;
  426. const DWORD TF_LBMENUF_GRAYED = 0x0010;
  427. HRESULT AddMenuItem([in] UINT uId,
  428. [in] DWORD dwFlags,
  429. [in] HBITMAP hbmp,
  430. [in] HBITMAP hbmpMask,
  431. [in, unique, size_is(cch)] const WCHAR *pch,
  432. [in] ULONG cch,
  433. [in, out, unique] ITfMenu **ppMenu);
  434. }
  435. cpp_quote("#endif // CTFUTB_DEFINED")