include: Add missing declarations and definitions to wincon.h.
[wine/hramrach.git] / include / msctf.idl
blobbcd2587d8338de015ec80d9b1ee2e07466fb73f0
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 GUID GUID_PROP_TEXTOWNER;")
37 cpp_quote("DEFINE_GUID(GUID_PROP_ATTRIBUTE,0x34b45670,0x7526,0x11d2,0xa1,0x47,0x00,0x10,0x5a,0x27,0x99,0xb5);")
38 cpp_quote("EXTERN_C const GUID GUID_PROP_LANGID;")
39 cpp_quote("EXTERN_C const GUID GUID_PROP_READING;")
40 cpp_quote("EXTERN_C const GUID GUID_PROP_COMPOSING;")
42 cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
43 cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
44 cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
45 cpp_quote("DEFINE_GUID(CLSID_TF_DisplayAttributeMgr,0x3ce74de4,0x53d3,0x4d74,0x8b,0x83,0x43,0x1b,0x38,0x28,0xba,0x53);")
47 /* GUIDs for Compartments */
48 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")
49 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;")
50 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;")
51 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;")
52 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;")
53 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;")
54 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;")
55 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;")
56 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;")
58 /* GUIDs for Categories */
59 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
60 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
61 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
62 cpp_quote("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
64 typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie;
65 typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
66 typedef [uuid(88a9c478-f3ec-4763-8345-cd9250443f8d)] DWORD TfGuidAtom;
68 cpp_quote("#define TF_MOD_ALT 0x0001")
69 cpp_quote("#define TF_MOD_CONTROL 0x0002")
70 cpp_quote("#define TF_MOD_SHIFT 0x0004")
71 cpp_quote("#define TF_MOD_RALT 0x0008")
72 cpp_quote("#define TF_MOD_RCONTROL 0x0010")
73 cpp_quote("#define TF_MOD_RSHIFT 0x0020")
74 cpp_quote("#define TF_MOD_LALT 0x0040")
75 cpp_quote("#define TF_MOD_LCONTROL 0x0080")
76 cpp_quote("#define TF_MOD_LSHIFT 0x0100")
77 cpp_quote("#define TF_MOD_ON_KEYUP 0x0200")
78 cpp_quote("#define TF_MOD_IGNORE_ALL_MODIFIER 0x0400")
80 interface ITfDocumentMgr;
81 interface ITfContext;
82 interface IEnumTfDocumentMgrs;
83 interface IEnumTfContexts;
84 interface ITfFunctionProvider;
85 interface IEnumTfFunctionProviders;
86 interface ITfCompartmentMgr;
87 interface ITfEditSession;
88 interface ITfRange;
89 interface ITfContextView;
90 interface IEnumTfContextViews;
91 interface ITfProperty;
92 interface ITfReadOnlyProperty;
93 interface IEnumTfProperties;
94 interface ITfRangeBackup;
95 interface IEnumTfLanguageProfiles;
96 interface ITfEditRecord;
97 interface ITfCompositionView;
98 interface ITfKeyEventSink;
100 typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
102 CLSID clsid;
103 LANGID langid;
104 GUID catid;
105 BOOL fActive;
106 GUID guidProfile;
107 } TF_LANGUAGEPROFILE;
109 typedef [uuid(77c12f95-b783-450d-879f-1cd2362c6521)] struct TF_PRESERVEDKEY
111 UINT uVKey;
112 UINT uModifiers;
113 } TF_PRESERVEDKEY;
115 typedef [uuid(5a886226-ae9a-489b-b991-2b1e25ee59a9)] enum { TF_ANCHOR_START = 0, TF_ANCHOR_END = 1 } TfAnchor;
118 object,
119 uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
120 pointer_default(unique)
122 interface ITfThreadMgr: IUnknown
124 HRESULT Activate(
125 [out] TfClientId *ptid);
127 HRESULT Deactivate();
129 HRESULT CreateDocumentMgr(
130 [out] ITfDocumentMgr **ppdim);
132 HRESULT EnumDocumentMgrs(
133 [out] IEnumTfDocumentMgrs **ppEnum);
135 HRESULT GetFocus(
136 [out] ITfDocumentMgr **ppdimFocus);
138 HRESULT SetFocus(
139 [in] ITfDocumentMgr *pdimFocus);
141 HRESULT AssociateFocus(
142 [in] HWND hwnd,
143 [in, unique] ITfDocumentMgr *pdimNew,
144 [out] ITfDocumentMgr **ppdimPrev);
146 HRESULT IsThreadFocus(
147 [out] BOOL *pfThreadFocus);
149 HRESULT GetFunctionProvider(
150 [in] REFCLSID clsid,
151 [out] ITfFunctionProvider **ppFuncProv);
153 HRESULT EnumFunctionProviders(
154 [out] IEnumTfFunctionProviders **ppEnum);
156 HRESULT GetGlobalCompartment(
157 [out] ITfCompartmentMgr **ppCompMgr);
161 object,
162 uuid(d7540241-f9a1-4364-befc-dbcd2c4395b7),
163 pointer_default(unique)
165 interface ITfCompositionView : IUnknown
167 HRESULT GetOwnerClsid([out] CLSID *pclsid);
169 HRESULT GetRange([out] ITfRange **ppRange);
173 object,
174 uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
175 pointer_default(unique)
177 interface ITfDocumentMgr: IUnknown
179 HRESULT CreateContext(
180 [in] TfClientId tidOwner,
181 [in] DWORD dwFlags,
182 [in, unique] IUnknown *punk,
183 [out] ITfContext **ppic,
184 [out] TfEditCookie *pecTextStore);
186 HRESULT Push(
187 [in] ITfContext *pic);
189 const DWORD TF_POPF_ALL = 0x0001;
191 HRESULT Pop(
192 [in] DWORD dwFlags);
194 HRESULT GetTop(
195 [out] ITfContext **ppic);
197 HRESULT GetBase(
198 [out] ITfContext **ppic);
200 HRESULT EnumContexts(
201 [out] IEnumTfContexts **ppEnum);
205 object,
206 uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
207 pointer_default(unique)
209 interface ITfContext : IUnknown
211 const DWORD TF_ES_ASYNCDONTCARE = 0x0;
212 const DWORD TF_ES_SYNC = 0x1;
213 const DWORD TF_ES_READ = 0x2;
214 const DWORD TF_ES_READWRITE = 0x6;
215 const DWORD TF_ES_ASYNC = 0x8;
217 HRESULT RequestEditSession(
218 [in] TfClientId tid,
219 [in] ITfEditSession *pes,
220 [in] DWORD dwFlags,
221 [out] HRESULT *phrSession);
223 HRESULT InWriteSession(
224 [in] TfClientId tid,
225 [out] BOOL *pfWriteSession);
227 typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
229 typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
231 TfActiveSelEnd ase;
232 BOOL fInterimChar;
233 } TF_SELECTIONSTYLE;
235 typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
237 ITfRange *range;
238 TF_SELECTIONSTYLE style;
239 } TF_SELECTION;
241 const ULONG TF_DEFAULT_SELECTION = TS_DEFAULT_SELECTION;
243 HRESULT GetSelection(
244 [in] TfEditCookie ec,
245 [in] ULONG ulIndex,
246 [in] ULONG ulCount,
247 [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
248 [out] ULONG *pcFetched);
250 HRESULT SetSelection(
251 [in] TfEditCookie ec,
252 [in] ULONG ulCount,
253 [in, size_is(ulCount)] const TF_SELECTION *pSelection);
255 HRESULT GetStart(
256 [in] TfEditCookie ec,
257 [out] ITfRange **ppStart);
259 HRESULT GetEnd(
260 [in] TfEditCookie ec,
261 [out] ITfRange **ppEnd);
263 typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
264 const DWORD TF_SD_READONLY = TS_SD_READONLY;
265 const DWORD TF_SD_LOADING = TS_SD_LOADING;
266 const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
267 const DWORD TF_SS_REGIONS = TS_SS_REGIONS;
268 const DWORD TF_SS_TRANSITORY = TS_SS_TRANSITORY;
271 HRESULT GetActiveView(
272 [out] ITfContextView **ppView);
274 HRESULT EnumViews(
275 [out] IEnumTfContextViews **ppEnum);
277 HRESULT GetStatus(
278 [out] TF_STATUS *pdcs);
280 HRESULT GetProperty(
281 [in] REFGUID guidProp,
282 [out] ITfProperty **ppProp);
284 HRESULT GetAppProperty(
285 [in] REFGUID guidProp,
286 [out] ITfReadOnlyProperty **ppProp);
288 HRESULT TrackProperties(
289 [in, size_is(cProp)] const GUID **prgProp,
290 [in] ULONG cProp,
291 [in, size_is(cAppProp)] const GUID **prgAppProp,
292 [in] ULONG cAppProp,
293 [out] ITfReadOnlyProperty **ppProperty);
295 HRESULT EnumProperties(
296 [out] IEnumTfProperties **ppEnum);
298 HRESULT GetDocumentMgr(
299 [out] ITfDocumentMgr **ppDm);
301 HRESULT CreateRangeBackup(
302 [in] TfEditCookie ec,
303 [in] ITfRange *pRange,
304 [out] ITfRangeBackup **ppBackup);
309 object,
310 uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
311 pointer_default(unique)
313 interface ITfSource : IUnknown
315 HRESULT AdviseSink(
316 [in] REFIID riid,
317 [in, iid_is(riid)] IUnknown *punk,
318 [out] DWORD *pdwCookie);
320 HRESULT UnadviseSink(
321 [in] DWORD dwCookie);
325 object,
326 local,
327 uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
328 pointer_default(unique)
330 interface ITfInputProcessorProfiles : IUnknown
332 HRESULT Register(
333 [in] REFCLSID rclsid);
335 HRESULT Unregister(
336 [in] REFCLSID rclsid);
338 HRESULT AddLanguageProfile(
339 [in] REFCLSID rclsid,
340 [in] LANGID langid,
341 [in] REFGUID guidProfile,
342 [in, size_is(cchDesc)] const WCHAR *pchDesc,
343 [in] ULONG cchDesc,
344 [in, size_is(cchFile)] const WCHAR *pchIconFile,
345 [in] ULONG cchFile,
346 [in] ULONG uIconIndex);
348 HRESULT RemoveLanguageProfile(
349 [in] REFCLSID rclsid,
350 [in] LANGID langid,
351 [in] REFGUID guidProfile);
353 HRESULT EnumInputProcessorInfo(
354 [out] IEnumGUID **ppEnum);
356 HRESULT GetDefaultLanguageProfile(
357 [in] LANGID langid,
358 [in] REFGUID catid,
359 [out] CLSID *pclsid,
360 [out] GUID *pguidProfile);
362 HRESULT SetDefaultLanguageProfile(
363 [in] LANGID langid,
364 [in] REFCLSID rclsid,
365 [in] REFGUID guidProfiles);
367 HRESULT ActivateLanguageProfile(
368 [in] REFCLSID rclsid,
369 [in] LANGID langid,
370 [in] REFGUID guidProfiles);
372 HRESULT GetActiveLanguageProfile(
373 [in] REFCLSID rclsid,
374 [out] LANGID *plangid,
375 [out] GUID *pguidProfile);
377 HRESULT GetLanguageProfileDescription(
378 [in] REFCLSID rclsid,
379 [in] LANGID langid,
380 [in] REFGUID guidProfile,
381 [out] BSTR *pbstrProfile);
383 HRESULT GetCurrentLanguage(
384 [out] LANGID *plangid);
386 HRESULT ChangeCurrentLanguage(
387 [in] LANGID langid);
389 HRESULT GetLanguageList(
390 [out] LANGID **ppLangId,
391 [out] ULONG *pulCount);
393 HRESULT EnumLanguageProfiles(
394 [in] LANGID langid,
395 [out] IEnumTfLanguageProfiles **ppEnum);
397 HRESULT EnableLanguageProfile(
398 [in] REFCLSID rclsid,
399 [in] LANGID langid,
400 [in] REFGUID guidProfile,
401 [in] BOOL fEnable);
403 HRESULT IsEnabledLanguageProfile(
404 [in] REFCLSID rclsid,
405 [in] LANGID langid,
406 [in] REFGUID guidProfile,
407 [out] BOOL *pfEnable);
409 HRESULT EnableLanguageProfileByDefault(
410 [in] REFCLSID rclsid,
411 [in] LANGID langid,
412 [in] REFGUID guidProfile,
413 [in] BOOL fEnable);
415 HRESULT SubstituteKeyboardLayout(
416 [in] REFCLSID rclsid,
417 [in] LANGID langid,
418 [in] REFGUID guidProfile,
419 [in] HKL hKL);
422 typedef [uuid(c4cc07f1-80cc-4a7b-bc54-98512782cbe3)]
423 enum {
424 TF_LS_NONE = 0,
425 TF_LS_SOLID = 1,
426 TF_LS_DOT = 2,
427 TF_LS_DASH = 3,
428 TF_LS_SQUIGGLE = 4
429 } TF_DA_LINESTYLE;
431 typedef [uuid(d9b92e21-084a-401b-9c64-1e6dad91a1ab)]
432 enum {
433 TF_CT_NONE = 0,
434 TF_CT_SYSCOLOR = 1,
435 TF_CT_COLORREF = 2
436 } TF_DA_COLORTYPE;
438 typedef [uuid(90d0cb5e-6520-4a0f-b47c-c39bd955f0d6)]
439 struct TF_DA_COLOR {
440 TF_DA_COLORTYPE type;
441 [switch_type(TF_DA_COLORTYPE), switch_is(type)]
442 union {
443 [case(TF_CT_SYSCOLOR)] int nIndex;
444 [case(TF_CT_COLORREF)] COLORREF cr;
446 } TF_DA_COLOR;
448 typedef [uuid(33d2fe4b-6c24-4f67-8d75-3bc1819e4126)]
449 enum {
450 TF_ATTR_INPUT = 0,
451 TF_ATTR_TARGET_CONVERTED = 1,
452 TF_ATTR_CONVERTED = 2,
453 TF_ATTR_TARGET_NOTCONVERTED = 3,
454 TF_ATTR_INPUT_ERROR = 4,
455 TF_ATTR_FIXEDCONVERTED = 5,
456 TF_ATTR_OTHER = -1
457 } TF_DA_ATTR_INFO;
459 typedef [uuid(1bf1c305-419b-4182-a4d2-9bfadc3f021f)]
460 struct TF_DISPLAYATTRIBUTE {
461 TF_DA_COLOR crText;
462 TF_DA_COLOR crBk;
463 TF_DA_LINESTYLE lsStyle;
464 BOOL fBoldLine;
465 TF_DA_COLOR crLine;
466 TF_DA_ATTR_INFO bAttr;
467 } TF_DISPLAYATTRIBUTE;
470 object,
471 uuid(70528852-2f26-4aea-8c96-215150578932),
472 pointer_default(unique)
474 interface ITfDisplayAttributeInfo : IUnknown
476 HRESULT GetGUID([out] GUID *pguid);
478 HRESULT GetDescription([out] BSTR *pbstrDesc);
480 HRESULT GetAttributeInfo([out] TF_DISPLAYATTRIBUTE *pda);
482 HRESULT SetAttributeInfo([in] const TF_DISPLAYATTRIBUTE *pda);
484 HRESULT Reset();
488 object,
489 uuid(7cef04d7-cb75-4e80-a7ab-5f5bc7d332de),
490 pointer_default(unique)
492 interface IEnumTfDisplayAttributeInfo : IUnknown
494 HRESULT Clone([out] IEnumTfDisplayAttributeInfo **ppEnum);
496 HRESULT Next(
497 [in] ULONG ulCount,
498 [out, size_is(ulCount), length_is(*pcFetched)] ITfDisplayAttributeInfo **rgInfo,
499 [out] ULONG *pcFetched);
501 HRESULT Reset();
503 HRESULT Skip([in] ULONG ulCount);
507 object,
508 local,
509 uuid(8ded7393-5db1-475c-9e71-a39111b0ff67),
510 pointer_default(unique)
512 interface ITfDisplayAttributeMgr : IUnknown
514 HRESULT OnUpdateInfo();
516 HRESULT EnumDisplayAttributeInfo([out] IEnumTfDisplayAttributeInfo **ppEnum);
518 HRESULT GetDisplayAttributeInfo(
519 [in] REFGUID guid,
520 [out] ITfDisplayAttributeInfo **ppInfo,
521 [out] CLSID *pclsidOwner);
526 object,
527 local,
528 uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
529 pointer_default(unique)
531 interface ITfCategoryMgr : IUnknown
533 HRESULT RegisterCategory([in] REFCLSID rclsid,
534 [in] REFGUID rcatid,
535 [in] REFGUID rguid);
537 HRESULT UnregisterCategory([in] REFCLSID rclsid,
538 [in] REFGUID rcatid,
539 [in] REFGUID rguid);
541 HRESULT EnumCategoriesInItem([in] REFGUID rguid,
542 [out] IEnumGUID **ppEnum);
544 HRESULT EnumItemsInCategory([in] REFGUID rcatid,
545 [out] IEnumGUID **ppEnum);
547 HRESULT FindClosestCategory([in] REFGUID rguid,
548 [out] GUID *pcatid,
549 [in, size_is(ulCount)] const GUID **ppcatidList,
550 [in] ULONG ulCount);
552 HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
553 [in] REFGUID rguid,
554 [in, size_is(cch)] const WCHAR *pchDesc,
555 [in] ULONG cch);
557 HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
558 [in] REFGUID rguid);
560 HRESULT GetGUIDDescription([in] REFGUID rguid,
561 [out] BSTR *pbstrDesc);
563 HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
564 [in] REFGUID rguid,
565 [in] DWORD dw);
567 HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
568 [in] REFGUID rguid);
570 HRESULT GetGUIDDWORD([in] REFGUID rguid,
571 [out] DWORD *pdw);
573 HRESULT RegisterGUID([in] REFGUID rguid,
574 [out] TfGuidAtom *pguidatom);
576 HRESULT GetGUID([in] TfGuidAtom guidatom,
577 [out] GUID *pguid);
579 HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
580 [in] REFGUID rguid,
581 [out] BOOL *pfEqual);
585 object,
586 uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
587 pointer_default(unique)
589 interface ITfTextEditSink : IUnknown
591 HRESULT OnEndEdit(
592 [in] ITfContext *pic,
593 [in] TfEditCookie ecReadOnly,
594 [in] ITfEditRecord *pEditRecord);
598 object,
599 uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
600 pointer_default(unique)
602 interface ITfContextOwnerCompositionSink : IUnknown
604 HRESULT OnStartComposition(
605 [in] ITfCompositionView *pComposition,
606 [out] BOOL *pfOk);
608 HRESULT OnUpdateComposition(
609 [in] ITfCompositionView *pComposition,
610 [in] ITfRange *pRangeNew);
612 HRESULT OnEndComposition(
613 [in] ITfCompositionView *pComposition);
617 object,
618 uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
619 pointer_default(unique)
621 interface IEnumTfLanguageProfiles : IUnknown
623 HRESULT Clone(
624 [out] IEnumTfLanguageProfiles **ppEnum);
626 HRESULT Next(
627 [in] ULONG ulCount,
628 [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
629 [out] ULONG *pcFetch);
631 HRESULT Reset();
633 HRESULT Skip(
634 [in] ULONG ulCount);
638 object,
639 local,
640 uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
641 pointer_default(unique)
643 interface ITfTextInputProcessor : IUnknown
645 HRESULT Activate(
646 [in] ITfThreadMgr *ptim,
647 [in] TfClientId tid);
649 HRESULT Deactivate();
653 object,
654 uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
655 pointer_default(unique)
657 interface ITfThreadMgrEventSink : IUnknown
659 HRESULT OnInitDocumentMgr(
660 [in] ITfDocumentMgr *pdim);
662 HRESULT OnUninitDocumentMgr(
663 [in] ITfDocumentMgr *pdim);
665 HRESULT OnSetFocus(
666 [in] ITfDocumentMgr *pdimFocus,
667 [in] ITfDocumentMgr *pdimPrevFocus);
669 HRESULT OnPushContext(
670 [in] ITfContext *pic);
672 HRESULT OnPopContext(
673 [in] ITfContext *pic);
677 object,
678 local,
679 uuid(aa80e7f0-2021-11d2-93e0-0060b067b86e),
680 pointer_default(unique)
682 interface ITfKeystrokeMgr : IUnknown
684 HRESULT AdviseKeyEventSink(
685 [in] TfClientId tid,
686 [in] ITfKeyEventSink *pSink,
687 [in] BOOL fForeground);
689 HRESULT UnadviseKeyEventSink(
690 [in] TfClientId tid);
692 HRESULT GetForeground(
693 [out] CLSID *pclsid);
695 HRESULT TestKeyDown(
696 [in] WPARAM wParam,
697 [in] LPARAM lParam,
698 [out] BOOL *pfEaten);
700 HRESULT TestKeyUp(
701 [in] WPARAM wParam,
702 [in] LPARAM lParam,
703 [out] BOOL *pfEaten);
705 HRESULT KeyDown(
706 [in] WPARAM wParam,
707 [in] LPARAM lParam,
708 [out] BOOL *pfEaten);
710 HRESULT KeyUp(
711 [in] WPARAM wParam,
712 [in] LPARAM lParam,
713 [out] BOOL *pfEaten);
715 HRESULT GetPreservedKey(
716 [in] ITfContext *pic,
717 [in] const TF_PRESERVEDKEY *pprekey,
718 [out] GUID *pguid);
720 HRESULT IsPreservedKey(
721 [in] REFGUID rguid,
722 [in] const TF_PRESERVEDKEY *pprekey,
723 [out] BOOL *pfRegistered);
725 HRESULT PreserveKey(
726 [in] TfClientId tid,
727 [in] REFGUID rguid,
728 [in] const TF_PRESERVEDKEY *prekey,
729 [in, size_is(cchDesc)] const WCHAR *pchDesc,
730 [in] ULONG cchDesc);
732 HRESULT UnpreserveKey(
733 [in] REFGUID rguid,
734 [in] const TF_PRESERVEDKEY *pprekey);
736 HRESULT SetPreservedKeyDescription(
737 [in] REFGUID rguid,
738 [in, size_is(cchDesc)] const WCHAR *pchDesc,
739 [in] ULONG cchDesc);
741 HRESULT GetPreservedKeyDescription(
742 [in] REFGUID rguid,
743 [out] BSTR *pbstrDesc);
745 HRESULT SimulatePreservedKey(
746 [in] ITfContext *pic,
747 [in] REFGUID rguid,
748 [out] BOOL *pfEaten);
752 object,
753 local,
754 uuid(aa80e7f5-2021-11d2-93e0-0060b067b86e),
755 pointer_default(unique)
757 interface ITfKeyEventSink : IUnknown
759 HRESULT OnSetFocus(
760 [in] BOOL fForeground);
762 HRESULT OnTestKeyDown(
763 [in] ITfContext *pic,
764 [in] WPARAM wParam,
765 [in] LPARAM lParam,
766 [out] BOOL *pfEaten);
768 HRESULT OnTestKeyUp(
769 [in] ITfContext *pic,
770 [in] WPARAM wParam,
771 [in] LPARAM lParam,
772 [out] BOOL *pfEaten);
774 HRESULT OnKeyDown(
775 [in] ITfContext *pic,
776 [in] WPARAM wParam,
777 [in] LPARAM lParam,
778 [out] BOOL *pfEaten);
780 HRESULT OnKeyUp(
781 [in] ITfContext *pic,
782 [in] WPARAM wParam,
783 [in] LPARAM lParam,
784 [out] BOOL *pfEaten);
786 HRESULT OnPreservedKey(
787 [in] ITfContext *pic,
788 [in] REFGUID rguid,
789 [out] BOOL *pfEaten);
793 object,
794 local,
795 uuid(8f1b8ad8-0b6b-4874-90c5-bd76011e8f7c),
796 pointer_default(unique)
798 interface ITfMessagePump : IUnknown
800 HRESULT PeekMessageA(
801 [out] LPMSG pMsg,
802 [in] HWND hwnd,
803 [in] UINT wMsgFilterMin,
804 [in] UINT wMsgFilterMax,
805 [in] UINT wRemoveMsg,
806 [out] BOOL *pfResult);
808 HRESULT GetMessageA(
809 [out] LPMSG pMsg,
810 [in] HWND hwnd,
811 [in] UINT wMsgFilterMin,
812 [in] UINT wMsgFilterMax,
813 [out] BOOL *pfResult);
815 HRESULT PeekMessageW(
816 [out] LPMSG pMsg,
817 [in] HWND hwnd,
818 [in] UINT wMsgFilterMin,
819 [in] UINT wMsgFilterMax,
820 [in] UINT wRemoveMsg,
821 [out] BOOL *pfResult);
823 HRESULT GetMessageW(
824 [out] LPMSG pMsg,
825 [in] HWND hwnd,
826 [in] UINT wMsgFilterMin,
827 [in] UINT wMsgFilterMax,
828 [out] BOOL *pfResult);
832 object,
833 local,
834 uuid(d60a7b49-1b9f-4be2-b702-47e9dc05dec3),
835 pointer_default(unique)
837 interface ITfClientId : IUnknown
839 HRESULT GetClientId(
840 [in] REFCLSID rclsid,
841 [out] TfClientId *ptid);
845 object,
846 uuid(43c9fe15-f494-4c17-9de2-b8a4ac350aa8),
847 pointer_default(unique)
849 interface ITfLanguageProfileNotifySink : IUnknown
851 HRESULT OnLanguageChange(
852 [in] LANGID langid,
853 [out] BOOL *pfAccept);
855 HRESULT OnLanguageChanged();
859 object,
860 uuid(aa80e803-2021-11d2-93e0-0060b067b86e),
861 pointer_default(unique)
863 interface ITfEditSession : IUnknown
865 HRESULT DoEditSession(
866 [in] TfEditCookie ec);
870 object,
871 uuid(aa80e7ff-2021-11d2-93e0-0060b067b86e),
872 pointer_default(unique)
874 interface ITfRange : IUnknown
876 const WCHAR TF_CHAR_EMBEDDED = TS_CHAR_EMBEDDED;
878 typedef [uuid(cf610f06-2882-46f6-abe5-298568b664c4)] enum { TF_GRAVITY_BACKWARD = 0, TF_GRAVITY_FORWARD = 1 } TfGravity;
880 typedef [uuid(1e512533-bbdc-4530-9a8e-a1dc0af67468)] enum { TF_SD_BACKWARD = 0, TF_SD_FORWARD = 1 } TfShiftDir;
882 const DWORD TF_HF_OBJECT = 1;
883 const DWORD TF_TF_MOVESTART = 1;
884 const DWORD TF_TF_IGNOREEND = 2;
885 const DWORD TF_ST_CORRECTION = 1;
886 const DWORD TF_IE_CORRECTION = 1;
888 typedef [uuid(49930d51-7d93-448c-a48c-fea5dac192b1)] struct TF_HALTCOND
890 ITfRange *pHaltRange;
891 TfAnchor aHaltPos;
892 DWORD dwFlags;
893 } TF_HALTCOND;
895 HRESULT GetText(
896 [in] TfEditCookie ec,
897 [in] DWORD dwFlags,
898 [out, size_is(cchMax), length_is(*pcch)] WCHAR *pchText,
899 [in] ULONG cchMax,
900 [out] ULONG *pcch);
902 HRESULT SetText(
903 [in] TfEditCookie ec,
904 [in] DWORD dwFlags,
905 [in, size_is(cch), unique] const WCHAR *pchText,
906 [in] LONG cch);
908 HRESULT GetFormattedText(
909 [in] TfEditCookie ec,
910 [out] IDataObject **ppDataObject);
912 HRESULT GetEmbedded(
913 [in] TfEditCookie ec,
914 [in] REFGUID rguidService,
915 [in] REFIID riid,
916 [out, iid_is(riid)] IUnknown **ppunk);
918 HRESULT InsertEmbedded(
919 [in] TfEditCookie ec,
920 [in] DWORD dwFlags,
921 [in] IDataObject *pDataObject);
923 HRESULT ShiftStart(
924 [in] TfEditCookie ec,
925 [in] LONG cchReq,
926 [out] LONG *pcch,
927 [in, unique] const TF_HALTCOND *pHalt);
929 HRESULT ShiftEnd(
930 [in] TfEditCookie ec,
931 [in] LONG cchReq,
932 [out] LONG *pcch,
933 [in, unique] const TF_HALTCOND *pHalt);
935 HRESULT ShiftStartToRange(
936 [in] TfEditCookie ec,
937 [in] ITfRange *pRange,
938 [in] TfAnchor aPos);
940 HRESULT ShiftEndToRange(
941 [in] TfEditCookie ec,
942 [in] ITfRange *pRange,
943 [in] TfAnchor aPos);
945 HRESULT ShiftStartRegion(
946 [in] TfEditCookie ec,
947 [in] TfShiftDir dir,
948 [out] BOOL *pfNoRegion);
950 HRESULT ShiftEndRegion(
951 [in] TfEditCookie ec,
952 [in] TfShiftDir dir,
953 [out] BOOL *pfNoRegion);
955 HRESULT IsEmpty(
956 [in] TfEditCookie ec,
957 [out] BOOL *pfEmpty);
959 HRESULT Collapse(
960 [in] TfEditCookie ec,
961 [in] TfAnchor aPos);
963 HRESULT IsEqualStart(
964 [in] TfEditCookie ec,
965 [in] ITfRange *pWith,
966 [in] TfAnchor aPos,
967 [out] BOOL *pfEqual);
969 HRESULT IsEqualEnd(
970 [in] TfEditCookie ec,
971 [in] ITfRange *pWith,
972 [in] TfAnchor aPos,
973 [out] BOOL *pfEqual);
975 HRESULT CompareStart(
976 [in] TfEditCookie ec,
977 [in] ITfRange *pWith,
978 [in] TfAnchor aPos,
979 [out] LONG *plResult);
981 HRESULT CompareEnd(
982 [in] TfEditCookie ec,
983 [in] ITfRange *pWith,
984 [in] TfAnchor aPos,
985 [out] LONG *plResult);
987 HRESULT AdjustForInsert(
988 [in] TfEditCookie ec,
989 [in] ULONG cchInsert,
990 [out] BOOL *pfInsertOk);
992 HRESULT GetGravity(
993 [out] TfGravity *pgStart,
994 [out] TfGravity *pgEnd);
996 HRESULT SetGravity(
997 [in] TfEditCookie ec,
998 [in] TfGravity gStart,
999 [in] TfGravity gEnd);
1001 HRESULT Clone(
1002 [out] ITfRange **ppClone);
1004 HRESULT GetContext(
1005 [out] ITfContext **ppContext);
1009 object,
1010 uuid(057a6296-029b-4154-b79a-0d461d4ea94c),
1011 pointer_default(unique)
1013 interface ITfRangeACP : ITfRange
1015 HRESULT GetExtent([out] LONG *pacpAnchor,
1016 [out] LONG *pcch);
1018 HRESULT SetExtent([in] LONG acpAnchor,
1019 [in] LONG cch);
1023 object,
1024 uuid(55ce16ba-3014-41c1-9ceb-fade1446ac6c),
1025 pointer_default(unique)
1027 interface ITfInsertAtSelection : IUnknown
1029 const DWORD TF_IAS_NOQUERY = 0x1;
1030 const DWORD TF_IAS_QUERYONLY = 0x2;
1031 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION = 0x80000000;
1033 HRESULT InsertTextAtSelection(
1034 [in] TfEditCookie ec,
1035 [in] DWORD dwFlags,
1036 [in, size_is(cch)] const WCHAR *pchText,
1037 [in] LONG cch,
1038 [out] ITfRange **ppRange);
1040 HRESULT InsertEmbeddedAtSelection(
1041 [in] TfEditCookie ec,
1042 [in] DWORD dwFlags,
1043 [in] IDataObject *pDataObject,
1044 [out] ITfRange **ppRange);
1048 object,
1049 uuid(6834b120-88cb-11d2-bf45-00105a2799b5),
1050 pointer_default(unique)
1052 interface ITfPropertyStore : IUnknown
1054 const DWORD TF_TU_CORRECTION = 0x1;
1056 HRESULT GetType([out] GUID *pguid);
1058 HRESULT GetDataType([out] DWORD *pdwReserved);
1060 HRESULT GetData([out] VARIANT *pvarValue);
1062 HRESULT OnTextUpdated(
1063 [in] DWORD dwFlags,
1064 [in] ITfRange *pRangeNew,
1065 [out] BOOL *pfAccept);
1067 HRESULT Shrink(
1068 [in] ITfRange *pRangeNew,
1069 [out] BOOL *pfFree);
1071 HRESULT Divide(
1072 [in] ITfRange *pRangeThis,
1073 [in] ITfRange *pRangeNew,
1074 [out] ITfPropertyStore **ppPropStore);
1076 HRESULT Clone(
1077 [out] ITfPropertyStore **pPropStore);
1079 HRESULT GetPropertyRangeCreator(
1080 [out] CLSID *pclsid);
1082 HRESULT Serialize(
1083 [in] IStream *pStream,
1084 [out] ULONG *pcb);
1088 object,
1089 uuid(f99d3f40-8e32-11d2-bf46-00105a2799b5),
1090 pointer_default(unique)
1092 interface IEnumTfRanges : IUnknown
1094 HRESULT Clone([out] IEnumTfRanges **ppEnum);
1096 HRESULT Next(
1097 [in] ULONG ulCount,
1098 [out, size_is(ulCount), length_is(*pcFetched)] ITfRange **ppRange,
1099 [out] ULONG *pcFetched);
1101 HRESULT Reset();
1103 HRESULT Skip(ULONG ulCount);
1107 object,
1108 uuid(5efd22Ba-7838-46cb-88e2-cadb14124f8f),
1109 pointer_default(unique)
1111 interface IEnumITfCompositionView : IUnknown
1113 HRESULT Clone([out] IEnumITfCompositionView **ppEnum);
1115 HRESULT Next(
1116 [in] ULONG ulCount,
1117 [out, size_is(ulCount), length_is(*pcFetched)] ITfCompositionView **rgCompositionView,
1118 [out] ULONG *pcFetched);
1120 HRESULT Reset();
1122 HRESULT Skip([in] ULONG ulCount);
1126 object,
1127 uuid(20168d64-5a8f-4a5a-b7bd-cfa29f4D0fd9),
1128 pointer_default(unique)
1130 interface ITfComposition : IUnknown
1132 HRESULT GetRange([out] ITfRange **ppRange);
1134 HRESULT ShiftStart(
1135 [in] TfEditCookie ecWrite,
1136 [in] ITfRange *pNewStart);
1138 HRESULT ShiftEnd(
1139 [in] TfEditCookie ecWrite,
1140 [in] ITfRange *pNewEnd);
1142 HRESULT EndComposition([in] TfEditCookie ecWrite);
1146 object,
1147 uuid(a781718c-579a-4b15-a280-32b8577acc5e),
1148 pointer_default(unique)
1150 interface ITfCompositionSink : IUnknown
1152 HRESULT OnCompositionTerminated(
1153 [in] TfEditCookie ecWrite,
1154 [in] ITfComposition *pComposition);
1158 object,
1159 uuid(d40C8aae-aC92-4fc7-9a11-0ee0e23aa39b),
1160 pointer_default(unique)
1162 interface ITfContextComposition : IUnknown
1164 HRESULT StartComposition(
1165 [in] TfEditCookie ecWrite,
1166 [in] ITfRange *pCompositionRange,
1167 [in] ITfCompositionSink *pSink,
1168 [out] ITfComposition **ppComposition);
1170 HRESULT EnumCompositions([out] IEnumITfCompositionView **ppEnum);
1172 HRESULT FindComposition(
1173 [in] TfEditCookie ecRead,
1174 [in] ITfRange *pTestRange,
1175 [out] IEnumITfCompositionView **ppEnum);
1177 HRESULT TakeOwnership(
1178 [in] TfEditCookie ecWrite,
1179 [in] ITfCompositionView *pComposition,
1180 [in] ITfCompositionSink *pSink,
1181 [out] ITfComposition **ppComposition);
1185 object,
1186 uuid(86462810-593b-4916-9764-19c08e9ce110),
1187 pointer_default(unique)
1189 interface ITfContextOwnerCompositionServices : ITfContextComposition
1191 HRESULT TerminateComposition([in] ITfCompositionView *pComposition);
1195 object,
1196 uuid(17d49a3d-f8b8-4b2f-b254-52319dd64c53),
1197 pointer_default(unique)
1199 interface ITfReadOnlyProperty : IUnknown
1201 HRESULT GetType([out] GUID *pguid);
1203 HRESULT EnumRanges(
1204 [in] TfEditCookie ec,
1205 [out] IEnumTfRanges **ppEnum,
1206 [in] ITfRange *pTargetRange);
1208 HRESULT GetValue(
1209 [in] TfEditCookie ec,
1210 [in] ITfRange *pRange,
1211 [out] VARIANT *pvarValue);
1213 HRESULT GetContext([out] ITfContext **ppContext);
1217 object,
1218 uuid(e2449660-9542-11d2-bf46-00105a2799b5),
1219 pointer_default(unique)
1221 interface ITfProperty : ITfReadOnlyProperty
1223 HRESULT FindRange(
1224 [in] TfEditCookie ec,
1225 [in] ITfRange *pRange,
1226 [out] ITfRange **ppRange,
1227 [in] TfAnchor aPos);
1229 HRESULT SetValueStore(
1230 [in] TfEditCookie ec,
1231 [in] ITfRange *pRange,
1232 [in] ITfPropertyStore *pPropStore);
1234 HRESULT SetValue(
1235 [in] TfEditCookie ec,
1236 [in] ITfRange *pRange,
1237 [in] const VARIANT *pvarValue);
1239 HRESULT Clear(
1240 [in] TfEditCookie ec,
1241 [in] ITfRange *pRange);
1245 object,
1246 uuid(bb08f7a9-607a-4384-8623-056892b64371),
1247 pointer_default(unique)
1249 interface ITfCompartment : IUnknown
1251 HRESULT SetValue(
1252 [in] TfClientId tid,
1253 [in] const VARIANT *pvarValue);
1255 HRESULT GetValue(
1256 [out] VARIANT *pvarValue);
1260 object,
1261 uuid(7dcf57ac-18ad-438b-824d-979bffb74b7c),
1262 pointer_default(unique)
1264 interface ITfCompartmentMgr : IUnknown
1266 HRESULT GetCompartment(
1267 [in] REFGUID rguid,
1268 [out] ITfCompartment **ppcomp);
1270 HRESULT ClearCompartment(
1271 [in] TfClientId tid,
1272 [in] REFGUID rguid);
1274 HRESULT EnumCompartments(
1275 [out] IEnumGUID **ppEnum);
1279 object,
1280 uuid(743abd5f-f26d-48df-8cc5-238492419b64),
1281 pointer_default(unique)
1283 interface ITfCompartmentEventSink : IUnknown
1285 HRESULT OnChange(
1286 [in] REFGUID rguid);
1290 object,
1291 uuid(8f1a7ea6-1654-4502-a86e-b2902344d507),
1292 pointer_default(unique)
1294 interface IEnumTfContexts : IUnknown
1296 HRESULT Clone(
1297 [out] IEnumTfContexts **ppEnum);
1299 HRESULT Next(
1300 [in] ULONG ulCount,
1301 [out, size_is(ulCount), length_is(*pcFetched)] ITfContext **rgContext,
1302 [out] ULONG *pcFetched);
1304 HRESULT Reset();
1306 HRESULT Skip(
1307 [in] ULONG ulCount);
1311 object,
1312 uuid(aa80e808-2021-11d2-93e0-0060b067b86e),
1313 pointer_default(unique)
1315 interface IEnumTfDocumentMgrs : IUnknown
1317 HRESULT Clone(
1318 [out] IEnumTfDocumentMgrs **ppEnum);
1320 HRESULT Next(
1321 [in] ULONG ulCount,
1322 [out, size_is(ulCount), length_is(*pcFetched)] ITfDocumentMgr **rgDocumentMgr,
1323 [out] ULONG *pcFetched);
1325 HRESULT Reset();
1327 HRESULT Skip(
1328 [in] ULONG ulCount);