From 7da2416e77cb9c9466887a1575759d835ce16b67 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Sat, 23 May 2015 17:17:55 +0200 Subject: [PATCH] include: Add more interfaces to ctfutb.idl. --- include/ctfutb.idl | 155 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 154 insertions(+), 1 deletion(-) diff --git a/include/ctfutb.idl b/include/ctfutb.idl index 6d80b3890dd..1a4125be67a 100644 --- a/include/ctfutb.idl +++ b/include/ctfutb.idl @@ -24,6 +24,128 @@ interface ITfLangBarEventSink; interface ITfLangBarItemMgr; interface ITfInputProcessorProfiles; +const ULONG TF_LBI_DESC_MAXLEN = 32; + +typedef [uuid(12a1d29f-a065-440c-9746-eb2002c8bd19)] struct TF_LANGBARITEMINFO +{ + CLSID clsidService; + GUID guidItem; + DWORD dwStyle; + ULONG ulSort; + WCHAR szDescription[TF_LBI_DESC_MAXLEN]; +} TF_LANGBARITEMINFO; + +[ + object, + uuid(73540d69-edeb-4ee9-96c9-23aa30b25916), + pointer_default(unique), +] +interface ITfLangBarItem : IUnknown +{ + HRESULT GetInfo( + [out] TF_LANGBARITEMINFO *pInfo); + + HRESULT GetStatus( + [out] DWORD *pdwStatus); + + HRESULT Show( + [in] BOOL fShow); + + HRESULT GetTooltipString( + [out] BSTR *pbstrToolTip); +} + +[ + object, + uuid(583f34d0-de25-11d2-afdd-00105a2799b5), + pointer_default(unique), +] +interface IEnumTfLangBarItems : IUnknown +{ + HRESULT Clone( + [out] IEnumTfLangBarItems **ppEnum); + + HRESULT Next( + [in] ULONG ulCount, + [out, size_is(ulCount)] ITfLangBarItem **ppItem, + [in, out, unique] ULONG *pcFetched); + + HRESULT Reset(); + + HRESULT Skip( + [in] ULONG ulCount); +} + +[ + object, + uuid(57dbe1a0-de25-11d2-afdd-00105a2799b5), + pointer_default(unique), +] +interface ITfLangBarItemSink : IUnknown +{ + HRESULT OnUpdate( + [in] DWORD dwFlags); +} + +[ + object, + uuid(ba468c55-9956-4fb1-a59d-52a7dd7cc6aa), + pointer_default(unique), +] +interface ITfLangBarItemMgr : IUnknown +{ + HRESULT EnumItems( + [out] IEnumTfLangBarItems **ppEnum); + + HRESULT GetItem( + [in] REFGUID rguid, + [out] ITfLangBarItem **ppItem); + + HRESULT AddItem( + [in] ITfLangBarItem *punk); + + HRESULT RemoveItem( + [in] ITfLangBarItem *punk); + + HRESULT AdviseItemSink( + [in] ITfLangBarItemSink *punk, + [out] DWORD *pdwCookie, + [in] REFGUID rguidItem); + + HRESULT UnadviseItemSink( + [in] DWORD dwCookie); + + HRESULT GetItemFloatingRect( + [in] DWORD dwThreadId, + [in] REFGUID rguid, + [out] RECT *prc); + + HRESULT GetItemsStatus( + [in] ULONG ulCount, + [in, size_is(ulCount)] const GUID *prgguid, + [out, size_is(ulCount)] DWORD *pdwStatus); + + HRESULT GetItemNum( + [out] ULONG *pulCount); + + HRESULT GetItems( + [in] ULONG ulCount, + [out, size_is(ulCount), length_is(*pcFetched)] ITfLangBarItem **ppItem, + [out, size_is(ulCount), length_is(*pcFetched)] TF_LANGBARITEMINFO *pInfo, + [out, size_is(ulCount), length_is(*pcFetched)] DWORD *pdwStatus, + [in, out, unique] ULONG *pcFetched); + + HRESULT AdviseItemsSink( + [in] ULONG ulCount, + [in, size_is(ulCount)] ITfLangBarItemSink **ppunk, + [in, size_is(ulCount)] const GUID *pguidItem, + [out, size_is(ulCount)] DWORD *pdwCookie); + + HRESULT UnadviseItemsSink( + [in] ULONG ulCount, + [in, size_is(ulCount)] DWORD *pdwCookie); +} + [ object, uuid(87955690-e627-11d2-8ddb-00105a2799b5), @@ -70,4 +192,35 @@ interface ITfLangBarMgr: IUnknown HRESULT GetShowFloatingStatus( [out] DWORD *pdwFlags); -}; +} + +[ + object, + uuid(18a4e900-e0ae-11d2-afdd-00105a2799b5), + pointer_default(unique) +] +interface ITfLangBarEventSink: IUnknown +{ + HRESULT OnSetFocus( + [in] DWORD dwThreadId); + + HRESULT OnThreadTerminate( + [in] DWORD dwThreadId); + + HRESULT OnThreadItemChange( + [in] DWORD dwThreadId); + + HRESULT OnModalInput( + [in] DWORD dwThreadId, + [in] UINT uMsg, + [in] WPARAM wParam, + [in] LPARAM lParam); + + HRESULT ShowFloating( + [in] DWORD dwFlags); + + HRESULT GetItemFloatingRect( + [in] DWORD dwThreadId, + [in] REFGUID rguid, + [out] RECT *prc); +}