[PSDK]
[reactos.git] / include / psdk / ctfutb.idl
1 /*
2 * Copyright 2010 Justin Chevrier
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #ifndef DO_NO_IMPORTS
20 import "oaidl.idl";
21 #ifdef __midl
22 import "msctf.idl";
23 #endif
24 #endif
25
26 interface ITfLangBarEventSink;
27 interface ITfLangBarItemMgr;
28 interface ITfInputProcessorProfiles;
29 interface IEnumTfLangBarItems;
30 interface ITfLangBarItem;
31 interface ITfLangBarItemSink;
32
33 [
34 object,
35 uuid(87955690-e627-11d2-8ddb-00105a2799b5),
36 pointer_default(unique)
37 ]
38 interface ITfLangBarMgr: IUnknown
39 {
40 HRESULT AdviseEventSink(
41 [in] ITfLangBarEventSink *pSink,
42 [in] HWND hwnd,
43 [in] DWORD dwflags,
44 [in] DWORD *pdwCookie);
45
46 HRESULT UnAdviseEventSink(
47 [in] DWORD dwCookie);
48
49 HRESULT GetThreadMarshalInterface(
50 [in] DWORD dwThreadId,
51 [in] DWORD dwType,
52 [in] REFIID riid,
53 [out] IUnknown **ppunk);
54
55 HRESULT GetThreadLangBarItemMgr(
56 [in] DWORD dwThreadId,
57 [out] ITfLangBarItemMgr **pplbie,
58 [out] DWORD *pdwThreadid);
59
60 HRESULT GetInputProcessorProfiles(
61 [in] DWORD dwThreadId,
62 [out] ITfInputProcessorProfiles **ppaip,
63 [out] DWORD *pdwThreadid);
64
65 HRESULT RestoreLastFocus(
66 [out] DWORD *dwThreadId,
67 [in] BOOL fPrev);
68
69 HRESULT SetModalInput(
70 [in] ITfLangBarEventSink *pSink,
71 [in] DWORD dwThreadId,
72 [in] DWORD dwFlags);
73
74 HRESULT ShowFloating(
75 [in] DWORD dwFlags);
76
77 HRESULT GetShowFloatingStatus(
78 [out] DWORD *pdwFlags);
79 };
80
81 [
82 object,
83 uuid(18a4e900-e0ae-11d2-afdd-00105a2799b5),
84 pointer_default(unique)
85 ]
86 interface ITfLangBarEventSink: IUnknown
87 {
88 HRESULT OnSetFocus(
89 [in] DWORD dwThreadId);
90
91 HRESULT OnThreadTerminate(
92 [in] DWORD dwThreadId);
93
94 HRESULT OnThreadItemChange(
95 [in] DWORD dwThreadId);
96
97 HRESULT OnModalInput(
98 [in] DWORD dwThreadId,
99 [in] UINT uMsg,
100 [in] WPARAM wParam,
101 [in] LPARAM lParam);
102
103 HRESULT ShowFloating(
104 [in] DWORD dwFlags);
105
106 HRESULT GetItemFloatingRect(
107 [in] DWORD dwThreadId,
108 [in] REFGUID rguid,
109 [out] RECT *prc);
110 }
111
112 const ULONG TF_LBI_DESC_MAXLEN = 32;
113
114 typedef [uuid(12a1d29f-a065-440c-9746-eb2002c8bd19)] struct TF_LANGBARITEMINFO
115 {
116 CLSID clsidService;
117 GUID guidItem;
118 DWORD dwStyle;
119 ULONG ulSort;
120 WCHAR szDescription[TF_LBI_DESC_MAXLEN];
121 } TF_LANGBARITEMINFO;
122
123 [
124 object,
125 uuid(ba468c55-9956-4fb1-a59d-52a7dd7cc6aa),
126 pointer_default(unique),
127 ]
128 interface ITfLangBarItemMgr : IUnknown
129 {
130 HRESULT EnumItems(
131 [out] IEnumTfLangBarItems **ppEnum);
132
133 HRESULT GetItem(
134 [in] REFGUID rguid,
135 [out] ITfLangBarItem **ppItem);
136
137 HRESULT AddItem(
138 [in] ITfLangBarItem *punk);
139
140 HRESULT RemoveItem(
141 [in] ITfLangBarItem *punk);
142
143 HRESULT AdviseItemSink(
144 [in] ITfLangBarItemSink *punk,
145 [out] DWORD *pdwCookie,
146 [in] REFGUID rguidItem);
147
148 HRESULT UnadviseItemSink(
149 [in] DWORD dwCookie);
150
151 HRESULT GetItemFloatingRect(
152 [in] DWORD dwThreadId,
153 [in] REFGUID rguid,
154 [out] RECT *prc);
155
156 HRESULT GetItemsStatus(
157 [in] ULONG ulCount,
158 [in, size_is(ulCount)] const GUID *prgguid,
159 [out, size_is(ulCount)] DWORD *pdwStatus);
160
161 HRESULT GetItemNum(
162 [out] ULONG *pulCount);
163
164 HRESULT GetItems(
165 [in] ULONG ulCount,
166 [out, size_is(ulCount), length_is(*pcFetched)] ITfLangBarItem **ppItem,
167 [out, size_is(ulCount), length_is(*pcFetched)] TF_LANGBARITEMINFO *pInfo,
168 [out, size_is(ulCount), length_is(*pcFetched)] DWORD *pdwStatus,
169 [in, out, unique] ULONG *pcFetched);
170
171 HRESULT AdviseItemsSink(
172 [in] ULONG ulCount,
173 [in, size_is(ulCount)] ITfLangBarItemSink **ppunk,
174 [in, size_is(ulCount)] const GUID *pguidItem,
175 [out, size_is(ulCount)] DWORD *pdwCookie);
176
177 HRESULT UnadviseItemsSink(
178 [in] ULONG ulCount,
179 [in, size_is(ulCount)] DWORD *pdwCookie);
180 };
181
182 [
183 object,
184 uuid(583f34d0-de25-11d2-afdd-00105a2799b5),
185 pointer_default(unique),
186 ]
187 interface IEnumTfLangBarItems : IUnknown
188 {
189 HRESULT Clone(
190 [out] IEnumTfLangBarItems **ppEnum);
191
192 HRESULT Next(
193 [in] ULONG ulCount,
194 [out, size_is(ulCount)] ITfLangBarItem **ppItem,
195 [in, out, unique] ULONG *pcFetched);
196
197 HRESULT Reset();
198
199 HRESULT Skip(
200 [in] ULONG ulCount);
201 }
202
203 [
204 object,
205 uuid(73540d69-edeb-4ee9-96c9-23aa30b25916),
206 pointer_default(unique),
207 ]
208 interface ITfLangBarItem : IUnknown
209 {
210 HRESULT GetInfo(
211 [out] TF_LANGBARITEMINFO *pInfo);
212
213 HRESULT GetStatus(
214 [out] DWORD *pdwStatus);
215
216 HRESULT Show(
217 [in] BOOL fShow);
218
219 HRESULT GetTooltipString(
220 [out] BSTR *pbstrToolTip);
221 }
222
223 [
224 object,
225 uuid(57dbe1a0-de25-11d2-afdd-00105a2799b5),
226 pointer_default(unique),
227 ]
228 interface ITfLangBarItemSink : IUnknown
229 {
230 HRESULT OnUpdate(
231 [in] DWORD dwFlags);
232 }