msctf: Implement ITfClientId.
[wine] / include / msctf.idl
1 /*
2  * Copyright 2008 Aric Stewart, CodeWeavers
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 "comcat.idl";
22 import "textstor.idl";
23 /* import "ctfutb.idl"; */
24 #endif
25 cpp_quote("#include <winuser.h>")
26
27 cpp_quote("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
28 cpp_quote("#define TF_E_ALREADY_EXISTS  MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)")
29 cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
30 cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
31 cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
32
33 /* GUIDs for Categories */
34 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
35 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
36 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
37 cpp_quote("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
38
39 typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)]  DWORD TfEditCookie;
40 typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
41 typedef [uuid(88a9c478-f3ec-4763-8345-cd9250443f8d)] DWORD TfGuidAtom;
42
43 cpp_quote("#define TF_MOD_ALT                   0x0001")
44 cpp_quote("#define TF_MOD_CONTROL               0x0002")
45 cpp_quote("#define TF_MOD_SHIFT                 0x0004")
46 cpp_quote("#define TF_MOD_RALT                  0x0008")
47 cpp_quote("#define TF_MOD_RCONTROL              0x0010")
48 cpp_quote("#define TF_MOD_RSHIFT                0x0020")
49 cpp_quote("#define TF_MOD_LALT                  0x0040")
50 cpp_quote("#define TF_MOD_LCONTROL              0x0080")
51 cpp_quote("#define TF_MOD_LSHIFT                0x0100")
52 cpp_quote("#define TF_MOD_ON_KEYUP              0x0200")
53 cpp_quote("#define TF_MOD_IGNORE_ALL_MODIFIER   0x0400")
54
55 interface ITfDocumentMgr;
56 interface ITfContext;
57 interface IEnumTfDocumentMgrs;
58 interface IEnumTfContexts;
59 interface ITfFunctionProvider;
60 interface IEnumTfFunctionProviders;
61 interface ITfCompartmentMgr;
62 interface ITfEditSession;
63 interface ITfRange;
64 interface ITfContextView;
65 interface IEnumTfContextViews;
66 interface ITfProperty;
67 interface ITfReadOnlyProperty;
68 interface IEnumTfProperties;
69 interface ITfRangeBackup;
70 interface IEnumTfLanguageProfiles;
71 interface ITfEditRecord;
72 interface ITfCompositionView;
73 interface ITfKeyEventSink;
74
75 typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
76 {
77     CLSID clsid;
78     LANGID langid;
79     GUID catid;
80     BOOL fActive;
81     GUID guidProfile;
82 } TF_LANGUAGEPROFILE;
83
84 typedef [uuid(77c12f95-b783-450d-879f-1cd2362c6521)] struct TF_PRESERVEDKEY
85 {
86     UINT uVKey;
87     UINT uModifiers;
88 } TF_PRESERVEDKEY;
89
90 [
91     object,
92     uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
93     pointer_default(unique)
94 ]
95 interface ITfThreadMgr: IUnknown
96 {
97     HRESULT Activate(
98         [out] TfClientId *ptid);
99
100     HRESULT Deactivate();
101
102     HRESULT CreateDocumentMgr(
103         [out] ITfDocumentMgr **ppdim);
104
105     HRESULT EnumDocumentMgrs(
106         [out] IEnumTfDocumentMgrs **ppEnum);
107
108     HRESULT GetFocus(
109         [out] ITfDocumentMgr **ppdimFocus);
110
111     HRESULT SetFocus(
112         [in] ITfDocumentMgr *pdimFocus);
113
114     HRESULT AssociateFocus(
115         [in] HWND hwnd,
116         [in, unique] ITfDocumentMgr *pdimNew,
117         [out] ITfDocumentMgr **ppdimPrev);
118
119     HRESULT IsThreadFocus(
120         [out] BOOL *pfThreadFocus);
121
122     HRESULT GetFunctionProvider(
123         [in] REFCLSID clsid,
124         [out] ITfFunctionProvider **ppFuncProv);
125
126     HRESULT EnumFunctionProviders(
127         [out] IEnumTfFunctionProviders **ppEnum);
128
129     HRESULT GetGlobalCompartment(
130         [out] ITfCompartmentMgr **ppCompMgr);
131 };
132
133
134 [
135     object,
136     uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
137     pointer_default(unique)
138 ]
139 interface ITfDocumentMgr: IUnknown
140 {
141     HRESULT CreateContext(
142         [in] TfClientId tidOwner,
143         [in] DWORD dwFlags,
144         [in, unique] IUnknown *punk,
145         [out] ITfContext **ppic,
146         [out] TfEditCookie *pecTextStore);
147
148     HRESULT Push(
149         [in] ITfContext *pic);
150
151     const DWORD TF_POPF_ALL = 0x0001;
152
153     HRESULT Pop(
154         [in] DWORD dwFlags);
155
156     HRESULT GetTop(
157         [out] ITfContext **ppic);
158
159     HRESULT GetBase(
160         [out] ITfContext **ppic);
161
162     HRESULT EnumContexts(
163         [out] IEnumTfContexts **ppEnum);
164 };
165
166 [
167     object,
168     uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
169     pointer_default(unique)
170 ]
171 interface ITfContext : IUnknown
172 {
173     const DWORD TF_ES_ASYNCDONTCARE = 0x0;
174     const DWORD TF_ES_SYNC          = 0x1;
175     const DWORD TF_ES_READ          = 0x2;
176     const DWORD TF_ES_READWRITE     = 0x6;
177     const DWORD TF_ES_ASYNC         = 0x8;
178
179     HRESULT RequestEditSession(
180         [in] TfClientId tid,
181         [in] ITfEditSession *pes,
182         [in] DWORD dwFlags,
183         [out] HRESULT *phrSession);
184
185     HRESULT InWriteSession(
186         [in] TfClientId tid,
187         [out] BOOL *pfWriteSession);
188
189     typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
190
191     typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
192     {
193         TfActiveSelEnd ase;
194         BOOL fInterimChar;
195     } TF_SELECTIONSTYLE;
196
197     typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
198     {
199         ITfRange *range;
200         TF_SELECTIONSTYLE style;
201     } TF_SELECTION;
202
203     const ULONG TF_DEFAULT_SELECTION =  TS_DEFAULT_SELECTION;
204
205     HRESULT GetSelection(
206         [in] TfEditCookie ec,
207         [in] ULONG ulIndex,
208         [in] ULONG ulCount,
209         [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
210         [out] ULONG *pcFetched);
211
212     HRESULT SetSelection(
213         [in] TfEditCookie ec,
214         [in] ULONG ulCount,
215         [in, size_is(ulCount)] const TF_SELECTION *pSelection);
216
217     HRESULT GetStart(
218         [in] TfEditCookie ec,
219         [out] ITfRange **ppStart);
220
221     HRESULT GetEnd(
222         [in] TfEditCookie ec,
223         [out] ITfRange **ppEnd);
224
225     typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
226     const DWORD TF_SD_READONLY    = TS_SD_READONLY;
227     const DWORD TF_SD_LOADING     = TS_SD_LOADING;
228     const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
229     const DWORD TF_SS_REGIONS     = TS_SS_REGIONS;
230     const DWORD TF_SS_TRANSITORY  = TS_SS_TRANSITORY;
231
232
233     HRESULT GetActiveView(
234         [out] ITfContextView **ppView);
235
236     HRESULT EnumViews(
237         [out] IEnumTfContextViews **ppEnum);
238
239     HRESULT GetStatus(
240         [out] TF_STATUS *pdcs);
241
242     HRESULT GetProperty(
243         [in] REFGUID guidProp,
244         [out] ITfProperty **ppProp);
245
246     HRESULT GetAppProperty(
247         [in] REFGUID guidProp,
248         [out] ITfReadOnlyProperty **ppProp);
249
250     HRESULT TrackProperties(
251         [in, size_is(cProp)] const GUID **prgProp,
252         [in] ULONG cProp,
253         [in, size_is(cAppProp)] const GUID **prgAppProp,
254         [in] ULONG cAppProp,
255         [out] ITfReadOnlyProperty **ppProperty);
256
257     HRESULT EnumProperties(
258         [out] IEnumTfProperties **ppEnum);
259
260     HRESULT GetDocumentMgr(
261         [out] ITfDocumentMgr **ppDm);
262
263     HRESULT CreateRangeBackup(
264         [in] TfEditCookie ec,
265         [in] ITfRange *pRange,
266         [out] ITfRangeBackup **ppBackup);
267
268 };
269
270 [
271   object,
272   uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
273   pointer_default(unique)
274 ]
275 interface ITfSource : IUnknown
276 {
277     HRESULT AdviseSink(
278         [in] REFIID riid,
279         [in, iid_is(riid)] IUnknown *punk,
280         [out] DWORD *pdwCookie);
281
282     HRESULT UnadviseSink(
283         [in] DWORD dwCookie);
284 };
285
286 [
287   object,
288   local,
289   uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
290   pointer_default(unique)
291 ]
292 interface ITfInputProcessorProfiles : IUnknown
293 {
294     HRESULT Register(
295         [in] REFCLSID rclsid);
296
297     HRESULT Unregister(
298         [in] REFCLSID rclsid);
299
300     HRESULT AddLanguageProfile(
301         [in] REFCLSID rclsid,
302         [in] LANGID langid,
303         [in] REFGUID guidProfile,
304         [in, size_is(cchDesc)] const WCHAR *pchDesc,
305         [in] ULONG cchDesc,
306         [in, size_is(cchFile)] const WCHAR *pchIconFile,
307         [in] ULONG cchFile,
308         [in] ULONG uIconIndex);
309
310     HRESULT RemoveLanguageProfile(
311         [in] REFCLSID rclsid,
312         [in] LANGID langid,
313         [in] REFGUID guidProfile);
314
315     HRESULT EnumInputProcessorInfo(
316         [out] IEnumGUID **ppEnum);
317
318     HRESULT GetDefaultLanguageProfile(
319         [in] LANGID langid,
320         [in] REFGUID catid,
321         [out] CLSID *pclsid,
322         [out] GUID *pguidProfile);
323
324     HRESULT SetDefaultLanguageProfile(
325         [in] LANGID langid,
326         [in] REFCLSID rclsid,
327         [in] REFGUID guidProfiles);
328
329     HRESULT ActivateLanguageProfile(
330         [in] REFCLSID rclsid,
331         [in] LANGID langid,
332         [in] REFGUID guidProfiles);
333
334     HRESULT GetActiveLanguageProfile(
335         [in] REFCLSID rclsid,
336         [out] LANGID *plangid,
337         [out] GUID *pguidProfile);
338
339     HRESULT GetLanguageProfileDescription(
340         [in] REFCLSID rclsid,
341         [in] LANGID langid,
342         [in] REFGUID guidProfile,
343         [out] BSTR *pbstrProfile);
344
345     HRESULT GetCurrentLanguage(
346         [out] LANGID *plangid);
347
348     HRESULT ChangeCurrentLanguage(
349         [in] LANGID langid);
350
351     HRESULT GetLanguageList(
352         [out] LANGID **ppLangId,
353         [out] ULONG *pulCount);
354
355     HRESULT EnumLanguageProfiles(
356         [in] LANGID langid,
357         [out] IEnumTfLanguageProfiles **ppEnum);
358
359     HRESULT EnableLanguageProfile(
360         [in] REFCLSID rclsid,
361         [in] LANGID langid,
362         [in] REFGUID guidProfile,
363         [in] BOOL fEnable);
364
365     HRESULT IsEnabledLanguageProfile(
366         [in] REFCLSID rclsid,
367         [in] LANGID langid,
368         [in] REFGUID guidProfile,
369         [out] BOOL *pfEnable);
370
371     HRESULT EnableLanguageProfileByDefault(
372         [in] REFCLSID rclsid,
373         [in] LANGID langid,
374         [in] REFGUID guidProfile,
375         [in] BOOL fEnable);
376
377     HRESULT SubstituteKeyboardLayout(
378         [in] REFCLSID rclsid,
379         [in] LANGID langid,
380         [in] REFGUID guidProfile,
381         [in] HKL hKL);
382 };
383
384 [
385   object,
386   local,
387   uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
388   pointer_default(unique)
389 ]
390 interface ITfCategoryMgr : IUnknown
391 {
392     HRESULT RegisterCategory([in] REFCLSID rclsid,
393                              [in] REFGUID rcatid,
394                              [in] REFGUID rguid);
395
396     HRESULT UnregisterCategory([in] REFCLSID rclsid,
397                                [in] REFGUID rcatid,
398                                [in] REFGUID rguid);
399
400     HRESULT EnumCategoriesInItem([in] REFGUID rguid,
401                                  [out] IEnumGUID **ppEnum);
402
403     HRESULT EnumItemsInCategory([in] REFGUID rcatid,
404                                 [out] IEnumGUID **ppEnum);
405
406     HRESULT FindClosestCategory([in] REFGUID rguid,
407                                 [out] GUID *pcatid,
408                                 [in, size_is(ulCount)] const GUID **ppcatidList,
409                                 [in] ULONG ulCount);
410
411     HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
412                                     [in] REFGUID rguid,
413                                     [in, size_is(cch)] const WCHAR *pchDesc,
414                                     [in] ULONG cch);
415
416     HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
417                                       [in] REFGUID rguid);
418
419     HRESULT GetGUIDDescription([in] REFGUID rguid,
420                                [out] BSTR *pbstrDesc);
421
422     HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
423                               [in] REFGUID rguid,
424                               [in] DWORD dw);
425
426     HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
427                                 [in] REFGUID rguid);
428
429     HRESULT GetGUIDDWORD([in] REFGUID rguid,
430                          [out] DWORD *pdw);
431
432     HRESULT RegisterGUID([in] REFGUID rguid,
433                          [out] TfGuidAtom *pguidatom);
434
435     HRESULT GetGUID([in] TfGuidAtom guidatom,
436                     [out] GUID *pguid);
437
438     HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
439                               [in] REFGUID rguid,
440                               [out] BOOL *pfEqual);
441 };
442
443 [
444   object,
445   uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
446   pointer_default(unique)
447 ]
448 interface ITfTextEditSink : IUnknown
449 {
450     HRESULT OnEndEdit(
451         [in] ITfContext *pic,
452         [in] TfEditCookie ecReadOnly,
453         [in] ITfEditRecord *pEditRecord);
454 };
455
456 [
457     object,
458     uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
459     pointer_default(unique)
460 ]
461 interface ITfContextOwnerCompositionSink : IUnknown
462 {
463     HRESULT OnStartComposition(
464         [in] ITfCompositionView *pComposition,
465         [out] BOOL *pfOk);
466
467     HRESULT OnUpdateComposition(
468         [in] ITfCompositionView *pComposition,
469         [in] ITfRange *pRangeNew);
470
471     HRESULT OnEndComposition(
472         [in] ITfCompositionView *pComposition);
473 };
474
475 [
476   object,
477   uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
478   pointer_default(unique)
479 ]
480 interface IEnumTfLanguageProfiles : IUnknown
481 {
482     HRESULT Clone(
483         [out] IEnumTfLanguageProfiles **ppEnum);
484
485     HRESULT Next(
486         [in] ULONG ulCount,
487         [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
488         [out] ULONG *pcFetch);
489
490     HRESULT Reset();
491
492     HRESULT Skip(
493         [in] ULONG ulCount);
494 };
495
496 [
497   object,
498   local,
499   uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
500   pointer_default(unique)
501 ]
502 interface ITfTextInputProcessor : IUnknown
503 {
504     HRESULT Activate(
505         [in] ITfThreadMgr *ptim,
506         [in] TfClientId tid);
507
508     HRESULT Deactivate();
509 };
510
511 [
512   object,
513   uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
514   pointer_default(unique)
515 ]
516 interface ITfThreadMgrEventSink : IUnknown
517 {
518     HRESULT OnInitDocumentMgr(
519         [in] ITfDocumentMgr *pdim);
520
521     HRESULT OnUninitDocumentMgr(
522         [in] ITfDocumentMgr *pdim);
523
524     HRESULT OnSetFocus(
525         [in] ITfDocumentMgr *pdimFocus,
526         [in] ITfDocumentMgr *pdimPrevFocus);
527
528     HRESULT OnPushContext(
529         [in] ITfContext *pic);
530
531     HRESULT OnPopContext(
532         [in] ITfContext *pic);
533 };
534
535 [
536   object,
537   local,
538   uuid(aa80e7f0-2021-11d2-93e0-0060b067b86e),
539   pointer_default(unique)
540 ]
541 interface ITfKeystrokeMgr : IUnknown
542 {
543     HRESULT AdviseKeyEventSink(
544         [in] TfClientId tid,
545         [in] ITfKeyEventSink *pSink,
546         [in] BOOL fForeground);
547
548     HRESULT UnadviseKeyEventSink(
549         [in] TfClientId tid);
550
551     HRESULT GetForeground(
552         [out] CLSID *pclsid);
553
554     HRESULT TestKeyDown(
555         [in] WPARAM wParam,
556         [in] LPARAM lParam,
557         [out] BOOL *pfEaten);
558
559     HRESULT TestKeyUp(
560         [in] WPARAM wParam,
561         [in] LPARAM lParam,
562         [out] BOOL *pfEaten);
563
564     HRESULT KeyDown(
565         [in] WPARAM wParam,
566         [in] LPARAM lParam,
567         [out] BOOL *pfEaten);
568
569     HRESULT KeyUp(
570         [in] WPARAM wParam,
571         [in] LPARAM lParam,
572         [out] BOOL *pfEaten);
573
574     HRESULT GetPreservedKey(
575         [in] ITfContext *pic,
576         [in] const TF_PRESERVEDKEY *pprekey,
577         [out] GUID *pguid);
578
579     HRESULT IsPreservedKey(
580         [in] REFGUID rguid,
581         [in] const TF_PRESERVEDKEY *pprekey,
582         [out] BOOL *pfRegistered);
583
584     HRESULT PreserveKey(
585         [in] TfClientId tid,
586         [in] REFGUID rguid,
587         [in] const TF_PRESERVEDKEY *prekey,
588         [in, size_is(cchDesc)] const WCHAR *pchDesc,
589         [in] ULONG cchDesc);
590
591     HRESULT UnpreserveKey(
592         [in] REFGUID rguid,
593         [in] const TF_PRESERVEDKEY *pprekey);
594
595     HRESULT SetPreservedKeyDescription(
596         [in] REFGUID rguid,
597         [in, size_is(cchDesc)] const WCHAR *pchDesc,
598         [in] ULONG cchDesc);
599
600     HRESULT GetPreservedKeyDescription(
601         [in] REFGUID rguid,
602         [out] BSTR *pbstrDesc);
603
604     HRESULT SimulatePreservedKey(
605         [in] ITfContext *pic,
606         [in] REFGUID rguid,
607         [out] BOOL *pfEaten);
608 };
609
610 [
611   object,
612   local,
613   uuid(aa80e7f5-2021-11d2-93e0-0060b067b86e),
614   pointer_default(unique)
615 ]
616 interface ITfKeyEventSink : IUnknown
617 {
618     HRESULT OnSetFocus(
619         [in] BOOL fForeground);
620
621     HRESULT OnTestKeyDown(
622         [in] ITfContext *pic,
623         [in] WPARAM wParam,
624         [in] LPARAM lParam,
625         [out] BOOL *pfEaten);
626
627     HRESULT OnTestKeyUp(
628         [in] ITfContext *pic,
629         [in] WPARAM wParam,
630         [in] LPARAM lParam,
631         [out] BOOL *pfEaten);
632
633     HRESULT OnKeyDown(
634         [in] ITfContext *pic,
635         [in] WPARAM wParam,
636         [in] LPARAM lParam,
637         [out] BOOL *pfEaten);
638
639     HRESULT OnKeyUp(
640         [in] ITfContext *pic,
641         [in] WPARAM wParam,
642         [in] LPARAM lParam,
643         [out] BOOL *pfEaten);
644
645     HRESULT OnPreservedKey(
646         [in] ITfContext *pic,
647         [in] REFGUID rguid,
648         [out] BOOL *pfEaten);
649 };
650
651 [
652   object,
653   local,
654   uuid(8f1b8ad8-0b6b-4874-90c5-bd76011e8f7c),
655   pointer_default(unique)
656 ]
657 interface ITfMessagePump : IUnknown
658 {
659     HRESULT PeekMessageA(
660         [out] LPMSG pMsg,
661         [in] HWND hwnd,
662         [in] UINT wMsgFilterMin,
663         [in] UINT wMsgFilterMax,
664         [in] UINT wRemoveMsg,
665         [out] BOOL *pfResult);
666
667     HRESULT GetMessageA(
668         [out] LPMSG pMsg,
669         [in] HWND hwnd,
670         [in] UINT wMsgFilterMin,
671         [in] UINT wMsgFilterMax,
672         [out] BOOL *pfResult);
673
674     HRESULT PeekMessageW(
675         [out] LPMSG pMsg,
676         [in] HWND hwnd,
677         [in] UINT wMsgFilterMin,
678         [in] UINT wMsgFilterMax,
679         [in] UINT wRemoveMsg,
680         [out] BOOL *pfResult);
681
682     HRESULT GetMessageW(
683         [out] LPMSG pMsg,
684         [in] HWND hwnd,
685         [in] UINT wMsgFilterMin,
686         [in] UINT wMsgFilterMax,
687         [out] BOOL *pfResult);
688 };
689
690 [
691   object,
692   local,
693   uuid(d60a7b49-1b9f-4be2-b702-47e9dc05dec3),
694   pointer_default(unique)
695 ]
696 interface ITfClientId : IUnknown
697 {
698     HRESULT GetClientId(
699         [in] REFCLSID rclsid,
700         [out] TfClientId *ptid);
701 };