msctf: Implement ITfCompartmentEventSink.
[wine.git] / include / msctf.idl
blob10580573e92a3b1ce989bfde24b9404e61debba0
1 /*
2 * Copyright 2008 Aric Stewart, CodeWeavers
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.
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.
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
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>")
27 cpp_quote("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
28 cpp_quote("#define TF_E_DISCONNECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0504)")
29 cpp_quote("#define TF_E_ALREADY_EXISTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)")
30 cpp_quote("#define TF_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)")
32 cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
33 cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
34 cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
36 /* GUIDs for Compartments */
37 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")
38 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;")
39 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;")
40 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;")
41 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;")
42 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;")
43 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;")
44 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;")
45 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;")
47 /* GUIDs for Categories */
48 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
49 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
50 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
51 cpp_quote("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
53 typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie;
54 typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
55 typedef [uuid(88a9c478-f3ec-4763-8345-cd9250443f8d)] DWORD TfGuidAtom;
57 cpp_quote("#define TF_MOD_ALT 0x0001")
58 cpp_quote("#define TF_MOD_CONTROL 0x0002")
59 cpp_quote("#define TF_MOD_SHIFT 0x0004")
60 cpp_quote("#define TF_MOD_RALT 0x0008")
61 cpp_quote("#define TF_MOD_RCONTROL 0x0010")
62 cpp_quote("#define TF_MOD_RSHIFT 0x0020")
63 cpp_quote("#define TF_MOD_LALT 0x0040")
64 cpp_quote("#define TF_MOD_LCONTROL 0x0080")
65 cpp_quote("#define TF_MOD_LSHIFT 0x0100")
66 cpp_quote("#define TF_MOD_ON_KEYUP 0x0200")
67 cpp_quote("#define TF_MOD_IGNORE_ALL_MODIFIER 0x0400")
69 interface ITfDocumentMgr;
70 interface ITfContext;
71 interface IEnumTfDocumentMgrs;
72 interface IEnumTfContexts;
73 interface ITfFunctionProvider;
74 interface IEnumTfFunctionProviders;
75 interface ITfCompartmentMgr;
76 interface ITfEditSession;
77 interface ITfRange;
78 interface ITfContextView;
79 interface IEnumTfContextViews;
80 interface ITfProperty;
81 interface ITfReadOnlyProperty;
82 interface IEnumTfProperties;
83 interface ITfRangeBackup;
84 interface IEnumTfLanguageProfiles;
85 interface ITfEditRecord;
86 interface ITfCompositionView;
87 interface ITfKeyEventSink;
89 typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
91 CLSID clsid;
92 LANGID langid;
93 GUID catid;
94 BOOL fActive;
95 GUID guidProfile;
96 } TF_LANGUAGEPROFILE;
98 typedef [uuid(77c12f95-b783-450d-879f-1cd2362c6521)] struct TF_PRESERVEDKEY
100 UINT uVKey;
101 UINT uModifiers;
102 } TF_PRESERVEDKEY;
104 typedef [uuid(5a886226-ae9a-489b-b991-2b1e25ee59a9)] enum { TF_ANCHOR_START = 0, TF_ANCHOR_END = 1 } TfAnchor;
107 object,
108 uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
109 pointer_default(unique)
111 interface ITfThreadMgr: IUnknown
113 HRESULT Activate(
114 [out] TfClientId *ptid);
116 HRESULT Deactivate();
118 HRESULT CreateDocumentMgr(
119 [out] ITfDocumentMgr **ppdim);
121 HRESULT EnumDocumentMgrs(
122 [out] IEnumTfDocumentMgrs **ppEnum);
124 HRESULT GetFocus(
125 [out] ITfDocumentMgr **ppdimFocus);
127 HRESULT SetFocus(
128 [in] ITfDocumentMgr *pdimFocus);
130 HRESULT AssociateFocus(
131 [in] HWND hwnd,
132 [in, unique] ITfDocumentMgr *pdimNew,
133 [out] ITfDocumentMgr **ppdimPrev);
135 HRESULT IsThreadFocus(
136 [out] BOOL *pfThreadFocus);
138 HRESULT GetFunctionProvider(
139 [in] REFCLSID clsid,
140 [out] ITfFunctionProvider **ppFuncProv);
142 HRESULT EnumFunctionProviders(
143 [out] IEnumTfFunctionProviders **ppEnum);
145 HRESULT GetGlobalCompartment(
146 [out] ITfCompartmentMgr **ppCompMgr);
151 object,
152 uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
153 pointer_default(unique)
155 interface ITfDocumentMgr: IUnknown
157 HRESULT CreateContext(
158 [in] TfClientId tidOwner,
159 [in] DWORD dwFlags,
160 [in, unique] IUnknown *punk,
161 [out] ITfContext **ppic,
162 [out] TfEditCookie *pecTextStore);
164 HRESULT Push(
165 [in] ITfContext *pic);
167 const DWORD TF_POPF_ALL = 0x0001;
169 HRESULT Pop(
170 [in] DWORD dwFlags);
172 HRESULT GetTop(
173 [out] ITfContext **ppic);
175 HRESULT GetBase(
176 [out] ITfContext **ppic);
178 HRESULT EnumContexts(
179 [out] IEnumTfContexts **ppEnum);
183 object,
184 uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
185 pointer_default(unique)
187 interface ITfContext : IUnknown
189 const DWORD TF_ES_ASYNCDONTCARE = 0x0;
190 const DWORD TF_ES_SYNC = 0x1;
191 const DWORD TF_ES_READ = 0x2;
192 const DWORD TF_ES_READWRITE = 0x6;
193 const DWORD TF_ES_ASYNC = 0x8;
195 HRESULT RequestEditSession(
196 [in] TfClientId tid,
197 [in] ITfEditSession *pes,
198 [in] DWORD dwFlags,
199 [out] HRESULT *phrSession);
201 HRESULT InWriteSession(
202 [in] TfClientId tid,
203 [out] BOOL *pfWriteSession);
205 typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
207 typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
209 TfActiveSelEnd ase;
210 BOOL fInterimChar;
211 } TF_SELECTIONSTYLE;
213 typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
215 ITfRange *range;
216 TF_SELECTIONSTYLE style;
217 } TF_SELECTION;
219 const ULONG TF_DEFAULT_SELECTION = TS_DEFAULT_SELECTION;
221 HRESULT GetSelection(
222 [in] TfEditCookie ec,
223 [in] ULONG ulIndex,
224 [in] ULONG ulCount,
225 [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
226 [out] ULONG *pcFetched);
228 HRESULT SetSelection(
229 [in] TfEditCookie ec,
230 [in] ULONG ulCount,
231 [in, size_is(ulCount)] const TF_SELECTION *pSelection);
233 HRESULT GetStart(
234 [in] TfEditCookie ec,
235 [out] ITfRange **ppStart);
237 HRESULT GetEnd(
238 [in] TfEditCookie ec,
239 [out] ITfRange **ppEnd);
241 typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
242 const DWORD TF_SD_READONLY = TS_SD_READONLY;
243 const DWORD TF_SD_LOADING = TS_SD_LOADING;
244 const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
245 const DWORD TF_SS_REGIONS = TS_SS_REGIONS;
246 const DWORD TF_SS_TRANSITORY = TS_SS_TRANSITORY;
249 HRESULT GetActiveView(
250 [out] ITfContextView **ppView);
252 HRESULT EnumViews(
253 [out] IEnumTfContextViews **ppEnum);
255 HRESULT GetStatus(
256 [out] TF_STATUS *pdcs);
258 HRESULT GetProperty(
259 [in] REFGUID guidProp,
260 [out] ITfProperty **ppProp);
262 HRESULT GetAppProperty(
263 [in] REFGUID guidProp,
264 [out] ITfReadOnlyProperty **ppProp);
266 HRESULT TrackProperties(
267 [in, size_is(cProp)] const GUID **prgProp,
268 [in] ULONG cProp,
269 [in, size_is(cAppProp)] const GUID **prgAppProp,
270 [in] ULONG cAppProp,
271 [out] ITfReadOnlyProperty **ppProperty);
273 HRESULT EnumProperties(
274 [out] IEnumTfProperties **ppEnum);
276 HRESULT GetDocumentMgr(
277 [out] ITfDocumentMgr **ppDm);
279 HRESULT CreateRangeBackup(
280 [in] TfEditCookie ec,
281 [in] ITfRange *pRange,
282 [out] ITfRangeBackup **ppBackup);
287 object,
288 uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
289 pointer_default(unique)
291 interface ITfSource : IUnknown
293 HRESULT AdviseSink(
294 [in] REFIID riid,
295 [in, iid_is(riid)] IUnknown *punk,
296 [out] DWORD *pdwCookie);
298 HRESULT UnadviseSink(
299 [in] DWORD dwCookie);
303 object,
304 local,
305 uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
306 pointer_default(unique)
308 interface ITfInputProcessorProfiles : IUnknown
310 HRESULT Register(
311 [in] REFCLSID rclsid);
313 HRESULT Unregister(
314 [in] REFCLSID rclsid);
316 HRESULT AddLanguageProfile(
317 [in] REFCLSID rclsid,
318 [in] LANGID langid,
319 [in] REFGUID guidProfile,
320 [in, size_is(cchDesc)] const WCHAR *pchDesc,
321 [in] ULONG cchDesc,
322 [in, size_is(cchFile)] const WCHAR *pchIconFile,
323 [in] ULONG cchFile,
324 [in] ULONG uIconIndex);
326 HRESULT RemoveLanguageProfile(
327 [in] REFCLSID rclsid,
328 [in] LANGID langid,
329 [in] REFGUID guidProfile);
331 HRESULT EnumInputProcessorInfo(
332 [out] IEnumGUID **ppEnum);
334 HRESULT GetDefaultLanguageProfile(
335 [in] LANGID langid,
336 [in] REFGUID catid,
337 [out] CLSID *pclsid,
338 [out] GUID *pguidProfile);
340 HRESULT SetDefaultLanguageProfile(
341 [in] LANGID langid,
342 [in] REFCLSID rclsid,
343 [in] REFGUID guidProfiles);
345 HRESULT ActivateLanguageProfile(
346 [in] REFCLSID rclsid,
347 [in] LANGID langid,
348 [in] REFGUID guidProfiles);
350 HRESULT GetActiveLanguageProfile(
351 [in] REFCLSID rclsid,
352 [out] LANGID *plangid,
353 [out] GUID *pguidProfile);
355 HRESULT GetLanguageProfileDescription(
356 [in] REFCLSID rclsid,
357 [in] LANGID langid,
358 [in] REFGUID guidProfile,
359 [out] BSTR *pbstrProfile);
361 HRESULT GetCurrentLanguage(
362 [out] LANGID *plangid);
364 HRESULT ChangeCurrentLanguage(
365 [in] LANGID langid);
367 HRESULT GetLanguageList(
368 [out] LANGID **ppLangId,
369 [out] ULONG *pulCount);
371 HRESULT EnumLanguageProfiles(
372 [in] LANGID langid,
373 [out] IEnumTfLanguageProfiles **ppEnum);
375 HRESULT EnableLanguageProfile(
376 [in] REFCLSID rclsid,
377 [in] LANGID langid,
378 [in] REFGUID guidProfile,
379 [in] BOOL fEnable);
381 HRESULT IsEnabledLanguageProfile(
382 [in] REFCLSID rclsid,
383 [in] LANGID langid,
384 [in] REFGUID guidProfile,
385 [out] BOOL *pfEnable);
387 HRESULT EnableLanguageProfileByDefault(
388 [in] REFCLSID rclsid,
389 [in] LANGID langid,
390 [in] REFGUID guidProfile,
391 [in] BOOL fEnable);
393 HRESULT SubstituteKeyboardLayout(
394 [in] REFCLSID rclsid,
395 [in] LANGID langid,
396 [in] REFGUID guidProfile,
397 [in] HKL hKL);
401 object,
402 local,
403 uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
404 pointer_default(unique)
406 interface ITfCategoryMgr : IUnknown
408 HRESULT RegisterCategory([in] REFCLSID rclsid,
409 [in] REFGUID rcatid,
410 [in] REFGUID rguid);
412 HRESULT UnregisterCategory([in] REFCLSID rclsid,
413 [in] REFGUID rcatid,
414 [in] REFGUID rguid);
416 HRESULT EnumCategoriesInItem([in] REFGUID rguid,
417 [out] IEnumGUID **ppEnum);
419 HRESULT EnumItemsInCategory([in] REFGUID rcatid,
420 [out] IEnumGUID **ppEnum);
422 HRESULT FindClosestCategory([in] REFGUID rguid,
423 [out] GUID *pcatid,
424 [in, size_is(ulCount)] const GUID **ppcatidList,
425 [in] ULONG ulCount);
427 HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
428 [in] REFGUID rguid,
429 [in, size_is(cch)] const WCHAR *pchDesc,
430 [in] ULONG cch);
432 HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
433 [in] REFGUID rguid);
435 HRESULT GetGUIDDescription([in] REFGUID rguid,
436 [out] BSTR *pbstrDesc);
438 HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
439 [in] REFGUID rguid,
440 [in] DWORD dw);
442 HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
443 [in] REFGUID rguid);
445 HRESULT GetGUIDDWORD([in] REFGUID rguid,
446 [out] DWORD *pdw);
448 HRESULT RegisterGUID([in] REFGUID rguid,
449 [out] TfGuidAtom *pguidatom);
451 HRESULT GetGUID([in] TfGuidAtom guidatom,
452 [out] GUID *pguid);
454 HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
455 [in] REFGUID rguid,
456 [out] BOOL *pfEqual);
460 object,
461 uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
462 pointer_default(unique)
464 interface ITfTextEditSink : IUnknown
466 HRESULT OnEndEdit(
467 [in] ITfContext *pic,
468 [in] TfEditCookie ecReadOnly,
469 [in] ITfEditRecord *pEditRecord);
473 object,
474 uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
475 pointer_default(unique)
477 interface ITfContextOwnerCompositionSink : IUnknown
479 HRESULT OnStartComposition(
480 [in] ITfCompositionView *pComposition,
481 [out] BOOL *pfOk);
483 HRESULT OnUpdateComposition(
484 [in] ITfCompositionView *pComposition,
485 [in] ITfRange *pRangeNew);
487 HRESULT OnEndComposition(
488 [in] ITfCompositionView *pComposition);
492 object,
493 uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
494 pointer_default(unique)
496 interface IEnumTfLanguageProfiles : IUnknown
498 HRESULT Clone(
499 [out] IEnumTfLanguageProfiles **ppEnum);
501 HRESULT Next(
502 [in] ULONG ulCount,
503 [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
504 [out] ULONG *pcFetch);
506 HRESULT Reset();
508 HRESULT Skip(
509 [in] ULONG ulCount);
513 object,
514 local,
515 uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
516 pointer_default(unique)
518 interface ITfTextInputProcessor : IUnknown
520 HRESULT Activate(
521 [in] ITfThreadMgr *ptim,
522 [in] TfClientId tid);
524 HRESULT Deactivate();
528 object,
529 uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
530 pointer_default(unique)
532 interface ITfThreadMgrEventSink : IUnknown
534 HRESULT OnInitDocumentMgr(
535 [in] ITfDocumentMgr *pdim);
537 HRESULT OnUninitDocumentMgr(
538 [in] ITfDocumentMgr *pdim);
540 HRESULT OnSetFocus(
541 [in] ITfDocumentMgr *pdimFocus,
542 [in] ITfDocumentMgr *pdimPrevFocus);
544 HRESULT OnPushContext(
545 [in] ITfContext *pic);
547 HRESULT OnPopContext(
548 [in] ITfContext *pic);
552 object,
553 local,
554 uuid(aa80e7f0-2021-11d2-93e0-0060b067b86e),
555 pointer_default(unique)
557 interface ITfKeystrokeMgr : IUnknown
559 HRESULT AdviseKeyEventSink(
560 [in] TfClientId tid,
561 [in] ITfKeyEventSink *pSink,
562 [in] BOOL fForeground);
564 HRESULT UnadviseKeyEventSink(
565 [in] TfClientId tid);
567 HRESULT GetForeground(
568 [out] CLSID *pclsid);
570 HRESULT TestKeyDown(
571 [in] WPARAM wParam,
572 [in] LPARAM lParam,
573 [out] BOOL *pfEaten);
575 HRESULT TestKeyUp(
576 [in] WPARAM wParam,
577 [in] LPARAM lParam,
578 [out] BOOL *pfEaten);
580 HRESULT KeyDown(
581 [in] WPARAM wParam,
582 [in] LPARAM lParam,
583 [out] BOOL *pfEaten);
585 HRESULT KeyUp(
586 [in] WPARAM wParam,
587 [in] LPARAM lParam,
588 [out] BOOL *pfEaten);
590 HRESULT GetPreservedKey(
591 [in] ITfContext *pic,
592 [in] const TF_PRESERVEDKEY *pprekey,
593 [out] GUID *pguid);
595 HRESULT IsPreservedKey(
596 [in] REFGUID rguid,
597 [in] const TF_PRESERVEDKEY *pprekey,
598 [out] BOOL *pfRegistered);
600 HRESULT PreserveKey(
601 [in] TfClientId tid,
602 [in] REFGUID rguid,
603 [in] const TF_PRESERVEDKEY *prekey,
604 [in, size_is(cchDesc)] const WCHAR *pchDesc,
605 [in] ULONG cchDesc);
607 HRESULT UnpreserveKey(
608 [in] REFGUID rguid,
609 [in] const TF_PRESERVEDKEY *pprekey);
611 HRESULT SetPreservedKeyDescription(
612 [in] REFGUID rguid,
613 [in, size_is(cchDesc)] const WCHAR *pchDesc,
614 [in] ULONG cchDesc);
616 HRESULT GetPreservedKeyDescription(
617 [in] REFGUID rguid,
618 [out] BSTR *pbstrDesc);
620 HRESULT SimulatePreservedKey(
621 [in] ITfContext *pic,
622 [in] REFGUID rguid,
623 [out] BOOL *pfEaten);
627 object,
628 local,
629 uuid(aa80e7f5-2021-11d2-93e0-0060b067b86e),
630 pointer_default(unique)
632 interface ITfKeyEventSink : IUnknown
634 HRESULT OnSetFocus(
635 [in] BOOL fForeground);
637 HRESULT OnTestKeyDown(
638 [in] ITfContext *pic,
639 [in] WPARAM wParam,
640 [in] LPARAM lParam,
641 [out] BOOL *pfEaten);
643 HRESULT OnTestKeyUp(
644 [in] ITfContext *pic,
645 [in] WPARAM wParam,
646 [in] LPARAM lParam,
647 [out] BOOL *pfEaten);
649 HRESULT OnKeyDown(
650 [in] ITfContext *pic,
651 [in] WPARAM wParam,
652 [in] LPARAM lParam,
653 [out] BOOL *pfEaten);
655 HRESULT OnKeyUp(
656 [in] ITfContext *pic,
657 [in] WPARAM wParam,
658 [in] LPARAM lParam,
659 [out] BOOL *pfEaten);
661 HRESULT OnPreservedKey(
662 [in] ITfContext *pic,
663 [in] REFGUID rguid,
664 [out] BOOL *pfEaten);
668 object,
669 local,
670 uuid(8f1b8ad8-0b6b-4874-90c5-bd76011e8f7c),
671 pointer_default(unique)
673 interface ITfMessagePump : IUnknown
675 HRESULT PeekMessageA(
676 [out] LPMSG pMsg,
677 [in] HWND hwnd,
678 [in] UINT wMsgFilterMin,
679 [in] UINT wMsgFilterMax,
680 [in] UINT wRemoveMsg,
681 [out] BOOL *pfResult);
683 HRESULT GetMessageA(
684 [out] LPMSG pMsg,
685 [in] HWND hwnd,
686 [in] UINT wMsgFilterMin,
687 [in] UINT wMsgFilterMax,
688 [out] BOOL *pfResult);
690 HRESULT PeekMessageW(
691 [out] LPMSG pMsg,
692 [in] HWND hwnd,
693 [in] UINT wMsgFilterMin,
694 [in] UINT wMsgFilterMax,
695 [in] UINT wRemoveMsg,
696 [out] BOOL *pfResult);
698 HRESULT GetMessageW(
699 [out] LPMSG pMsg,
700 [in] HWND hwnd,
701 [in] UINT wMsgFilterMin,
702 [in] UINT wMsgFilterMax,
703 [out] BOOL *pfResult);
707 object,
708 local,
709 uuid(d60a7b49-1b9f-4be2-b702-47e9dc05dec3),
710 pointer_default(unique)
712 interface ITfClientId : IUnknown
714 HRESULT GetClientId(
715 [in] REFCLSID rclsid,
716 [out] TfClientId *ptid);
720 object,
721 uuid(43c9fe15-f494-4c17-9de2-b8a4ac350aa8),
722 pointer_default(unique)
724 interface ITfLanguageProfileNotifySink : IUnknown
726 HRESULT OnLanguageChange(
727 [in] LANGID langid,
728 [out] BOOL *pfAccept);
730 HRESULT OnLanguageChanged();
734 object,
735 uuid(aa80e803-2021-11d2-93e0-0060b067b86e),
736 pointer_default(unique)
738 interface ITfEditSession : IUnknown
740 HRESULT DoEditSession(
741 [in] TfEditCookie ec);
745 object,
746 uuid(aa80e7ff-2021-11d2-93e0-0060b067b86e),
747 pointer_default(unique)
749 interface ITfRange : IUnknown
751 const WCHAR TF_CHAR_EMBEDDED = TS_CHAR_EMBEDDED;
753 typedef [uuid(cf610f06-2882-46f6-abe5-298568b664c4)] enum { TF_GRAVITY_BACKWARD = 0, TF_GRAVITY_FORWARD = 1 } TfGravity;
755 typedef [uuid(1e512533-bbdc-4530-9a8e-a1dc0af67468)] enum { TF_SD_BACKWARD = 0, TF_SD_FORWARD = 1 } TfShiftDir;
757 const DWORD TF_HF_OBJECT = 1;
758 const DWORD TF_TF_MOVESTART = 1;
759 const DWORD TF_TF_IGNOREEND = 2;
760 const DWORD TF_ST_CORRECTION = 1;
761 const DWORD TF_IE_CORRECTION = 1;
763 typedef [uuid(49930d51-7d93-448c-a48c-fea5dac192b1)] struct TF_HALTCOND
765 ITfRange *pHaltRange;
766 TfAnchor aHaltPos;
767 DWORD dwFlags;
768 } TF_HALTCOND;
770 HRESULT GetText(
771 [in] TfEditCookie ec,
772 [in] DWORD dwFlags,
773 [out, size_is(cchMax), length_is(*pcch)] WCHAR *pchText,
774 [in] ULONG cchMax,
775 [out] ULONG *pcch);
777 HRESULT SetText(
778 [in] TfEditCookie ec,
779 [in] DWORD dwFlags,
780 [in, size_is(cch), unique] const WCHAR *pchText,
781 [in] LONG cch);
783 HRESULT GetFormattedText(
784 [in] TfEditCookie ec,
785 [out] IDataObject **ppDataObject);
787 HRESULT GetEmbedded(
788 [in] TfEditCookie ec,
789 [in] REFGUID rguidService,
790 [in] REFIID riid,
791 [out, iid_is(riid)] IUnknown **ppunk);
793 HRESULT InsertEmbedded(
794 [in] TfEditCookie ec,
795 [in] DWORD dwFlags,
796 [in] IDataObject *pDataObject);
798 HRESULT ShiftStart(
799 [in] TfEditCookie ec,
800 [in] LONG cchReq,
801 [out] LONG *pcch,
802 [in, unique] const TF_HALTCOND *pHalt);
804 HRESULT ShiftEnd(
805 [in] TfEditCookie ec,
806 [in] LONG cchReq,
807 [out] LONG *pcch,
808 [in, unique] const TF_HALTCOND *pHalt);
810 HRESULT ShiftStartToRange(
811 [in] TfEditCookie ec,
812 [in] ITfRange *pRange,
813 [in] TfAnchor aPos);
815 HRESULT ShiftEndToRange(
816 [in] TfEditCookie ec,
817 [in] ITfRange *pRange,
818 [in] TfAnchor aPos);
820 HRESULT ShiftStartRegion(
821 [in] TfEditCookie ec,
822 [in] TfShiftDir dir,
823 [out] BOOL *pfNoRegion);
825 HRESULT ShiftEndRegion(
826 [in] TfEditCookie ec,
827 [in] TfShiftDir dir,
828 [out] BOOL *pfNoRegion);
830 HRESULT IsEmpty(
831 [in] TfEditCookie ec,
832 [out] BOOL *pfEmpty);
834 HRESULT Collapse(
835 [in] TfEditCookie ec,
836 [in] TfAnchor aPos);
838 HRESULT IsEqualStart(
839 [in] TfEditCookie ec,
840 [in] ITfRange *pWith,
841 [in] TfAnchor aPos,
842 [out] BOOL *pfEqual);
844 HRESULT IsEqualEnd(
845 [in] TfEditCookie ec,
846 [in] ITfRange *pWith,
847 [in] TfAnchor aPos,
848 [out] BOOL *pfEqual);
850 HRESULT CompareStart(
851 [in] TfEditCookie ec,
852 [in] ITfRange *pWith,
853 [in] TfAnchor aPos,
854 [out] LONG *plResult);
856 HRESULT CompareEnd(
857 [in] TfEditCookie ec,
858 [in] ITfRange *pWith,
859 [in] TfAnchor aPos,
860 [out] LONG *plResult);
862 HRESULT AdjustForInsert(
863 [in] TfEditCookie ec,
864 [in] ULONG cchInsert,
865 [out] BOOL *pfInsertOk);
867 HRESULT GetGravity(
868 [out] TfGravity *pgStart,
869 [out] TfGravity *pgEnd);
871 HRESULT SetGravity(
872 [in] TfEditCookie ec,
873 [in] TfGravity gStart,
874 [in] TfGravity gEnd);
876 HRESULT Clone(
877 [out] ITfRange **ppClone);
879 HRESULT GetContext(
880 [out] ITfContext **ppContext);
884 object,
885 uuid(55ce16ba-3014-41c1-9ceb-fade1446ac6c),
886 pointer_default(unique)
888 interface ITfInsertAtSelection : IUnknown
890 const DWORD TF_IAS_NOQUERY = 0x1;
891 const DWORD TF_IAS_QUERYONLY = 0x2;
892 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION = 0x80000000;
894 HRESULT InsertTextAtSelection(
895 [in] TfEditCookie ec,
896 [in] DWORD dwFlags,
897 [in, size_is(cch)] const WCHAR *pchText,
898 [in] LONG cch,
899 [out] ITfRange **ppRange);
901 HRESULT InsertEmbeddedAtSelection(
902 [in] TfEditCookie ec,
903 [in] DWORD dwFlags,
904 [in] IDataObject *pDataObject,
905 [out] ITfRange **ppRange);
909 object,
910 uuid(bb08f7a9-607a-4384-8623-056892b64371),
911 pointer_default(unique)
913 interface ITfCompartment : IUnknown
915 HRESULT SetValue(
916 [in] TfClientId tid,
917 [in] const VARIANT *pvarValue);
919 HRESULT GetValue(
920 [out] VARIANT *pvarValue);
924 object,
925 uuid(7dcf57ac-18ad-438b-824d-979bffb74b7c),
926 pointer_default(unique)
928 interface ITfCompartmentMgr : IUnknown
930 HRESULT GetCompartment(
931 [in] REFGUID rguid,
932 [out] ITfCompartment **ppcomp);
934 HRESULT ClearCompartment(
935 [in] TfClientId tid,
936 [in] REFGUID rguid);
938 HRESULT EnumCompartments(
939 [out] IEnumGUID **ppEnum);
943 object,
944 uuid(743abd5f-f26d-48df-8cc5-238492419b64),
945 pointer_default(unique)
947 interface ITfCompartmentEventSink : IUnknown
949 HRESULT OnChange(
950 [in] REFGUID rguid);