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(e1b5808d
-1e46
-4c19
-84dc
-68c5f5978cc8
)] struct TF_LANGUAGEPROFILE
116 } TF_LANGUAGEPROFILE
;
118 typedef [uuid(77c12f95
-b783
-450d
-879f
-1cd2362c6521
)] struct TF_PRESERVEDKEY
124 typedef [uuid(5a886226
-ae9a
-489b
-b991
-2b1e25ee59a9
)] enum { TF_ANCHOR_START
= 0, TF_ANCHOR_END
= 1 } TfAnchor
;
128 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
129 pointer_default(unique)
131 interface ITfThreadMgr
: IUnknown
134 [out] TfClientId
*ptid
);
136 HRESULT Deactivate
();
138 HRESULT CreateDocumentMgr
(
139 [out] ITfDocumentMgr
**ppdim
);
141 HRESULT EnumDocumentMgrs
(
142 [out] IEnumTfDocumentMgrs
**ppEnum
);
145 [out] ITfDocumentMgr
**ppdimFocus
);
148 [in] ITfDocumentMgr
*pdimFocus
);
150 HRESULT AssociateFocus
(
152 [in, unique] ITfDocumentMgr
*pdimNew
,
153 [out] ITfDocumentMgr
**ppdimPrev
);
155 HRESULT IsThreadFocus
(
156 [out] BOOL
*pfThreadFocus
);
158 HRESULT GetFunctionProvider
(
160 [out] ITfFunctionProvider
**ppFuncProv
);
162 HRESULT EnumFunctionProviders
(
163 [out] IEnumTfFunctionProviders
**ppEnum
);
165 HRESULT GetGlobalCompartment
(
166 [out] ITfCompartmentMgr
**ppCompMgr
);
171 uuid(d7540241
-f9a1
-4364-befc
-dbcd2c4395b7
),
172 pointer_default(unique)
174 interface ITfCompositionView
: IUnknown
176 HRESULT GetOwnerClsid
([out] CLSID
*pclsid
);
178 HRESULT GetRange
([out] ITfRange
**ppRange
);
183 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
184 pointer_default(unique)
186 interface ITfDocumentMgr
: IUnknown
188 HRESULT CreateContext
(
189 [in] TfClientId tidOwner
,
191 [in, unique] IUnknown
*punk
,
192 [out] ITfContext
**ppic
,
193 [out] TfEditCookie
*pecTextStore
);
196 [in] ITfContext
*pic
);
198 const DWORD TF_POPF_ALL
= 0x0001;
204 [out] ITfContext
**ppic
);
207 [out] ITfContext
**ppic
);
209 HRESULT EnumContexts
(
210 [out] IEnumTfContexts
**ppEnum
);
215 uuid(aa80e7fd
-2021-11d2
-93e0
-0060b067b86e
),
216 pointer_default(unique)
218 interface ITfContext
: IUnknown
220 const DWORD TF_ES_ASYNCDONTCARE
= 0x0;
221 const DWORD TF_ES_SYNC
= 0x1;
222 const DWORD TF_ES_READ
= 0x2;
223 const DWORD TF_ES_READWRITE
= 0x6;
224 const DWORD TF_ES_ASYNC
= 0x8;
226 HRESULT RequestEditSession
(
228 [in] ITfEditSession
*pes
,
230 [out] HRESULT *phrSession
);
232 HRESULT InWriteSession
(
234 [out] BOOL
*pfWriteSession
);
236 typedef [uuid(1690be9b
-d3e9
-49f6
-8d8b
-51b905af4c43
)] enum { TF_AE_NONE
, TF_AE_START
, TF_AE_END
} TfActiveSelEnd
;
238 typedef [uuid(36ae42a4
-6989-4bdc
-b48a
-6137b7bf2e42
)] struct TF_SELECTIONSTYLE
244 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
247 TF_SELECTIONSTYLE style
;
250 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
252 HRESULT GetSelection
(
253 [in] TfEditCookie ec
,
256 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
257 [out] ULONG
*pcFetched
);
259 HRESULT SetSelection
(
260 [in] TfEditCookie ec
,
262 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
265 [in] TfEditCookie ec
,
266 [out] ITfRange
**ppStart
);
269 [in] TfEditCookie ec
,
270 [out] ITfRange
**ppEnd
);
272 typedef [uuid(bc7d979a
-846a
-444d
-afef
-0a9bfa82b961
)] TS_STATUS TF_STATUS
;
273 const DWORD TF_SD_READONLY
= TS_SD_READONLY
;
274 const DWORD TF_SD_LOADING
= TS_SD_LOADING
;
275 const DWORD TF_SS_DISJOINTSEL
= TS_SS_DISJOINTSEL
;
276 const DWORD TF_SS_REGIONS
= TS_SS_REGIONS
;
277 const DWORD TF_SS_TRANSITORY
= TS_SS_TRANSITORY
;
280 HRESULT GetActiveView
(
281 [out] ITfContextView
**ppView
);
284 [out] IEnumTfContextViews
**ppEnum
);
287 [out] TF_STATUS
*pdcs
);
290 [in] REFGUID guidProp
,
291 [out] ITfProperty
**ppProp
);
293 HRESULT GetAppProperty
(
294 [in] REFGUID guidProp
,
295 [out] ITfReadOnlyProperty
**ppProp
);
297 HRESULT TrackProperties
(
298 [in, size_is(cProp
)] const GUID
**prgProp
,
300 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
302 [out] ITfReadOnlyProperty
**ppProperty
);
304 HRESULT EnumProperties
(
305 [out] IEnumTfProperties
**ppEnum
);
307 HRESULT GetDocumentMgr
(
308 [out] ITfDocumentMgr
**ppDm
);
310 HRESULT CreateRangeBackup
(
311 [in] TfEditCookie ec
,
312 [in] ITfRange
*pRange
,
313 [out] ITfRangeBackup
**ppBackup
);
319 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
320 pointer_default(unique)
322 interface ITfSource
: IUnknown
326 [in, iid_is(riid
)] IUnknown
*punk
,
327 [out] DWORD
*pdwCookie
);
329 HRESULT UnadviseSink
(
330 [in] DWORD dwCookie
);
336 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
337 pointer_default(unique)
339 interface ITfInputProcessorProfiles
: IUnknown
342 [in] REFCLSID rclsid
);
345 [in] REFCLSID rclsid
);
347 HRESULT AddLanguageProfile
(
348 [in] REFCLSID rclsid
,
350 [in] REFGUID guidProfile
,
351 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
353 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
355 [in] ULONG uIconIndex
);
357 HRESULT RemoveLanguageProfile
(
358 [in] REFCLSID rclsid
,
360 [in] REFGUID guidProfile
);
362 HRESULT EnumInputProcessorInfo
(
363 [out] IEnumGUID
**ppEnum
);
365 HRESULT GetDefaultLanguageProfile
(
369 [out] GUID
*pguidProfile
);
371 HRESULT SetDefaultLanguageProfile
(
373 [in] REFCLSID rclsid
,
374 [in] REFGUID guidProfiles
);
376 HRESULT ActivateLanguageProfile
(
377 [in] REFCLSID rclsid
,
379 [in] REFGUID guidProfiles
);
381 HRESULT GetActiveLanguageProfile
(
382 [in] REFCLSID rclsid
,
383 [out] LANGID
*plangid
,
384 [out] GUID
*pguidProfile
);
386 HRESULT GetLanguageProfileDescription
(
387 [in] REFCLSID rclsid
,
389 [in] REFGUID guidProfile
,
390 [out] BSTR *pbstrProfile
);
392 HRESULT GetCurrentLanguage
(
393 [out] LANGID
*plangid
);
395 HRESULT ChangeCurrentLanguage
(
398 HRESULT GetLanguageList
(
399 [out] LANGID
**ppLangId
,
400 [out] ULONG
*pulCount
);
402 HRESULT EnumLanguageProfiles
(
404 [out] IEnumTfLanguageProfiles
**ppEnum
);
406 HRESULT EnableLanguageProfile
(
407 [in] REFCLSID rclsid
,
409 [in] REFGUID guidProfile
,
412 HRESULT IsEnabledLanguageProfile
(
413 [in] REFCLSID rclsid
,
415 [in] REFGUID guidProfile
,
416 [out] BOOL
*pfEnable
);
418 HRESULT EnableLanguageProfileByDefault
(
419 [in] REFCLSID rclsid
,
421 [in] REFGUID guidProfile
,
424 HRESULT SubstituteKeyboardLayout
(
425 [in] REFCLSID rclsid
,
427 [in] REFGUID guidProfile
,
431 typedef [uuid(44d2825a
-10e5
-43b2
-877f
-6cb2f43b7e7e
)]
432 struct TF_INPUTPROCESSORPROFILE
{
442 } TF_INPUTPROCESSORPROFILE
;
446 uuid(71c6e74d
-0f28
-11d8
-a82a
-00065b84435c
),
447 pointer_default(unique)
449 interface IEnumTfInputProcessorProfiles
: IUnknown
452 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
456 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_INPUTPROCESSORPROFILE
*pProfile
,
457 [out] ULONG
*pcFetch
);
467 uuid(71c6e74c
-0f28
-11d8
-a82a
-00065b84435c
),
468 pointer_default(unique)
470 interface ITfInputProcessorProfileMgr
: IUnknown
472 HRESULT ActivateProfile
(
473 [in] DWORD dwProfileType
,
476 [in] REFGUID guidProfile
,
480 HRESULT DeactivateProfile
(
481 [in] DWORD dwProfileType
,
484 [in] REFGUID guidProfile
,
489 [in] DWORD dwProfileType
,
492 [in] REFGUID guidProfile
,
494 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
497 HRESULT EnumProfiles
(
499 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
501 HRESULT ReleaseInputProcessor
(
502 [in] REFCLSID rclsid
,
505 HRESULT RegisterProfile
(
506 [in] REFCLSID rclsid
,
508 [in] REFGUID guidProfile
,
509 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
511 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
513 [in] ULONG uIconIndex
,
514 [in] HKL hklsubstitute
,
515 [in] DWORD dwPreferredLayout
,
516 [in] BOOL bEnabledByDefault
,
519 HRESULT UnregisterProfile
(
520 [in] REFCLSID rclsid
,
522 [in] REFGUID guidProfile
,
525 HRESULT GetActiveProfile
(
527 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
530 typedef [uuid(c4cc07f1
-80cc
-4a7b
-bc54
-98512782cbe3
)]
539 typedef [uuid(d9b92e21
-084a
-401b
-9c64
-1e6dad91a1ab
)]
546 typedef [uuid(90d0cb5e
-6520
-4a0f
-b47c
-c39bd955f0d6
)]
548 TF_DA_COLORTYPE type
;
549 [switch_type(TF_DA_COLORTYPE
), switch_is(type
)]
551 [case(TF_CT_SYSCOLOR
)] int nIndex
;
552 [case(TF_CT_COLORREF
)] COLORREF cr
;
556 typedef [uuid(33d2fe4b
-6c24
-4f67
-8d75
-3bc1819e4126
)]
559 TF_ATTR_TARGET_CONVERTED
= 1,
560 TF_ATTR_CONVERTED
= 2,
561 TF_ATTR_TARGET_NOTCONVERTED
= 3,
562 TF_ATTR_INPUT_ERROR
= 4,
563 TF_ATTR_FIXEDCONVERTED
= 5,
567 typedef [uuid(1bf1c305
-419b
-4182-a4d2
-9bfadc3f021f
)]
568 struct TF_DISPLAYATTRIBUTE
{
571 TF_DA_LINESTYLE lsStyle
;
574 TF_DA_ATTR_INFO bAttr
;
575 } TF_DISPLAYATTRIBUTE
;
579 uuid(70528852-2f26
-4aea
-8c96
-215150578932),
580 pointer_default(unique)
582 interface ITfDisplayAttributeInfo
: IUnknown
584 HRESULT GetGUID
([out] GUID
*pguid
);
586 HRESULT GetDescription
([out] BSTR *pbstrDesc
);
588 HRESULT GetAttributeInfo
([out] TF_DISPLAYATTRIBUTE
*pda
);
590 HRESULT SetAttributeInfo
([in] const TF_DISPLAYATTRIBUTE
*pda
);
597 uuid(7cef04d7
-cb75
-4e80
-a7ab
-5f5bc7d332de
),
598 pointer_default(unique)
600 interface IEnumTfDisplayAttributeInfo
: IUnknown
602 HRESULT Clone
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
606 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDisplayAttributeInfo
**rgInfo
,
607 [out] ULONG
*pcFetched
);
611 HRESULT Skip
([in] ULONG ulCount
);
617 uuid(8ded7393
-5db1
-475c
-9e71
-a39111b0ff67
),
618 pointer_default(unique)
620 interface ITfDisplayAttributeMgr
: IUnknown
622 HRESULT OnUpdateInfo
();
624 HRESULT EnumDisplayAttributeInfo
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
626 HRESULT GetDisplayAttributeInfo
(
628 [out] ITfDisplayAttributeInfo
**ppInfo
,
629 [out] CLSID
*pclsidOwner
);
636 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
637 pointer_default(unique)
639 interface ITfCategoryMgr
: IUnknown
641 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
645 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
649 HRESULT EnumCategoriesInItem
([in] REFGUID rguid
,
650 [out] IEnumGUID
**ppEnum
);
652 HRESULT EnumItemsInCategory
([in] REFGUID rcatid
,
653 [out] IEnumGUID
**ppEnum
);
655 HRESULT FindClosestCategory
([in] REFGUID rguid
,
657 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
660 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
662 [in, size_is(cch
)] const WCHAR
*pchDesc
,
665 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
668 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
669 [out] BSTR *pbstrDesc
);
671 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
675 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
678 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
681 HRESULT RegisterGUID
([in] REFGUID rguid
,
682 [out] TfGuidAtom
*pguidatom
);
684 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
687 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
689 [out] BOOL
*pfEqual
);
694 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
695 pointer_default(unique)
697 interface ITfTextEditSink
: IUnknown
700 [in] ITfContext
*pic
,
701 [in] TfEditCookie ecReadOnly
,
702 [in] ITfEditRecord
*pEditRecord
);
707 uuid(5F20AA40
-B57A
-4F34
-96AB
-3576F377CC79
),
708 pointer_default(unique)
710 interface ITfContextOwnerCompositionSink
: IUnknown
712 HRESULT OnStartComposition
(
713 [in] ITfCompositionView
*pComposition
,
716 HRESULT OnUpdateComposition
(
717 [in] ITfCompositionView
*pComposition
,
718 [in] ITfRange
*pRangeNew
);
720 HRESULT OnEndComposition
(
721 [in] ITfCompositionView
*pComposition
);
726 uuid(3d61bf11
-ac5f
-42c8
-a4cb
-931bcc28c744
),
727 pointer_default(unique)
729 interface IEnumTfLanguageProfiles
: IUnknown
732 [out] IEnumTfLanguageProfiles
**ppEnum
);
736 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_LANGUAGEPROFILE
*pProfile
,
737 [out] ULONG
*pcFetch
);
748 uuid(aa80e7f7
-2021-11d2
-93e0
-0060b067b86e
),
749 pointer_default(unique)
751 interface ITfTextInputProcessor
: IUnknown
754 [in] ITfThreadMgr
*ptim
,
755 [in] TfClientId tid
);
757 HRESULT Deactivate
();
762 uuid(aa80e80e
-2021
-11d2
-93e0
-0060b067b86e
),
763 pointer_default(unique)
765 interface ITfThreadMgrEventSink
: IUnknown
767 HRESULT OnInitDocumentMgr
(
768 [in] ITfDocumentMgr
*pdim
);
770 HRESULT OnUninitDocumentMgr
(
771 [in] ITfDocumentMgr
*pdim
);
774 [in] ITfDocumentMgr
*pdimFocus
,
775 [in] ITfDocumentMgr
*pdimPrevFocus
);
777 HRESULT OnPushContext
(
778 [in] ITfContext
*pic
);
780 HRESULT OnPopContext
(
781 [in] ITfContext
*pic
);
787 uuid(aa80e7f0
-2021-11d2
-93e0
-0060b067b86e
),
788 pointer_default(unique)
790 interface ITfKeystrokeMgr
: IUnknown
792 HRESULT AdviseKeyEventSink
(
794 [in] ITfKeyEventSink
*pSink
,
795 [in] BOOL fForeground
);
797 HRESULT UnadviseKeyEventSink
(
798 [in] TfClientId tid
);
800 HRESULT GetForeground
(
801 [out] CLSID
*pclsid
);
806 [out] BOOL
*pfEaten
);
811 [out] BOOL
*pfEaten
);
816 [out] BOOL
*pfEaten
);
821 [out] BOOL
*pfEaten
);
823 HRESULT GetPreservedKey
(
824 [in] ITfContext
*pic
,
825 [in] const TF_PRESERVEDKEY
*pprekey
,
828 HRESULT IsPreservedKey
(
830 [in] const TF_PRESERVEDKEY
*pprekey
,
831 [out] BOOL
*pfRegistered
);
836 [in] const TF_PRESERVEDKEY
*prekey
,
837 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
840 HRESULT UnpreserveKey
(
842 [in] const TF_PRESERVEDKEY
*pprekey
);
844 HRESULT SetPreservedKeyDescription
(
846 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
849 HRESULT GetPreservedKeyDescription
(
851 [out] BSTR *pbstrDesc
);
853 HRESULT SimulatePreservedKey
(
854 [in] ITfContext
*pic
,
856 [out] BOOL
*pfEaten
);
862 uuid(aa80e7f5
-2021-11d2
-93e0
-0060b067b86e
),
863 pointer_default(unique)
865 interface ITfKeyEventSink
: IUnknown
868 [in] BOOL fForeground
);
870 HRESULT OnTestKeyDown
(
871 [in] ITfContext
*pic
,
874 [out] BOOL
*pfEaten
);
877 [in] ITfContext
*pic
,
880 [out] BOOL
*pfEaten
);
883 [in] ITfContext
*pic
,
886 [out] BOOL
*pfEaten
);
889 [in] ITfContext
*pic
,
892 [out] BOOL
*pfEaten
);
894 HRESULT OnPreservedKey
(
895 [in] ITfContext
*pic
,
897 [out] BOOL
*pfEaten
);
903 uuid(8f1b8ad8
-0b6b
-4874-90c5
-bd76011e8f7c
),
904 pointer_default(unique)
906 interface ITfMessagePump
: IUnknown
908 HRESULT PeekMessageA
(
911 [in] UINT wMsgFilterMin
,
912 [in] UINT wMsgFilterMax
,
913 [in] UINT wRemoveMsg
,
914 [out] BOOL
*pfResult
);
919 [in] UINT wMsgFilterMin
,
920 [in] UINT wMsgFilterMax
,
921 [out] BOOL
*pfResult
);
923 HRESULT PeekMessageW
(
926 [in] UINT wMsgFilterMin
,
927 [in] UINT wMsgFilterMax
,
928 [in] UINT wRemoveMsg
,
929 [out] BOOL
*pfResult
);
934 [in] UINT wMsgFilterMin
,
935 [in] UINT wMsgFilterMax
,
936 [out] BOOL
*pfResult
);
942 uuid(d60a7b49
-1b9f
-4be2
-b702
-47e9dc05dec3
),
943 pointer_default(unique)
945 interface ITfClientId
: IUnknown
948 [in] REFCLSID rclsid
,
949 [out] TfClientId
*ptid
);
954 uuid(43c9fe15
-f494
-4c17
-9de2
-b8a4ac350aa8
),
955 pointer_default(unique)
957 interface ITfLanguageProfileNotifySink
: IUnknown
959 HRESULT OnLanguageChange
(
961 [out] BOOL
*pfAccept
);
963 HRESULT OnLanguageChanged
();
968 uuid(aa80e803
-2021-11d2
-93e0
-0060b067b86e
),
969 pointer_default(unique)
971 interface ITfEditSession
: IUnknown
973 HRESULT DoEditSession
(
974 [in] TfEditCookie ec
);
979 uuid(aa80e7ff
-2021-11d2
-93e0
-0060b067b86e
),
980 pointer_default(unique)
982 interface ITfRange
: IUnknown
984 const WCHAR TF_CHAR_EMBEDDED
= TS_CHAR_EMBEDDED
;
986 typedef [uuid(cf610f06
-2882-46f6
-abe5
-298568b664c4
)] enum { TF_GRAVITY_BACKWARD
= 0, TF_GRAVITY_FORWARD
= 1 } TfGravity
;
988 typedef [uuid(1e512533
-bbdc
-4530-9a8e
-a1dc0af67468
)] enum { TF_SD_BACKWARD
= 0, TF_SD_FORWARD
= 1 } TfShiftDir
;
990 const DWORD TF_HF_OBJECT
= 1;
991 const DWORD TF_TF_MOVESTART
= 1;
992 const DWORD TF_TF_IGNOREEND
= 2;
993 const DWORD TF_ST_CORRECTION
= 1;
994 const DWORD TF_IE_CORRECTION
= 1;
996 typedef [uuid(49930d51
-7d93
-448c
-a48c
-fea5dac192b1
)] struct TF_HALTCOND
998 ITfRange
*pHaltRange
;
1004 [in] TfEditCookie ec
,
1006 [out, size_is(cchMax
), length_is(*pcch
)] WCHAR
*pchText
,
1011 [in] TfEditCookie ec
,
1013 [in, size_is(cch
), unique] const WCHAR
*pchText
,
1016 HRESULT GetFormattedText
(
1017 [in] TfEditCookie ec
,
1018 [out] IDataObject
**ppDataObject
);
1020 HRESULT GetEmbedded
(
1021 [in] TfEditCookie ec
,
1022 [in] REFGUID rguidService
,
1024 [out, iid_is(riid
)] IUnknown
**ppunk
);
1026 HRESULT InsertEmbedded
(
1027 [in] TfEditCookie ec
,
1029 [in] IDataObject
*pDataObject
);
1032 [in] TfEditCookie ec
,
1035 [in, unique] const TF_HALTCOND
*pHalt
);
1038 [in] TfEditCookie ec
,
1041 [in, unique] const TF_HALTCOND
*pHalt
);
1043 HRESULT ShiftStartToRange
(
1044 [in] TfEditCookie ec
,
1045 [in] ITfRange
*pRange
,
1046 [in] TfAnchor aPos
);
1048 HRESULT ShiftEndToRange
(
1049 [in] TfEditCookie ec
,
1050 [in] ITfRange
*pRange
,
1051 [in] TfAnchor aPos
);
1053 HRESULT ShiftStartRegion
(
1054 [in] TfEditCookie ec
,
1055 [in] TfShiftDir dir
,
1056 [out] BOOL
*pfNoRegion
);
1058 HRESULT ShiftEndRegion
(
1059 [in] TfEditCookie ec
,
1060 [in] TfShiftDir dir
,
1061 [out] BOOL
*pfNoRegion
);
1064 [in] TfEditCookie ec
,
1065 [out] BOOL
*pfEmpty
);
1068 [in] TfEditCookie ec
,
1069 [in] TfAnchor aPos
);
1071 HRESULT IsEqualStart
(
1072 [in] TfEditCookie ec
,
1073 [in] ITfRange
*pWith
,
1075 [out] BOOL
*pfEqual
);
1078 [in] TfEditCookie ec
,
1079 [in] ITfRange
*pWith
,
1081 [out] BOOL
*pfEqual
);
1083 HRESULT CompareStart
(
1084 [in] TfEditCookie ec
,
1085 [in] ITfRange
*pWith
,
1087 [out] LONG *plResult
);
1090 [in] TfEditCookie ec
,
1091 [in] ITfRange
*pWith
,
1093 [out] LONG *plResult
);
1095 HRESULT AdjustForInsert
(
1096 [in] TfEditCookie ec
,
1097 [in] ULONG cchInsert
,
1098 [out] BOOL
*pfInsertOk
);
1101 [out] TfGravity
*pgStart
,
1102 [out] TfGravity
*pgEnd
);
1105 [in] TfEditCookie ec
,
1106 [in] TfGravity gStart
,
1107 [in] TfGravity gEnd
);
1110 [out] ITfRange
**ppClone
);
1113 [out] ITfContext
**ppContext
);
1118 uuid(057a6296
-029b
-4154-b79a
-0d461d4ea94c
),
1119 pointer_default(unique)
1121 interface ITfRangeACP
: ITfRange
1123 HRESULT GetExtent
([out] LONG *pacpAnchor
,
1126 HRESULT SetExtent
([in] LONG acpAnchor
,
1132 uuid(55ce16ba
-3014-41c1
-9ceb
-fade1446ac6c
),
1133 pointer_default(unique)
1135 interface ITfInsertAtSelection
: IUnknown
1137 const DWORD TF_IAS_NOQUERY
= 0x1;
1138 const DWORD TF_IAS_QUERYONLY
= 0x2;
1139 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION
= 0x80000000;
1141 HRESULT InsertTextAtSelection
(
1142 [in] TfEditCookie ec
,
1144 [in, size_is(cch
)] const WCHAR
*pchText
,
1146 [out] ITfRange
**ppRange
);
1148 HRESULT InsertEmbeddedAtSelection
(
1149 [in] TfEditCookie ec
,
1151 [in] IDataObject
*pDataObject
,
1152 [out] ITfRange
**ppRange
);
1157 uuid(6834b120
-88cb
-11d2
-bf45
-00105a2799b5
),
1158 pointer_default(unique)
1160 interface ITfPropertyStore
: IUnknown
1162 const DWORD TF_TU_CORRECTION
= 0x1;
1164 HRESULT GetType
([out] GUID
*pguid
);
1166 HRESULT GetDataType
([out] DWORD
*pdwReserved
);
1168 HRESULT GetData
([out] VARIANT *pvarValue
);
1170 HRESULT OnTextUpdated
(
1172 [in] ITfRange
*pRangeNew
,
1173 [out] BOOL
*pfAccept
);
1176 [in] ITfRange
*pRangeNew
,
1177 [out] BOOL
*pfFree
);
1180 [in] ITfRange
*pRangeThis
,
1181 [in] ITfRange
*pRangeNew
,
1182 [out] ITfPropertyStore
**ppPropStore
);
1185 [out] ITfPropertyStore
**pPropStore
);
1187 HRESULT GetPropertyRangeCreator
(
1188 [out] CLSID
*pclsid
);
1191 [in] IStream
*pStream
,
1197 uuid(f99d3f40
-8e32
-11d2
-bf46
-00105a2799b5
),
1198 pointer_default(unique)
1200 interface IEnumTfRanges
: IUnknown
1202 HRESULT Clone
([out] IEnumTfRanges
**ppEnum
);
1206 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfRange
**ppRange
,
1207 [out] ULONG
*pcFetched
);
1211 HRESULT Skip
(ULONG ulCount
);
1216 uuid(5efd22Ba
-7838-46cb
-88e2
-cadb14124f8f
),
1217 pointer_default(unique)
1219 interface IEnumITfCompositionView
: IUnknown
1221 HRESULT Clone
([out] IEnumITfCompositionView
**ppEnum
);
1225 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfCompositionView
**rgCompositionView
,
1226 [out] ULONG
*pcFetched
);
1230 HRESULT Skip
([in] ULONG ulCount
);
1235 uuid(20168d64
-5a8f
-4a5a
-b7bd
-cfa29f4D0fd9
),
1236 pointer_default(unique)
1238 interface ITfComposition
: IUnknown
1240 HRESULT GetRange
([out] ITfRange
**ppRange
);
1243 [in] TfEditCookie ecWrite
,
1244 [in] ITfRange
*pNewStart
);
1247 [in] TfEditCookie ecWrite
,
1248 [in] ITfRange
*pNewEnd
);
1250 HRESULT EndComposition
([in] TfEditCookie ecWrite
);
1255 uuid(a781718c
-579a
-4b15
-a280
-32b8577acc5e
),
1256 pointer_default(unique)
1258 interface ITfCompositionSink
: IUnknown
1260 HRESULT OnCompositionTerminated
(
1261 [in] TfEditCookie ecWrite
,
1262 [in] ITfComposition
*pComposition
);
1267 uuid(d40C8aae
-aC92
-4fc7
-9a11
-0ee0e23aa39b
),
1268 pointer_default(unique)
1270 interface ITfContextComposition
: IUnknown
1272 HRESULT StartComposition
(
1273 [in] TfEditCookie ecWrite
,
1274 [in] ITfRange
*pCompositionRange
,
1275 [in] ITfCompositionSink
*pSink
,
1276 [out] ITfComposition
**ppComposition
);
1278 HRESULT EnumCompositions
([out] IEnumITfCompositionView
**ppEnum
);
1280 HRESULT FindComposition
(
1281 [in] TfEditCookie ecRead
,
1282 [in] ITfRange
*pTestRange
,
1283 [out] IEnumITfCompositionView
**ppEnum
);
1285 HRESULT TakeOwnership
(
1286 [in] TfEditCookie ecWrite
,
1287 [in] ITfCompositionView
*pComposition
,
1288 [in] ITfCompositionSink
*pSink
,
1289 [out] ITfComposition
**ppComposition
);
1294 uuid(86462810-593b
-4916-9764-19c08e9ce110
),
1295 pointer_default(unique)
1297 interface ITfContextOwnerCompositionServices
: ITfContextComposition
1299 HRESULT TerminateComposition
([in] ITfCompositionView
*pComposition
);
1304 uuid(17d49a3d
-f8b8
-4b2f
-b254
-52319dd64c53
),
1305 pointer_default(unique)
1307 interface ITfReadOnlyProperty
: IUnknown
1309 HRESULT GetType
([out] GUID
*pguid
);
1312 [in] TfEditCookie ec
,
1313 [out] IEnumTfRanges
**ppEnum
,
1314 [in] ITfRange
*pTargetRange
);
1317 [in] TfEditCookie ec
,
1318 [in] ITfRange
*pRange
,
1319 [out] VARIANT *pvarValue
);
1321 HRESULT GetContext
([out] ITfContext
**ppContext
);
1326 uuid(e2449660
-9542-11d2
-bf46
-00105a2799b5
),
1327 pointer_default(unique)
1329 interface ITfProperty
: ITfReadOnlyProperty
1332 [in] TfEditCookie ec
,
1333 [in] ITfRange
*pRange
,
1334 [out] ITfRange
**ppRange
,
1335 [in] TfAnchor aPos
);
1337 HRESULT SetValueStore
(
1338 [in] TfEditCookie ec
,
1339 [in] ITfRange
*pRange
,
1340 [in] ITfPropertyStore
*pPropStore
);
1343 [in] TfEditCookie ec
,
1344 [in] ITfRange
*pRange
,
1345 [in] const VARIANT *pvarValue
);
1348 [in] TfEditCookie ec
,
1349 [in] ITfRange
*pRange
);
1354 uuid(bb08f7a9
-607a
-4384-8623-056892b64371
),
1355 pointer_default(unique)
1357 interface ITfCompartment
: IUnknown
1360 [in] TfClientId tid
,
1361 [in] const VARIANT *pvarValue
);
1364 [out] VARIANT *pvarValue
);
1369 uuid(7dcf57ac
-18ad
-438b
-824d
-979bffb74b7c
),
1370 pointer_default(unique)
1372 interface ITfCompartmentMgr
: IUnknown
1374 HRESULT GetCompartment
(
1376 [out] ITfCompartment
**ppcomp
);
1378 HRESULT ClearCompartment
(
1379 [in] TfClientId tid
,
1380 [in] REFGUID rguid
);
1382 HRESULT EnumCompartments
(
1383 [out] IEnumGUID
**ppEnum
);
1388 uuid(743abd5f
-f26d
-48df
-8cc5
-238492419b64
),
1389 pointer_default(unique)
1391 interface ITfCompartmentEventSink
: IUnknown
1394 [in] REFGUID rguid
);
1399 uuid(8f1a7ea6
-1654-4502-a86e
-b2902344d507
),
1400 pointer_default(unique)
1402 interface IEnumTfContexts
: IUnknown
1405 [out] IEnumTfContexts
**ppEnum
);
1409 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfContext
**rgContext
,
1410 [out] ULONG
*pcFetched
);
1415 [in] ULONG ulCount
);
1420 uuid(aa80e808
-2021-11d2
-93e0
-0060b067b86e
),
1421 pointer_default(unique)
1423 interface IEnumTfDocumentMgrs
: IUnknown
1426 [out] IEnumTfDocumentMgrs
**ppEnum
);
1430 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDocumentMgr
**rgDocumentMgr
,
1431 [out] ULONG
*pcFetched
);
1436 [in] ULONG ulCount
);
1441 uuid(73131f9c
-56a9
-49dd
-b0ee
-d046633f7528
),
1442 pointer_default(unique)
1444 interface ITfSourceSingle
: IUnknown
1446 HRESULT AdviseSingleSink
(
1447 [in] TfClientId tid
,
1449 [in, iid_is(riid
)] IUnknown
*punk
);
1451 HRESULT UnadviseSingleSink
(
1452 [in] TfClientId tid
,
1459 uuid(c0f1db0c
-3a20
-405c
-a303
-96b6010a885f
),
1460 pointer_default(unique)
1462 interface ITfThreadFocusSink
: IUnknown
1464 HRESULT OnSetThreadFocus
();
1466 HRESULT OnKillThreadFocus
();