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
22 import
"textstor.idl";
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);")
35 cpp_quote
("HRESULT WINAPI TF_CreateLangBarMgr(ITfLangBarMgr **pppbm);")
36 cpp_quote
("HRESULT WINAPI TF_CreateLangBarItemMgr(ITfLangBarItemMgr **pplbim);")
37 cpp_quote
("HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist(void);")
39 cpp_quote
("EXTERN_C const GUID GUID_PROP_TEXTOWNER;")
40 cpp_quote
("DEFINE_GUID(GUID_PROP_ATTRIBUTE,0x34b45670,0x7526,0x11d2,0xa1,0x47,0x00,0x10,0x5a,0x27,0x99,0xb5);")
41 cpp_quote
("EXTERN_C const GUID GUID_PROP_LANGID;")
42 cpp_quote
("EXTERN_C const GUID GUID_PROP_READING;")
43 cpp_quote
("EXTERN_C const GUID GUID_PROP_COMPOSING;")
45 cpp_quote
("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
46 cpp_quote
("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
47 cpp_quote
("EXTERN_C const CLSID CLSID_TF_LangBarMgr;")
48 cpp_quote
("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
49 cpp_quote
("EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr;")
51 /* GUIDs for Compartments */
52 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")
53 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;")
54 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;")
55 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;")
56 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;")
57 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;")
58 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;")
59 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;")
60 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;")
62 /* GUIDs for Categories */
63 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
64 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
65 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
66 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
68 typedef [uuid(7213778c
-7bb0
-4270-b050
-6189ee594e97
)] DWORD TfEditCookie
;
69 typedef [uuid(de403c21
-89fd
-4f85
-8b87
-64584d063fbc
)] DWORD TfClientId
;
70 typedef [uuid(88a9c478
-f3ec
-4763-8345-cd9250443f8d
)] DWORD TfGuidAtom
;
72 cpp_quote
("#define TF_MOD_ALT 0x0001")
73 cpp_quote
("#define TF_MOD_CONTROL 0x0002")
74 cpp_quote
("#define TF_MOD_SHIFT 0x0004")
75 cpp_quote
("#define TF_MOD_RALT 0x0008")
76 cpp_quote
("#define TF_MOD_RCONTROL 0x0010")
77 cpp_quote
("#define TF_MOD_RSHIFT 0x0020")
78 cpp_quote
("#define TF_MOD_LALT 0x0040")
79 cpp_quote
("#define TF_MOD_LCONTROL 0x0080")
80 cpp_quote
("#define TF_MOD_LSHIFT 0x0100")
81 cpp_quote
("#define TF_MOD_ON_KEYUP 0x0200")
82 cpp_quote
("#define TF_MOD_IGNORE_ALL_MODIFIER 0x0400")
84 cpp_quote
("#define TF_PROFILETYPE_INPUTPROCESSOR 0x0001")
85 cpp_quote
("#define TF_PROFILETYPE_KEYBOARDLAYOUT 0x0002")
87 cpp_quote
("#define TF_IPSINK_FLAG_ACTIVE 0x0001")
89 interface ITfDocumentMgr
;
91 interface IEnumTfDocumentMgrs
;
92 interface IEnumTfContexts
;
93 interface ITfFunctionProvider
;
94 interface IEnumTfFunctionProviders
;
95 interface ITfCompartmentMgr
;
96 interface ITfEditSession
;
98 interface ITfContextView
;
99 interface IEnumTfContextViews
;
100 interface ITfProperty
;
101 interface ITfReadOnlyProperty
;
102 interface IEnumTfProperties
;
103 interface ITfRangeBackup
;
104 interface IEnumTfLanguageProfiles
;
105 interface ITfEditRecord
;
106 interface ITfCompositionView
;
107 interface ITfKeyEventSink
;
110 typedef [uuid(4f5d560f
-5ab5
-4dde
-8c4d
-404592857ab0
)] UINT_PTR HKL
;
113 typedef [uuid(e26d9e1d
-691e-4f29
-90d7
-338dcf1f8cef
)] struct TF_PERSISTENT_PROPERTY_HEADER_ACP
121 } TF_PERSISTENT_PROPERTY_HEADER_ACP
;
123 typedef [uuid(e1b5808d
-1e46
-4c19
-84dc
-68c5f5978cc8
)] struct TF_LANGUAGEPROFILE
130 } TF_LANGUAGEPROFILE
;
132 typedef [uuid(77c12f95
-b783
-450d
-879f
-1cd2362c6521
)] struct TF_PRESERVEDKEY
138 typedef [uuid(5a886226
-ae9a
-489b
-b991
-2b1e25ee59a9
)] enum { TF_ANCHOR_START
= 0, TF_ANCHOR_END
= 1 } TfAnchor
;
142 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
143 pointer_default(unique)
145 interface ITfThreadMgr
: IUnknown
148 [out] TfClientId
*ptid
);
150 HRESULT Deactivate
();
152 HRESULT CreateDocumentMgr
(
153 [out] ITfDocumentMgr
**ppdim
);
155 HRESULT EnumDocumentMgrs
(
156 [out] IEnumTfDocumentMgrs
**ppEnum
);
159 [out] ITfDocumentMgr
**ppdimFocus
);
162 [in] ITfDocumentMgr
*pdimFocus
);
164 HRESULT AssociateFocus
(
166 [in, unique] ITfDocumentMgr
*pdimNew
,
167 [out] ITfDocumentMgr
**ppdimPrev
);
169 HRESULT IsThreadFocus
(
170 [out] BOOL
*pfThreadFocus
);
172 HRESULT GetFunctionProvider
(
174 [out] ITfFunctionProvider
**ppFuncProv
);
176 HRESULT EnumFunctionProviders
(
177 [out] IEnumTfFunctionProviders
**ppEnum
);
179 HRESULT GetGlobalCompartment
(
180 [out] ITfCompartmentMgr
**ppCompMgr
);
185 uuid(d7540241
-f9a1
-4364-befc
-dbcd2c4395b7
),
186 pointer_default(unique)
188 interface ITfCompositionView
: IUnknown
190 HRESULT GetOwnerClsid
([out] CLSID
*pclsid
);
192 HRESULT GetRange
([out] ITfRange
**ppRange
);
197 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
198 pointer_default(unique)
200 interface ITfDocumentMgr
: IUnknown
202 HRESULT CreateContext
(
203 [in] TfClientId tidOwner
,
205 [in, unique] IUnknown
*punk
,
206 [out] ITfContext
**ppic
,
207 [out] TfEditCookie
*pecTextStore
);
210 [in] ITfContext
*pic
);
212 const DWORD TF_POPF_ALL
= 0x0001;
218 [out] ITfContext
**ppic
);
221 [out] ITfContext
**ppic
);
223 HRESULT EnumContexts
(
224 [out] IEnumTfContexts
**ppEnum
);
229 uuid(aa80e7fd
-2021-11d2
-93e0
-0060b067b86e
),
230 pointer_default(unique)
232 interface ITfContext
: IUnknown
234 const DWORD TF_ES_ASYNCDONTCARE
= 0x0;
235 const DWORD TF_ES_SYNC
= 0x1;
236 const DWORD TF_ES_READ
= 0x2;
237 const DWORD TF_ES_READWRITE
= 0x6;
238 const DWORD TF_ES_ASYNC
= 0x8;
240 HRESULT RequestEditSession
(
242 [in] ITfEditSession
*pes
,
244 [out] HRESULT *phrSession
);
246 HRESULT InWriteSession
(
248 [out] BOOL
*pfWriteSession
);
250 typedef [uuid(1690be9b
-d3e9
-49f6
-8d8b
-51b905af4c43
)] enum { TF_AE_NONE
, TF_AE_START
, TF_AE_END
} TfActiveSelEnd
;
252 typedef [uuid(36ae42a4
-6989-4bdc
-b48a
-6137b7bf2e42
)] struct TF_SELECTIONSTYLE
258 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
261 TF_SELECTIONSTYLE style
;
264 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
266 HRESULT GetSelection
(
267 [in] TfEditCookie ec
,
270 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
271 [out] ULONG
*pcFetched
);
273 HRESULT SetSelection
(
274 [in] TfEditCookie ec
,
276 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
279 [in] TfEditCookie ec
,
280 [out] ITfRange
**ppStart
);
283 [in] TfEditCookie ec
,
284 [out] ITfRange
**ppEnd
);
286 typedef [uuid(bc7d979a
-846a
-444d
-afef
-0a9bfa82b961
)] TS_STATUS TF_STATUS
;
287 const DWORD TF_SD_READONLY
= TS_SD_READONLY
;
288 const DWORD TF_SD_LOADING
= TS_SD_LOADING
;
289 const DWORD TF_SS_DISJOINTSEL
= TS_SS_DISJOINTSEL
;
290 const DWORD TF_SS_REGIONS
= TS_SS_REGIONS
;
291 const DWORD TF_SS_TRANSITORY
= TS_SS_TRANSITORY
;
294 HRESULT GetActiveView
(
295 [out] ITfContextView
**ppView
);
298 [out] IEnumTfContextViews
**ppEnum
);
301 [out] TF_STATUS
*pdcs
);
304 [in] REFGUID guidProp
,
305 [out] ITfProperty
**ppProp
);
307 HRESULT GetAppProperty
(
308 [in] REFGUID guidProp
,
309 [out] ITfReadOnlyProperty
**ppProp
);
311 HRESULT TrackProperties
(
312 [in, size_is(cProp
)] const GUID
**prgProp
,
314 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
316 [out] ITfReadOnlyProperty
**ppProperty
);
318 HRESULT EnumProperties
(
319 [out] IEnumTfProperties
**ppEnum
);
321 HRESULT GetDocumentMgr
(
322 [out] ITfDocumentMgr
**ppDm
);
324 HRESULT CreateRangeBackup
(
325 [in] TfEditCookie ec
,
326 [in] ITfRange
*pRange
,
327 [out] ITfRangeBackup
**ppBackup
);
331 const DWORD TF_INVALID_COOKIE
= 0xffffffff;
335 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
336 pointer_default(unique)
338 interface ITfSource
: IUnknown
342 [in, iid_is(riid
)] IUnknown
*punk
,
343 [out] DWORD
*pdwCookie
);
345 HRESULT UnadviseSink
(
346 [in] DWORD dwCookie
);
352 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
353 pointer_default(unique)
355 interface ITfInputProcessorProfiles
: IUnknown
358 [in] REFCLSID rclsid
);
361 [in] REFCLSID rclsid
);
363 HRESULT AddLanguageProfile
(
364 [in] REFCLSID rclsid
,
366 [in] REFGUID guidProfile
,
367 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
369 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
371 [in] ULONG uIconIndex
);
373 HRESULT RemoveLanguageProfile
(
374 [in] REFCLSID rclsid
,
376 [in] REFGUID guidProfile
);
378 HRESULT EnumInputProcessorInfo
(
379 [out] IEnumGUID
**ppEnum
);
381 HRESULT GetDefaultLanguageProfile
(
385 [out] GUID
*pguidProfile
);
387 HRESULT SetDefaultLanguageProfile
(
389 [in] REFCLSID rclsid
,
390 [in] REFGUID guidProfiles
);
392 HRESULT ActivateLanguageProfile
(
393 [in] REFCLSID rclsid
,
395 [in] REFGUID guidProfiles
);
397 HRESULT GetActiveLanguageProfile
(
398 [in] REFCLSID rclsid
,
399 [out] LANGID
*plangid
,
400 [out] GUID
*pguidProfile
);
402 HRESULT GetLanguageProfileDescription
(
403 [in] REFCLSID rclsid
,
405 [in] REFGUID guidProfile
,
406 [out] BSTR *pbstrProfile
);
408 HRESULT GetCurrentLanguage
(
409 [out] LANGID
*plangid
);
411 HRESULT ChangeCurrentLanguage
(
414 HRESULT GetLanguageList
(
415 [out] LANGID
**ppLangId
,
416 [out] ULONG
*pulCount
);
418 HRESULT EnumLanguageProfiles
(
420 [out] IEnumTfLanguageProfiles
**ppEnum
);
422 HRESULT EnableLanguageProfile
(
423 [in] REFCLSID rclsid
,
425 [in] REFGUID guidProfile
,
428 HRESULT IsEnabledLanguageProfile
(
429 [in] REFCLSID rclsid
,
431 [in] REFGUID guidProfile
,
432 [out] BOOL
*pfEnable
);
434 HRESULT EnableLanguageProfileByDefault
(
435 [in] REFCLSID rclsid
,
437 [in] REFGUID guidProfile
,
440 HRESULT SubstituteKeyboardLayout
(
441 [in] REFCLSID rclsid
,
443 [in] REFGUID guidProfile
,
447 typedef [uuid(44d2825a
-10e5
-43b2
-877f
-6cb2f43b7e7e
)]
448 struct TF_INPUTPROCESSORPROFILE
{
458 } TF_INPUTPROCESSORPROFILE
;
462 uuid(71c6e74d
-0f28
-11d8
-a82a
-00065b84435c
),
463 pointer_default(unique)
465 interface IEnumTfInputProcessorProfiles
: IUnknown
468 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
472 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_INPUTPROCESSORPROFILE
*pProfile
,
473 [out] ULONG
*pcFetch
);
483 uuid(71c6e74c
-0f28
-11d8
-a82a
-00065b84435c
),
484 pointer_default(unique)
486 interface ITfInputProcessorProfileMgr
: IUnknown
488 HRESULT ActivateProfile
(
489 [in] DWORD dwProfileType
,
492 [in] REFGUID guidProfile
,
496 HRESULT DeactivateProfile
(
497 [in] DWORD dwProfileType
,
500 [in] REFGUID guidProfile
,
505 [in] DWORD dwProfileType
,
508 [in] REFGUID guidProfile
,
510 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
513 HRESULT EnumProfiles
(
515 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
517 HRESULT ReleaseInputProcessor
(
518 [in] REFCLSID rclsid
,
521 HRESULT RegisterProfile
(
522 [in] REFCLSID rclsid
,
524 [in] REFGUID guidProfile
,
525 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
527 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
529 [in] ULONG uIconIndex
,
530 [in] HKL hklsubstitute
,
531 [in] DWORD dwPreferredLayout
,
532 [in] BOOL bEnabledByDefault
,
535 HRESULT UnregisterProfile
(
536 [in] REFCLSID rclsid
,
538 [in] REFGUID guidProfile
,
541 HRESULT GetActiveProfile
(
543 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
546 typedef [uuid(c4cc07f1
-80cc
-4a7b
-bc54
-98512782cbe3
)]
555 typedef [uuid(d9b92e21
-084a
-401b
-9c64
-1e6dad91a1ab
)]
562 typedef [uuid(90d0cb5e
-6520
-4a0f
-b47c
-c39bd955f0d6
)]
564 TF_DA_COLORTYPE type
;
565 [switch_type(TF_DA_COLORTYPE
), switch_is(type
)]
567 [case(TF_CT_SYSCOLOR
)] int nIndex
;
568 [case(TF_CT_COLORREF
)] COLORREF cr
;
572 typedef [uuid(33d2fe4b
-6c24
-4f67
-8d75
-3bc1819e4126
)]
575 TF_ATTR_TARGET_CONVERTED
= 1,
576 TF_ATTR_CONVERTED
= 2,
577 TF_ATTR_TARGET_NOTCONVERTED
= 3,
578 TF_ATTR_INPUT_ERROR
= 4,
579 TF_ATTR_FIXEDCONVERTED
= 5,
583 typedef [uuid(1bf1c305
-419b
-4182-a4d2
-9bfadc3f021f
)]
584 struct TF_DISPLAYATTRIBUTE
{
587 TF_DA_LINESTYLE lsStyle
;
590 TF_DA_ATTR_INFO bAttr
;
591 } TF_DISPLAYATTRIBUTE
;
595 uuid(70528852-2f26
-4aea
-8c96
-215150578932),
596 pointer_default(unique)
598 interface ITfDisplayAttributeInfo
: IUnknown
600 HRESULT GetGUID
([out] GUID
*pguid
);
602 HRESULT GetDescription
([out] BSTR *pbstrDesc
);
604 HRESULT GetAttributeInfo
([out] TF_DISPLAYATTRIBUTE
*pda
);
606 HRESULT SetAttributeInfo
([in] const TF_DISPLAYATTRIBUTE
*pda
);
613 uuid(7cef04d7
-cb75
-4e80
-a7ab
-5f5bc7d332de
),
614 pointer_default(unique)
616 interface IEnumTfDisplayAttributeInfo
: IUnknown
618 HRESULT Clone
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
622 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDisplayAttributeInfo
**rgInfo
,
623 [out] ULONG
*pcFetched
);
627 HRESULT Skip
([in] ULONG ulCount
);
633 uuid(8ded7393
-5db1
-475c
-9e71
-a39111b0ff67
),
634 pointer_default(unique)
636 interface ITfDisplayAttributeMgr
: IUnknown
638 HRESULT OnUpdateInfo
();
640 HRESULT EnumDisplayAttributeInfo
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
642 HRESULT GetDisplayAttributeInfo
(
644 [out] ITfDisplayAttributeInfo
**ppInfo
,
645 [out] CLSID
*pclsidOwner
);
652 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
653 pointer_default(unique)
655 interface ITfCategoryMgr
: IUnknown
657 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
661 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
665 HRESULT EnumCategoriesInItem
([in] REFGUID rguid
,
666 [out] IEnumGUID
**ppEnum
);
668 HRESULT EnumItemsInCategory
([in] REFGUID rcatid
,
669 [out] IEnumGUID
**ppEnum
);
671 HRESULT FindClosestCategory
([in] REFGUID rguid
,
673 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
676 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
678 [in, size_is(cch
)] const WCHAR
*pchDesc
,
681 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
684 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
685 [out] BSTR *pbstrDesc
);
687 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
691 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
694 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
697 HRESULT RegisterGUID
([in] REFGUID rguid
,
698 [out] TfGuidAtom
*pguidatom
);
700 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
703 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
705 [out] BOOL
*pfEqual
);
710 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
711 pointer_default(unique)
713 interface ITfTextEditSink
: IUnknown
716 [in] ITfContext
*pic
,
717 [in] TfEditCookie ecReadOnly
,
718 [in] ITfEditRecord
*pEditRecord
);
723 uuid(5F20AA40
-B57A
-4F34
-96AB
-3576F377CC79
),
724 pointer_default(unique)
726 interface ITfContextOwnerCompositionSink
: IUnknown
728 HRESULT OnStartComposition
(
729 [in] ITfCompositionView
*pComposition
,
732 HRESULT OnUpdateComposition
(
733 [in] ITfCompositionView
*pComposition
,
734 [in] ITfRange
*pRangeNew
);
736 HRESULT OnEndComposition
(
737 [in] ITfCompositionView
*pComposition
);
742 uuid(b246cb75
-a93e
-4652
-bf8c
-b3fe0cfd7e57
),
743 pointer_default(unique)
745 interface ITfActiveLanguageProfileNotifySink
: IUnknown
749 [in] REFGUID guidProfile
,
750 [in] BOOL fActivated
);
755 uuid(3d61bf11
-ac5f
-42c8
-a4cb
-931bcc28c744
),
756 pointer_default(unique)
758 interface IEnumTfLanguageProfiles
: IUnknown
761 [out] IEnumTfLanguageProfiles
**ppEnum
);
765 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_LANGUAGEPROFILE
*pProfile
,
766 [out] ULONG
*pcFetch
);
777 uuid(aa80e7f7
-2021-11d2
-93e0
-0060b067b86e
),
778 pointer_default(unique)
780 interface ITfTextInputProcessor
: IUnknown
783 [in] ITfThreadMgr
*ptim
,
784 [in] TfClientId tid
);
786 HRESULT Deactivate
();
791 uuid(aa80e80e
-2021
-11d2
-93e0
-0060b067b86e
),
792 pointer_default(unique)
794 interface ITfThreadMgrEventSink
: IUnknown
796 HRESULT OnInitDocumentMgr
(
797 [in] ITfDocumentMgr
*pdim
);
799 HRESULT OnUninitDocumentMgr
(
800 [in] ITfDocumentMgr
*pdim
);
803 [in] ITfDocumentMgr
*pdimFocus
,
804 [in] ITfDocumentMgr
*pdimPrevFocus
);
806 HRESULT OnPushContext
(
807 [in] ITfContext
*pic
);
809 HRESULT OnPopContext
(
810 [in] ITfContext
*pic
);
816 uuid(aa80e7f0
-2021-11d2
-93e0
-0060b067b86e
),
817 pointer_default(unique)
819 interface ITfKeystrokeMgr
: IUnknown
821 HRESULT AdviseKeyEventSink
(
823 [in] ITfKeyEventSink
*pSink
,
824 [in] BOOL fForeground
);
826 HRESULT UnadviseKeyEventSink
(
827 [in] TfClientId tid
);
829 HRESULT GetForeground
(
830 [out] CLSID
*pclsid
);
835 [out] BOOL
*pfEaten
);
840 [out] BOOL
*pfEaten
);
845 [out] BOOL
*pfEaten
);
850 [out] BOOL
*pfEaten
);
852 HRESULT GetPreservedKey
(
853 [in] ITfContext
*pic
,
854 [in] const TF_PRESERVEDKEY
*pprekey
,
857 HRESULT IsPreservedKey
(
859 [in] const TF_PRESERVEDKEY
*pprekey
,
860 [out] BOOL
*pfRegistered
);
865 [in] const TF_PRESERVEDKEY
*prekey
,
866 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
869 HRESULT UnpreserveKey
(
871 [in] const TF_PRESERVEDKEY
*pprekey
);
873 HRESULT SetPreservedKeyDescription
(
875 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
878 HRESULT GetPreservedKeyDescription
(
880 [out] BSTR *pbstrDesc
);
882 HRESULT SimulatePreservedKey
(
883 [in] ITfContext
*pic
,
885 [out] BOOL
*pfEaten
);
891 uuid(aa80e7f5
-2021-11d2
-93e0
-0060b067b86e
),
892 pointer_default(unique)
894 interface ITfKeyEventSink
: IUnknown
897 [in] BOOL fForeground
);
899 HRESULT OnTestKeyDown
(
900 [in] ITfContext
*pic
,
903 [out] BOOL
*pfEaten
);
906 [in] ITfContext
*pic
,
909 [out] BOOL
*pfEaten
);
912 [in] ITfContext
*pic
,
915 [out] BOOL
*pfEaten
);
918 [in] ITfContext
*pic
,
921 [out] BOOL
*pfEaten
);
923 HRESULT OnPreservedKey
(
924 [in] ITfContext
*pic
,
926 [out] BOOL
*pfEaten
);
932 uuid(8f1b8ad8
-0b6b
-4874-90c5
-bd76011e8f7c
),
933 pointer_default(unique)
935 interface ITfMessagePump
: IUnknown
937 HRESULT PeekMessageA
(
940 [in] UINT wMsgFilterMin
,
941 [in] UINT wMsgFilterMax
,
942 [in] UINT wRemoveMsg
,
943 [out] BOOL
*pfResult
);
948 [in] UINT wMsgFilterMin
,
949 [in] UINT wMsgFilterMax
,
950 [out] BOOL
*pfResult
);
952 HRESULT PeekMessageW
(
955 [in] UINT wMsgFilterMin
,
956 [in] UINT wMsgFilterMax
,
957 [in] UINT wRemoveMsg
,
958 [out] BOOL
*pfResult
);
963 [in] UINT wMsgFilterMin
,
964 [in] UINT wMsgFilterMax
,
965 [out] BOOL
*pfResult
);
971 uuid(d60a7b49
-1b9f
-4be2
-b702
-47e9dc05dec3
),
972 pointer_default(unique)
974 interface ITfClientId
: IUnknown
977 [in] REFCLSID rclsid
,
978 [out] TfClientId
*ptid
);
983 uuid(43c9fe15
-f494
-4c17
-9de2
-b8a4ac350aa8
),
984 pointer_default(unique)
986 interface ITfLanguageProfileNotifySink
: IUnknown
988 HRESULT OnLanguageChange
(
990 [out] BOOL
*pfAccept
);
992 HRESULT OnLanguageChanged
();
997 uuid(aa80e803
-2021-11d2
-93e0
-0060b067b86e
),
998 pointer_default(unique)
1000 interface ITfEditSession
: IUnknown
1002 HRESULT DoEditSession
(
1003 [in] TfEditCookie ec
);
1008 uuid(aa80e7ff
-2021-11d2
-93e0
-0060b067b86e
),
1009 pointer_default(unique)
1011 interface ITfRange
: IUnknown
1013 const WCHAR TF_CHAR_EMBEDDED
= TS_CHAR_EMBEDDED
;
1015 typedef [uuid(cf610f06
-2882-46f6
-abe5
-298568b664c4
)] enum { TF_GRAVITY_BACKWARD
= 0, TF_GRAVITY_FORWARD
= 1 } TfGravity
;
1017 typedef [uuid(1e512533
-bbdc
-4530-9a8e
-a1dc0af67468
)] enum { TF_SD_BACKWARD
= 0, TF_SD_FORWARD
= 1 } TfShiftDir
;
1019 const DWORD TF_HF_OBJECT
= 1;
1020 const DWORD TF_TF_MOVESTART
= 1;
1021 const DWORD TF_TF_IGNOREEND
= 2;
1022 const DWORD TF_ST_CORRECTION
= 1;
1023 const DWORD TF_IE_CORRECTION
= 1;
1025 typedef [uuid(49930d51
-7d93
-448c
-a48c
-fea5dac192b1
)] struct TF_HALTCOND
1027 ITfRange
*pHaltRange
;
1033 [in] TfEditCookie ec
,
1035 [out, size_is(cchMax
), length_is(*pcch
)] WCHAR
*pchText
,
1040 [in] TfEditCookie ec
,
1042 [in, size_is(cch
), unique] const WCHAR
*pchText
,
1045 HRESULT GetFormattedText
(
1046 [in] TfEditCookie ec
,
1047 [out] IDataObject
**ppDataObject
);
1049 HRESULT GetEmbedded
(
1050 [in] TfEditCookie ec
,
1051 [in] REFGUID rguidService
,
1053 [out, iid_is(riid
)] IUnknown
**ppunk
);
1055 HRESULT InsertEmbedded
(
1056 [in] TfEditCookie ec
,
1058 [in] IDataObject
*pDataObject
);
1061 [in] TfEditCookie ec
,
1064 [in, unique] const TF_HALTCOND
*pHalt
);
1067 [in] TfEditCookie ec
,
1070 [in, unique] const TF_HALTCOND
*pHalt
);
1072 HRESULT ShiftStartToRange
(
1073 [in] TfEditCookie ec
,
1074 [in] ITfRange
*pRange
,
1075 [in] TfAnchor aPos
);
1077 HRESULT ShiftEndToRange
(
1078 [in] TfEditCookie ec
,
1079 [in] ITfRange
*pRange
,
1080 [in] TfAnchor aPos
);
1082 HRESULT ShiftStartRegion
(
1083 [in] TfEditCookie ec
,
1084 [in] TfShiftDir dir
,
1085 [out] BOOL
*pfNoRegion
);
1087 HRESULT ShiftEndRegion
(
1088 [in] TfEditCookie ec
,
1089 [in] TfShiftDir dir
,
1090 [out] BOOL
*pfNoRegion
);
1093 [in] TfEditCookie ec
,
1094 [out] BOOL
*pfEmpty
);
1097 [in] TfEditCookie ec
,
1098 [in] TfAnchor aPos
);
1100 HRESULT IsEqualStart
(
1101 [in] TfEditCookie ec
,
1102 [in] ITfRange
*pWith
,
1104 [out] BOOL
*pfEqual
);
1107 [in] TfEditCookie ec
,
1108 [in] ITfRange
*pWith
,
1110 [out] BOOL
*pfEqual
);
1112 HRESULT CompareStart
(
1113 [in] TfEditCookie ec
,
1114 [in] ITfRange
*pWith
,
1116 [out] LONG *plResult
);
1119 [in] TfEditCookie ec
,
1120 [in] ITfRange
*pWith
,
1122 [out] LONG *plResult
);
1124 HRESULT AdjustForInsert
(
1125 [in] TfEditCookie ec
,
1126 [in] ULONG cchInsert
,
1127 [out] BOOL
*pfInsertOk
);
1130 [out] TfGravity
*pgStart
,
1131 [out] TfGravity
*pgEnd
);
1134 [in] TfEditCookie ec
,
1135 [in] TfGravity gStart
,
1136 [in] TfGravity gEnd
);
1139 [out] ITfRange
**ppClone
);
1142 [out] ITfContext
**ppContext
);
1147 uuid(057a6296
-029b
-4154-b79a
-0d461d4ea94c
),
1148 pointer_default(unique)
1150 interface ITfRangeACP
: ITfRange
1152 HRESULT GetExtent
([out] LONG *pacpAnchor
,
1155 HRESULT SetExtent
([in] LONG acpAnchor
,
1161 uuid(55ce16ba
-3014-41c1
-9ceb
-fade1446ac6c
),
1162 pointer_default(unique)
1164 interface ITfInsertAtSelection
: IUnknown
1166 const DWORD TF_IAS_NOQUERY
= 0x1;
1167 const DWORD TF_IAS_QUERYONLY
= 0x2;
1168 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION
= 0x80000000;
1170 HRESULT InsertTextAtSelection
(
1171 [in] TfEditCookie ec
,
1173 [in, size_is(cch
)] const WCHAR
*pchText
,
1175 [out] ITfRange
**ppRange
);
1177 HRESULT InsertEmbeddedAtSelection
(
1178 [in] TfEditCookie ec
,
1180 [in] IDataObject
*pDataObject
,
1181 [out] ITfRange
**ppRange
);
1186 uuid(6834b120
-88cb
-11d2
-bf45
-00105a2799b5
),
1187 pointer_default(unique)
1189 interface ITfPropertyStore
: IUnknown
1191 const DWORD TF_TU_CORRECTION
= 0x1;
1193 HRESULT GetType
([out] GUID
*pguid
);
1195 HRESULT GetDataType
([out] DWORD
*pdwReserved
);
1197 HRESULT GetData
([out] VARIANT *pvarValue
);
1199 HRESULT OnTextUpdated
(
1201 [in] ITfRange
*pRangeNew
,
1202 [out] BOOL
*pfAccept
);
1205 [in] ITfRange
*pRangeNew
,
1206 [out] BOOL
*pfFree
);
1209 [in] ITfRange
*pRangeThis
,
1210 [in] ITfRange
*pRangeNew
,
1211 [out] ITfPropertyStore
**ppPropStore
);
1214 [out] ITfPropertyStore
**pPropStore
);
1216 HRESULT GetPropertyRangeCreator
(
1217 [out] CLSID
*pclsid
);
1220 [in] IStream
*pStream
,
1226 uuid(f99d3f40
-8e32
-11d2
-bf46
-00105a2799b5
),
1227 pointer_default(unique)
1229 interface IEnumTfRanges
: IUnknown
1231 HRESULT Clone
([out] IEnumTfRanges
**ppEnum
);
1235 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfRange
**ppRange
,
1236 [out] ULONG
*pcFetched
);
1240 HRESULT Skip
(ULONG ulCount
);
1245 uuid(5efd22Ba
-7838-46cb
-88e2
-cadb14124f8f
),
1246 pointer_default(unique)
1248 interface IEnumITfCompositionView
: IUnknown
1250 HRESULT Clone
([out] IEnumITfCompositionView
**ppEnum
);
1254 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfCompositionView
**rgCompositionView
,
1255 [out] ULONG
*pcFetched
);
1259 HRESULT Skip
([in] ULONG ulCount
);
1264 uuid(20168d64
-5a8f
-4a5a
-b7bd
-cfa29f4D0fd9
),
1265 pointer_default(unique)
1267 interface ITfComposition
: IUnknown
1269 HRESULT GetRange
([out] ITfRange
**ppRange
);
1272 [in] TfEditCookie ecWrite
,
1273 [in] ITfRange
*pNewStart
);
1276 [in] TfEditCookie ecWrite
,
1277 [in] ITfRange
*pNewEnd
);
1279 HRESULT EndComposition
([in] TfEditCookie ecWrite
);
1284 uuid(a781718c
-579a
-4b15
-a280
-32b8577acc5e
),
1285 pointer_default(unique)
1287 interface ITfCompositionSink
: IUnknown
1289 HRESULT OnCompositionTerminated
(
1290 [in] TfEditCookie ecWrite
,
1291 [in] ITfComposition
*pComposition
);
1296 uuid(d40C8aae
-aC92
-4fc7
-9a11
-0ee0e23aa39b
),
1297 pointer_default(unique)
1299 interface ITfContextComposition
: IUnknown
1301 HRESULT StartComposition
(
1302 [in] TfEditCookie ecWrite
,
1303 [in] ITfRange
*pCompositionRange
,
1304 [in] ITfCompositionSink
*pSink
,
1305 [out] ITfComposition
**ppComposition
);
1307 HRESULT EnumCompositions
([out] IEnumITfCompositionView
**ppEnum
);
1309 HRESULT FindComposition
(
1310 [in] TfEditCookie ecRead
,
1311 [in] ITfRange
*pTestRange
,
1312 [out] IEnumITfCompositionView
**ppEnum
);
1314 HRESULT TakeOwnership
(
1315 [in] TfEditCookie ecWrite
,
1316 [in] ITfCompositionView
*pComposition
,
1317 [in] ITfCompositionSink
*pSink
,
1318 [out] ITfComposition
**ppComposition
);
1323 uuid(86462810-593b
-4916-9764-19c08e9ce110
),
1324 pointer_default(unique)
1326 interface ITfContextOwnerCompositionServices
: ITfContextComposition
1328 HRESULT TerminateComposition
([in] ITfCompositionView
*pComposition
);
1333 uuid(4ef89150
-0807-11d3
-8df0
-00105a2799b5
),
1334 pointer_default(unique)
1336 interface ITfPersistentPropertyLoaderACP
: IUnknown
1338 HRESULT LoadProperty
(
1339 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1340 [out] IStream
**ppStream
);
1345 uuid(b23eb630
-3e1c
-11d3
-a745
-0050040ab407
),
1346 pointer_default(unique)
1348 interface ITfContextOwnerServices
: IUnknown
1350 HRESULT OnLayoutChange
();
1352 HRESULT OnStatusChange
([in] DWORD dwFlags
);
1354 HRESULT OnAttributeChange
([in] REFGUID rguidAttribute
);
1357 [in] ITfProperty
*pProp
,
1358 [in] ITfRange
*pRange
,
1359 [out] TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1360 [in] IStream
*pStream
);
1362 HRESULT Unserialize
(
1363 [in] ITfProperty
*pProp
,
1364 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1365 [in] IStream
*pStream
,
1366 [in] ITfPersistentPropertyLoaderACP
*pLoader
);
1368 HRESULT ForceLoadProperty
([in] ITfProperty
*pProp
);
1370 HRESULT CreateRange
(
1373 [out] ITfRangeACP
**ppRange
);
1378 uuid(17d49a3d
-f8b8
-4b2f
-b254
-52319dd64c53
),
1379 pointer_default(unique)
1381 interface ITfReadOnlyProperty
: IUnknown
1383 HRESULT GetType
([out] GUID
*pguid
);
1386 [in] TfEditCookie ec
,
1387 [out] IEnumTfRanges
**ppEnum
,
1388 [in] ITfRange
*pTargetRange
);
1391 [in] TfEditCookie ec
,
1392 [in] ITfRange
*pRange
,
1393 [out] VARIANT *pvarValue
);
1395 HRESULT GetContext
([out] ITfContext
**ppContext
);
1400 uuid(e2449660
-9542-11d2
-bf46
-00105a2799b5
),
1401 pointer_default(unique)
1403 interface ITfProperty
: ITfReadOnlyProperty
1406 [in] TfEditCookie ec
,
1407 [in] ITfRange
*pRange
,
1408 [out] ITfRange
**ppRange
,
1409 [in] TfAnchor aPos
);
1411 HRESULT SetValueStore
(
1412 [in] TfEditCookie ec
,
1413 [in] ITfRange
*pRange
,
1414 [in] ITfPropertyStore
*pPropStore
);
1417 [in] TfEditCookie ec
,
1418 [in] ITfRange
*pRange
,
1419 [in] const VARIANT *pvarValue
);
1422 [in] TfEditCookie ec
,
1423 [in] ITfRange
*pRange
);
1428 uuid(bb08f7a9
-607a
-4384-8623-056892b64371
),
1429 pointer_default(unique)
1431 interface ITfCompartment
: IUnknown
1434 [in] TfClientId tid
,
1435 [in] const VARIANT *pvarValue
);
1438 [out] VARIANT *pvarValue
);
1443 uuid(7dcf57ac
-18ad
-438b
-824d
-979bffb74b7c
),
1444 pointer_default(unique)
1446 interface ITfCompartmentMgr
: IUnknown
1448 HRESULT GetCompartment
(
1450 [out] ITfCompartment
**ppcomp
);
1452 HRESULT ClearCompartment
(
1453 [in] TfClientId tid
,
1454 [in] REFGUID rguid
);
1456 HRESULT EnumCompartments
(
1457 [out] IEnumGUID
**ppEnum
);
1462 uuid(743abd5f
-f26d
-48df
-8cc5
-238492419b64
),
1463 pointer_default(unique)
1465 interface ITfCompartmentEventSink
: IUnknown
1468 [in] REFGUID rguid
);
1473 uuid(8f1a7ea6
-1654-4502-a86e
-b2902344d507
),
1474 pointer_default(unique)
1476 interface IEnumTfContexts
: IUnknown
1479 [out] IEnumTfContexts
**ppEnum
);
1483 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfContext
**rgContext
,
1484 [out] ULONG
*pcFetched
);
1489 [in] ULONG ulCount
);
1494 uuid(aa80e808
-2021-11d2
-93e0
-0060b067b86e
),
1495 pointer_default(unique)
1497 interface IEnumTfDocumentMgrs
: IUnknown
1500 [out] IEnumTfDocumentMgrs
**ppEnum
);
1504 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDocumentMgr
**rgDocumentMgr
,
1505 [out] ULONG
*pcFetched
);
1510 [in] ULONG ulCount
);
1515 uuid(73131f9c
-56a9
-49dd
-b0ee
-d046633f7528
),
1516 pointer_default(unique)
1518 interface ITfSourceSingle
: IUnknown
1520 HRESULT AdviseSingleSink
(
1521 [in] TfClientId tid
,
1523 [in, iid_is(riid
)] IUnknown
*punk
);
1525 HRESULT UnadviseSingleSink
(
1526 [in] TfClientId tid
,
1533 uuid(c0f1db0c
-3a20
-405c
-a303
-96b6010a885f
),
1534 pointer_default(unique)
1536 interface ITfThreadFocusSink
: IUnknown
1538 HRESULT OnSetThreadFocus
();
1540 HRESULT OnKillThreadFocus
();
1545 uuid(71c6e74e
-0f28
-11d8
-a82a
-00065b84435c
),
1546 pointer_default(unique)
1548 interface ITfInputProcessorProfileActivationSink
: IUnknown
1550 HRESULT OnActivated
(
1551 [in] DWORD dwProfileType
,
1553 [in] REFCLSID clsid
,
1555 [in] REFGUID guidProfile
,
1557 [in] DWORD dwFlags
);