msctf: Implement ITfDocumentMgr::EnumContexts.
[wine/hacks.git] / include / msctf.idl
blob6b341d26c9c0d80e7b0bc50a53eb9709bcdb8ed2
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("HRESULT WINAPI TF_CreateThreadMgr(ITfThreadMgr **pptim);")
33 cpp_quote("HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim);")
34 cpp_quote("HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr);")
36 cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
37 cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
38 cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
40 /* GUIDs for Compartments */
41 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")
42 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;")
43 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;")
44 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;")
45 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;")
46 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;")
47 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;")
48 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;")
49 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;")
51 /* GUIDs for Categories */
52 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
53 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
54 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
55 cpp_quote("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
57 typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie;
58 typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
59 typedef [uuid(88a9c478-f3ec-4763-8345-cd9250443f8d)] DWORD TfGuidAtom;
61 cpp_quote("#define TF_MOD_ALT 0x0001")
62 cpp_quote("#define TF_MOD_CONTROL 0x0002")
63 cpp_quote("#define TF_MOD_SHIFT 0x0004")
64 cpp_quote("#define TF_MOD_RALT 0x0008")
65 cpp_quote("#define TF_MOD_RCONTROL 0x0010")
66 cpp_quote("#define TF_MOD_RSHIFT 0x0020")
67 cpp_quote("#define TF_MOD_LALT 0x0040")
68 cpp_quote("#define TF_MOD_LCONTROL 0x0080")
69 cpp_quote("#define TF_MOD_LSHIFT 0x0100")
70 cpp_quote("#define TF_MOD_ON_KEYUP 0x0200")
71 cpp_quote("#define TF_MOD_IGNORE_ALL_MODIFIER 0x0400")
73 interface ITfDocumentMgr;
74 interface ITfContext;
75 interface IEnumTfDocumentMgrs;
76 interface IEnumTfContexts;
77 interface ITfFunctionProvider;
78 interface IEnumTfFunctionProviders;
79 interface ITfCompartmentMgr;
80 interface ITfEditSession;
81 interface ITfRange;
82 interface ITfContextView;
83 interface IEnumTfContextViews;
84 interface ITfProperty;
85 interface ITfReadOnlyProperty;
86 interface IEnumTfProperties;
87 interface ITfRangeBackup;
88 interface IEnumTfLanguageProfiles;
89 interface ITfEditRecord;
90 interface ITfCompositionView;
91 interface ITfKeyEventSink;
93 typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
95 CLSID clsid;
96 LANGID langid;
97 GUID catid;
98 BOOL fActive;
99 GUID guidProfile;
100 } TF_LANGUAGEPROFILE;
102 typedef [uuid(77c12f95-b783-450d-879f-1cd2362c6521)] struct TF_PRESERVEDKEY
104 UINT uVKey;
105 UINT uModifiers;
106 } TF_PRESERVEDKEY;
108 typedef [uuid(5a886226-ae9a-489b-b991-2b1e25ee59a9)] enum { TF_ANCHOR_START = 0, TF_ANCHOR_END = 1 } TfAnchor;
111 object,
112 uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
113 pointer_default(unique)
115 interface ITfThreadMgr: IUnknown
117 HRESULT Activate(
118 [out] TfClientId *ptid);
120 HRESULT Deactivate();
122 HRESULT CreateDocumentMgr(
123 [out] ITfDocumentMgr **ppdim);
125 HRESULT EnumDocumentMgrs(
126 [out] IEnumTfDocumentMgrs **ppEnum);
128 HRESULT GetFocus(
129 [out] ITfDocumentMgr **ppdimFocus);
131 HRESULT SetFocus(
132 [in] ITfDocumentMgr *pdimFocus);
134 HRESULT AssociateFocus(
135 [in] HWND hwnd,
136 [in, unique] ITfDocumentMgr *pdimNew,
137 [out] ITfDocumentMgr **ppdimPrev);
139 HRESULT IsThreadFocus(
140 [out] BOOL *pfThreadFocus);
142 HRESULT GetFunctionProvider(
143 [in] REFCLSID clsid,
144 [out] ITfFunctionProvider **ppFuncProv);
146 HRESULT EnumFunctionProviders(
147 [out] IEnumTfFunctionProviders **ppEnum);
149 HRESULT GetGlobalCompartment(
150 [out] ITfCompartmentMgr **ppCompMgr);
155 object,
156 uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
157 pointer_default(unique)
159 interface ITfDocumentMgr: IUnknown
161 HRESULT CreateContext(
162 [in] TfClientId tidOwner,
163 [in] DWORD dwFlags,
164 [in, unique] IUnknown *punk,
165 [out] ITfContext **ppic,
166 [out] TfEditCookie *pecTextStore);
168 HRESULT Push(
169 [in] ITfContext *pic);
171 const DWORD TF_POPF_ALL = 0x0001;
173 HRESULT Pop(
174 [in] DWORD dwFlags);
176 HRESULT GetTop(
177 [out] ITfContext **ppic);
179 HRESULT GetBase(
180 [out] ITfContext **ppic);
182 HRESULT EnumContexts(
183 [out] IEnumTfContexts **ppEnum);
187 object,
188 uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
189 pointer_default(unique)
191 interface ITfContext : IUnknown
193 const DWORD TF_ES_ASYNCDONTCARE = 0x0;
194 const DWORD TF_ES_SYNC = 0x1;
195 const DWORD TF_ES_READ = 0x2;
196 const DWORD TF_ES_READWRITE = 0x6;
197 const DWORD TF_ES_ASYNC = 0x8;
199 HRESULT RequestEditSession(
200 [in] TfClientId tid,
201 [in] ITfEditSession *pes,
202 [in] DWORD dwFlags,
203 [out] HRESULT *phrSession);
205 HRESULT InWriteSession(
206 [in] TfClientId tid,
207 [out] BOOL *pfWriteSession);
209 typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
211 typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
213 TfActiveSelEnd ase;
214 BOOL fInterimChar;
215 } TF_SELECTIONSTYLE;
217 typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
219 ITfRange *range;
220 TF_SELECTIONSTYLE style;
221 } TF_SELECTION;
223 const ULONG TF_DEFAULT_SELECTION = TS_DEFAULT_SELECTION;
225 HRESULT GetSelection(
226 [in] TfEditCookie ec,
227 [in] ULONG ulIndex,
228 [in] ULONG ulCount,
229 [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
230 [out] ULONG *pcFetched);
232 HRESULT SetSelection(
233 [in] TfEditCookie ec,
234 [in] ULONG ulCount,
235 [in, size_is(ulCount)] const TF_SELECTION *pSelection);
237 HRESULT GetStart(
238 [in] TfEditCookie ec,
239 [out] ITfRange **ppStart);
241 HRESULT GetEnd(
242 [in] TfEditCookie ec,
243 [out] ITfRange **ppEnd);
245 typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
246 const DWORD TF_SD_READONLY = TS_SD_READONLY;
247 const DWORD TF_SD_LOADING = TS_SD_LOADING;
248 const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
249 const DWORD TF_SS_REGIONS = TS_SS_REGIONS;
250 const DWORD TF_SS_TRANSITORY = TS_SS_TRANSITORY;
253 HRESULT GetActiveView(
254 [out] ITfContextView **ppView);
256 HRESULT EnumViews(
257 [out] IEnumTfContextViews **ppEnum);
259 HRESULT GetStatus(
260 [out] TF_STATUS *pdcs);
262 HRESULT GetProperty(
263 [in] REFGUID guidProp,
264 [out] ITfProperty **ppProp);
266 HRESULT GetAppProperty(
267 [in] REFGUID guidProp,
268 [out] ITfReadOnlyProperty **ppProp);
270 HRESULT TrackProperties(
271 [in, size_is(cProp)] const GUID **prgProp,
272 [in] ULONG cProp,
273 [in, size_is(cAppProp)] const GUID **prgAppProp,
274 [in] ULONG cAppProp,
275 [out] ITfReadOnlyProperty **ppProperty);
277 HRESULT EnumProperties(
278 [out] IEnumTfProperties **ppEnum);
280 HRESULT GetDocumentMgr(
281 [out] ITfDocumentMgr **ppDm);
283 HRESULT CreateRangeBackup(
284 [in] TfEditCookie ec,
285 [in] ITfRange *pRange,
286 [out] ITfRangeBackup **ppBackup);
291 object,
292 uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
293 pointer_default(unique)
295 interface ITfSource : IUnknown
297 HRESULT AdviseSink(
298 [in] REFIID riid,
299 [in, iid_is(riid)] IUnknown *punk,
300 [out] DWORD *pdwCookie);
302 HRESULT UnadviseSink(
303 [in] DWORD dwCookie);
307 object,
308 local,
309 uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
310 pointer_default(unique)
312 interface ITfInputProcessorProfiles : IUnknown
314 HRESULT Register(
315 [in] REFCLSID rclsid);
317 HRESULT Unregister(
318 [in] REFCLSID rclsid);
320 HRESULT AddLanguageProfile(
321 [in] REFCLSID rclsid,
322 [in] LANGID langid,
323 [in] REFGUID guidProfile,
324 [in, size_is(cchDesc)] const WCHAR *pchDesc,
325 [in] ULONG cchDesc,
326 [in, size_is(cchFile)] const WCHAR *pchIconFile,
327 [in] ULONG cchFile,
328 [in] ULONG uIconIndex);
330 HRESULT RemoveLanguageProfile(
331 [in] REFCLSID rclsid,
332 [in] LANGID langid,
333 [in] REFGUID guidProfile);
335 HRESULT EnumInputProcessorInfo(
336 [out] IEnumGUID **ppEnum);
338 HRESULT GetDefaultLanguageProfile(
339 [in] LANGID langid,
340 [in] REFGUID catid,
341 [out] CLSID *pclsid,
342 [out] GUID *pguidProfile);
344 HRESULT SetDefaultLanguageProfile(
345 [in] LANGID langid,
346 [in] REFCLSID rclsid,
347 [in] REFGUID guidProfiles);
349 HRESULT ActivateLanguageProfile(
350 [in] REFCLSID rclsid,
351 [in] LANGID langid,
352 [in] REFGUID guidProfiles);
354 HRESULT GetActiveLanguageProfile(
355 [in] REFCLSID rclsid,
356 [out] LANGID *plangid,
357 [out] GUID *pguidProfile);
359 HRESULT GetLanguageProfileDescription(
360 [in] REFCLSID rclsid,
361 [in] LANGID langid,
362 [in] REFGUID guidProfile,
363 [out] BSTR *pbstrProfile);
365 HRESULT GetCurrentLanguage(
366 [out] LANGID *plangid);
368 HRESULT ChangeCurrentLanguage(
369 [in] LANGID langid);
371 HRESULT GetLanguageList(
372 [out] LANGID **ppLangId,
373 [out] ULONG *pulCount);
375 HRESULT EnumLanguageProfiles(
376 [in] LANGID langid,
377 [out] IEnumTfLanguageProfiles **ppEnum);
379 HRESULT EnableLanguageProfile(
380 [in] REFCLSID rclsid,
381 [in] LANGID langid,
382 [in] REFGUID guidProfile,
383 [in] BOOL fEnable);
385 HRESULT IsEnabledLanguageProfile(
386 [in] REFCLSID rclsid,
387 [in] LANGID langid,
388 [in] REFGUID guidProfile,
389 [out] BOOL *pfEnable);
391 HRESULT EnableLanguageProfileByDefault(
392 [in] REFCLSID rclsid,
393 [in] LANGID langid,
394 [in] REFGUID guidProfile,
395 [in] BOOL fEnable);
397 HRESULT SubstituteKeyboardLayout(
398 [in] REFCLSID rclsid,
399 [in] LANGID langid,
400 [in] REFGUID guidProfile,
401 [in] HKL hKL);
405 object,
406 local,
407 uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
408 pointer_default(unique)
410 interface ITfCategoryMgr : IUnknown
412 HRESULT RegisterCategory([in] REFCLSID rclsid,
413 [in] REFGUID rcatid,
414 [in] REFGUID rguid);
416 HRESULT UnregisterCategory([in] REFCLSID rclsid,
417 [in] REFGUID rcatid,
418 [in] REFGUID rguid);
420 HRESULT EnumCategoriesInItem([in] REFGUID rguid,
421 [out] IEnumGUID **ppEnum);
423 HRESULT EnumItemsInCategory([in] REFGUID rcatid,
424 [out] IEnumGUID **ppEnum);
426 HRESULT FindClosestCategory([in] REFGUID rguid,
427 [out] GUID *pcatid,
428 [in, size_is(ulCount)] const GUID **ppcatidList,
429 [in] ULONG ulCount);
431 HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
432 [in] REFGUID rguid,
433 [in, size_is(cch)] const WCHAR *pchDesc,
434 [in] ULONG cch);
436 HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
437 [in] REFGUID rguid);
439 HRESULT GetGUIDDescription([in] REFGUID rguid,
440 [out] BSTR *pbstrDesc);
442 HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
443 [in] REFGUID rguid,
444 [in] DWORD dw);
446 HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
447 [in] REFGUID rguid);
449 HRESULT GetGUIDDWORD([in] REFGUID rguid,
450 [out] DWORD *pdw);
452 HRESULT RegisterGUID([in] REFGUID rguid,
453 [out] TfGuidAtom *pguidatom);
455 HRESULT GetGUID([in] TfGuidAtom guidatom,
456 [out] GUID *pguid);
458 HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
459 [in] REFGUID rguid,
460 [out] BOOL *pfEqual);
464 object,
465 uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
466 pointer_default(unique)
468 interface ITfTextEditSink : IUnknown
470 HRESULT OnEndEdit(
471 [in] ITfContext *pic,
472 [in] TfEditCookie ecReadOnly,
473 [in] ITfEditRecord *pEditRecord);
477 object,
478 uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
479 pointer_default(unique)
481 interface ITfContextOwnerCompositionSink : IUnknown
483 HRESULT OnStartComposition(
484 [in] ITfCompositionView *pComposition,
485 [out] BOOL *pfOk);
487 HRESULT OnUpdateComposition(
488 [in] ITfCompositionView *pComposition,
489 [in] ITfRange *pRangeNew);
491 HRESULT OnEndComposition(
492 [in] ITfCompositionView *pComposition);
496 object,
497 uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
498 pointer_default(unique)
500 interface IEnumTfLanguageProfiles : IUnknown
502 HRESULT Clone(
503 [out] IEnumTfLanguageProfiles **ppEnum);
505 HRESULT Next(
506 [in] ULONG ulCount,
507 [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
508 [out] ULONG *pcFetch);
510 HRESULT Reset();
512 HRESULT Skip(
513 [in] ULONG ulCount);
517 object,
518 local,
519 uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
520 pointer_default(unique)
522 interface ITfTextInputProcessor : IUnknown
524 HRESULT Activate(
525 [in] ITfThreadMgr *ptim,
526 [in] TfClientId tid);
528 HRESULT Deactivate();
532 object,
533 uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
534 pointer_default(unique)
536 interface ITfThreadMgrEventSink : IUnknown
538 HRESULT OnInitDocumentMgr(
539 [in] ITfDocumentMgr *pdim);
541 HRESULT OnUninitDocumentMgr(
542 [in] ITfDocumentMgr *pdim);
544 HRESULT OnSetFocus(
545 [in] ITfDocumentMgr *pdimFocus,
546 [in] ITfDocumentMgr *pdimPrevFocus);
548 HRESULT OnPushContext(
549 [in] ITfContext *pic);
551 HRESULT OnPopContext(
552 [in] ITfContext *pic);
556 object,
557 local,
558 uuid(aa80e7f0-2021-11d2-93e0-0060b067b86e),
559 pointer_default(unique)
561 interface ITfKeystrokeMgr : IUnknown
563 HRESULT AdviseKeyEventSink(
564 [in] TfClientId tid,
565 [in] ITfKeyEventSink *pSink,
566 [in] BOOL fForeground);
568 HRESULT UnadviseKeyEventSink(
569 [in] TfClientId tid);
571 HRESULT GetForeground(
572 [out] CLSID *pclsid);
574 HRESULT TestKeyDown(
575 [in] WPARAM wParam,
576 [in] LPARAM lParam,
577 [out] BOOL *pfEaten);
579 HRESULT TestKeyUp(
580 [in] WPARAM wParam,
581 [in] LPARAM lParam,
582 [out] BOOL *pfEaten);
584 HRESULT KeyDown(
585 [in] WPARAM wParam,
586 [in] LPARAM lParam,
587 [out] BOOL *pfEaten);
589 HRESULT KeyUp(
590 [in] WPARAM wParam,
591 [in] LPARAM lParam,
592 [out] BOOL *pfEaten);
594 HRESULT GetPreservedKey(
595 [in] ITfContext *pic,
596 [in] const TF_PRESERVEDKEY *pprekey,
597 [out] GUID *pguid);
599 HRESULT IsPreservedKey(
600 [in] REFGUID rguid,
601 [in] const TF_PRESERVEDKEY *pprekey,
602 [out] BOOL *pfRegistered);
604 HRESULT PreserveKey(
605 [in] TfClientId tid,
606 [in] REFGUID rguid,
607 [in] const TF_PRESERVEDKEY *prekey,
608 [in, size_is(cchDesc)] const WCHAR *pchDesc,
609 [in] ULONG cchDesc);
611 HRESULT UnpreserveKey(
612 [in] REFGUID rguid,
613 [in] const TF_PRESERVEDKEY *pprekey);
615 HRESULT SetPreservedKeyDescription(
616 [in] REFGUID rguid,
617 [in, size_is(cchDesc)] const WCHAR *pchDesc,
618 [in] ULONG cchDesc);
620 HRESULT GetPreservedKeyDescription(
621 [in] REFGUID rguid,
622 [out] BSTR *pbstrDesc);
624 HRESULT SimulatePreservedKey(
625 [in] ITfContext *pic,
626 [in] REFGUID rguid,
627 [out] BOOL *pfEaten);
631 object,
632 local,
633 uuid(aa80e7f5-2021-11d2-93e0-0060b067b86e),
634 pointer_default(unique)
636 interface ITfKeyEventSink : IUnknown
638 HRESULT OnSetFocus(
639 [in] BOOL fForeground);
641 HRESULT OnTestKeyDown(
642 [in] ITfContext *pic,
643 [in] WPARAM wParam,
644 [in] LPARAM lParam,
645 [out] BOOL *pfEaten);
647 HRESULT OnTestKeyUp(
648 [in] ITfContext *pic,
649 [in] WPARAM wParam,
650 [in] LPARAM lParam,
651 [out] BOOL *pfEaten);
653 HRESULT OnKeyDown(
654 [in] ITfContext *pic,
655 [in] WPARAM wParam,
656 [in] LPARAM lParam,
657 [out] BOOL *pfEaten);
659 HRESULT OnKeyUp(
660 [in] ITfContext *pic,
661 [in] WPARAM wParam,
662 [in] LPARAM lParam,
663 [out] BOOL *pfEaten);
665 HRESULT OnPreservedKey(
666 [in] ITfContext *pic,
667 [in] REFGUID rguid,
668 [out] BOOL *pfEaten);
672 object,
673 local,
674 uuid(8f1b8ad8-0b6b-4874-90c5-bd76011e8f7c),
675 pointer_default(unique)
677 interface ITfMessagePump : IUnknown
679 HRESULT PeekMessageA(
680 [out] LPMSG pMsg,
681 [in] HWND hwnd,
682 [in] UINT wMsgFilterMin,
683 [in] UINT wMsgFilterMax,
684 [in] UINT wRemoveMsg,
685 [out] BOOL *pfResult);
687 HRESULT GetMessageA(
688 [out] LPMSG pMsg,
689 [in] HWND hwnd,
690 [in] UINT wMsgFilterMin,
691 [in] UINT wMsgFilterMax,
692 [out] BOOL *pfResult);
694 HRESULT PeekMessageW(
695 [out] LPMSG pMsg,
696 [in] HWND hwnd,
697 [in] UINT wMsgFilterMin,
698 [in] UINT wMsgFilterMax,
699 [in] UINT wRemoveMsg,
700 [out] BOOL *pfResult);
702 HRESULT GetMessageW(
703 [out] LPMSG pMsg,
704 [in] HWND hwnd,
705 [in] UINT wMsgFilterMin,
706 [in] UINT wMsgFilterMax,
707 [out] BOOL *pfResult);
711 object,
712 local,
713 uuid(d60a7b49-1b9f-4be2-b702-47e9dc05dec3),
714 pointer_default(unique)
716 interface ITfClientId : IUnknown
718 HRESULT GetClientId(
719 [in] REFCLSID rclsid,
720 [out] TfClientId *ptid);
724 object,
725 uuid(43c9fe15-f494-4c17-9de2-b8a4ac350aa8),
726 pointer_default(unique)
728 interface ITfLanguageProfileNotifySink : IUnknown
730 HRESULT OnLanguageChange(
731 [in] LANGID langid,
732 [out] BOOL *pfAccept);
734 HRESULT OnLanguageChanged();
738 object,
739 uuid(aa80e803-2021-11d2-93e0-0060b067b86e),
740 pointer_default(unique)
742 interface ITfEditSession : IUnknown
744 HRESULT DoEditSession(
745 [in] TfEditCookie ec);
749 object,
750 uuid(aa80e7ff-2021-11d2-93e0-0060b067b86e),
751 pointer_default(unique)
753 interface ITfRange : IUnknown
755 const WCHAR TF_CHAR_EMBEDDED = TS_CHAR_EMBEDDED;
757 typedef [uuid(cf610f06-2882-46f6-abe5-298568b664c4)] enum { TF_GRAVITY_BACKWARD = 0, TF_GRAVITY_FORWARD = 1 } TfGravity;
759 typedef [uuid(1e512533-bbdc-4530-9a8e-a1dc0af67468)] enum { TF_SD_BACKWARD = 0, TF_SD_FORWARD = 1 } TfShiftDir;
761 const DWORD TF_HF_OBJECT = 1;
762 const DWORD TF_TF_MOVESTART = 1;
763 const DWORD TF_TF_IGNOREEND = 2;
764 const DWORD TF_ST_CORRECTION = 1;
765 const DWORD TF_IE_CORRECTION = 1;
767 typedef [uuid(49930d51-7d93-448c-a48c-fea5dac192b1)] struct TF_HALTCOND
769 ITfRange *pHaltRange;
770 TfAnchor aHaltPos;
771 DWORD dwFlags;
772 } TF_HALTCOND;
774 HRESULT GetText(
775 [in] TfEditCookie ec,
776 [in] DWORD dwFlags,
777 [out, size_is(cchMax), length_is(*pcch)] WCHAR *pchText,
778 [in] ULONG cchMax,
779 [out] ULONG *pcch);
781 HRESULT SetText(
782 [in] TfEditCookie ec,
783 [in] DWORD dwFlags,
784 [in, size_is(cch), unique] const WCHAR *pchText,
785 [in] LONG cch);
787 HRESULT GetFormattedText(
788 [in] TfEditCookie ec,
789 [out] IDataObject **ppDataObject);
791 HRESULT GetEmbedded(
792 [in] TfEditCookie ec,
793 [in] REFGUID rguidService,
794 [in] REFIID riid,
795 [out, iid_is(riid)] IUnknown **ppunk);
797 HRESULT InsertEmbedded(
798 [in] TfEditCookie ec,
799 [in] DWORD dwFlags,
800 [in] IDataObject *pDataObject);
802 HRESULT ShiftStart(
803 [in] TfEditCookie ec,
804 [in] LONG cchReq,
805 [out] LONG *pcch,
806 [in, unique] const TF_HALTCOND *pHalt);
808 HRESULT ShiftEnd(
809 [in] TfEditCookie ec,
810 [in] LONG cchReq,
811 [out] LONG *pcch,
812 [in, unique] const TF_HALTCOND *pHalt);
814 HRESULT ShiftStartToRange(
815 [in] TfEditCookie ec,
816 [in] ITfRange *pRange,
817 [in] TfAnchor aPos);
819 HRESULT ShiftEndToRange(
820 [in] TfEditCookie ec,
821 [in] ITfRange *pRange,
822 [in] TfAnchor aPos);
824 HRESULT ShiftStartRegion(
825 [in] TfEditCookie ec,
826 [in] TfShiftDir dir,
827 [out] BOOL *pfNoRegion);
829 HRESULT ShiftEndRegion(
830 [in] TfEditCookie ec,
831 [in] TfShiftDir dir,
832 [out] BOOL *pfNoRegion);
834 HRESULT IsEmpty(
835 [in] TfEditCookie ec,
836 [out] BOOL *pfEmpty);
838 HRESULT Collapse(
839 [in] TfEditCookie ec,
840 [in] TfAnchor aPos);
842 HRESULT IsEqualStart(
843 [in] TfEditCookie ec,
844 [in] ITfRange *pWith,
845 [in] TfAnchor aPos,
846 [out] BOOL *pfEqual);
848 HRESULT IsEqualEnd(
849 [in] TfEditCookie ec,
850 [in] ITfRange *pWith,
851 [in] TfAnchor aPos,
852 [out] BOOL *pfEqual);
854 HRESULT CompareStart(
855 [in] TfEditCookie ec,
856 [in] ITfRange *pWith,
857 [in] TfAnchor aPos,
858 [out] LONG *plResult);
860 HRESULT CompareEnd(
861 [in] TfEditCookie ec,
862 [in] ITfRange *pWith,
863 [in] TfAnchor aPos,
864 [out] LONG *plResult);
866 HRESULT AdjustForInsert(
867 [in] TfEditCookie ec,
868 [in] ULONG cchInsert,
869 [out] BOOL *pfInsertOk);
871 HRESULT GetGravity(
872 [out] TfGravity *pgStart,
873 [out] TfGravity *pgEnd);
875 HRESULT SetGravity(
876 [in] TfEditCookie ec,
877 [in] TfGravity gStart,
878 [in] TfGravity gEnd);
880 HRESULT Clone(
881 [out] ITfRange **ppClone);
883 HRESULT GetContext(
884 [out] ITfContext **ppContext);
888 object,
889 uuid(55ce16ba-3014-41c1-9ceb-fade1446ac6c),
890 pointer_default(unique)
892 interface ITfInsertAtSelection : IUnknown
894 const DWORD TF_IAS_NOQUERY = 0x1;
895 const DWORD TF_IAS_QUERYONLY = 0x2;
896 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION = 0x80000000;
898 HRESULT InsertTextAtSelection(
899 [in] TfEditCookie ec,
900 [in] DWORD dwFlags,
901 [in, size_is(cch)] const WCHAR *pchText,
902 [in] LONG cch,
903 [out] ITfRange **ppRange);
905 HRESULT InsertEmbeddedAtSelection(
906 [in] TfEditCookie ec,
907 [in] DWORD dwFlags,
908 [in] IDataObject *pDataObject,
909 [out] ITfRange **ppRange);
913 object,
914 uuid(bb08f7a9-607a-4384-8623-056892b64371),
915 pointer_default(unique)
917 interface ITfCompartment : IUnknown
919 HRESULT SetValue(
920 [in] TfClientId tid,
921 [in] const VARIANT *pvarValue);
923 HRESULT GetValue(
924 [out] VARIANT *pvarValue);
928 object,
929 uuid(7dcf57ac-18ad-438b-824d-979bffb74b7c),
930 pointer_default(unique)
932 interface ITfCompartmentMgr : IUnknown
934 HRESULT GetCompartment(
935 [in] REFGUID rguid,
936 [out] ITfCompartment **ppcomp);
938 HRESULT ClearCompartment(
939 [in] TfClientId tid,
940 [in] REFGUID rguid);
942 HRESULT EnumCompartments(
943 [out] IEnumGUID **ppEnum);
947 object,
948 uuid(743abd5f-f26d-48df-8cc5-238492419b64),
949 pointer_default(unique)
951 interface ITfCompartmentEventSink : IUnknown
953 HRESULT OnChange(
954 [in] REFGUID rguid);
958 object,
959 uuid(8f1a7ea6-1654-4502-a86e-b2902344d507),
960 pointer_default(unique)
962 interface IEnumTfContexts : IUnknown
964 HRESULT Clone(
965 [out] IEnumTfContexts **ppEnum);
967 HRESULT Next(
968 [in] ULONG ulCount,
969 [out, size_is(ulCount), length_is(*pcFetched)] ITfContext **rgContext,
970 [out] ULONG *pcFetched);
972 HRESULT Reset();
974 HRESULT Skip(
975 [in] ULONG ulCount);