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);")
37 cpp_quote
("EXTERN_C const GUID GUID_PROP_TEXTOWNER;")
38 cpp_quote
("DEFINE_GUID(GUID_PROP_ATTRIBUTE,0x34b45670,0x7526,0x11d2,0xa1,0x47,0x00,0x10,0x5a,0x27,0x99,0xb5);")
39 cpp_quote
("EXTERN_C const GUID GUID_PROP_LANGID;")
40 cpp_quote
("EXTERN_C const GUID GUID_PROP_READING;")
41 cpp_quote
("EXTERN_C const GUID GUID_PROP_COMPOSING;")
43 cpp_quote
("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
44 cpp_quote
("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
45 cpp_quote
("EXTERN_C const CLSID CLSID_TF_LangBarMgr;")
46 cpp_quote
("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
47 cpp_quote
("EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr;")
49 /* GUIDs for Compartments */
50 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")
51 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;")
52 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;")
53 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;")
54 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;")
55 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;")
56 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;")
57 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;")
58 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;")
60 /* GUIDs for Categories */
61 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
62 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
63 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
64 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
66 typedef [uuid(7213778c
-7bb0
-4270-b050
-6189ee594e97
)] DWORD TfEditCookie
;
67 typedef [uuid(de403c21
-89fd
-4f85
-8b87
-64584d063fbc
)] DWORD TfClientId
;
68 typedef [uuid(88a9c478
-f3ec
-4763-8345-cd9250443f8d
)] DWORD TfGuidAtom
;
70 cpp_quote
("#define TF_MOD_ALT 0x0001")
71 cpp_quote
("#define TF_MOD_CONTROL 0x0002")
72 cpp_quote
("#define TF_MOD_SHIFT 0x0004")
73 cpp_quote
("#define TF_MOD_RALT 0x0008")
74 cpp_quote
("#define TF_MOD_RCONTROL 0x0010")
75 cpp_quote
("#define TF_MOD_RSHIFT 0x0020")
76 cpp_quote
("#define TF_MOD_LALT 0x0040")
77 cpp_quote
("#define TF_MOD_LCONTROL 0x0080")
78 cpp_quote
("#define TF_MOD_LSHIFT 0x0100")
79 cpp_quote
("#define TF_MOD_ON_KEYUP 0x0200")
80 cpp_quote
("#define TF_MOD_IGNORE_ALL_MODIFIER 0x0400")
82 cpp_quote
("#define TF_PROFILETYPE_INPUTPROCESSOR 0x0001")
83 cpp_quote
("#define TF_PROFILETYPE_KEYBOARDLAYOUT 0x0002")
85 interface ITfDocumentMgr
;
87 interface IEnumTfDocumentMgrs
;
88 interface IEnumTfContexts
;
89 interface ITfFunctionProvider
;
90 interface IEnumTfFunctionProviders
;
91 interface ITfCompartmentMgr
;
92 interface ITfEditSession
;
94 interface ITfContextView
;
95 interface IEnumTfContextViews
;
96 interface ITfProperty
;
97 interface ITfReadOnlyProperty
;
98 interface IEnumTfProperties
;
99 interface ITfRangeBackup
;
100 interface IEnumTfLanguageProfiles
;
101 interface ITfEditRecord
;
102 interface ITfCompositionView
;
103 interface ITfKeyEventSink
;
106 typedef [uuid(4f5d560f
-5ab5
-4dde
-8c4d
-404592857ab0
)] UINT_PTR HKL
;
109 typedef [uuid(e26d9e1d
-691e-4f29
-90d7
-338dcf1f8cef
)] struct TF_PERSISTENT_PROPERTY_HEADER_ACP
117 } TF_PERSISTENT_PROPERTY_HEADER_ACP
;
119 typedef [uuid(e1b5808d
-1e46
-4c19
-84dc
-68c5f5978cc8
)] struct TF_LANGUAGEPROFILE
126 } TF_LANGUAGEPROFILE
;
128 typedef [uuid(77c12f95
-b783
-450d
-879f
-1cd2362c6521
)] struct TF_PRESERVEDKEY
134 typedef [uuid(5a886226
-ae9a
-489b
-b991
-2b1e25ee59a9
)] enum { TF_ANCHOR_START
= 0, TF_ANCHOR_END
= 1 } TfAnchor
;
138 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
139 pointer_default(unique)
141 interface ITfThreadMgr
: IUnknown
144 [out] TfClientId
*ptid
);
146 HRESULT Deactivate
();
148 HRESULT CreateDocumentMgr
(
149 [out] ITfDocumentMgr
**ppdim
);
151 HRESULT EnumDocumentMgrs
(
152 [out] IEnumTfDocumentMgrs
**ppEnum
);
155 [out] ITfDocumentMgr
**ppdimFocus
);
158 [in] ITfDocumentMgr
*pdimFocus
);
160 HRESULT AssociateFocus
(
162 [in, unique] ITfDocumentMgr
*pdimNew
,
163 [out] ITfDocumentMgr
**ppdimPrev
);
165 HRESULT IsThreadFocus
(
166 [out] BOOL
*pfThreadFocus
);
168 HRESULT GetFunctionProvider
(
170 [out] ITfFunctionProvider
**ppFuncProv
);
172 HRESULT EnumFunctionProviders
(
173 [out] IEnumTfFunctionProviders
**ppEnum
);
175 HRESULT GetGlobalCompartment
(
176 [out] ITfCompartmentMgr
**ppCompMgr
);
181 uuid(d7540241
-f9a1
-4364-befc
-dbcd2c4395b7
),
182 pointer_default(unique)
184 interface ITfCompositionView
: IUnknown
186 HRESULT GetOwnerClsid
([out] CLSID
*pclsid
);
188 HRESULT GetRange
([out] ITfRange
**ppRange
);
193 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
194 pointer_default(unique)
196 interface ITfDocumentMgr
: IUnknown
198 HRESULT CreateContext
(
199 [in] TfClientId tidOwner
,
201 [in, unique] IUnknown
*punk
,
202 [out] ITfContext
**ppic
,
203 [out] TfEditCookie
*pecTextStore
);
206 [in] ITfContext
*pic
);
208 const DWORD TF_POPF_ALL
= 0x0001;
214 [out] ITfContext
**ppic
);
217 [out] ITfContext
**ppic
);
219 HRESULT EnumContexts
(
220 [out] IEnumTfContexts
**ppEnum
);
225 uuid(aa80e7fd
-2021-11d2
-93e0
-0060b067b86e
),
226 pointer_default(unique)
228 interface ITfContext
: IUnknown
230 const DWORD TF_ES_ASYNCDONTCARE
= 0x0;
231 const DWORD TF_ES_SYNC
= 0x1;
232 const DWORD TF_ES_READ
= 0x2;
233 const DWORD TF_ES_READWRITE
= 0x6;
234 const DWORD TF_ES_ASYNC
= 0x8;
236 HRESULT RequestEditSession
(
238 [in] ITfEditSession
*pes
,
240 [out] HRESULT *phrSession
);
242 HRESULT InWriteSession
(
244 [out] BOOL
*pfWriteSession
);
246 typedef [uuid(1690be9b
-d3e9
-49f6
-8d8b
-51b905af4c43
)] enum { TF_AE_NONE
, TF_AE_START
, TF_AE_END
} TfActiveSelEnd
;
248 typedef [uuid(36ae42a4
-6989-4bdc
-b48a
-6137b7bf2e42
)] struct TF_SELECTIONSTYLE
254 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
257 TF_SELECTIONSTYLE style
;
260 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
262 HRESULT GetSelection
(
263 [in] TfEditCookie ec
,
266 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
267 [out] ULONG
*pcFetched
);
269 HRESULT SetSelection
(
270 [in] TfEditCookie ec
,
272 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
275 [in] TfEditCookie ec
,
276 [out] ITfRange
**ppStart
);
279 [in] TfEditCookie ec
,
280 [out] ITfRange
**ppEnd
);
282 typedef [uuid(bc7d979a
-846a
-444d
-afef
-0a9bfa82b961
)] TS_STATUS TF_STATUS
;
283 const DWORD TF_SD_READONLY
= TS_SD_READONLY
;
284 const DWORD TF_SD_LOADING
= TS_SD_LOADING
;
285 const DWORD TF_SS_DISJOINTSEL
= TS_SS_DISJOINTSEL
;
286 const DWORD TF_SS_REGIONS
= TS_SS_REGIONS
;
287 const DWORD TF_SS_TRANSITORY
= TS_SS_TRANSITORY
;
290 HRESULT GetActiveView
(
291 [out] ITfContextView
**ppView
);
294 [out] IEnumTfContextViews
**ppEnum
);
297 [out] TF_STATUS
*pdcs
);
300 [in] REFGUID guidProp
,
301 [out] ITfProperty
**ppProp
);
303 HRESULT GetAppProperty
(
304 [in] REFGUID guidProp
,
305 [out] ITfReadOnlyProperty
**ppProp
);
307 HRESULT TrackProperties
(
308 [in, size_is(cProp
)] const GUID
**prgProp
,
310 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
312 [out] ITfReadOnlyProperty
**ppProperty
);
314 HRESULT EnumProperties
(
315 [out] IEnumTfProperties
**ppEnum
);
317 HRESULT GetDocumentMgr
(
318 [out] ITfDocumentMgr
**ppDm
);
320 HRESULT CreateRangeBackup
(
321 [in] TfEditCookie ec
,
322 [in] ITfRange
*pRange
,
323 [out] ITfRangeBackup
**ppBackup
);
329 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
330 pointer_default(unique)
332 interface ITfSource
: IUnknown
336 [in, iid_is(riid
)] IUnknown
*punk
,
337 [out] DWORD
*pdwCookie
);
339 HRESULT UnadviseSink
(
340 [in] DWORD dwCookie
);
346 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
347 pointer_default(unique)
349 interface ITfInputProcessorProfiles
: IUnknown
352 [in] REFCLSID rclsid
);
355 [in] REFCLSID rclsid
);
357 HRESULT AddLanguageProfile
(
358 [in] REFCLSID rclsid
,
360 [in] REFGUID guidProfile
,
361 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
363 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
365 [in] ULONG uIconIndex
);
367 HRESULT RemoveLanguageProfile
(
368 [in] REFCLSID rclsid
,
370 [in] REFGUID guidProfile
);
372 HRESULT EnumInputProcessorInfo
(
373 [out] IEnumGUID
**ppEnum
);
375 HRESULT GetDefaultLanguageProfile
(
379 [out] GUID
*pguidProfile
);
381 HRESULT SetDefaultLanguageProfile
(
383 [in] REFCLSID rclsid
,
384 [in] REFGUID guidProfiles
);
386 HRESULT ActivateLanguageProfile
(
387 [in] REFCLSID rclsid
,
389 [in] REFGUID guidProfiles
);
391 HRESULT GetActiveLanguageProfile
(
392 [in] REFCLSID rclsid
,
393 [out] LANGID
*plangid
,
394 [out] GUID
*pguidProfile
);
396 HRESULT GetLanguageProfileDescription
(
397 [in] REFCLSID rclsid
,
399 [in] REFGUID guidProfile
,
400 [out] BSTR *pbstrProfile
);
402 HRESULT GetCurrentLanguage
(
403 [out] LANGID
*plangid
);
405 HRESULT ChangeCurrentLanguage
(
408 HRESULT GetLanguageList
(
409 [out] LANGID
**ppLangId
,
410 [out] ULONG
*pulCount
);
412 HRESULT EnumLanguageProfiles
(
414 [out] IEnumTfLanguageProfiles
**ppEnum
);
416 HRESULT EnableLanguageProfile
(
417 [in] REFCLSID rclsid
,
419 [in] REFGUID guidProfile
,
422 HRESULT IsEnabledLanguageProfile
(
423 [in] REFCLSID rclsid
,
425 [in] REFGUID guidProfile
,
426 [out] BOOL
*pfEnable
);
428 HRESULT EnableLanguageProfileByDefault
(
429 [in] REFCLSID rclsid
,
431 [in] REFGUID guidProfile
,
434 HRESULT SubstituteKeyboardLayout
(
435 [in] REFCLSID rclsid
,
437 [in] REFGUID guidProfile
,
441 typedef [uuid(44d2825a
-10e5
-43b2
-877f
-6cb2f43b7e7e
)]
442 struct TF_INPUTPROCESSORPROFILE
{
452 } TF_INPUTPROCESSORPROFILE
;
456 uuid(71c6e74d
-0f28
-11d8
-a82a
-00065b84435c
),
457 pointer_default(unique)
459 interface IEnumTfInputProcessorProfiles
: IUnknown
462 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
466 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_INPUTPROCESSORPROFILE
*pProfile
,
467 [out] ULONG
*pcFetch
);
477 uuid(71c6e74c
-0f28
-11d8
-a82a
-00065b84435c
),
478 pointer_default(unique)
480 interface ITfInputProcessorProfileMgr
: IUnknown
482 HRESULT ActivateProfile
(
483 [in] DWORD dwProfileType
,
486 [in] REFGUID guidProfile
,
490 HRESULT DeactivateProfile
(
491 [in] DWORD dwProfileType
,
494 [in] REFGUID guidProfile
,
499 [in] DWORD dwProfileType
,
502 [in] REFGUID guidProfile
,
504 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
507 HRESULT EnumProfiles
(
509 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
511 HRESULT ReleaseInputProcessor
(
512 [in] REFCLSID rclsid
,
515 HRESULT RegisterProfile
(
516 [in] REFCLSID rclsid
,
518 [in] REFGUID guidProfile
,
519 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
521 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
523 [in] ULONG uIconIndex
,
524 [in] HKL hklsubstitute
,
525 [in] DWORD dwPreferredLayout
,
526 [in] BOOL bEnabledByDefault
,
529 HRESULT UnregisterProfile
(
530 [in] REFCLSID rclsid
,
532 [in] REFGUID guidProfile
,
535 HRESULT GetActiveProfile
(
537 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
540 typedef [uuid(c4cc07f1
-80cc
-4a7b
-bc54
-98512782cbe3
)]
549 typedef [uuid(d9b92e21
-084a
-401b
-9c64
-1e6dad91a1ab
)]
556 typedef [uuid(90d0cb5e
-6520
-4a0f
-b47c
-c39bd955f0d6
)]
558 TF_DA_COLORTYPE type
;
559 [switch_type(TF_DA_COLORTYPE
), switch_is(type
)]
561 [case(TF_CT_SYSCOLOR
)] int nIndex
;
562 [case(TF_CT_COLORREF
)] COLORREF cr
;
566 typedef [uuid(33d2fe4b
-6c24
-4f67
-8d75
-3bc1819e4126
)]
569 TF_ATTR_TARGET_CONVERTED
= 1,
570 TF_ATTR_CONVERTED
= 2,
571 TF_ATTR_TARGET_NOTCONVERTED
= 3,
572 TF_ATTR_INPUT_ERROR
= 4,
573 TF_ATTR_FIXEDCONVERTED
= 5,
577 typedef [uuid(1bf1c305
-419b
-4182-a4d2
-9bfadc3f021f
)]
578 struct TF_DISPLAYATTRIBUTE
{
581 TF_DA_LINESTYLE lsStyle
;
584 TF_DA_ATTR_INFO bAttr
;
585 } TF_DISPLAYATTRIBUTE
;
589 uuid(70528852-2f26
-4aea
-8c96
-215150578932),
590 pointer_default(unique)
592 interface ITfDisplayAttributeInfo
: IUnknown
594 HRESULT GetGUID
([out] GUID
*pguid
);
596 HRESULT GetDescription
([out] BSTR *pbstrDesc
);
598 HRESULT GetAttributeInfo
([out] TF_DISPLAYATTRIBUTE
*pda
);
600 HRESULT SetAttributeInfo
([in] const TF_DISPLAYATTRIBUTE
*pda
);
607 uuid(7cef04d7
-cb75
-4e80
-a7ab
-5f5bc7d332de
),
608 pointer_default(unique)
610 interface IEnumTfDisplayAttributeInfo
: IUnknown
612 HRESULT Clone
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
616 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDisplayAttributeInfo
**rgInfo
,
617 [out] ULONG
*pcFetched
);
621 HRESULT Skip
([in] ULONG ulCount
);
627 uuid(8ded7393
-5db1
-475c
-9e71
-a39111b0ff67
),
628 pointer_default(unique)
630 interface ITfDisplayAttributeMgr
: IUnknown
632 HRESULT OnUpdateInfo
();
634 HRESULT EnumDisplayAttributeInfo
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
636 HRESULT GetDisplayAttributeInfo
(
638 [out] ITfDisplayAttributeInfo
**ppInfo
,
639 [out] CLSID
*pclsidOwner
);
646 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
647 pointer_default(unique)
649 interface ITfCategoryMgr
: IUnknown
651 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
655 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
659 HRESULT EnumCategoriesInItem
([in] REFGUID rguid
,
660 [out] IEnumGUID
**ppEnum
);
662 HRESULT EnumItemsInCategory
([in] REFGUID rcatid
,
663 [out] IEnumGUID
**ppEnum
);
665 HRESULT FindClosestCategory
([in] REFGUID rguid
,
667 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
670 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
672 [in, size_is(cch
)] const WCHAR
*pchDesc
,
675 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
678 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
679 [out] BSTR *pbstrDesc
);
681 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
685 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
688 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
691 HRESULT RegisterGUID
([in] REFGUID rguid
,
692 [out] TfGuidAtom
*pguidatom
);
694 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
697 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
699 [out] BOOL
*pfEqual
);
704 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
705 pointer_default(unique)
707 interface ITfTextEditSink
: IUnknown
710 [in] ITfContext
*pic
,
711 [in] TfEditCookie ecReadOnly
,
712 [in] ITfEditRecord
*pEditRecord
);
717 uuid(5F20AA40
-B57A
-4F34
-96AB
-3576F377CC79
),
718 pointer_default(unique)
720 interface ITfContextOwnerCompositionSink
: IUnknown
722 HRESULT OnStartComposition
(
723 [in] ITfCompositionView
*pComposition
,
726 HRESULT OnUpdateComposition
(
727 [in] ITfCompositionView
*pComposition
,
728 [in] ITfRange
*pRangeNew
);
730 HRESULT OnEndComposition
(
731 [in] ITfCompositionView
*pComposition
);
736 uuid(3d61bf11
-ac5f
-42c8
-a4cb
-931bcc28c744
),
737 pointer_default(unique)
739 interface IEnumTfLanguageProfiles
: IUnknown
742 [out] IEnumTfLanguageProfiles
**ppEnum
);
746 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_LANGUAGEPROFILE
*pProfile
,
747 [out] ULONG
*pcFetch
);
758 uuid(aa80e7f7
-2021-11d2
-93e0
-0060b067b86e
),
759 pointer_default(unique)
761 interface ITfTextInputProcessor
: IUnknown
764 [in] ITfThreadMgr
*ptim
,
765 [in] TfClientId tid
);
767 HRESULT Deactivate
();
772 uuid(aa80e80e
-2021
-11d2
-93e0
-0060b067b86e
),
773 pointer_default(unique)
775 interface ITfThreadMgrEventSink
: IUnknown
777 HRESULT OnInitDocumentMgr
(
778 [in] ITfDocumentMgr
*pdim
);
780 HRESULT OnUninitDocumentMgr
(
781 [in] ITfDocumentMgr
*pdim
);
784 [in] ITfDocumentMgr
*pdimFocus
,
785 [in] ITfDocumentMgr
*pdimPrevFocus
);
787 HRESULT OnPushContext
(
788 [in] ITfContext
*pic
);
790 HRESULT OnPopContext
(
791 [in] ITfContext
*pic
);
797 uuid(aa80e7f0
-2021-11d2
-93e0
-0060b067b86e
),
798 pointer_default(unique)
800 interface ITfKeystrokeMgr
: IUnknown
802 HRESULT AdviseKeyEventSink
(
804 [in] ITfKeyEventSink
*pSink
,
805 [in] BOOL fForeground
);
807 HRESULT UnadviseKeyEventSink
(
808 [in] TfClientId tid
);
810 HRESULT GetForeground
(
811 [out] CLSID
*pclsid
);
816 [out] BOOL
*pfEaten
);
821 [out] BOOL
*pfEaten
);
826 [out] BOOL
*pfEaten
);
831 [out] BOOL
*pfEaten
);
833 HRESULT GetPreservedKey
(
834 [in] ITfContext
*pic
,
835 [in] const TF_PRESERVEDKEY
*pprekey
,
838 HRESULT IsPreservedKey
(
840 [in] const TF_PRESERVEDKEY
*pprekey
,
841 [out] BOOL
*pfRegistered
);
846 [in] const TF_PRESERVEDKEY
*prekey
,
847 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
850 HRESULT UnpreserveKey
(
852 [in] const TF_PRESERVEDKEY
*pprekey
);
854 HRESULT SetPreservedKeyDescription
(
856 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
859 HRESULT GetPreservedKeyDescription
(
861 [out] BSTR *pbstrDesc
);
863 HRESULT SimulatePreservedKey
(
864 [in] ITfContext
*pic
,
866 [out] BOOL
*pfEaten
);
872 uuid(aa80e7f5
-2021-11d2
-93e0
-0060b067b86e
),
873 pointer_default(unique)
875 interface ITfKeyEventSink
: IUnknown
878 [in] BOOL fForeground
);
880 HRESULT OnTestKeyDown
(
881 [in] ITfContext
*pic
,
884 [out] BOOL
*pfEaten
);
887 [in] ITfContext
*pic
,
890 [out] BOOL
*pfEaten
);
893 [in] ITfContext
*pic
,
896 [out] BOOL
*pfEaten
);
899 [in] ITfContext
*pic
,
902 [out] BOOL
*pfEaten
);
904 HRESULT OnPreservedKey
(
905 [in] ITfContext
*pic
,
907 [out] BOOL
*pfEaten
);
913 uuid(8f1b8ad8
-0b6b
-4874-90c5
-bd76011e8f7c
),
914 pointer_default(unique)
916 interface ITfMessagePump
: IUnknown
918 HRESULT PeekMessageA
(
921 [in] UINT wMsgFilterMin
,
922 [in] UINT wMsgFilterMax
,
923 [in] UINT wRemoveMsg
,
924 [out] BOOL
*pfResult
);
929 [in] UINT wMsgFilterMin
,
930 [in] UINT wMsgFilterMax
,
931 [out] BOOL
*pfResult
);
933 HRESULT PeekMessageW
(
936 [in] UINT wMsgFilterMin
,
937 [in] UINT wMsgFilterMax
,
938 [in] UINT wRemoveMsg
,
939 [out] BOOL
*pfResult
);
944 [in] UINT wMsgFilterMin
,
945 [in] UINT wMsgFilterMax
,
946 [out] BOOL
*pfResult
);
952 uuid(d60a7b49
-1b9f
-4be2
-b702
-47e9dc05dec3
),
953 pointer_default(unique)
955 interface ITfClientId
: IUnknown
958 [in] REFCLSID rclsid
,
959 [out] TfClientId
*ptid
);
964 uuid(43c9fe15
-f494
-4c17
-9de2
-b8a4ac350aa8
),
965 pointer_default(unique)
967 interface ITfLanguageProfileNotifySink
: IUnknown
969 HRESULT OnLanguageChange
(
971 [out] BOOL
*pfAccept
);
973 HRESULT OnLanguageChanged
();
978 uuid(aa80e803
-2021-11d2
-93e0
-0060b067b86e
),
979 pointer_default(unique)
981 interface ITfEditSession
: IUnknown
983 HRESULT DoEditSession
(
984 [in] TfEditCookie ec
);
989 uuid(aa80e7ff
-2021-11d2
-93e0
-0060b067b86e
),
990 pointer_default(unique)
992 interface ITfRange
: IUnknown
994 const WCHAR TF_CHAR_EMBEDDED
= TS_CHAR_EMBEDDED
;
996 typedef [uuid(cf610f06
-2882-46f6
-abe5
-298568b664c4
)] enum { TF_GRAVITY_BACKWARD
= 0, TF_GRAVITY_FORWARD
= 1 } TfGravity
;
998 typedef [uuid(1e512533
-bbdc
-4530-9a8e
-a1dc0af67468
)] enum { TF_SD_BACKWARD
= 0, TF_SD_FORWARD
= 1 } TfShiftDir
;
1000 const DWORD TF_HF_OBJECT
= 1;
1001 const DWORD TF_TF_MOVESTART
= 1;
1002 const DWORD TF_TF_IGNOREEND
= 2;
1003 const DWORD TF_ST_CORRECTION
= 1;
1004 const DWORD TF_IE_CORRECTION
= 1;
1006 typedef [uuid(49930d51
-7d93
-448c
-a48c
-fea5dac192b1
)] struct TF_HALTCOND
1008 ITfRange
*pHaltRange
;
1014 [in] TfEditCookie ec
,
1016 [out, size_is(cchMax
), length_is(*pcch
)] WCHAR
*pchText
,
1021 [in] TfEditCookie ec
,
1023 [in, size_is(cch
), unique] const WCHAR
*pchText
,
1026 HRESULT GetFormattedText
(
1027 [in] TfEditCookie ec
,
1028 [out] IDataObject
**ppDataObject
);
1030 HRESULT GetEmbedded
(
1031 [in] TfEditCookie ec
,
1032 [in] REFGUID rguidService
,
1034 [out, iid_is(riid
)] IUnknown
**ppunk
);
1036 HRESULT InsertEmbedded
(
1037 [in] TfEditCookie ec
,
1039 [in] IDataObject
*pDataObject
);
1042 [in] TfEditCookie ec
,
1045 [in, unique] const TF_HALTCOND
*pHalt
);
1048 [in] TfEditCookie ec
,
1051 [in, unique] const TF_HALTCOND
*pHalt
);
1053 HRESULT ShiftStartToRange
(
1054 [in] TfEditCookie ec
,
1055 [in] ITfRange
*pRange
,
1056 [in] TfAnchor aPos
);
1058 HRESULT ShiftEndToRange
(
1059 [in] TfEditCookie ec
,
1060 [in] ITfRange
*pRange
,
1061 [in] TfAnchor aPos
);
1063 HRESULT ShiftStartRegion
(
1064 [in] TfEditCookie ec
,
1065 [in] TfShiftDir dir
,
1066 [out] BOOL
*pfNoRegion
);
1068 HRESULT ShiftEndRegion
(
1069 [in] TfEditCookie ec
,
1070 [in] TfShiftDir dir
,
1071 [out] BOOL
*pfNoRegion
);
1074 [in] TfEditCookie ec
,
1075 [out] BOOL
*pfEmpty
);
1078 [in] TfEditCookie ec
,
1079 [in] TfAnchor aPos
);
1081 HRESULT IsEqualStart
(
1082 [in] TfEditCookie ec
,
1083 [in] ITfRange
*pWith
,
1085 [out] BOOL
*pfEqual
);
1088 [in] TfEditCookie ec
,
1089 [in] ITfRange
*pWith
,
1091 [out] BOOL
*pfEqual
);
1093 HRESULT CompareStart
(
1094 [in] TfEditCookie ec
,
1095 [in] ITfRange
*pWith
,
1097 [out] LONG *plResult
);
1100 [in] TfEditCookie ec
,
1101 [in] ITfRange
*pWith
,
1103 [out] LONG *plResult
);
1105 HRESULT AdjustForInsert
(
1106 [in] TfEditCookie ec
,
1107 [in] ULONG cchInsert
,
1108 [out] BOOL
*pfInsertOk
);
1111 [out] TfGravity
*pgStart
,
1112 [out] TfGravity
*pgEnd
);
1115 [in] TfEditCookie ec
,
1116 [in] TfGravity gStart
,
1117 [in] TfGravity gEnd
);
1120 [out] ITfRange
**ppClone
);
1123 [out] ITfContext
**ppContext
);
1128 uuid(057a6296
-029b
-4154-b79a
-0d461d4ea94c
),
1129 pointer_default(unique)
1131 interface ITfRangeACP
: ITfRange
1133 HRESULT GetExtent
([out] LONG *pacpAnchor
,
1136 HRESULT SetExtent
([in] LONG acpAnchor
,
1142 uuid(55ce16ba
-3014-41c1
-9ceb
-fade1446ac6c
),
1143 pointer_default(unique)
1145 interface ITfInsertAtSelection
: IUnknown
1147 const DWORD TF_IAS_NOQUERY
= 0x1;
1148 const DWORD TF_IAS_QUERYONLY
= 0x2;
1149 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION
= 0x80000000;
1151 HRESULT InsertTextAtSelection
(
1152 [in] TfEditCookie ec
,
1154 [in, size_is(cch
)] const WCHAR
*pchText
,
1156 [out] ITfRange
**ppRange
);
1158 HRESULT InsertEmbeddedAtSelection
(
1159 [in] TfEditCookie ec
,
1161 [in] IDataObject
*pDataObject
,
1162 [out] ITfRange
**ppRange
);
1167 uuid(6834b120
-88cb
-11d2
-bf45
-00105a2799b5
),
1168 pointer_default(unique)
1170 interface ITfPropertyStore
: IUnknown
1172 const DWORD TF_TU_CORRECTION
= 0x1;
1174 HRESULT GetType
([out] GUID
*pguid
);
1176 HRESULT GetDataType
([out] DWORD
*pdwReserved
);
1178 HRESULT GetData
([out] VARIANT *pvarValue
);
1180 HRESULT OnTextUpdated
(
1182 [in] ITfRange
*pRangeNew
,
1183 [out] BOOL
*pfAccept
);
1186 [in] ITfRange
*pRangeNew
,
1187 [out] BOOL
*pfFree
);
1190 [in] ITfRange
*pRangeThis
,
1191 [in] ITfRange
*pRangeNew
,
1192 [out] ITfPropertyStore
**ppPropStore
);
1195 [out] ITfPropertyStore
**pPropStore
);
1197 HRESULT GetPropertyRangeCreator
(
1198 [out] CLSID
*pclsid
);
1201 [in] IStream
*pStream
,
1207 uuid(f99d3f40
-8e32
-11d2
-bf46
-00105a2799b5
),
1208 pointer_default(unique)
1210 interface IEnumTfRanges
: IUnknown
1212 HRESULT Clone
([out] IEnumTfRanges
**ppEnum
);
1216 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfRange
**ppRange
,
1217 [out] ULONG
*pcFetched
);
1221 HRESULT Skip
(ULONG ulCount
);
1226 uuid(5efd22Ba
-7838-46cb
-88e2
-cadb14124f8f
),
1227 pointer_default(unique)
1229 interface IEnumITfCompositionView
: IUnknown
1231 HRESULT Clone
([out] IEnumITfCompositionView
**ppEnum
);
1235 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfCompositionView
**rgCompositionView
,
1236 [out] ULONG
*pcFetched
);
1240 HRESULT Skip
([in] ULONG ulCount
);
1245 uuid(20168d64
-5a8f
-4a5a
-b7bd
-cfa29f4D0fd9
),
1246 pointer_default(unique)
1248 interface ITfComposition
: IUnknown
1250 HRESULT GetRange
([out] ITfRange
**ppRange
);
1253 [in] TfEditCookie ecWrite
,
1254 [in] ITfRange
*pNewStart
);
1257 [in] TfEditCookie ecWrite
,
1258 [in] ITfRange
*pNewEnd
);
1260 HRESULT EndComposition
([in] TfEditCookie ecWrite
);
1265 uuid(a781718c
-579a
-4b15
-a280
-32b8577acc5e
),
1266 pointer_default(unique)
1268 interface ITfCompositionSink
: IUnknown
1270 HRESULT OnCompositionTerminated
(
1271 [in] TfEditCookie ecWrite
,
1272 [in] ITfComposition
*pComposition
);
1277 uuid(d40C8aae
-aC92
-4fc7
-9a11
-0ee0e23aa39b
),
1278 pointer_default(unique)
1280 interface ITfContextComposition
: IUnknown
1282 HRESULT StartComposition
(
1283 [in] TfEditCookie ecWrite
,
1284 [in] ITfRange
*pCompositionRange
,
1285 [in] ITfCompositionSink
*pSink
,
1286 [out] ITfComposition
**ppComposition
);
1288 HRESULT EnumCompositions
([out] IEnumITfCompositionView
**ppEnum
);
1290 HRESULT FindComposition
(
1291 [in] TfEditCookie ecRead
,
1292 [in] ITfRange
*pTestRange
,
1293 [out] IEnumITfCompositionView
**ppEnum
);
1295 HRESULT TakeOwnership
(
1296 [in] TfEditCookie ecWrite
,
1297 [in] ITfCompositionView
*pComposition
,
1298 [in] ITfCompositionSink
*pSink
,
1299 [out] ITfComposition
**ppComposition
);
1304 uuid(86462810-593b
-4916-9764-19c08e9ce110
),
1305 pointer_default(unique)
1307 interface ITfContextOwnerCompositionServices
: ITfContextComposition
1309 HRESULT TerminateComposition
([in] ITfCompositionView
*pComposition
);
1314 uuid(4ef89150
-0807-11d3
-8df0
-00105a2799b5
),
1315 pointer_default(unique)
1317 interface ITfPersistentPropertyLoaderACP
: IUnknown
1319 HRESULT LoadProperty
(
1320 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1321 [out] IStream
**ppStream
);
1326 uuid(b23eb630
-3e1c
-11d3
-a745
-0050040ab407
),
1327 pointer_default(unique)
1329 interface ITfContextOwnerServices
: IUnknown
1331 HRESULT OnLayoutChange
();
1333 HRESULT OnStatusChange
([in] DWORD dwFlags
);
1335 HRESULT OnAttributeChange
([in] REFGUID rguidAttribute
);
1338 [in] ITfProperty
*pProp
,
1339 [in] ITfRange
*pRange
,
1340 [out] TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1341 [in] IStream
*pStream
);
1343 HRESULT Unserialize
(
1344 [in] ITfProperty
*pProp
,
1345 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1346 [in] IStream
*pStream
,
1347 [in] ITfPersistentPropertyLoaderACP
*pLoader
);
1349 HRESULT ForceLoadProperty
([in] ITfProperty
*pProp
);
1351 HRESULT CreateRange
(
1354 [out] ITfRangeACP
**ppRange
);
1359 uuid(17d49a3d
-f8b8
-4b2f
-b254
-52319dd64c53
),
1360 pointer_default(unique)
1362 interface ITfReadOnlyProperty
: IUnknown
1364 HRESULT GetType
([out] GUID
*pguid
);
1367 [in] TfEditCookie ec
,
1368 [out] IEnumTfRanges
**ppEnum
,
1369 [in] ITfRange
*pTargetRange
);
1372 [in] TfEditCookie ec
,
1373 [in] ITfRange
*pRange
,
1374 [out] VARIANT *pvarValue
);
1376 HRESULT GetContext
([out] ITfContext
**ppContext
);
1381 uuid(e2449660
-9542-11d2
-bf46
-00105a2799b5
),
1382 pointer_default(unique)
1384 interface ITfProperty
: ITfReadOnlyProperty
1387 [in] TfEditCookie ec
,
1388 [in] ITfRange
*pRange
,
1389 [out] ITfRange
**ppRange
,
1390 [in] TfAnchor aPos
);
1392 HRESULT SetValueStore
(
1393 [in] TfEditCookie ec
,
1394 [in] ITfRange
*pRange
,
1395 [in] ITfPropertyStore
*pPropStore
);
1398 [in] TfEditCookie ec
,
1399 [in] ITfRange
*pRange
,
1400 [in] const VARIANT *pvarValue
);
1403 [in] TfEditCookie ec
,
1404 [in] ITfRange
*pRange
);
1409 uuid(bb08f7a9
-607a
-4384-8623-056892b64371
),
1410 pointer_default(unique)
1412 interface ITfCompartment
: IUnknown
1415 [in] TfClientId tid
,
1416 [in] const VARIANT *pvarValue
);
1419 [out] VARIANT *pvarValue
);
1424 uuid(7dcf57ac
-18ad
-438b
-824d
-979bffb74b7c
),
1425 pointer_default(unique)
1427 interface ITfCompartmentMgr
: IUnknown
1429 HRESULT GetCompartment
(
1431 [out] ITfCompartment
**ppcomp
);
1433 HRESULT ClearCompartment
(
1434 [in] TfClientId tid
,
1435 [in] REFGUID rguid
);
1437 HRESULT EnumCompartments
(
1438 [out] IEnumGUID
**ppEnum
);
1443 uuid(743abd5f
-f26d
-48df
-8cc5
-238492419b64
),
1444 pointer_default(unique)
1446 interface ITfCompartmentEventSink
: IUnknown
1449 [in] REFGUID rguid
);
1454 uuid(8f1a7ea6
-1654-4502-a86e
-b2902344d507
),
1455 pointer_default(unique)
1457 interface IEnumTfContexts
: IUnknown
1460 [out] IEnumTfContexts
**ppEnum
);
1464 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfContext
**rgContext
,
1465 [out] ULONG
*pcFetched
);
1470 [in] ULONG ulCount
);
1475 uuid(aa80e808
-2021-11d2
-93e0
-0060b067b86e
),
1476 pointer_default(unique)
1478 interface IEnumTfDocumentMgrs
: IUnknown
1481 [out] IEnumTfDocumentMgrs
**ppEnum
);
1485 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDocumentMgr
**rgDocumentMgr
,
1486 [out] ULONG
*pcFetched
);
1491 [in] ULONG ulCount
);
1496 uuid(73131f9c
-56a9
-49dd
-b0ee
-d046633f7528
),
1497 pointer_default(unique)
1499 interface ITfSourceSingle
: IUnknown
1501 HRESULT AdviseSingleSink
(
1502 [in] TfClientId tid
,
1504 [in, iid_is(riid
)] IUnknown
*punk
);
1506 HRESULT UnadviseSingleSink
(
1507 [in] TfClientId tid
,
1514 uuid(c0f1db0c
-3a20
-405c
-a303
-96b6010a885f
),
1515 pointer_default(unique)
1517 interface ITfThreadFocusSink
: IUnknown
1519 HRESULT OnSetThreadFocus
();
1521 HRESULT OnKillThreadFocus
();