[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 import "msctf.idl";
22 #endif
23
24 interface ITfLangBarEventSink;
25 interface ITfLangBarItemMgr;
26 interface ITfInputProcessorProfiles;
27 interface IEnumTfLangBarItems;
28 interface ITfLangBarItem;
29 interface ITfLangBarItemSink;
30
31 [
32 object,
33 uuid(87955690-e627-11d2-8ddb-00105a2799b5),
34 pointer_default(unique)
35 ]
36 interface ITfLangBarMgr: IUnknown
37 {
38 HRESULT AdviseEventSink(
39 [in] ITfLangBarEventSink *pSink,
40 [in] HWND hwnd,
41 [in] DWORD dwflags,
42 [in] DWORD *pdwCookie);
43
44 HRESULT UnAdviseEventSink(
45 [in] DWORD dwCookie);
46
47 HRESULT GetThreadMarshalInterface(
48 [in] DWORD dwThreadId,
49 [in] DWORD dwType,
50 [in] REFIID riid,
51 [out] IUnknown **ppunk);
52
53 HRESULT GetThreadLangBarItemMgr(
54 [in] DWORD dwThreadId,
55 [out] ITfLangBarItemMgr **pplbie,
56 [out] DWORD *pdwThreadid);
57
58 HRESULT GetInputProcessorProfiles(
59 [in] DWORD dwThreadId,
60 [out] ITfInputProcessorProfiles **ppaip,
61 [out] DWORD *pdwThreadid);
62
63 HRESULT RestoreLastFocus(
64 [out] DWORD *dwThreadId,
65 [in] BOOL fPrev);
66
67 HRESULT SetModalInput(
68 [in] ITfLangBarEventSink *pSink,
69 [in] DWORD dwThreadId,
70 [in] DWORD dwFlags);
71
72 HRESULT ShowFloating(
73 [in] DWORD dwFlags);
74
75 HRESULT GetShowFloatingStatus(
76 [out] DWORD *pdwFlags);
77 };
78
79 [
80 object,
81 uuid(18a4e900-e0ae-11d2-afdd-00105a2799b5),
82 pointer_default(unique)
83 ]
84 interface ITfLangBarEventSink: IUnknown
85 {
86 HRESULT OnSetFocus(
87 [in] DWORD dwThreadId);
88
89 HRESULT OnThreadTerminate(
90 [in] DWORD dwThreadId);
91
92 HRESULT OnThreadItemChange(
93 [in] DWORD dwThreadId);
94
95 HRESULT OnModalInput(
96 [in] DWORD dwThreadId,
97 [in] UINT uMsg,
98 [in] WPARAM wParam,
99 [in] LPARAM lParam);
100
101 HRESULT ShowFloating(
102 [in] DWORD dwFlags);
103
104 HRESULT GetItemFloatingRect(
105 [in] DWORD dwThreadId,
106 [in] REFGUID rguid,
107 [out] RECT *prc);
108 }
109
110 const ULONG TF_LBI_DESC_MAXLEN = 32;
111
112 typedef [uuid(12a1d29f-a065-440c-9746-eb2002c8bd19)] struct TF_LANGBARITEMINFO
113 {
114 CLSID clsidService;
115 GUID guidItem;
116 DWORD dwStyle;
117 ULONG ulSort;
118 WCHAR szDescription[TF_LBI_DESC_MAXLEN];
119 } TF_LANGBARITEMINFO;
120
121 [
122 object,
123 uuid(ba468c55-9956-4fb1-a59d-52a7dd7cc6aa),
124 pointer_default(unique),
125 ]
126 interface ITfLangBarItemMgr : IUnknown
127 {
128 HRESULT EnumItems(
129 [out] IEnumTfLangBarItems **ppEnum);
130
131 HRESULT GetItem(
132 [in] REFGUID rguid,
133 [out] ITfLangBarItem **ppItem);
134
135 HRESULT AddItem(
136 [in] ITfLangBarItem *punk);
137
138 HRESULT RemoveItem(
139 [in] ITfLangBarItem *punk);
140
141 HRESULT AdviseItemSink(
142 [in] ITfLangBarItemSink *punk,
143 [out] DWORD *pdwCookie,
144 [in] REFGUID rguidItem);
145
146 HRESULT UnadviseItemSink(
147 [in] DWORD dwCookie);
148
149 HRESULT GetItemFloatingRect(
150 [in] DWORD dwThreadId,
151 [in] REFGUID rguid,
152 [out] RECT *prc);
153
154 HRESULT GetItemsStatus(
155 [in] ULONG ulCount,
156 [in, size_is(ulCount)] const GUID *prgguid,
157 [out, size_is(ulCount)] DWORD *pdwStatus);
158
159 HRESULT GetItemNum(
160 [out] ULONG *pulCount);
161
162 HRESULT GetItems(
163 [in] ULONG ulCount,
164 [out, size_is(ulCount), length_is(*pcFetched)] ITfLangBarItem **ppItem,
165 [out, size_is(ulCount), length_is(*pcFetched)] TF_LANGBARITEMINFO *pInfo,
166 [out, size_is(ulCount), length_is(*pcFetched)] DWORD *pdwStatus,
167 [in, out, unique] ULONG *pcFetched);
168
169 HRESULT AdviseItemsSink(
170 [in] ULONG ulCount,
171 [in, size_is(ulCount)] ITfLangBarItemSink **ppunk,
172 [in, size_is(ulCount)] const GUID *pguidItem,
173 [out, size_is(ulCount)] DWORD *pdwCookie);
174
175 HRESULT UnadviseItemsSink(
176 [in] ULONG ulCount,
177 [in, size_is(ulCount)] DWORD *pdwCookie);
178 };
179
180 [
181 object,
182 uuid(583f34d0-de25-11d2-afdd-00105a2799b5),
183 pointer_default(unique),
184 ]
185 interface IEnumTfLangBarItems : IUnknown
186 {
187 HRESULT Clone(
188 [out] IEnumTfLangBarItems **ppEnum);
189
190 HRESULT Next(
191 [in] ULONG ulCount,
192 [out, size_is(ulCount)] ITfLangBarItem **ppItem,
193 [in, out, unique] ULONG *pcFetched);
194
195 HRESULT Reset();
196
197 HRESULT Skip(
198 [in] ULONG ulCount);
199 }
200
201 [
202 object,
203 uuid(73540d69-edeb-4ee9-96c9-23aa30b25916),
204 pointer_default(unique),
205 ]
206 interface ITfLangBarItem : IUnknown
207 {
208 HRESULT GetInfo(
209 [out] TF_LANGBARITEMINFO *pInfo);
210
211 HRESULT GetStatus(
212 [out] DWORD *pdwStatus);
213
214 HRESULT Show(
215 [in] BOOL fShow);
216
217 HRESULT GetTooltipString(
218 [out] BSTR *pbstrToolTip);
219 }
220
221 [
222 object,
223 uuid(57dbe1a0-de25-11d2-afdd-00105a2799b5),
224 pointer_default(unique),
225 ]
226 interface ITfLangBarItemSink : IUnknown
227 {
228 HRESULT OnUpdate(
229 [in] DWORD dwFlags);
230 }