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";
23 /* import "ctfutb.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);")
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
;
82 interface IEnumTfDocumentMgrs
;
83 interface IEnumTfContexts
;
84 interface ITfFunctionProvider
;
85 interface IEnumTfFunctionProviders
;
86 interface ITfCompartmentMgr
;
87 interface ITfEditSession
;
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
107 } TF_LANGUAGEPROFILE
;
109 typedef [uuid(77c12f95
-b783
-450d
-879f
-1cd2362c6521
)] struct TF_PRESERVEDKEY
115 typedef [uuid(5a886226
-ae9a
-489b
-b991
-2b1e25ee59a9
)] enum { TF_ANCHOR_START
= 0, TF_ANCHOR_END
= 1 } TfAnchor
;
119 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
120 pointer_default(unique)
122 interface ITfThreadMgr
: IUnknown
125 [out] TfClientId
*ptid
);
127 HRESULT Deactivate
();
129 HRESULT CreateDocumentMgr
(
130 [out] ITfDocumentMgr
**ppdim
);
132 HRESULT EnumDocumentMgrs
(
133 [out] IEnumTfDocumentMgrs
**ppEnum
);
136 [out] ITfDocumentMgr
**ppdimFocus
);
139 [in] ITfDocumentMgr
*pdimFocus
);
141 HRESULT AssociateFocus
(
143 [in, unique] ITfDocumentMgr
*pdimNew
,
144 [out] ITfDocumentMgr
**ppdimPrev
);
146 HRESULT IsThreadFocus
(
147 [out] BOOL
*pfThreadFocus
);
149 HRESULT GetFunctionProvider
(
151 [out] ITfFunctionProvider
**ppFuncProv
);
153 HRESULT EnumFunctionProviders
(
154 [out] IEnumTfFunctionProviders
**ppEnum
);
156 HRESULT GetGlobalCompartment
(
157 [out] ITfCompartmentMgr
**ppCompMgr
);
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
);
174 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
175 pointer_default(unique)
177 interface ITfDocumentMgr
: IUnknown
179 HRESULT CreateContext
(
180 [in] TfClientId tidOwner
,
182 [in, unique] IUnknown
*punk
,
183 [out] ITfContext
**ppic
,
184 [out] TfEditCookie
*pecTextStore
);
187 [in] ITfContext
*pic
);
189 const DWORD TF_POPF_ALL
= 0x0001;
195 [out] ITfContext
**ppic
);
198 [out] ITfContext
**ppic
);
200 HRESULT EnumContexts
(
201 [out] IEnumTfContexts
**ppEnum
);
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
(
219 [in] ITfEditSession
*pes
,
221 [out] HRESULT *phrSession
);
223 HRESULT InWriteSession
(
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
235 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
238 TF_SELECTIONSTYLE style
;
241 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
243 HRESULT GetSelection
(
244 [in] TfEditCookie ec
,
247 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
248 [out] ULONG
*pcFetched
);
250 HRESULT SetSelection
(
251 [in] TfEditCookie ec
,
253 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
256 [in] TfEditCookie ec
,
257 [out] ITfRange
**ppStart
);
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
);
275 [out] IEnumTfContextViews
**ppEnum
);
278 [out] TF_STATUS
*pdcs
);
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
,
291 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
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
);
310 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
311 pointer_default(unique)
313 interface ITfSource
: IUnknown
317 [in, iid_is(riid
)] IUnknown
*punk
,
318 [out] DWORD
*pdwCookie
);
320 HRESULT UnadviseSink
(
321 [in] DWORD dwCookie
);
327 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
328 pointer_default(unique)
330 interface ITfInputProcessorProfiles
: IUnknown
333 [in] REFCLSID rclsid
);
336 [in] REFCLSID rclsid
);
338 HRESULT AddLanguageProfile
(
339 [in] REFCLSID rclsid
,
341 [in] REFGUID guidProfile
,
342 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
344 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
346 [in] ULONG uIconIndex
);
348 HRESULT RemoveLanguageProfile
(
349 [in] REFCLSID rclsid
,
351 [in] REFGUID guidProfile
);
353 HRESULT EnumInputProcessorInfo
(
354 [out] IEnumGUID
**ppEnum
);
356 HRESULT GetDefaultLanguageProfile
(
360 [out] GUID
*pguidProfile
);
362 HRESULT SetDefaultLanguageProfile
(
364 [in] REFCLSID rclsid
,
365 [in] REFGUID guidProfiles
);
367 HRESULT ActivateLanguageProfile
(
368 [in] REFCLSID rclsid
,
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
,
380 [in] REFGUID guidProfile
,
381 [out] BSTR *pbstrProfile
);
383 HRESULT GetCurrentLanguage
(
384 [out] LANGID
*plangid
);
386 HRESULT ChangeCurrentLanguage
(
389 HRESULT GetLanguageList
(
390 [out] LANGID
**ppLangId
,
391 [out] ULONG
*pulCount
);
393 HRESULT EnumLanguageProfiles
(
395 [out] IEnumTfLanguageProfiles
**ppEnum
);
397 HRESULT EnableLanguageProfile
(
398 [in] REFCLSID rclsid
,
400 [in] REFGUID guidProfile
,
403 HRESULT IsEnabledLanguageProfile
(
404 [in] REFCLSID rclsid
,
406 [in] REFGUID guidProfile
,
407 [out] BOOL
*pfEnable
);
409 HRESULT EnableLanguageProfileByDefault
(
410 [in] REFCLSID rclsid
,
412 [in] REFGUID guidProfile
,
415 HRESULT SubstituteKeyboardLayout
(
416 [in] REFCLSID rclsid
,
418 [in] REFGUID guidProfile
,
422 typedef [uuid(c4cc07f1
-80cc
-4a7b
-bc54
-98512782cbe3
)]
431 typedef [uuid(d9b92e21
-084a
-401b
-9c64
-1e6dad91a1ab
)]
438 typedef [uuid(90d0cb5e
-6520
-4a0f
-b47c
-c39bd955f0d6
)]
440 TF_DA_COLORTYPE type
;
441 [switch_type(TF_DA_COLORTYPE
), switch_is(type
)]
443 [case(TF_CT_SYSCOLOR
)] int nIndex
;
444 [case(TF_CT_COLORREF
)] COLORREF cr
;
448 typedef [uuid(33d2fe4b
-6c24
-4f67
-8d75
-3bc1819e4126
)]
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,
459 typedef [uuid(1bf1c305
-419b
-4182-a4d2
-9bfadc3f021f
)]
460 struct TF_DISPLAYATTRIBUTE
{
463 TF_DA_LINESTYLE lsStyle
;
466 TF_DA_ATTR_INFO bAttr
;
467 } TF_DISPLAYATTRIBUTE
;
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
);
489 uuid(7cef04d7
-cb75
-4e80
-a7ab
-5f5bc7d332de
),
490 pointer_default(unique)
492 interface IEnumTfDisplayAttributeInfo
: IUnknown
494 HRESULT Clone
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
498 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDisplayAttributeInfo
**rgInfo
,
499 [out] ULONG
*pcFetched
);
503 HRESULT Skip
([in] ULONG ulCount
);
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
(
520 [out] ITfDisplayAttributeInfo
**ppInfo
,
521 [out] CLSID
*pclsidOwner
);
528 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
529 pointer_default(unique)
531 interface ITfCategoryMgr
: IUnknown
533 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
537 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
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
,
549 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
552 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
554 [in, size_is(cch
)] const WCHAR
*pchDesc
,
557 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
560 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
561 [out] BSTR *pbstrDesc
);
563 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
567 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
570 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
573 HRESULT RegisterGUID
([in] REFGUID rguid
,
574 [out] TfGuidAtom
*pguidatom
);
576 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
579 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
581 [out] BOOL
*pfEqual
);
586 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
587 pointer_default(unique)
589 interface ITfTextEditSink
: IUnknown
592 [in] ITfContext
*pic
,
593 [in] TfEditCookie ecReadOnly
,
594 [in] ITfEditRecord
*pEditRecord
);
599 uuid(5F20AA40
-B57A
-4F34
-96AB
-3576F377CC79
),
600 pointer_default(unique)
602 interface ITfContextOwnerCompositionSink
: IUnknown
604 HRESULT OnStartComposition
(
605 [in] ITfCompositionView
*pComposition
,
608 HRESULT OnUpdateComposition
(
609 [in] ITfCompositionView
*pComposition
,
610 [in] ITfRange
*pRangeNew
);
612 HRESULT OnEndComposition
(
613 [in] ITfCompositionView
*pComposition
);
618 uuid(3d61bf11
-ac5f
-42c8
-a4cb
-931bcc28c744
),
619 pointer_default(unique)
621 interface IEnumTfLanguageProfiles
: IUnknown
624 [out] IEnumTfLanguageProfiles
**ppEnum
);
628 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_LANGUAGEPROFILE
*pProfile
,
629 [out] ULONG
*pcFetch
);
640 uuid(aa80e7f7
-2021-11d2
-93e0
-0060b067b86e
),
641 pointer_default(unique)
643 interface ITfTextInputProcessor
: IUnknown
646 [in] ITfThreadMgr
*ptim
,
647 [in] TfClientId tid
);
649 HRESULT Deactivate
();
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
);
666 [in] ITfDocumentMgr
*pdimFocus
,
667 [in] ITfDocumentMgr
*pdimPrevFocus
);
669 HRESULT OnPushContext
(
670 [in] ITfContext
*pic
);
672 HRESULT OnPopContext
(
673 [in] ITfContext
*pic
);
679 uuid(aa80e7f0
-2021-11d2
-93e0
-0060b067b86e
),
680 pointer_default(unique)
682 interface ITfKeystrokeMgr
: IUnknown
684 HRESULT AdviseKeyEventSink
(
686 [in] ITfKeyEventSink
*pSink
,
687 [in] BOOL fForeground
);
689 HRESULT UnadviseKeyEventSink
(
690 [in] TfClientId tid
);
692 HRESULT GetForeground
(
693 [out] CLSID
*pclsid
);
698 [out] BOOL
*pfEaten
);
703 [out] BOOL
*pfEaten
);
708 [out] BOOL
*pfEaten
);
713 [out] BOOL
*pfEaten
);
715 HRESULT GetPreservedKey
(
716 [in] ITfContext
*pic
,
717 [in] const TF_PRESERVEDKEY
*pprekey
,
720 HRESULT IsPreservedKey
(
722 [in] const TF_PRESERVEDKEY
*pprekey
,
723 [out] BOOL
*pfRegistered
);
728 [in] const TF_PRESERVEDKEY
*prekey
,
729 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
732 HRESULT UnpreserveKey
(
734 [in] const TF_PRESERVEDKEY
*pprekey
);
736 HRESULT SetPreservedKeyDescription
(
738 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
741 HRESULT GetPreservedKeyDescription
(
743 [out] BSTR *pbstrDesc
);
745 HRESULT SimulatePreservedKey
(
746 [in] ITfContext
*pic
,
748 [out] BOOL
*pfEaten
);
754 uuid(aa80e7f5
-2021-11d2
-93e0
-0060b067b86e
),
755 pointer_default(unique)
757 interface ITfKeyEventSink
: IUnknown
760 [in] BOOL fForeground
);
762 HRESULT OnTestKeyDown
(
763 [in] ITfContext
*pic
,
766 [out] BOOL
*pfEaten
);
769 [in] ITfContext
*pic
,
772 [out] BOOL
*pfEaten
);
775 [in] ITfContext
*pic
,
778 [out] BOOL
*pfEaten
);
781 [in] ITfContext
*pic
,
784 [out] BOOL
*pfEaten
);
786 HRESULT OnPreservedKey
(
787 [in] ITfContext
*pic
,
789 [out] BOOL
*pfEaten
);
795 uuid(8f1b8ad8
-0b6b
-4874-90c5
-bd76011e8f7c
),
796 pointer_default(unique)
798 interface ITfMessagePump
: IUnknown
800 HRESULT PeekMessageA
(
803 [in] UINT wMsgFilterMin
,
804 [in] UINT wMsgFilterMax
,
805 [in] UINT wRemoveMsg
,
806 [out] BOOL
*pfResult
);
811 [in] UINT wMsgFilterMin
,
812 [in] UINT wMsgFilterMax
,
813 [out] BOOL
*pfResult
);
815 HRESULT PeekMessageW
(
818 [in] UINT wMsgFilterMin
,
819 [in] UINT wMsgFilterMax
,
820 [in] UINT wRemoveMsg
,
821 [out] BOOL
*pfResult
);
826 [in] UINT wMsgFilterMin
,
827 [in] UINT wMsgFilterMax
,
828 [out] BOOL
*pfResult
);
834 uuid(d60a7b49
-1b9f
-4be2
-b702
-47e9dc05dec3
),
835 pointer_default(unique)
837 interface ITfClientId
: IUnknown
840 [in] REFCLSID rclsid
,
841 [out] TfClientId
*ptid
);
846 uuid(43c9fe15
-f494
-4c17
-9de2
-b8a4ac350aa8
),
847 pointer_default(unique)
849 interface ITfLanguageProfileNotifySink
: IUnknown
851 HRESULT OnLanguageChange
(
853 [out] BOOL
*pfAccept
);
855 HRESULT OnLanguageChanged
();
860 uuid(aa80e803
-2021-11d2
-93e0
-0060b067b86e
),
861 pointer_default(unique)
863 interface ITfEditSession
: IUnknown
865 HRESULT DoEditSession
(
866 [in] TfEditCookie ec
);
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
;
896 [in] TfEditCookie ec
,
898 [out, size_is(cchMax
), length_is(*pcch
)] WCHAR
*pchText
,
903 [in] TfEditCookie ec
,
905 [in, size_is(cch
), unique] const WCHAR
*pchText
,
908 HRESULT GetFormattedText
(
909 [in] TfEditCookie ec
,
910 [out] IDataObject
**ppDataObject
);
913 [in] TfEditCookie ec
,
914 [in] REFGUID rguidService
,
916 [out, iid_is(riid
)] IUnknown
**ppunk
);
918 HRESULT InsertEmbedded
(
919 [in] TfEditCookie ec
,
921 [in] IDataObject
*pDataObject
);
924 [in] TfEditCookie ec
,
927 [in, unique] const TF_HALTCOND
*pHalt
);
930 [in] TfEditCookie ec
,
933 [in, unique] const TF_HALTCOND
*pHalt
);
935 HRESULT ShiftStartToRange
(
936 [in] TfEditCookie ec
,
937 [in] ITfRange
*pRange
,
940 HRESULT ShiftEndToRange
(
941 [in] TfEditCookie ec
,
942 [in] ITfRange
*pRange
,
945 HRESULT ShiftStartRegion
(
946 [in] TfEditCookie ec
,
948 [out] BOOL
*pfNoRegion
);
950 HRESULT ShiftEndRegion
(
951 [in] TfEditCookie ec
,
953 [out] BOOL
*pfNoRegion
);
956 [in] TfEditCookie ec
,
957 [out] BOOL
*pfEmpty
);
960 [in] TfEditCookie ec
,
963 HRESULT IsEqualStart
(
964 [in] TfEditCookie ec
,
965 [in] ITfRange
*pWith
,
967 [out] BOOL
*pfEqual
);
970 [in] TfEditCookie ec
,
971 [in] ITfRange
*pWith
,
973 [out] BOOL
*pfEqual
);
975 HRESULT CompareStart
(
976 [in] TfEditCookie ec
,
977 [in] ITfRange
*pWith
,
979 [out] LONG *plResult
);
982 [in] TfEditCookie ec
,
983 [in] ITfRange
*pWith
,
985 [out] LONG *plResult
);
987 HRESULT AdjustForInsert
(
988 [in] TfEditCookie ec
,
989 [in] ULONG cchInsert
,
990 [out] BOOL
*pfInsertOk
);
993 [out] TfGravity
*pgStart
,
994 [out] TfGravity
*pgEnd
);
997 [in] TfEditCookie ec
,
998 [in] TfGravity gStart
,
999 [in] TfGravity gEnd
);
1002 [out] ITfRange
**ppClone
);
1005 [out] ITfContext
**ppContext
);
1010 uuid(057a6296
-029b
-4154-b79a
-0d461d4ea94c
),
1011 pointer_default(unique)
1013 interface ITfRangeACP
: ITfRange
1015 HRESULT GetExtent
([out] LONG *pacpAnchor
,
1018 HRESULT SetExtent
([in] LONG acpAnchor
,
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
,
1036 [in, size_is(cch
)] const WCHAR
*pchText
,
1038 [out] ITfRange
**ppRange
);
1040 HRESULT InsertEmbeddedAtSelection
(
1041 [in] TfEditCookie ec
,
1043 [in] IDataObject
*pDataObject
,
1044 [out] ITfRange
**ppRange
);
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
(
1064 [in] ITfRange
*pRangeNew
,
1065 [out] BOOL
*pfAccept
);
1068 [in] ITfRange
*pRangeNew
,
1069 [out] BOOL
*pfFree
);
1072 [in] ITfRange
*pRangeThis
,
1073 [in] ITfRange
*pRangeNew
,
1074 [out] ITfPropertyStore
**ppPropStore
);
1077 [out] ITfPropertyStore
**pPropStore
);
1079 HRESULT GetPropertyRangeCreator
(
1080 [out] CLSID
*pclsid
);
1083 [in] IStream
*pStream
,
1089 uuid(f99d3f40
-8e32
-11d2
-bf46
-00105a2799b5
),
1090 pointer_default(unique)
1092 interface IEnumTfRanges
: IUnknown
1094 HRESULT Clone
([out] IEnumTfRanges
**ppEnum
);
1098 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfRange
**ppRange
,
1099 [out] ULONG
*pcFetched
);
1103 HRESULT Skip
(ULONG ulCount
);
1108 uuid(5efd22Ba
-7838-46cb
-88e2
-cadb14124f8f
),
1109 pointer_default(unique)
1111 interface IEnumITfCompositionView
: IUnknown
1113 HRESULT Clone
([out] IEnumITfCompositionView
**ppEnum
);
1117 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfCompositionView
**rgCompositionView
,
1118 [out] ULONG
*pcFetched
);
1122 HRESULT Skip
([in] ULONG ulCount
);
1127 uuid(20168d64
-5a8f
-4a5a
-b7bd
-cfa29f4D0fd9
),
1128 pointer_default(unique)
1130 interface ITfComposition
: IUnknown
1132 HRESULT GetRange
([out] ITfRange
**ppRange
);
1135 [in] TfEditCookie ecWrite
,
1136 [in] ITfRange
*pNewStart
);
1139 [in] TfEditCookie ecWrite
,
1140 [in] ITfRange
*pNewEnd
);
1142 HRESULT EndComposition
([in] TfEditCookie ecWrite
);
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
);
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
);
1186 uuid(86462810-593b
-4916-9764-19c08e9ce110
),
1187 pointer_default(unique)
1189 interface ITfContextOwnerCompositionServices
: ITfContextComposition
1191 HRESULT TerminateComposition
([in] ITfCompositionView
*pComposition
);
1196 uuid(17d49a3d
-f8b8
-4b2f
-b254
-52319dd64c53
),
1197 pointer_default(unique)
1199 interface ITfReadOnlyProperty
: IUnknown
1201 HRESULT GetType
([out] GUID
*pguid
);
1204 [in] TfEditCookie ec
,
1205 [out] IEnumTfRanges
**ppEnum
,
1206 [in] ITfRange
*pTargetRange
);
1209 [in] TfEditCookie ec
,
1210 [in] ITfRange
*pRange
,
1211 [out] VARIANT *pvarValue
);
1213 HRESULT GetContext
([out] ITfContext
**ppContext
);
1218 uuid(e2449660
-9542-11d2
-bf46
-00105a2799b5
),
1219 pointer_default(unique)
1221 interface ITfProperty
: ITfReadOnlyProperty
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
);
1235 [in] TfEditCookie ec
,
1236 [in] ITfRange
*pRange
,
1237 [in] const VARIANT *pvarValue
);
1240 [in] TfEditCookie ec
,
1241 [in] ITfRange
*pRange
);
1246 uuid(bb08f7a9
-607a
-4384-8623-056892b64371
),
1247 pointer_default(unique)
1249 interface ITfCompartment
: IUnknown
1252 [in] TfClientId tid
,
1253 [in] const VARIANT *pvarValue
);
1256 [out] VARIANT *pvarValue
);
1261 uuid(7dcf57ac
-18ad
-438b
-824d
-979bffb74b7c
),
1262 pointer_default(unique)
1264 interface ITfCompartmentMgr
: IUnknown
1266 HRESULT GetCompartment
(
1268 [out] ITfCompartment
**ppcomp
);
1270 HRESULT ClearCompartment
(
1271 [in] TfClientId tid
,
1272 [in] REFGUID rguid
);
1274 HRESULT EnumCompartments
(
1275 [out] IEnumGUID
**ppEnum
);
1280 uuid(743abd5f
-f26d
-48df
-8cc5
-238492419b64
),
1281 pointer_default(unique)
1283 interface ITfCompartmentEventSink
: IUnknown
1286 [in] REFGUID rguid
);
1291 uuid(8f1a7ea6
-1654-4502-a86e
-b2902344d507
),
1292 pointer_default(unique)
1294 interface IEnumTfContexts
: IUnknown
1297 [out] IEnumTfContexts
**ppEnum
);
1301 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfContext
**rgContext
,
1302 [out] ULONG
*pcFetched
);
1307 [in] ULONG ulCount
);
1312 uuid(aa80e808
-2021-11d2
-93e0
-0060b067b86e
),
1313 pointer_default(unique)
1315 interface IEnumTfDocumentMgrs
: IUnknown
1318 [out] IEnumTfDocumentMgrs
**ppEnum
);
1322 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDocumentMgr
**rgDocumentMgr
,
1323 [out] ULONG
*pcFetched
);
1328 [in] ULONG ulCount
);