ReactOS 0.4.15-dev-7693-gd0e2924
ctfutb.idl
Go to the documentation of this file.
1/*
2 * Copyright 2010 Justin Chevrier
3 * Copyright 2023 Katayama Hirofumi MZ
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#ifndef DO_NO_IMPORTS
21import "oaidl.idl";
22#ifdef __midl
23import "msctf.idl";
24#endif
25#endif
26
27cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLEW L\"TF_FloatingLangBar_WndTitle\"")
28cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLEA \"TF_FloatingLangBar_WndTitle\"")
29cpp_quote("#ifdef UNICODE")
30cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLE TF_FLOATINGLANGBAR_WNDTITLEW")
31cpp_quote("#else")
32cpp_quote("#define TF_FLOATINGLANGBAR_WNDTITLE TF_FLOATINGLANGBAR_WNDTITLEA")
33cpp_quote("#endif")
34
35/* Flags for ITfLangBarItemSink::OnUpdate */
36cpp_quote("#define TF_LBI_ICON 0x00000001")
37cpp_quote("#define TF_LBI_TEXT 0x00000002")
38cpp_quote("#define TF_LBI_TOOLTIP 0x00000004")
39cpp_quote("#define TF_LBI_BITMAP 0x00000008")
40cpp_quote("#define TF_LBI_BALLOON 0x00000010")
41cpp_quote("#define TF_LBI_CUSTOMUI 0x00000020")
42cpp_quote("#define TF_LBI_BTNALL (TF_LBI_TEXT | TF_LBI_ICON | TF_LBI_TOOLTIP)")
43cpp_quote("#define TF_LBI_BMPBTNALL (TF_LBI_TEXT | TF_LBI_BITMAP | TF_LBI_TOOLTIP)")
44cpp_quote("#define TF_LBI_BMPALL (TF_LBI_BITMAP | TF_LBI_TOOLTIP)")
45cpp_quote("#define TF_LBI_STATUS 0x00010000")
46
47/* Flags for ITfLangBarItem::GetInfo */
48cpp_quote("#define TF_LBI_STYLE_HIDDENSTATUSCONTROL 0x00000001")
49cpp_quote("#define TF_LBI_STYLE_SHOWNINTRAY 0x00000002")
50cpp_quote("#define TF_LBI_STYLE_HIDEONNOOTHERITEMS 0x00000004")
51cpp_quote("#define TF_LBI_STYLE_SHOWNINTRAYONLY 0x00000008")
52cpp_quote("#define TF_LBI_STYLE_HIDDENBYDEFAULT 0x00000010")
53cpp_quote("#define TF_LBI_STYLE_TEXTCOLORICON 0x00000020")
54cpp_quote("#define TF_LBI_STYLE_BTN_BUTTON 0x00010000")
55cpp_quote("#define TF_LBI_STYLE_BTN_MENU 0x00020000")
56cpp_quote("#define TF_LBI_STYLE_BTN_TOGGLE 0x00040000")
57
58/* Flags for ITfLangBarItem::GetStatus */
59cpp_quote("#define TF_LBI_STATUS_HIDDEN 0x00000001")
60cpp_quote("#define TF_LBI_STATUS_DISABLED 0x00000002")
61cpp_quote("#define TF_LBI_STATUS_BTN_TOGGLED 0x00010000")
62
63cpp_quote("#define TF_LBI_BMPF_VERTICAL 0x00000001")
64
65/* Flags for ShowFloating */
66cpp_quote("#define TF_SFT_SHOWNORMAL 0x00000001")
67cpp_quote("#define TF_SFT_DOCK 0x00000002")
68cpp_quote("#define TF_SFT_MINIMIZED 0x00000004")
69cpp_quote("#define TF_SFT_HIDDEN 0x00000008")
70cpp_quote("#define TF_SFT_NOTRANSPARENCY 0x00000010")
71cpp_quote("#define TF_SFT_LOWTRANSPARENCY 0x00000020")
72cpp_quote("#define TF_SFT_HIGHTRANSPARENCY 0x00000040")
73cpp_quote("#define TF_SFT_LABELS 0x00000080")
74cpp_quote("#define TF_SFT_NOLABELS 0x00000100")
75cpp_quote("#define TF_SFT_EXTRAICONSONMINIMIZED 0x00000200")
76cpp_quote("#define TF_SFT_NOEXTRAICONSONMINIMIZED 0x00000400")
77cpp_quote("#define TF_SFT_DESKBAND 0x00000800")
78
79/* OnMenuSelect flags */
80cpp_quote("#define TF_INVALIDMENUITEM (UINT)(-1)")
81
82/* SystemDeviceTypeLangbarItem flag */
83cpp_quote("#define TF_DTLBI_USEPROFILEICON 0x00000001")
84
85typedef enum
86{
87 TF_LBI_CLK_RIGHT = 1,
88 TF_LBI_CLK_LEFT = 2
89} TfLBIClick;
90
91interface ITfLangBarEventSink;
92interface ITfLangBarItemMgr;
93interface ITfInputProcessorProfiles;
94interface IEnumTfLangBarItems;
95interface ITfLangBarItem;
96interface ITfLangBarItemSink;
97interface ITfLangBarItemBalloon;
98interface ITfLangBarItemBitmap;
99interface ITfLangBarItemBitmapButton;
100interface ITfLangBarItemButton;
101interface ITfMenu;
102interface ITfSystemDeviceTypeLangBarItem;
103interface ITfSystemLangBarItem;
104interface ITfSystemLangBarItemSink;
105interface ITfSystemLangBarItemText;
106
107[
108 object,
109 uuid(87955690-e627-11d2-8ddb-00105a2799b5),
110 pointer_default(unique)
111]
112interface ITfLangBarMgr: IUnknown
113{
114 HRESULT AdviseEventSink(
115 [in] ITfLangBarEventSink *pSink,
116 [in] HWND hwnd,
117 [in] DWORD dwflags,
118 [in] DWORD *pdwCookie);
119
120 HRESULT UnAdviseEventSink(
121 [in] DWORD dwCookie);
122
123 HRESULT GetThreadMarshalInterface(
124 [in] DWORD dwThreadId,
125 [in] DWORD dwType,
126 [in] REFIID riid,
127 [out] IUnknown **ppunk);
128
129 HRESULT GetThreadLangBarItemMgr(
130 [in] DWORD dwThreadId,
131 [out] ITfLangBarItemMgr **pplbie,
132 [out] DWORD *pdwThreadid);
133
134 HRESULT GetInputProcessorProfiles(
135 [in] DWORD dwThreadId,
136 [out] ITfInputProcessorProfiles **ppaip,
137 [out] DWORD *pdwThreadid);
138
139 HRESULT RestoreLastFocus(
140 [out] DWORD *dwThreadId,
141 [in] BOOL fPrev);
142
143 HRESULT SetModalInput(
144 [in] ITfLangBarEventSink *pSink,
145 [in] DWORD dwThreadId,
146 [in] DWORD dwFlags);
147
148 HRESULT ShowFloating(
149 [in] DWORD dwFlags);
150
151 HRESULT GetShowFloatingStatus(
152 [out] DWORD *pdwFlags);
153}
154
155[
156 object,
157 uuid(18a4e900-e0ae-11d2-afdd-00105a2799b5),
158 pointer_default(unique)
159]
160interface ITfLangBarEventSink: IUnknown
161{
162 HRESULT OnSetFocus(
163 [in] DWORD dwThreadId);
164
165 HRESULT OnThreadTerminate(
166 [in] DWORD dwThreadId);
167
168 HRESULT OnThreadItemChange(
169 [in] DWORD dwThreadId);
170
171 HRESULT OnModalInput(
172 [in] DWORD dwThreadId,
173 [in] UINT uMsg,
174 [in] WPARAM wParam,
175 [in] LPARAM lParam);
176
177 HRESULT ShowFloating(
178 [in] DWORD dwFlags);
179
180 HRESULT GetItemFloatingRect(
181 [in] DWORD dwThreadId,
182 [in] REFGUID rguid,
183 [out] RECT *prc);
184}
185
186const ULONG TF_LBI_DESC_MAXLEN = 32;
187
188typedef [uuid(12a1d29f-a065-440c-9746-eb2002c8bd19)] struct TF_LANGBARITEMINFO
189{
190 CLSID clsidService;
191 GUID guidItem;
192 DWORD dwStyle;
193 ULONG ulSort;
194 WCHAR szDescription[TF_LBI_DESC_MAXLEN];
195} TF_LANGBARITEMINFO;
196
197[
198 object,
199 uuid(ba468c55-9956-4fb1-a59d-52a7dd7cc6aa),
200 pointer_default(unique)
201]
202interface ITfLangBarItemMgr : IUnknown
203{
204 HRESULT EnumItems(
205 [out] IEnumTfLangBarItems **ppEnum);
206
207 HRESULT GetItem(
208 [in] REFGUID rguid,
209 [out] ITfLangBarItem **ppItem);
210
211 HRESULT AddItem(
212 [in] ITfLangBarItem *punk);
213
214 HRESULT RemoveItem(
215 [in] ITfLangBarItem *punk);
216
217 HRESULT AdviseItemSink(
218 [in] ITfLangBarItemSink *punk,
219 [out] DWORD *pdwCookie,
220 [in] REFGUID rguidItem);
221
222 HRESULT UnadviseItemSink(
223 [in] DWORD dwCookie);
224
225 HRESULT GetItemFloatingRect(
226 [in] DWORD dwThreadId,
227 [in] REFGUID rguid,
228 [out] RECT *prc);
229
230 HRESULT GetItemsStatus(
231 [in] ULONG ulCount,
232 [in, size_is(ulCount)] const GUID *prgguid,
233 [out, size_is(ulCount)] DWORD *pdwStatus);
234
235 HRESULT GetItemNum(
236 [out] ULONG *pulCount);
237
238 HRESULT GetItems(
239 [in] ULONG ulCount,
240 [out, size_is(ulCount), length_is(*pcFetched)] ITfLangBarItem **ppItem,
241 [out, size_is(ulCount), length_is(*pcFetched)] TF_LANGBARITEMINFO *pInfo,
242 [out, size_is(ulCount), length_is(*pcFetched)] DWORD *pdwStatus,
243 [in, out, unique] ULONG *pcFetched);
244
245 HRESULT AdviseItemsSink(
246 [in] ULONG ulCount,
247 [in, size_is(ulCount)] ITfLangBarItemSink **ppunk,
248 [in, size_is(ulCount)] const GUID *pguidItem,
249 [out, size_is(ulCount)] DWORD *pdwCookie);
250
251 HRESULT UnadviseItemsSink(
252 [in] ULONG ulCount,
253 [in, size_is(ulCount)] DWORD *pdwCookie);
254}
255
256[
257 object,
258 uuid(583f34d0-de25-11d2-afdd-00105a2799b5),
259 pointer_default(unique)
260]
261interface IEnumTfLangBarItems : IUnknown
262{
263 HRESULT Clone(
264 [out] IEnumTfLangBarItems **ppEnum);
265
266 HRESULT Next(
267 [in] ULONG ulCount,
268 [out, size_is(ulCount)] ITfLangBarItem **ppItem,
269 [in, out, unique] ULONG *pcFetched);
270
271 HRESULT Reset();
272
273 HRESULT Skip(
274 [in] ULONG ulCount);
275}
276
277[
278 object,
279 uuid(73540d69-edeb-4ee9-96c9-23aa30b25916),
280 pointer_default(unique)
281]
282interface ITfLangBarItem : IUnknown
283{
284 HRESULT GetInfo(
285 [out] TF_LANGBARITEMINFO *pInfo);
286
287 HRESULT GetStatus(
288 [out] DWORD *pdwStatus);
289
290 HRESULT Show(
291 [in] BOOL fShow);
292
293 HRESULT GetTooltipString(
294 [out] BSTR *pbstrToolTip);
295}
296
297[
298 object,
299 uuid(57dbe1a0-de25-11d2-afdd-00105a2799b5),
300 pointer_default(unique)
301]
302interface ITfLangBarItemSink : IUnknown
303{
304 HRESULT OnUpdate(
305 [in] DWORD dwFlags);
306}
307
308[
309 object,
310 uuid(01c2d285-d3c7-4b7b-b5b5-d97411d0c283),
311 pointer_default(unique)
312]
313interface ITfLangBarItemBalloon : IUnknown
314{
315 HRESULT OnClick(
316 [in] TfLBIClick click,
317 [in] POINT pt,
318 [in] const RECT *prcArea);
319
320 HRESULT GetPreferredSize(
321 [in] const SIZE *pszDefault,
322 [out] SIZE *psz);
323
324 typedef enum
325 {
326 TF_LB_BALLOON_RECO = 0,
327 TF_LB_BALLOON_SHOW = 1,
328 TF_LB_BALLOON_MISS = 2
329 } TfLBBalloonStyle;
330
331 typedef struct TF_LBBALLOONINFO
332 {
333 TfLBBalloonStyle style;
334 BSTR bstrText;
335 } TF_LBBALLOONINFO;
336
337 HRESULT GetBalloonInfo(
338 [out] TF_LBBALLOONINFO *pInfo);
339}
340
341[
342 object,
343 uuid(73830352-d722-4179-ada5-f045c98df355),
344 pointer_default(unique)
345]
346interface ITfLangBarItemBitmap : IUnknown
347{
348 HRESULT OnClick(
349 [in] TfLBIClick click,
350 [in] POINT pt,
351 [in] const RECT *prcArea);
352
353 HRESULT GetPreferredSize(
354 [in] const SIZE *pszDefault,
355 [out] SIZE *psz);
356
357 HRESULT DrawBitmap(
358 [in] LONG bmWidth,
359 [in] LONG bmHeight,
360 [in] DWORD dwFlags,
361 [out] HBITMAP *phbmp,
362 [out] HBITMAP *phbmpMask);
363}
364
365[
366 object,
367 uuid(a26a0525-3fae-4fa0-89ee-88a964f9f1b5),
368 pointer_default(unique)
369]
370interface ITfLangBarItemBitmapButton : IUnknown
371{
372 HRESULT OnClick(
373 [in] TfLBIClick click,
374 [in] POINT pt,
375 [in] const RECT *prcArea);
376
377 HRESULT InitMenu(
378 [in] ITfMenu *pMenu);
379
380 HRESULT OnMenuSelect(
381 [in] UINT wID);
382
383 HRESULT GetPreferredSize(
384 [in] const SIZE *pszDefault,
385 [out] SIZE *psz);
386
387 HRESULT DrawBitmap(
388 [in] LONG bmWidth,
389 [in] LONG bmHeight,
390 [in] DWORD dwFlags,
391 [out] HBITMAP *phbmp,
392 [out] HBITMAP *phbmpMask);
393
394 HRESULT GetText(
395 [out] BSTR *pbstrText);
396}
397
398[
399 object,
400 uuid(28c7f1d0-de25-11d2-afdd-00105a2799b5),
401 pointer_default(unique)
402]
403interface ITfLangBarItemButton : IUnknown
404{
405 HRESULT OnClick(
406 [in] TfLBIClick click,
407 [in] POINT pt,
408 [in] const RECT *prcArea);
409
410 HRESULT InitMenu(
411 [in] ITfMenu *pMenu);
412
413 HRESULT OnMenuSelect(
414 [in] UINT wID);
415
416 HRESULT GetIcon(
417 [out] HICON *phIcon);
418
419 HRESULT GetText(
420 [out] BSTR *pbstrText);
421}
422
423[
424 object,
425 uuid(6f8a98e4-aaa0-4f15-8c5b-07e0df0a3dd8),
426 pointer_default(unique)
427]
428interface ITfMenu : IUnknown
429{
430 const DWORD TF_LBMENUF_CHECKED = 0x00000001;
431 const DWORD TF_LBMENUF_SUBMENU = 0x00000002;
432 const DWORD TF_LBMENUF_SEPARATOR = 0x00000004;
433 const DWORD TF_LBMENUF_RADIOCHECKED = 0x00000008;
434 const DWORD TF_LBMENUF_GRAYED = 0x00000010;
435
436 HRESULT AddMenuItem(
437 [in] UINT uId,
438 [in] DWORD dwFlags,
439 [in] HBITMAP hbmp,
440 [in] HBITMAP hbmpMask,
441 [in] const WCHAR *pch,
442 [in] ULONG cch,
443 ITfMenu **ppMenu);
444}
445
446[
447 object,
448 uuid(45672eb9-9059-46a2-838d-4530355f6a77),
449 pointer_default(unique)
450]
451interface ITfSystemDeviceTypeLangBarItem : IUnknown
452{
453 HRESULT SetIconMode(
454 [in] DWORD dwFlags);
455
456 HRESULT GetIconMode(
457 [out] DWORD *pdwFlags);
458}
459
460[
461 object,
462 uuid(1e13e9ec-6b33-4d4a-b5eb-8a92f029f356),
463 pointer_default(unique)
464]
465interface ITfSystemLangBarItem : IUnknown
466{
467 HRESULT SetIcon(
468 [in] HICON hIcon);
469
470 HRESULT SetTooltipString(
471 [in] WCHAR *pchToolTip,
472 [in] ULONG cch);
473}
474
475[
476 object,
477 uuid(1449d9ab-13cf-4687-aa3e-8d8b18574396),
478 pointer_default(unique)
479]
480interface ITfSystemLangBarItemSink : IUnknown
481{
482 HRESULT InitMenu(
483 [in] ITfMenu *pMenu);
484
485 HRESULT OnMenuSelect(
486 [in] UINT wID);
487}
488
489[
490 object,
491 uuid(5c4ce0e5-ba49-4b52-ac6b-3b397b4f701f),
492 pointer_default(unique)
493]
494interface ITfSystemLangBarItemText : IUnknown
495{
496 HRESULT SetItemText(
497 [in] const WCHAR *pch,
498 [in] ULONG cch);
499
500 HRESULT GetItemText(
501 [out] BSTR *pbstrText);
502}
CD3D10_BUFFER_DESC D3D10_BUFFER_DESC cpp_quote(" ~CD3D10_BUFFER_DESC() {}") operator const D3D10_BUFFER_DESC &() const
Definition: d3d10.idl:491