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 SetInputScope(HWND hwnd, INT inputscope);")
33 cpp_quote
("HRESULT WINAPI SetInputScopes(HWND hwnd, const INT *pInputScopes, UINT cInputScopes, WCHAR **ppszPhraseList, UINT cPhrases, WCHAR *pszRegExp, WCHAR *pszSRGS);")
34 cpp_quote
("HRESULT WINAPI TF_CreateThreadMgr(ITfThreadMgr **pptim);")
35 cpp_quote
("HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim);")
36 cpp_quote
("HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr);")
37 cpp_quote
("HRESULT WINAPI TF_CreateLangBarMgr(ITfLangBarMgr **pppbm);")
38 cpp_quote
("HRESULT WINAPI TF_CreateLangBarItemMgr(ITfLangBarItemMgr **pplbim);")
39 cpp_quote
("HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist(void);")
41 cpp_quote
("EXTERN_C const GUID GUID_PROP_TEXTOWNER;")
42 cpp_quote
("DEFINE_GUID(GUID_PROP_ATTRIBUTE,0x34b45670,0x7526,0x11d2,0xa1,0x47,0x00,0x10,0x5a,0x27,0x99,0xb5);")
43 cpp_quote
("EXTERN_C const GUID GUID_PROP_LANGID;")
44 cpp_quote
("EXTERN_C const GUID GUID_PROP_READING;")
45 cpp_quote
("EXTERN_C const GUID GUID_PROP_COMPOSING;")
47 cpp_quote
("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
48 cpp_quote
("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
49 cpp_quote
("EXTERN_C const CLSID CLSID_TF_LangBarMgr;")
50 cpp_quote
("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
51 cpp_quote
("EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr;")
53 /* GUIDs for Compartments */
54 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")
55 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;")
56 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;")
57 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;")
58 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;")
59 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;")
60 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;")
61 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;")
62 cpp_quote
("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;")
64 /* GUIDs for Categories */
65 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
66 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
67 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
68 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
70 typedef [uuid(7213778c
-7bb0
-4270-b050
-6189ee594e97
)] DWORD TfEditCookie
;
71 typedef [uuid(de403c21
-89fd
-4f85
-8b87
-64584d063fbc
)] DWORD TfClientId
;
72 typedef [uuid(88a9c478
-f3ec
-4763-8345-cd9250443f8d
)] DWORD TfGuidAtom
;
74 cpp_quote
("#define TF_MOD_ALT 0x0001")
75 cpp_quote
("#define TF_MOD_CONTROL 0x0002")
76 cpp_quote
("#define TF_MOD_SHIFT 0x0004")
77 cpp_quote
("#define TF_MOD_RALT 0x0008")
78 cpp_quote
("#define TF_MOD_RCONTROL 0x0010")
79 cpp_quote
("#define TF_MOD_RSHIFT 0x0020")
80 cpp_quote
("#define TF_MOD_LALT 0x0040")
81 cpp_quote
("#define TF_MOD_LCONTROL 0x0080")
82 cpp_quote
("#define TF_MOD_LSHIFT 0x0100")
83 cpp_quote
("#define TF_MOD_ON_KEYUP 0x0200")
84 cpp_quote
("#define TF_MOD_IGNORE_ALL_MODIFIER 0x0400")
86 cpp_quote
("#define TF_PROFILETYPE_INPUTPROCESSOR 0x0001")
87 cpp_quote
("#define TF_PROFILETYPE_KEYBOARDLAYOUT 0x0002")
89 interface ITfDocumentMgr
;
91 interface IEnumTfDocumentMgrs
;
92 interface IEnumTfContexts
;
93 interface ITfFunctionProvider
;
94 interface IEnumTfFunctionProviders
;
95 interface ITfCompartmentMgr
;
96 interface ITfEditSession
;
98 interface ITfContextView
;
99 interface IEnumTfContextViews
;
100 interface ITfProperty
;
101 interface ITfReadOnlyProperty
;
102 interface IEnumTfProperties
;
103 interface ITfRangeBackup
;
104 interface IEnumTfLanguageProfiles
;
105 interface ITfEditRecord
;
106 interface ITfCompositionView
;
107 interface ITfKeyEventSink
;
110 typedef [uuid(4f5d560f
-5ab5
-4dde
-8c4d
-404592857ab0
)] UINT_PTR HKL
;
113 typedef [uuid(e26d9e1d
-691e-4f29
-90d7
-338dcf1f8cef
)] struct TF_PERSISTENT_PROPERTY_HEADER_ACP
121 } TF_PERSISTENT_PROPERTY_HEADER_ACP
;
123 typedef [uuid(e1b5808d
-1e46
-4c19
-84dc
-68c5f5978cc8
)] struct TF_LANGUAGEPROFILE
130 } TF_LANGUAGEPROFILE
;
132 typedef [uuid(77c12f95
-b783
-450d
-879f
-1cd2362c6521
)] struct TF_PRESERVEDKEY
138 typedef [uuid(5a886226
-ae9a
-489b
-b991
-2b1e25ee59a9
)] enum { TF_ANCHOR_START
= 0, TF_ANCHOR_END
= 1 } TfAnchor
;
142 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
143 pointer_default(unique)
145 interface ITfThreadMgr
: IUnknown
148 [out] TfClientId
*ptid
);
150 HRESULT Deactivate
();
152 HRESULT CreateDocumentMgr
(
153 [out] ITfDocumentMgr
**ppdim
);
155 HRESULT EnumDocumentMgrs
(
156 [out] IEnumTfDocumentMgrs
**ppEnum
);
159 [out] ITfDocumentMgr
**ppdimFocus
);
162 [in] ITfDocumentMgr
*pdimFocus
);
164 HRESULT AssociateFocus
(
166 [in, unique] ITfDocumentMgr
*pdimNew
,
167 [out] ITfDocumentMgr
**ppdimPrev
);
169 HRESULT IsThreadFocus
(
170 [out] BOOL
*pfThreadFocus
);
172 HRESULT GetFunctionProvider
(
174 [out] ITfFunctionProvider
**ppFuncProv
);
176 HRESULT EnumFunctionProviders
(
177 [out] IEnumTfFunctionProviders
**ppEnum
);
179 HRESULT GetGlobalCompartment
(
180 [out] ITfCompartmentMgr
**ppCompMgr
);
185 uuid(d7540241
-f9a1
-4364-befc
-dbcd2c4395b7
),
186 pointer_default(unique)
188 interface ITfCompositionView
: IUnknown
190 HRESULT GetOwnerClsid
([out] CLSID
*pclsid
);
192 HRESULT GetRange
([out] ITfRange
**ppRange
);
197 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
198 pointer_default(unique)
200 interface ITfDocumentMgr
: IUnknown
202 HRESULT CreateContext
(
203 [in] TfClientId tidOwner
,
205 [in, unique] IUnknown
*punk
,
206 [out] ITfContext
**ppic
,
207 [out] TfEditCookie
*pecTextStore
);
210 [in] ITfContext
*pic
);
212 const DWORD TF_POPF_ALL
= 0x0001;
218 [out] ITfContext
**ppic
);
221 [out] ITfContext
**ppic
);
223 HRESULT EnumContexts
(
224 [out] IEnumTfContexts
**ppEnum
);
229 uuid(aa80e7fd
-2021-11d2
-93e0
-0060b067b86e
),
230 pointer_default(unique)
232 interface ITfContext
: IUnknown
234 const DWORD TF_ES_ASYNCDONTCARE
= 0x0;
235 const DWORD TF_ES_SYNC
= 0x1;
236 const DWORD TF_ES_READ
= 0x2;
237 const DWORD TF_ES_READWRITE
= 0x6;
238 const DWORD TF_ES_ASYNC
= 0x8;
240 HRESULT RequestEditSession
(
242 [in] ITfEditSession
*pes
,
244 [out] HRESULT *phrSession
);
246 HRESULT InWriteSession
(
248 [out] BOOL
*pfWriteSession
);
250 typedef [uuid(1690be9b
-d3e9
-49f6
-8d8b
-51b905af4c43
)] enum { TF_AE_NONE
, TF_AE_START
, TF_AE_END
} TfActiveSelEnd
;
252 typedef [uuid(36ae42a4
-6989-4bdc
-b48a
-6137b7bf2e42
)] struct TF_SELECTIONSTYLE
258 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
261 TF_SELECTIONSTYLE style
;
264 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
266 HRESULT GetSelection
(
267 [in] TfEditCookie ec
,
270 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
271 [out] ULONG
*pcFetched
);
273 HRESULT SetSelection
(
274 [in] TfEditCookie ec
,
276 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
279 [in] TfEditCookie ec
,
280 [out] ITfRange
**ppStart
);
283 [in] TfEditCookie ec
,
284 [out] ITfRange
**ppEnd
);
286 typedef [uuid(bc7d979a
-846a
-444d
-afef
-0a9bfa82b961
)] TS_STATUS TF_STATUS
;
287 const DWORD TF_SD_READONLY
= TS_SD_READONLY
;
288 const DWORD TF_SD_LOADING
= TS_SD_LOADING
;
289 const DWORD TF_SS_DISJOINTSEL
= TS_SS_DISJOINTSEL
;
290 const DWORD TF_SS_REGIONS
= TS_SS_REGIONS
;
291 const DWORD TF_SS_TRANSITORY
= TS_SS_TRANSITORY
;
294 HRESULT GetActiveView
(
295 [out] ITfContextView
**ppView
);
298 [out] IEnumTfContextViews
**ppEnum
);
301 [out] TF_STATUS
*pdcs
);
304 [in] REFGUID guidProp
,
305 [out] ITfProperty
**ppProp
);
307 HRESULT GetAppProperty
(
308 [in] REFGUID guidProp
,
309 [out] ITfReadOnlyProperty
**ppProp
);
311 HRESULT TrackProperties
(
312 [in, size_is(cProp
)] const GUID
**prgProp
,
314 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
316 [out] ITfReadOnlyProperty
**ppProperty
);
318 HRESULT EnumProperties
(
319 [out] IEnumTfProperties
**ppEnum
);
321 HRESULT GetDocumentMgr
(
322 [out] ITfDocumentMgr
**ppDm
);
324 HRESULT CreateRangeBackup
(
325 [in] TfEditCookie ec
,
326 [in] ITfRange
*pRange
,
327 [out] ITfRangeBackup
**ppBackup
);
333 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
334 pointer_default(unique)
336 interface ITfSource
: IUnknown
340 [in, iid_is(riid
)] IUnknown
*punk
,
341 [out] DWORD
*pdwCookie
);
343 HRESULT UnadviseSink
(
344 [in] DWORD dwCookie
);
350 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
351 pointer_default(unique)
353 interface ITfInputProcessorProfiles
: IUnknown
356 [in] REFCLSID rclsid
);
359 [in] REFCLSID rclsid
);
361 HRESULT AddLanguageProfile
(
362 [in] REFCLSID rclsid
,
364 [in] REFGUID guidProfile
,
365 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
367 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
369 [in] ULONG uIconIndex
);
371 HRESULT RemoveLanguageProfile
(
372 [in] REFCLSID rclsid
,
374 [in] REFGUID guidProfile
);
376 HRESULT EnumInputProcessorInfo
(
377 [out] IEnumGUID
**ppEnum
);
379 HRESULT GetDefaultLanguageProfile
(
383 [out] GUID
*pguidProfile
);
385 HRESULT SetDefaultLanguageProfile
(
387 [in] REFCLSID rclsid
,
388 [in] REFGUID guidProfiles
);
390 HRESULT ActivateLanguageProfile
(
391 [in] REFCLSID rclsid
,
393 [in] REFGUID guidProfiles
);
395 HRESULT GetActiveLanguageProfile
(
396 [in] REFCLSID rclsid
,
397 [out] LANGID
*plangid
,
398 [out] GUID
*pguidProfile
);
400 HRESULT GetLanguageProfileDescription
(
401 [in] REFCLSID rclsid
,
403 [in] REFGUID guidProfile
,
404 [out] BSTR *pbstrProfile
);
406 HRESULT GetCurrentLanguage
(
407 [out] LANGID
*plangid
);
409 HRESULT ChangeCurrentLanguage
(
412 HRESULT GetLanguageList
(
413 [out] LANGID
**ppLangId
,
414 [out] ULONG
*pulCount
);
416 HRESULT EnumLanguageProfiles
(
418 [out] IEnumTfLanguageProfiles
**ppEnum
);
420 HRESULT EnableLanguageProfile
(
421 [in] REFCLSID rclsid
,
423 [in] REFGUID guidProfile
,
426 HRESULT IsEnabledLanguageProfile
(
427 [in] REFCLSID rclsid
,
429 [in] REFGUID guidProfile
,
430 [out] BOOL
*pfEnable
);
432 HRESULT EnableLanguageProfileByDefault
(
433 [in] REFCLSID rclsid
,
435 [in] REFGUID guidProfile
,
438 HRESULT SubstituteKeyboardLayout
(
439 [in] REFCLSID rclsid
,
441 [in] REFGUID guidProfile
,
445 typedef [uuid(44d2825a
-10e5
-43b2
-877f
-6cb2f43b7e7e
)]
446 struct TF_INPUTPROCESSORPROFILE
{
456 } TF_INPUTPROCESSORPROFILE
;
460 uuid(71c6e74d
-0f28
-11d8
-a82a
-00065b84435c
),
461 pointer_default(unique)
463 interface IEnumTfInputProcessorProfiles
: IUnknown
466 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
470 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_INPUTPROCESSORPROFILE
*pProfile
,
471 [out] ULONG
*pcFetch
);
481 uuid(71c6e74c
-0f28
-11d8
-a82a
-00065b84435c
),
482 pointer_default(unique)
484 interface ITfInputProcessorProfileMgr
: IUnknown
486 HRESULT ActivateProfile
(
487 [in] DWORD dwProfileType
,
490 [in] REFGUID guidProfile
,
494 HRESULT DeactivateProfile
(
495 [in] DWORD dwProfileType
,
498 [in] REFGUID guidProfile
,
503 [in] DWORD dwProfileType
,
506 [in] REFGUID guidProfile
,
508 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
511 HRESULT EnumProfiles
(
513 [out] IEnumTfInputProcessorProfiles
**ppEnum
);
515 HRESULT ReleaseInputProcessor
(
516 [in] REFCLSID rclsid
,
519 HRESULT RegisterProfile
(
520 [in] REFCLSID rclsid
,
522 [in] REFGUID guidProfile
,
523 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
525 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
527 [in] ULONG uIconIndex
,
528 [in] HKL hklsubstitute
,
529 [in] DWORD dwPreferredLayout
,
530 [in] BOOL bEnabledByDefault
,
533 HRESULT UnregisterProfile
(
534 [in] REFCLSID rclsid
,
536 [in] REFGUID guidProfile
,
539 HRESULT GetActiveProfile
(
541 [out] TF_INPUTPROCESSORPROFILE
*pProfile
);
544 typedef [uuid(c4cc07f1
-80cc
-4a7b
-bc54
-98512782cbe3
)]
553 typedef [uuid(d9b92e21
-084a
-401b
-9c64
-1e6dad91a1ab
)]
560 typedef [uuid(90d0cb5e
-6520
-4a0f
-b47c
-c39bd955f0d6
)]
562 TF_DA_COLORTYPE type
;
563 [switch_type(TF_DA_COLORTYPE
), switch_is(type
)]
565 [case(TF_CT_SYSCOLOR
)] int nIndex
;
566 [case(TF_CT_COLORREF
)] COLORREF cr
;
570 typedef [uuid(33d2fe4b
-6c24
-4f67
-8d75
-3bc1819e4126
)]
573 TF_ATTR_TARGET_CONVERTED
= 1,
574 TF_ATTR_CONVERTED
= 2,
575 TF_ATTR_TARGET_NOTCONVERTED
= 3,
576 TF_ATTR_INPUT_ERROR
= 4,
577 TF_ATTR_FIXEDCONVERTED
= 5,
581 typedef [uuid(1bf1c305
-419b
-4182-a4d2
-9bfadc3f021f
)]
582 struct TF_DISPLAYATTRIBUTE
{
585 TF_DA_LINESTYLE lsStyle
;
588 TF_DA_ATTR_INFO bAttr
;
589 } TF_DISPLAYATTRIBUTE
;
593 uuid(70528852-2f26
-4aea
-8c96
-215150578932),
594 pointer_default(unique)
596 interface ITfDisplayAttributeInfo
: IUnknown
598 HRESULT GetGUID
([out] GUID
*pguid
);
600 HRESULT GetDescription
([out] BSTR *pbstrDesc
);
602 HRESULT GetAttributeInfo
([out] TF_DISPLAYATTRIBUTE
*pda
);
604 HRESULT SetAttributeInfo
([in] const TF_DISPLAYATTRIBUTE
*pda
);
611 uuid(7cef04d7
-cb75
-4e80
-a7ab
-5f5bc7d332de
),
612 pointer_default(unique)
614 interface IEnumTfDisplayAttributeInfo
: IUnknown
616 HRESULT Clone
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
620 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDisplayAttributeInfo
**rgInfo
,
621 [out] ULONG
*pcFetched
);
625 HRESULT Skip
([in] ULONG ulCount
);
631 uuid(8ded7393
-5db1
-475c
-9e71
-a39111b0ff67
),
632 pointer_default(unique)
634 interface ITfDisplayAttributeMgr
: IUnknown
636 HRESULT OnUpdateInfo
();
638 HRESULT EnumDisplayAttributeInfo
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
640 HRESULT GetDisplayAttributeInfo
(
642 [out] ITfDisplayAttributeInfo
**ppInfo
,
643 [out] CLSID
*pclsidOwner
);
650 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
651 pointer_default(unique)
653 interface ITfCategoryMgr
: IUnknown
655 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
659 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
663 HRESULT EnumCategoriesInItem
([in] REFGUID rguid
,
664 [out] IEnumGUID
**ppEnum
);
666 HRESULT EnumItemsInCategory
([in] REFGUID rcatid
,
667 [out] IEnumGUID
**ppEnum
);
669 HRESULT FindClosestCategory
([in] REFGUID rguid
,
671 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
674 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
676 [in, size_is(cch
)] const WCHAR
*pchDesc
,
679 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
682 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
683 [out] BSTR *pbstrDesc
);
685 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
689 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
692 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
695 HRESULT RegisterGUID
([in] REFGUID rguid
,
696 [out] TfGuidAtom
*pguidatom
);
698 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
701 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
703 [out] BOOL
*pfEqual
);
708 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
709 pointer_default(unique)
711 interface ITfTextEditSink
: IUnknown
714 [in] ITfContext
*pic
,
715 [in] TfEditCookie ecReadOnly
,
716 [in] ITfEditRecord
*pEditRecord
);
721 uuid(5F20AA40
-B57A
-4F34
-96AB
-3576F377CC79
),
722 pointer_default(unique)
724 interface ITfContextOwnerCompositionSink
: IUnknown
726 HRESULT OnStartComposition
(
727 [in] ITfCompositionView
*pComposition
,
730 HRESULT OnUpdateComposition
(
731 [in] ITfCompositionView
*pComposition
,
732 [in] ITfRange
*pRangeNew
);
734 HRESULT OnEndComposition
(
735 [in] ITfCompositionView
*pComposition
);
740 uuid(3d61bf11
-ac5f
-42c8
-a4cb
-931bcc28c744
),
741 pointer_default(unique)
743 interface IEnumTfLanguageProfiles
: IUnknown
746 [out] IEnumTfLanguageProfiles
**ppEnum
);
750 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_LANGUAGEPROFILE
*pProfile
,
751 [out] ULONG
*pcFetch
);
762 uuid(aa80e7f7
-2021-11d2
-93e0
-0060b067b86e
),
763 pointer_default(unique)
765 interface ITfTextInputProcessor
: IUnknown
768 [in] ITfThreadMgr
*ptim
,
769 [in] TfClientId tid
);
771 HRESULT Deactivate
();
776 uuid(aa80e80e
-2021
-11d2
-93e0
-0060b067b86e
),
777 pointer_default(unique)
779 interface ITfThreadMgrEventSink
: IUnknown
781 HRESULT OnInitDocumentMgr
(
782 [in] ITfDocumentMgr
*pdim
);
784 HRESULT OnUninitDocumentMgr
(
785 [in] ITfDocumentMgr
*pdim
);
788 [in] ITfDocumentMgr
*pdimFocus
,
789 [in] ITfDocumentMgr
*pdimPrevFocus
);
791 HRESULT OnPushContext
(
792 [in] ITfContext
*pic
);
794 HRESULT OnPopContext
(
795 [in] ITfContext
*pic
);
801 uuid(aa80e7f0
-2021-11d2
-93e0
-0060b067b86e
),
802 pointer_default(unique)
804 interface ITfKeystrokeMgr
: IUnknown
806 HRESULT AdviseKeyEventSink
(
808 [in] ITfKeyEventSink
*pSink
,
809 [in] BOOL fForeground
);
811 HRESULT UnadviseKeyEventSink
(
812 [in] TfClientId tid
);
814 HRESULT GetForeground
(
815 [out] CLSID
*pclsid
);
820 [out] BOOL
*pfEaten
);
825 [out] BOOL
*pfEaten
);
830 [out] BOOL
*pfEaten
);
835 [out] BOOL
*pfEaten
);
837 HRESULT GetPreservedKey
(
838 [in] ITfContext
*pic
,
839 [in] const TF_PRESERVEDKEY
*pprekey
,
842 HRESULT IsPreservedKey
(
844 [in] const TF_PRESERVEDKEY
*pprekey
,
845 [out] BOOL
*pfRegistered
);
850 [in] const TF_PRESERVEDKEY
*prekey
,
851 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
854 HRESULT UnpreserveKey
(
856 [in] const TF_PRESERVEDKEY
*pprekey
);
858 HRESULT SetPreservedKeyDescription
(
860 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
863 HRESULT GetPreservedKeyDescription
(
865 [out] BSTR *pbstrDesc
);
867 HRESULT SimulatePreservedKey
(
868 [in] ITfContext
*pic
,
870 [out] BOOL
*pfEaten
);
876 uuid(aa80e7f5
-2021-11d2
-93e0
-0060b067b86e
),
877 pointer_default(unique)
879 interface ITfKeyEventSink
: IUnknown
882 [in] BOOL fForeground
);
884 HRESULT OnTestKeyDown
(
885 [in] ITfContext
*pic
,
888 [out] BOOL
*pfEaten
);
891 [in] ITfContext
*pic
,
894 [out] BOOL
*pfEaten
);
897 [in] ITfContext
*pic
,
900 [out] BOOL
*pfEaten
);
903 [in] ITfContext
*pic
,
906 [out] BOOL
*pfEaten
);
908 HRESULT OnPreservedKey
(
909 [in] ITfContext
*pic
,
911 [out] BOOL
*pfEaten
);
917 uuid(8f1b8ad8
-0b6b
-4874-90c5
-bd76011e8f7c
),
918 pointer_default(unique)
920 interface ITfMessagePump
: IUnknown
922 HRESULT PeekMessageA
(
925 [in] UINT wMsgFilterMin
,
926 [in] UINT wMsgFilterMax
,
927 [in] UINT wRemoveMsg
,
928 [out] BOOL
*pfResult
);
933 [in] UINT wMsgFilterMin
,
934 [in] UINT wMsgFilterMax
,
935 [out] BOOL
*pfResult
);
937 HRESULT PeekMessageW
(
940 [in] UINT wMsgFilterMin
,
941 [in] UINT wMsgFilterMax
,
942 [in] UINT wRemoveMsg
,
943 [out] BOOL
*pfResult
);
948 [in] UINT wMsgFilterMin
,
949 [in] UINT wMsgFilterMax
,
950 [out] BOOL
*pfResult
);
956 uuid(d60a7b49
-1b9f
-4be2
-b702
-47e9dc05dec3
),
957 pointer_default(unique)
959 interface ITfClientId
: IUnknown
962 [in] REFCLSID rclsid
,
963 [out] TfClientId
*ptid
);
968 uuid(43c9fe15
-f494
-4c17
-9de2
-b8a4ac350aa8
),
969 pointer_default(unique)
971 interface ITfLanguageProfileNotifySink
: IUnknown
973 HRESULT OnLanguageChange
(
975 [out] BOOL
*pfAccept
);
977 HRESULT OnLanguageChanged
();
982 uuid(aa80e803
-2021-11d2
-93e0
-0060b067b86e
),
983 pointer_default(unique)
985 interface ITfEditSession
: IUnknown
987 HRESULT DoEditSession
(
988 [in] TfEditCookie ec
);
993 uuid(aa80e7ff
-2021-11d2
-93e0
-0060b067b86e
),
994 pointer_default(unique)
996 interface ITfRange
: IUnknown
998 const WCHAR TF_CHAR_EMBEDDED
= TS_CHAR_EMBEDDED
;
1000 typedef [uuid(cf610f06
-2882-46f6
-abe5
-298568b664c4
)] enum { TF_GRAVITY_BACKWARD
= 0, TF_GRAVITY_FORWARD
= 1 } TfGravity
;
1002 typedef [uuid(1e512533
-bbdc
-4530-9a8e
-a1dc0af67468
)] enum { TF_SD_BACKWARD
= 0, TF_SD_FORWARD
= 1 } TfShiftDir
;
1004 const DWORD TF_HF_OBJECT
= 1;
1005 const DWORD TF_TF_MOVESTART
= 1;
1006 const DWORD TF_TF_IGNOREEND
= 2;
1007 const DWORD TF_ST_CORRECTION
= 1;
1008 const DWORD TF_IE_CORRECTION
= 1;
1010 typedef [uuid(49930d51
-7d93
-448c
-a48c
-fea5dac192b1
)] struct TF_HALTCOND
1012 ITfRange
*pHaltRange
;
1018 [in] TfEditCookie ec
,
1020 [out, size_is(cchMax
), length_is(*pcch
)] WCHAR
*pchText
,
1025 [in] TfEditCookie ec
,
1027 [in, size_is(cch
), unique] const WCHAR
*pchText
,
1030 HRESULT GetFormattedText
(
1031 [in] TfEditCookie ec
,
1032 [out] IDataObject
**ppDataObject
);
1034 HRESULT GetEmbedded
(
1035 [in] TfEditCookie ec
,
1036 [in] REFGUID rguidService
,
1038 [out, iid_is(riid
)] IUnknown
**ppunk
);
1040 HRESULT InsertEmbedded
(
1041 [in] TfEditCookie ec
,
1043 [in] IDataObject
*pDataObject
);
1046 [in] TfEditCookie ec
,
1049 [in, unique] const TF_HALTCOND
*pHalt
);
1052 [in] TfEditCookie ec
,
1055 [in, unique] const TF_HALTCOND
*pHalt
);
1057 HRESULT ShiftStartToRange
(
1058 [in] TfEditCookie ec
,
1059 [in] ITfRange
*pRange
,
1060 [in] TfAnchor aPos
);
1062 HRESULT ShiftEndToRange
(
1063 [in] TfEditCookie ec
,
1064 [in] ITfRange
*pRange
,
1065 [in] TfAnchor aPos
);
1067 HRESULT ShiftStartRegion
(
1068 [in] TfEditCookie ec
,
1069 [in] TfShiftDir dir
,
1070 [out] BOOL
*pfNoRegion
);
1072 HRESULT ShiftEndRegion
(
1073 [in] TfEditCookie ec
,
1074 [in] TfShiftDir dir
,
1075 [out] BOOL
*pfNoRegion
);
1078 [in] TfEditCookie ec
,
1079 [out] BOOL
*pfEmpty
);
1082 [in] TfEditCookie ec
,
1083 [in] TfAnchor aPos
);
1085 HRESULT IsEqualStart
(
1086 [in] TfEditCookie ec
,
1087 [in] ITfRange
*pWith
,
1089 [out] BOOL
*pfEqual
);
1092 [in] TfEditCookie ec
,
1093 [in] ITfRange
*pWith
,
1095 [out] BOOL
*pfEqual
);
1097 HRESULT CompareStart
(
1098 [in] TfEditCookie ec
,
1099 [in] ITfRange
*pWith
,
1101 [out] LONG *plResult
);
1104 [in] TfEditCookie ec
,
1105 [in] ITfRange
*pWith
,
1107 [out] LONG *plResult
);
1109 HRESULT AdjustForInsert
(
1110 [in] TfEditCookie ec
,
1111 [in] ULONG cchInsert
,
1112 [out] BOOL
*pfInsertOk
);
1115 [out] TfGravity
*pgStart
,
1116 [out] TfGravity
*pgEnd
);
1119 [in] TfEditCookie ec
,
1120 [in] TfGravity gStart
,
1121 [in] TfGravity gEnd
);
1124 [out] ITfRange
**ppClone
);
1127 [out] ITfContext
**ppContext
);
1132 uuid(057a6296
-029b
-4154-b79a
-0d461d4ea94c
),
1133 pointer_default(unique)
1135 interface ITfRangeACP
: ITfRange
1137 HRESULT GetExtent
([out] LONG *pacpAnchor
,
1140 HRESULT SetExtent
([in] LONG acpAnchor
,
1146 uuid(55ce16ba
-3014-41c1
-9ceb
-fade1446ac6c
),
1147 pointer_default(unique)
1149 interface ITfInsertAtSelection
: IUnknown
1151 const DWORD TF_IAS_NOQUERY
= 0x1;
1152 const DWORD TF_IAS_QUERYONLY
= 0x2;
1153 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION
= 0x80000000;
1155 HRESULT InsertTextAtSelection
(
1156 [in] TfEditCookie ec
,
1158 [in, size_is(cch
)] const WCHAR
*pchText
,
1160 [out] ITfRange
**ppRange
);
1162 HRESULT InsertEmbeddedAtSelection
(
1163 [in] TfEditCookie ec
,
1165 [in] IDataObject
*pDataObject
,
1166 [out] ITfRange
**ppRange
);
1171 uuid(6834b120
-88cb
-11d2
-bf45
-00105a2799b5
),
1172 pointer_default(unique)
1174 interface ITfPropertyStore
: IUnknown
1176 const DWORD TF_TU_CORRECTION
= 0x1;
1178 HRESULT GetType
([out] GUID
*pguid
);
1180 HRESULT GetDataType
([out] DWORD
*pdwReserved
);
1182 HRESULT GetData
([out] VARIANT *pvarValue
);
1184 HRESULT OnTextUpdated
(
1186 [in] ITfRange
*pRangeNew
,
1187 [out] BOOL
*pfAccept
);
1190 [in] ITfRange
*pRangeNew
,
1191 [out] BOOL
*pfFree
);
1194 [in] ITfRange
*pRangeThis
,
1195 [in] ITfRange
*pRangeNew
,
1196 [out] ITfPropertyStore
**ppPropStore
);
1199 [out] ITfPropertyStore
**pPropStore
);
1201 HRESULT GetPropertyRangeCreator
(
1202 [out] CLSID
*pclsid
);
1205 [in] IStream
*pStream
,
1211 uuid(f99d3f40
-8e32
-11d2
-bf46
-00105a2799b5
),
1212 pointer_default(unique)
1214 interface IEnumTfRanges
: IUnknown
1216 HRESULT Clone
([out] IEnumTfRanges
**ppEnum
);
1220 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfRange
**ppRange
,
1221 [out] ULONG
*pcFetched
);
1225 HRESULT Skip
(ULONG ulCount
);
1230 uuid(5efd22Ba
-7838-46cb
-88e2
-cadb14124f8f
),
1231 pointer_default(unique)
1233 interface IEnumITfCompositionView
: IUnknown
1235 HRESULT Clone
([out] IEnumITfCompositionView
**ppEnum
);
1239 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfCompositionView
**rgCompositionView
,
1240 [out] ULONG
*pcFetched
);
1244 HRESULT Skip
([in] ULONG ulCount
);
1249 uuid(20168d64
-5a8f
-4a5a
-b7bd
-cfa29f4D0fd9
),
1250 pointer_default(unique)
1252 interface ITfComposition
: IUnknown
1254 HRESULT GetRange
([out] ITfRange
**ppRange
);
1257 [in] TfEditCookie ecWrite
,
1258 [in] ITfRange
*pNewStart
);
1261 [in] TfEditCookie ecWrite
,
1262 [in] ITfRange
*pNewEnd
);
1264 HRESULT EndComposition
([in] TfEditCookie ecWrite
);
1269 uuid(a781718c
-579a
-4b15
-a280
-32b8577acc5e
),
1270 pointer_default(unique)
1272 interface ITfCompositionSink
: IUnknown
1274 HRESULT OnCompositionTerminated
(
1275 [in] TfEditCookie ecWrite
,
1276 [in] ITfComposition
*pComposition
);
1281 uuid(d40C8aae
-aC92
-4fc7
-9a11
-0ee0e23aa39b
),
1282 pointer_default(unique)
1284 interface ITfContextComposition
: IUnknown
1286 HRESULT StartComposition
(
1287 [in] TfEditCookie ecWrite
,
1288 [in] ITfRange
*pCompositionRange
,
1289 [in] ITfCompositionSink
*pSink
,
1290 [out] ITfComposition
**ppComposition
);
1292 HRESULT EnumCompositions
([out] IEnumITfCompositionView
**ppEnum
);
1294 HRESULT FindComposition
(
1295 [in] TfEditCookie ecRead
,
1296 [in] ITfRange
*pTestRange
,
1297 [out] IEnumITfCompositionView
**ppEnum
);
1299 HRESULT TakeOwnership
(
1300 [in] TfEditCookie ecWrite
,
1301 [in] ITfCompositionView
*pComposition
,
1302 [in] ITfCompositionSink
*pSink
,
1303 [out] ITfComposition
**ppComposition
);
1308 uuid(86462810-593b
-4916-9764-19c08e9ce110
),
1309 pointer_default(unique)
1311 interface ITfContextOwnerCompositionServices
: ITfContextComposition
1313 HRESULT TerminateComposition
([in] ITfCompositionView
*pComposition
);
1318 uuid(4ef89150
-0807-11d3
-8df0
-00105a2799b5
),
1319 pointer_default(unique)
1321 interface ITfPersistentPropertyLoaderACP
: IUnknown
1323 HRESULT LoadProperty
(
1324 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1325 [out] IStream
**ppStream
);
1330 uuid(b23eb630
-3e1c
-11d3
-a745
-0050040ab407
),
1331 pointer_default(unique)
1333 interface ITfContextOwnerServices
: IUnknown
1335 HRESULT OnLayoutChange
();
1337 HRESULT OnStatusChange
([in] DWORD dwFlags
);
1339 HRESULT OnAttributeChange
([in] REFGUID rguidAttribute
);
1342 [in] ITfProperty
*pProp
,
1343 [in] ITfRange
*pRange
,
1344 [out] TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1345 [in] IStream
*pStream
);
1347 HRESULT Unserialize
(
1348 [in] ITfProperty
*pProp
,
1349 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP
*pHdr
,
1350 [in] IStream
*pStream
,
1351 [in] ITfPersistentPropertyLoaderACP
*pLoader
);
1353 HRESULT ForceLoadProperty
([in] ITfProperty
*pProp
);
1355 HRESULT CreateRange
(
1358 [out] ITfRangeACP
**ppRange
);
1363 uuid(17d49a3d
-f8b8
-4b2f
-b254
-52319dd64c53
),
1364 pointer_default(unique)
1366 interface ITfReadOnlyProperty
: IUnknown
1368 HRESULT GetType
([out] GUID
*pguid
);
1371 [in] TfEditCookie ec
,
1372 [out] IEnumTfRanges
**ppEnum
,
1373 [in] ITfRange
*pTargetRange
);
1376 [in] TfEditCookie ec
,
1377 [in] ITfRange
*pRange
,
1378 [out] VARIANT *pvarValue
);
1380 HRESULT GetContext
([out] ITfContext
**ppContext
);
1385 uuid(e2449660
-9542-11d2
-bf46
-00105a2799b5
),
1386 pointer_default(unique)
1388 interface ITfProperty
: ITfReadOnlyProperty
1391 [in] TfEditCookie ec
,
1392 [in] ITfRange
*pRange
,
1393 [out] ITfRange
**ppRange
,
1394 [in] TfAnchor aPos
);
1396 HRESULT SetValueStore
(
1397 [in] TfEditCookie ec
,
1398 [in] ITfRange
*pRange
,
1399 [in] ITfPropertyStore
*pPropStore
);
1402 [in] TfEditCookie ec
,
1403 [in] ITfRange
*pRange
,
1404 [in] const VARIANT *pvarValue
);
1407 [in] TfEditCookie ec
,
1408 [in] ITfRange
*pRange
);
1413 uuid(bb08f7a9
-607a
-4384-8623-056892b64371
),
1414 pointer_default(unique)
1416 interface ITfCompartment
: IUnknown
1419 [in] TfClientId tid
,
1420 [in] const VARIANT *pvarValue
);
1423 [out] VARIANT *pvarValue
);
1428 uuid(7dcf57ac
-18ad
-438b
-824d
-979bffb74b7c
),
1429 pointer_default(unique)
1431 interface ITfCompartmentMgr
: IUnknown
1433 HRESULT GetCompartment
(
1435 [out] ITfCompartment
**ppcomp
);
1437 HRESULT ClearCompartment
(
1438 [in] TfClientId tid
,
1439 [in] REFGUID rguid
);
1441 HRESULT EnumCompartments
(
1442 [out] IEnumGUID
**ppEnum
);
1447 uuid(743abd5f
-f26d
-48df
-8cc5
-238492419b64
),
1448 pointer_default(unique)
1450 interface ITfCompartmentEventSink
: IUnknown
1453 [in] REFGUID rguid
);
1458 uuid(8f1a7ea6
-1654-4502-a86e
-b2902344d507
),
1459 pointer_default(unique)
1461 interface IEnumTfContexts
: IUnknown
1464 [out] IEnumTfContexts
**ppEnum
);
1468 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfContext
**rgContext
,
1469 [out] ULONG
*pcFetched
);
1474 [in] ULONG ulCount
);
1479 uuid(aa80e808
-2021-11d2
-93e0
-0060b067b86e
),
1480 pointer_default(unique)
1482 interface IEnumTfDocumentMgrs
: IUnknown
1485 [out] IEnumTfDocumentMgrs
**ppEnum
);
1489 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDocumentMgr
**rgDocumentMgr
,
1490 [out] ULONG
*pcFetched
);
1495 [in] ULONG ulCount
);
1500 uuid(73131f9c
-56a9
-49dd
-b0ee
-d046633f7528
),
1501 pointer_default(unique)
1503 interface ITfSourceSingle
: IUnknown
1505 HRESULT AdviseSingleSink
(
1506 [in] TfClientId tid
,
1508 [in, iid_is(riid
)] IUnknown
*punk
);
1510 HRESULT UnadviseSingleSink
(
1511 [in] TfClientId tid
,
1518 uuid(c0f1db0c
-3a20
-405c
-a303
-96b6010a885f
),
1519 pointer_default(unique)
1521 interface ITfThreadFocusSink
: IUnknown
1523 HRESULT OnSetThreadFocus
();
1525 HRESULT OnKillThreadFocus
();