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 interface ITfDocumentMgr
;
89 interface IEnumTfDocumentMgrs
;
90 interface IEnumTfContexts
;
91 interface ITfFunctionProvider
;
92 interface IEnumTfFunctionProviders
;
93 interface ITfCompartmentMgr
;
94 interface ITfEditSession
;
96 interface ITfContextView
;
97 interface IEnumTfContextViews
;
98 interface ITfProperty
;
99 interface ITfReadOnlyProperty
;
100 interface IEnumTfProperties
;
101 interface ITfRangeBackup
;
102 interface IEnumTfLanguageProfiles
;
103 interface ITfEditRecord
;
104 interface ITfCompositionView
;
105 interface ITfKeyEventSink
;
108 typedef [uuid(4f5d560f
-5ab5
-4dde
-8c4d
-404592857ab0
)] UINT_PTR HKL
;
111 typedef [uuid(e26d9e1d
-691e-4f29
-90d7
-338dcf1f8cef
)] struct TF_PERSISTENT_PROPERTY_HEADER_ACP
119 } TF_PERSISTENT_PROPERTY_HEADER_ACP
;
121 typedef [uuid(e1b5808d
-1e46
-4c19
-84dc
-68c5f5978cc8
)] struct TF_LANGUAGEPROFILE
128 } TF_LANGUAGEPROFILE
;
130 typedef [uuid(77c12f95
-b783
-450d
-879f
-1cd2362c6521
)] struct TF_PRESERVEDKEY
136 typedef [uuid(5a886226
-ae9a
-489b
-b991
-2b1e25ee59a9
)] enum { TF_ANCHOR_START
= 0, TF_ANCHOR_END
= 1 } TfAnchor
;
140 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
141 pointer_default(unique)
143 interface ITfThreadMgr
: IUnknown
146 [out] TfClientId
*ptid
);
148 HRESULT Deactivate
();
150 HRESULT CreateDocumentMgr
(
151 [out] ITfDocumentMgr
**ppdim
);
153 HRESULT EnumDocumentMgrs
(
154 [out] IEnumTfDocumentMgrs
**ppEnum
);
157 [out] ITfDocumentMgr
**ppdimFocus
);
160 [in] ITfDocumentMgr
*pdimFocus
);
162 HRESULT AssociateFocus
(
164 [in, unique] ITfDocumentMgr
*pdimNew
,
165 [out] ITfDocumentMgr
**ppdimPrev
);
167 HRESULT IsThreadFocus
(
168 [out] BOOL
*pfThreadFocus
);
170 HRESULT GetFunctionProvider
(
172 [out] ITfFunctionProvider
**ppFuncProv
);
174 HRESULT EnumFunctionProviders
(
175 [out] IEnumTfFunctionProviders
**ppEnum
);
177 HRESULT GetGlobalCompartment
(
178 [out] ITfCompartmentMgr
**ppCompMgr
);
183 uuid(d7540241
-f9a1
-4364-befc
-dbcd2c4395b7
),
184 pointer_default(unique)
186 interface ITfCompositionView
: IUnknown
188 HRESULT GetOwnerClsid
([out] CLSID
*pclsid
);
190 HRESULT GetRange
([out] ITfRange
**ppRange
);
195 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
196 pointer_default(unique)
198 interface ITfDocumentMgr
: IUnknown
200 HRESULT CreateContext
(
201 [in] TfClientId tidOwner
,
203 [in, unique] IUnknown
*punk
,
204 [out] ITfContext
**ppic
,
205 [out] TfEditCookie
*pecTextStore
);
208 [in] ITfContext
*pic
);
210 const DWORD TF_POPF_ALL
= 0x0001;
216 [out] ITfContext
**ppic
);
219 [out] ITfContext
**ppic
);
221 HRESULT EnumContexts
(
222 [out] IEnumTfContexts
**ppEnum
);
227 uuid(aa80e7fd
-2021-11d2
-93e0
-0060b067b86e
),
228 pointer_default(unique)
230 interface ITfContext
: IUnknown
232 const DWORD TF_ES_ASYNCDONTCARE
= 0x0;
233 const DWORD TF_ES_SYNC
= 0x1;
234 const DWORD TF_ES_READ
= 0x2;
235 const DWORD TF_ES_READWRITE
= 0x6;
236 const DWORD TF_ES_ASYNC
= 0x8;
238 HRESULT RequestEditSession
(
240 [in] ITfEditSession
*pes
,
242 [out] HRESULT *phrSession
);
244 HRESULT InWriteSession
(
246 [out] BOOL
*pfWriteSession
);
248 typedef [uuid(1690be9b
-d3e9
-49f6
-8d8b
-51b905af4c43
)] enum { TF_AE_NONE
, TF_AE_START
, TF_AE_END
} TfActiveSelEnd
;
250 typedef [uuid(36ae42a4
-6989-4bdc
-b48a
-6137b7bf2e42
)] struct TF_SELECTIONSTYLE
256 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
259 TF_SELECTIONSTYLE style
;
262 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
264 HRESULT GetSelection
(
265 [in] TfEditCookie ec
,
268 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
269 [out] ULONG
*pcFetched
);
271 HRESULT SetSelection
(
272 [in] TfEditCookie ec
,
274 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
277 [in] TfEditCookie ec
,
278 [out] ITfRange
**ppStart
);
281 [in] TfEditCookie ec
,
282 [out] ITfRange
**ppEnd
);
284 typedef [uuid(bc7d979a
-846a
-444d
-afef
-0a9bfa82b961
)] TS_STATUS TF_STATUS
;
285 const DWORD TF_SD_READONLY
= TS_SD_READONLY
;
286 const DWORD TF_SD_LOADING
= TS_SD_LOADING
;
287 const DWORD TF_SS_DISJOINTSEL
= TS_SS_DISJOINTSEL
;
288 const DWORD TF_SS_REGIONS
= TS_SS_REGIONS
;
289 const DWORD TF_SS_TRANSITORY
= TS_SS_TRANSITORY
;
292 HRESULT GetActiveView
(
293 [out] ITfContextView
**ppView
);
296 [out] IEnumTfContextViews
**ppEnum
);
299 [out] TF_STATUS
*pdcs
);
302 [in] REFGUID guidProp
,
303 [out] ITfProperty
**ppProp
);
305 HRESULT GetAppProperty
(
306 [in] REFGUID guidProp
,
307 [out] ITfReadOnlyProperty
**ppProp
);
309 HRESULT TrackProperties
(
310 [in, size_is(cProp
)] const GUID
**prgProp
,
312 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
314 [out] ITfReadOnlyProperty
**ppProperty
);
316 HRESULT EnumProperties
(
317 [out] IEnumTfProperties
**ppEnum
);
319 HRESULT GetDocumentMgr
(
320 [out] ITfDocumentMgr
**ppDm
);
322 HRESULT CreateRangeBackup
(
323 [in] TfEditCookie ec
,
324 [in] ITfRange
*pRange
,
325 [out] ITfRangeBackup
**ppBackup
);
331 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
332 pointer_default(unique)
334 interface ITfSource
: IUnknown
338 [in, iid_is(riid
)] IUnknown
*punk
,
339 [out] DWORD
*pdwCookie
);
341 HRESULT UnadviseSink
(
342 [in] DWORD dwCookie
);
348 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
349 pointer_default(unique)
351 interface ITfInputProcessorProfiles
: IUnknown
354 [in] REFCLSID rclsid
);
357 [in] REFCLSID rclsid
);
359 HRESULT AddLanguageProfile
(
360 [in] REFCLSID rclsid
,
362 [in] REFGUID guidProfile
,
363 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
365 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
367 [in] ULONG uIconIndex
);
369 HRESULT RemoveLanguageProfile
(
370 [in] REFCLSID rclsid
,
372 [in] REFGUID guidProfile
);
374 HRESULT EnumInputProcessorInfo
(
375 [out] IEnumGUID
**ppEnum
);
377 HRESULT GetDefaultLanguageProfile
(
381 [out] GUID
*pguidProfile
);
383 HRESULT SetDefaultLanguageProfile
(
385 [in] REFCLSID rclsid
,
386 [in] REFGUID guidProfiles
);
388 HRESULT ActivateLanguageProfile
(
389 [in] REFCLSID rclsid
,
391 [in] REFGUID guidProfiles
);
393 HRESULT GetActiveLanguageProfile
(
394 [in] REFCLSID rclsid
,
395 [out] LANGID
*plangid
,
396 [out] GUID
*pguidProfile
);
398 HRESULT GetLanguageProfileDescription
(
399 [in] REFCLSID rclsid
,
401 [in] REFGUID guidProfile
,
402 [out] BSTR *pbstrProfile
);
404 HRESULT GetCurrentLanguage
(
405 [out] LANGID
*plangid
);
407 HRESULT ChangeCurrentLanguage
(
410 HRESULT GetLanguageList
(
411 [out] LANGID
**ppLangId
,
412 [out] ULONG
*pulCount
);
414 HRESULT EnumLanguageProfiles
(
416 [out] IEnumTfLanguageProfiles
**ppEnum
);
418 HRESULT EnableLanguageProfile
(
419 [in] REFCLSID rclsid
,
421 [in] REFGUID guidProfile
,
424 HRESULT IsEnabledLanguageProfile
(
425 [in] REFCLSID rclsid
,
427 [in] REFGUID guidProfile
,
428 [out] BOOL
*pfEnable
);
430 HRESULT EnableLanguageProfileByDefault
(
431 [in] REFCLSID rclsid
,
433 [in] REFGUID guidProfile
,
436 HRESULT SubstituteKeyboardLayout
(
437 [in] REFCLSID rclsid
,
439 [in] REFGUID guidProfile
,
443 typedef [uuid(44d2825a
-10e5
-43b2
-877f
-6cb2f43b7e7e
)]
444 struct TF_INPUTPROCESSORPROFILE
{
454 } TF_INPUTPROCESSORPROFILE
;
458 uuid(71c6e74d
-0f28
-11d8
-a82a
-00065b84435c
),
459 pointer_default(unique)
461 interface IEnumTfInputProcessorProfiles
: IUnknown
464 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
468 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_INPUTPROCESSORPROFILE
*pProfile
,
469 [out] ULONG
*pcFetch
);
479 uuid(71c6e74c
-0f28
-11d8
-a82a
-00065b84435c
),
480 pointer_default(unique)
482 interface ITfInputProcessorProfileMgr
: IUnknown
484 HRESULT ActivateProfile
(
485 [in] DWORD dwProfileType
,
488 [in] REFGUID guidProfile
,
492 HRESULT DeactivateProfile
(
493 [in] DWORD dwProfileType
,
496 [in] REFGUID guidProfile
,
501 [in] DWORD dwProfileType
,
504 [in] REFGUID guidProfile
,
506 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
509 HRESULT EnumProfiles
(
511 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
513 HRESULT ReleaseInputProcessor
(
514 [in] REFCLSID rclsid
,
517 HRESULT RegisterProfile
(
518 [in] REFCLSID rclsid
,
520 [in] REFGUID guidProfile
,
521 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
523 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
525 [in] ULONG uIconIndex
,
526 [in] HKL hklsubstitute
,
527 [in] DWORD dwPreferredLayout
,
528 [in] BOOL bEnabledByDefault
,
531 HRESULT UnregisterProfile
(
532 [in] REFCLSID rclsid
,
534 [in] REFGUID guidProfile
,
537 HRESULT GetActiveProfile
(
539 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
542 typedef [uuid(c4cc07f1
-80cc
-4a7b
-bc54
-98512782cbe3
)]
551 typedef [uuid(d9b92e21
-084a
-401b
-9c64
-1e6dad91a1ab
)]
558 typedef [uuid(90d0cb5e
-6520
-4a0f
-b47c
-c39bd955f0d6
)]
560 TF_DA_COLORTYPE type
;
561 [switch_type(TF_DA_COLORTYPE
), switch_is(type
)]
563 [case(TF_CT_SYSCOLOR
)] int nIndex
;
564 [case(TF_CT_COLORREF
)] COLORREF cr
;
568 typedef [uuid(33d2fe4b
-6c24
-4f67
-8d75
-3bc1819e4126
)]
571 TF_ATTR_TARGET_CONVERTED
= 1,
572 TF_ATTR_CONVERTED
= 2,
573 TF_ATTR_TARGET_NOTCONVERTED
= 3,
574 TF_ATTR_INPUT_ERROR
= 4,
575 TF_ATTR_FIXEDCONVERTED
= 5,
579 typedef [uuid(1bf1c305
-419b
-4182-a4d2
-9bfadc3f021f
)]
580 struct TF_DISPLAYATTRIBUTE
{
583 TF_DA_LINESTYLE lsStyle
;
586 TF_DA_ATTR_INFO bAttr
;
587 } TF_DISPLAYATTRIBUTE
;
591 uuid(70528852-2f26
-4aea
-8c96
-215150578932),
592 pointer_default(unique)
594 interface ITfDisplayAttributeInfo
: IUnknown
596 HRESULT GetGUID
([out] GUID
*pguid
);
598 HRESULT GetDescription
([out] BSTR *pbstrDesc
);
600 HRESULT GetAttributeInfo
([out] TF_DISPLAYATTRIBUTE
*pda
);
602 HRESULT SetAttributeInfo
([in] const TF_DISPLAYATTRIBUTE
*pda
);
609 uuid(7cef04d7
-cb75
-4e80
-a7ab
-5f5bc7d332de
),
610 pointer_default(unique)
612 interface IEnumTfDisplayAttributeInfo
: IUnknown
614 HRESULT Clone
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
618 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDisplayAttributeInfo
**rgInfo
,
619 [out] ULONG
*pcFetched
);
623 HRESULT Skip
([in] ULONG ulCount
);
629 uuid(8ded7393
-5db1
-475c
-9e71
-a39111b0ff67
),
630 pointer_default(unique)
632 interface ITfDisplayAttributeMgr
: IUnknown
634 HRESULT OnUpdateInfo
();
636 HRESULT EnumDisplayAttributeInfo
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
638 HRESULT GetDisplayAttributeInfo
(
640 [out] ITfDisplayAttributeInfo
**ppInfo
,
641 [out] CLSID
*pclsidOwner
);
648 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
649 pointer_default(unique)
651 interface ITfCategoryMgr
: IUnknown
653 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
657 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
661 HRESULT EnumCategoriesInItem
([in] REFGUID rguid
,
662 [out] IEnumGUID
**ppEnum
);
664 HRESULT EnumItemsInCategory
([in] REFGUID rcatid
,
665 [out] IEnumGUID
**ppEnum
);
667 HRESULT FindClosestCategory
([in] REFGUID rguid
,
669 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
672 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
674 [in, size_is(cch
)] const WCHAR
*pchDesc
,
677 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
680 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
681 [out] BSTR *pbstrDesc
);
683 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
687 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
690 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
693 HRESULT RegisterGUID
([in] REFGUID rguid
,
694 [out] TfGuidAtom
*pguidatom
);
696 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
699 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
701 [out] BOOL
*pfEqual
);
706 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
707 pointer_default(unique)
709 interface ITfTextEditSink
: IUnknown
712 [in] ITfContext
*pic
,
713 [in] TfEditCookie ecReadOnly
,
714 [in] ITfEditRecord
*pEditRecord
);
719 uuid(5F20AA40
-B57A
-4F34
-96AB
-3576F377CC79
),
720 pointer_default(unique)
722 interface ITfContextOwnerCompositionSink
: IUnknown
724 HRESULT OnStartComposition
(
725 [in] ITfCompositionView
*pComposition
,
728 HRESULT OnUpdateComposition
(
729 [in] ITfCompositionView
*pComposition
,
730 [in] ITfRange
*pRangeNew
);
732 HRESULT OnEndComposition
(
733 [in] ITfCompositionView
*pComposition
);
738 uuid(3d61bf11
-ac5f
-42c8
-a4cb
-931bcc28c744
),
739 pointer_default(unique)
741 interface IEnumTfLanguageProfiles
: IUnknown
744 [out] IEnumTfLanguageProfiles
**ppEnum
);
748 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_LANGUAGEPROFILE
*pProfile
,
749 [out] ULONG
*pcFetch
);
760 uuid(aa80e7f7
-2021-11d2
-93e0
-0060b067b86e
),
761 pointer_default(unique)
763 interface ITfTextInputProcessor
: IUnknown
766 [in] ITfThreadMgr
*ptim
,
767 [in] TfClientId tid
);
769 HRESULT Deactivate
();
774 uuid(aa80e80e
-2021
-11d2
-93e0
-0060b067b86e
),
775 pointer_default(unique)
777 interface ITfThreadMgrEventSink
: IUnknown
779 HRESULT OnInitDocumentMgr
(
780 [in] ITfDocumentMgr
*pdim
);
782 HRESULT OnUninitDocumentMgr
(
783 [in] ITfDocumentMgr
*pdim
);
786 [in] ITfDocumentMgr
*pdimFocus
,
787 [in] ITfDocumentMgr
*pdimPrevFocus
);
789 HRESULT OnPushContext
(
790 [in] ITfContext
*pic
);
792 HRESULT OnPopContext
(
793 [in] ITfContext
*pic
);
799 uuid(aa80e7f0
-2021-11d2
-93e0
-0060b067b86e
),
800 pointer_default(unique)
802 interface ITfKeystrokeMgr
: IUnknown
804 HRESULT AdviseKeyEventSink
(
806 [in] ITfKeyEventSink
*pSink
,
807 [in] BOOL fForeground
);
809 HRESULT UnadviseKeyEventSink
(
810 [in] TfClientId tid
);
812 HRESULT GetForeground
(
813 [out] CLSID
*pclsid
);
818 [out] BOOL
*pfEaten
);
823 [out] BOOL
*pfEaten
);
828 [out] BOOL
*pfEaten
);
833 [out] BOOL
*pfEaten
);
835 HRESULT GetPreservedKey
(
836 [in] ITfContext
*pic
,
837 [in] const TF_PRESERVEDKEY
*pprekey
,
840 HRESULT IsPreservedKey
(
842 [in] const TF_PRESERVEDKEY
*pprekey
,
843 [out] BOOL
*pfRegistered
);
848 [in] const TF_PRESERVEDKEY
*prekey
,
849 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
852 HRESULT UnpreserveKey
(
854 [in] const TF_PRESERVEDKEY
*pprekey
);
856 HRESULT SetPreservedKeyDescription
(
858 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
861 HRESULT GetPreservedKeyDescription
(
863 [out] BSTR *pbstrDesc
);
865 HRESULT SimulatePreservedKey
(
866 [in] ITfContext
*pic
,
868 [out] BOOL
*pfEaten
);
874 uuid(aa80e7f5
-2021-11d2
-93e0
-0060b067b86e
),
875 pointer_default(unique)
877 interface ITfKeyEventSink
: IUnknown
880 [in] BOOL fForeground
);
882 HRESULT OnTestKeyDown
(
883 [in] ITfContext
*pic
,
886 [out] BOOL
*pfEaten
);
889 [in] ITfContext
*pic
,
892 [out] BOOL
*pfEaten
);
895 [in] ITfContext
*pic
,
898 [out] BOOL
*pfEaten
);
901 [in] ITfContext
*pic
,
904 [out] BOOL
*pfEaten
);
906 HRESULT OnPreservedKey
(
907 [in] ITfContext
*pic
,
909 [out] BOOL
*pfEaten
);
915 uuid(8f1b8ad8
-0b6b
-4874-90c5
-bd76011e8f7c
),
916 pointer_default(unique)
918 interface ITfMessagePump
: IUnknown
920 HRESULT PeekMessageA
(
923 [in] UINT wMsgFilterMin
,
924 [in] UINT wMsgFilterMax
,
925 [in] UINT wRemoveMsg
,
926 [out] BOOL
*pfResult
);
931 [in] UINT wMsgFilterMin
,
932 [in] UINT wMsgFilterMax
,
933 [out] BOOL
*pfResult
);
935 HRESULT PeekMessageW
(
938 [in] UINT wMsgFilterMin
,
939 [in] UINT wMsgFilterMax
,
940 [in] UINT wRemoveMsg
,
941 [out] BOOL
*pfResult
);
946 [in] UINT wMsgFilterMin
,
947 [in] UINT wMsgFilterMax
,
948 [out] BOOL
*pfResult
);
954 uuid(d60a7b49
-1b9f
-4be2
-b702
-47e9dc05dec3
),
955 pointer_default(unique)
957 interface ITfClientId
: IUnknown
960 [in] REFCLSID rclsid
,
961 [out] TfClientId
*ptid
);
966 uuid(43c9fe15
-f494
-4c17
-9de2
-b8a4ac350aa8
),
967 pointer_default(unique)
969 interface ITfLanguageProfileNotifySink
: IUnknown
971 HRESULT OnLanguageChange
(
973 [out] BOOL
*pfAccept
);
975 HRESULT OnLanguageChanged
();
980 uuid(aa80e803
-2021-11d2
-93e0
-0060b067b86e
),
981 pointer_default(unique)
983 interface ITfEditSession
: IUnknown
985 HRESULT DoEditSession
(
986 [in] TfEditCookie ec
);
991 uuid(aa80e7ff
-2021-11d2
-93e0
-0060b067b86e
),
992 pointer_default(unique)
994 interface ITfRange
: IUnknown
996 const WCHAR TF_CHAR_EMBEDDED
= TS_CHAR_EMBEDDED
;
998 typedef [uuid(cf610f06
-2882-46f6
-abe5
-298568b664c4
)] enum { TF_GRAVITY_BACKWARD
= 0, TF_GRAVITY_FORWARD
= 1 } TfGravity
;
1000 typedef [uuid(1e512533
-bbdc
-4530-9a8e
-a1dc0af67468
)] enum { TF_SD_BACKWARD
= 0, TF_SD_FORWARD
= 1 } TfShiftDir
;
1002 const DWORD TF_HF_OBJECT
= 1;
1003 const DWORD TF_TF_MOVESTART
= 1;
1004 const DWORD TF_TF_IGNOREEND
= 2;
1005 const DWORD TF_ST_CORRECTION
= 1;
1006 const DWORD TF_IE_CORRECTION
= 1;
1008 typedef [uuid(49930d51
-7d93
-448c
-a48c
-fea5dac192b1
)] struct TF_HALTCOND
1010 ITfRange
*pHaltRange
;
1016 [in] TfEditCookie ec
,
1018 [out, size_is(cchMax
), length_is(*pcch
)] WCHAR
*pchText
,
1023 [in] TfEditCookie ec
,
1025 [in, size_is(cch
), unique] const WCHAR
*pchText
,
1028 HRESULT GetFormattedText
(
1029 [in] TfEditCookie ec
,
1030 [out] IDataObject
**ppDataObject
);
1032 HRESULT GetEmbedded
(
1033 [in] TfEditCookie ec
,
1034 [in] REFGUID rguidService
,
1036 [out, iid_is(riid
)] IUnknown
**ppunk
);
1038 HRESULT InsertEmbedded
(
1039 [in] TfEditCookie ec
,
1041 [in] IDataObject
*pDataObject
);
1044 [in] TfEditCookie ec
,
1047 [in, unique] const TF_HALTCOND
*pHalt
);
1050 [in] TfEditCookie ec
,
1053 [in, unique] const TF_HALTCOND
*pHalt
);
1055 HRESULT ShiftStartToRange
(
1056 [in] TfEditCookie ec
,
1057 [in] ITfRange
*pRange
,
1058 [in] TfAnchor aPos
);
1060 HRESULT ShiftEndToRange
(
1061 [in] TfEditCookie ec
,
1062 [in] ITfRange
*pRange
,
1063 [in] TfAnchor aPos
);
1065 HRESULT ShiftStartRegion
(
1066 [in] TfEditCookie ec
,
1067 [in] TfShiftDir dir
,
1068 [out] BOOL
*pfNoRegion
);
1070 HRESULT ShiftEndRegion
(
1071 [in] TfEditCookie ec
,
1072 [in] TfShiftDir dir
,
1073 [out] BOOL
*pfNoRegion
);
1076 [in] TfEditCookie ec
,
1077 [out] BOOL
*pfEmpty
);
1080 [in] TfEditCookie ec
,
1081 [in] TfAnchor aPos
);
1083 HRESULT IsEqualStart
(
1084 [in] TfEditCookie ec
,
1085 [in] ITfRange
*pWith
,
1087 [out] BOOL
*pfEqual
);
1090 [in] TfEditCookie ec
,
1091 [in] ITfRange
*pWith
,
1093 [out] BOOL
*pfEqual
);
1095 HRESULT CompareStart
(
1096 [in] TfEditCookie ec
,
1097 [in] ITfRange
*pWith
,
1099 [out] LONG *plResult
);
1102 [in] TfEditCookie ec
,
1103 [in] ITfRange
*pWith
,
1105 [out] LONG *plResult
);
1107 HRESULT AdjustForInsert
(
1108 [in] TfEditCookie ec
,
1109 [in] ULONG cchInsert
,
1110 [out] BOOL
*pfInsertOk
);
1113 [out] TfGravity
*pgStart
,
1114 [out] TfGravity
*pgEnd
);
1117 [in] TfEditCookie ec
,
1118 [in] TfGravity gStart
,
1119 [in] TfGravity gEnd
);
1122 [out] ITfRange
**ppClone
);
1125 [out] ITfContext
**ppContext
);
1130 uuid(057a6296
-029b
-4154-b79a
-0d461d4ea94c
),
1131 pointer_default(unique)
1133 interface ITfRangeACP
: ITfRange
1135 HRESULT GetExtent
([out] LONG *pacpAnchor
,
1138 HRESULT SetExtent
([in] LONG acpAnchor
,
1144 uuid(55ce16ba
-3014-41c1
-9ceb
-fade1446ac6c
),
1145 pointer_default(unique)
1147 interface ITfInsertAtSelection
: IUnknown
1149 const DWORD TF_IAS_NOQUERY
= 0x1;
1150 const DWORD TF_IAS_QUERYONLY
= 0x2;
1151 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION
= 0x80000000;
1153 HRESULT InsertTextAtSelection
(
1154 [in] TfEditCookie ec
,
1156 [in, size_is(cch
)] const WCHAR
*pchText
,
1158 [out] ITfRange
**ppRange
);
1160 HRESULT InsertEmbeddedAtSelection
(
1161 [in] TfEditCookie ec
,
1163 [in] IDataObject
*pDataObject
,
1164 [out] ITfRange
**ppRange
);
1169 uuid(6834b120
-88cb
-11d2
-bf45
-00105a2799b5
),
1170 pointer_default(unique)
1172 interface ITfPropertyStore
: IUnknown
1174 const DWORD TF_TU_CORRECTION
= 0x1;
1176 HRESULT GetType
([out] GUID
*pguid
);
1178 HRESULT GetDataType
([out] DWORD
*pdwReserved
);
1180 HRESULT GetData
([out] VARIANT *pvarValue
);
1182 HRESULT OnTextUpdated
(
1184 [in] ITfRange
*pRangeNew
,
1185 [out] BOOL
*pfAccept
);
1188 [in] ITfRange
*pRangeNew
,
1189 [out] BOOL
*pfFree
);
1192 [in] ITfRange
*pRangeThis
,
1193 [in] ITfRange
*pRangeNew
,
1194 [out] ITfPropertyStore
**ppPropStore
);
1197 [out] ITfPropertyStore
**pPropStore
);
1199 HRESULT GetPropertyRangeCreator
(
1200 [out] CLSID
*pclsid
);
1203 [in] IStream
*pStream
,
1209 uuid(f99d3f40
-8e32
-11d2
-bf46
-00105a2799b5
),
1210 pointer_default(unique)
1212 interface IEnumTfRanges
: IUnknown
1214 HRESULT Clone
([out] IEnumTfRanges
**ppEnum
);
1218 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfRange
**ppRange
,
1219 [out] ULONG
*pcFetched
);
1223 HRESULT Skip
(ULONG ulCount
);
1228 uuid(5efd22Ba
-7838-46cb
-88e2
-cadb14124f8f
),
1229 pointer_default(unique)
1231 interface IEnumITfCompositionView
: IUnknown
1233 HRESULT Clone
([out] IEnumITfCompositionView
**ppEnum
);
1237 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfCompositionView
**rgCompositionView
,
1238 [out] ULONG
*pcFetched
);
1242 HRESULT Skip
([in] ULONG ulCount
);
1247 uuid(20168d64
-5a8f
-4a5a
-b7bd
-cfa29f4D0fd9
),
1248 pointer_default(unique)
1250 interface ITfComposition
: IUnknown
1252 HRESULT GetRange
([out] ITfRange
**ppRange
);
1255 [in] TfEditCookie ecWrite
,
1256 [in] ITfRange
*pNewStart
);
1259 [in] TfEditCookie ecWrite
,
1260 [in] ITfRange
*pNewEnd
);
1262 HRESULT EndComposition
([in] TfEditCookie ecWrite
);
1267 uuid(a781718c
-579a
-4b15
-a280
-32b8577acc5e
),
1268 pointer_default(unique)
1270 interface ITfCompositionSink
: IUnknown
1272 HRESULT OnCompositionTerminated
(
1273 [in] TfEditCookie ecWrite
,
1274 [in] ITfComposition
*pComposition
);
1279 uuid(d40C8aae
-aC92
-4fc7
-9a11
-0ee0e23aa39b
),
1280 pointer_default(unique)
1282 interface ITfContextComposition
: IUnknown
1284 HRESULT StartComposition
(
1285 [in] TfEditCookie ecWrite
,
1286 [in] ITfRange
*pCompositionRange
,
1287 [in] ITfCompositionSink
*pSink
,
1288 [out] ITfComposition
**ppComposition
);
1290 HRESULT EnumCompositions
([out] IEnumITfCompositionView
**ppEnum
);
1292 HRESULT FindComposition
(
1293 [in] TfEditCookie ecRead
,
1294 [in] ITfRange
*pTestRange
,
1295 [out] IEnumITfCompositionView
**ppEnum
);
1297 HRESULT TakeOwnership
(
1298 [in] TfEditCookie ecWrite
,
1299 [in] ITfCompositionView
*pComposition
,
1300 [in] ITfCompositionSink
*pSink
,
1301 [out] ITfComposition
**ppComposition
);
1306 uuid(86462810-593b
-4916-9764-19c08e9ce110
),
1307 pointer_default(unique)
1309 interface ITfContextOwnerCompositionServices
: ITfContextComposition
1311 HRESULT TerminateComposition
([in] ITfCompositionView
*pComposition
);
1316 uuid(4ef89150
-0807-11d3
-8df0
-00105a2799b5
),
1317 pointer_default(unique)
1319 interface ITfPersistentPropertyLoaderACP
: IUnknown
1321 HRESULT LoadProperty
(
1322 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1323 [out] IStream
**ppStream
);
1328 uuid(b23eb630
-3e1c
-11d3
-a745
-0050040ab407
),
1329 pointer_default(unique)
1331 interface ITfContextOwnerServices
: IUnknown
1333 HRESULT OnLayoutChange
();
1335 HRESULT OnStatusChange
([in] DWORD dwFlags
);
1337 HRESULT OnAttributeChange
([in] REFGUID rguidAttribute
);
1340 [in] ITfProperty
*pProp
,
1341 [in] ITfRange
*pRange
,
1342 [out] TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1343 [in] IStream
*pStream
);
1345 HRESULT Unserialize
(
1346 [in] ITfProperty
*pProp
,
1347 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1348 [in] IStream
*pStream
,
1349 [in] ITfPersistentPropertyLoaderACP
*pLoader
);
1351 HRESULT ForceLoadProperty
([in] ITfProperty
*pProp
);
1353 HRESULT CreateRange
(
1356 [out] ITfRangeACP
**ppRange
);
1361 uuid(17d49a3d
-f8b8
-4b2f
-b254
-52319dd64c53
),
1362 pointer_default(unique)
1364 interface ITfReadOnlyProperty
: IUnknown
1366 HRESULT GetType
([out] GUID
*pguid
);
1369 [in] TfEditCookie ec
,
1370 [out] IEnumTfRanges
**ppEnum
,
1371 [in] ITfRange
*pTargetRange
);
1374 [in] TfEditCookie ec
,
1375 [in] ITfRange
*pRange
,
1376 [out] VARIANT *pvarValue
);
1378 HRESULT GetContext
([out] ITfContext
**ppContext
);
1383 uuid(e2449660
-9542-11d2
-bf46
-00105a2799b5
),
1384 pointer_default(unique)
1386 interface ITfProperty
: ITfReadOnlyProperty
1389 [in] TfEditCookie ec
,
1390 [in] ITfRange
*pRange
,
1391 [out] ITfRange
**ppRange
,
1392 [in] TfAnchor aPos
);
1394 HRESULT SetValueStore
(
1395 [in] TfEditCookie ec
,
1396 [in] ITfRange
*pRange
,
1397 [in] ITfPropertyStore
*pPropStore
);
1400 [in] TfEditCookie ec
,
1401 [in] ITfRange
*pRange
,
1402 [in] const VARIANT *pvarValue
);
1405 [in] TfEditCookie ec
,
1406 [in] ITfRange
*pRange
);
1411 uuid(bb08f7a9
-607a
-4384-8623-056892b64371
),
1412 pointer_default(unique)
1414 interface ITfCompartment
: IUnknown
1417 [in] TfClientId tid
,
1418 [in] const VARIANT *pvarValue
);
1421 [out] VARIANT *pvarValue
);
1426 uuid(7dcf57ac
-18ad
-438b
-824d
-979bffb74b7c
),
1427 pointer_default(unique)
1429 interface ITfCompartmentMgr
: IUnknown
1431 HRESULT GetCompartment
(
1433 [out] ITfCompartment
**ppcomp
);
1435 HRESULT ClearCompartment
(
1436 [in] TfClientId tid
,
1437 [in] REFGUID rguid
);
1439 HRESULT EnumCompartments
(
1440 [out] IEnumGUID
**ppEnum
);
1445 uuid(743abd5f
-f26d
-48df
-8cc5
-238492419b64
),
1446 pointer_default(unique)
1448 interface ITfCompartmentEventSink
: IUnknown
1451 [in] REFGUID rguid
);
1456 uuid(8f1a7ea6
-1654-4502-a86e
-b2902344d507
),
1457 pointer_default(unique)
1459 interface IEnumTfContexts
: IUnknown
1462 [out] IEnumTfContexts
**ppEnum
);
1466 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfContext
**rgContext
,
1467 [out] ULONG
*pcFetched
);
1472 [in] ULONG ulCount
);
1477 uuid(aa80e808
-2021-11d2
-93e0
-0060b067b86e
),
1478 pointer_default(unique)
1480 interface IEnumTfDocumentMgrs
: IUnknown
1483 [out] IEnumTfDocumentMgrs
**ppEnum
);
1487 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDocumentMgr
**rgDocumentMgr
,
1488 [out] ULONG
*pcFetched
);
1493 [in] ULONG ulCount
);
1498 uuid(73131f9c
-56a9
-49dd
-b0ee
-d046633f7528
),
1499 pointer_default(unique)
1501 interface ITfSourceSingle
: IUnknown
1503 HRESULT AdviseSingleSink
(
1504 [in] TfClientId tid
,
1506 [in, iid_is(riid
)] IUnknown
*punk
);
1508 HRESULT UnadviseSingleSink
(
1509 [in] TfClientId tid
,
1516 uuid(c0f1db0c
-3a20
-405c
-a303
-96b6010a885f
),
1517 pointer_default(unique)
1519 interface ITfThreadFocusSink
: IUnknown
1521 HRESULT OnSetThreadFocus
();
1523 HRESULT OnKillThreadFocus
();