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 interface ITfDocumentMgr
;
84 interface IEnumTfDocumentMgrs
;
85 interface IEnumTfContexts
;
86 interface ITfFunctionProvider
;
87 interface IEnumTfFunctionProviders
;
88 interface ITfCompartmentMgr
;
89 interface ITfEditSession
;
91 interface ITfContextView
;
92 interface IEnumTfContextViews
;
93 interface ITfProperty
;
94 interface ITfReadOnlyProperty
;
95 interface IEnumTfProperties
;
96 interface ITfRangeBackup
;
97 interface IEnumTfLanguageProfiles
;
98 interface ITfEditRecord
;
99 interface ITfCompositionView
;
100 interface ITfKeyEventSink
;
102 typedef [uuid(e1b5808d
-1e46
-4c19
-84dc
-68c5f5978cc8
)] struct TF_LANGUAGEPROFILE
109 } TF_LANGUAGEPROFILE
;
111 typedef [uuid(77c12f95
-b783
-450d
-879f
-1cd2362c6521
)] struct TF_PRESERVEDKEY
117 typedef [uuid(5a886226
-ae9a
-489b
-b991
-2b1e25ee59a9
)] enum { TF_ANCHOR_START
= 0, TF_ANCHOR_END
= 1 } TfAnchor
;
121 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
122 pointer_default(unique)
124 interface ITfThreadMgr
: IUnknown
127 [out] TfClientId
*ptid
);
129 HRESULT Deactivate
();
131 HRESULT CreateDocumentMgr
(
132 [out] ITfDocumentMgr
**ppdim
);
134 HRESULT EnumDocumentMgrs
(
135 [out] IEnumTfDocumentMgrs
**ppEnum
);
138 [out] ITfDocumentMgr
**ppdimFocus
);
141 [in] ITfDocumentMgr
*pdimFocus
);
143 HRESULT AssociateFocus
(
145 [in, unique] ITfDocumentMgr
*pdimNew
,
146 [out] ITfDocumentMgr
**ppdimPrev
);
148 HRESULT IsThreadFocus
(
149 [out] BOOL
*pfThreadFocus
);
151 HRESULT GetFunctionProvider
(
153 [out] ITfFunctionProvider
**ppFuncProv
);
155 HRESULT EnumFunctionProviders
(
156 [out] IEnumTfFunctionProviders
**ppEnum
);
158 HRESULT GetGlobalCompartment
(
159 [out] ITfCompartmentMgr
**ppCompMgr
);
164 uuid(d7540241
-f9a1
-4364-befc
-dbcd2c4395b7
),
165 pointer_default(unique)
167 interface ITfCompositionView
: IUnknown
169 HRESULT GetOwnerClsid
([out] CLSID
*pclsid
);
171 HRESULT GetRange
([out] ITfRange
**ppRange
);
176 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
177 pointer_default(unique)
179 interface ITfDocumentMgr
: IUnknown
181 HRESULT CreateContext
(
182 [in] TfClientId tidOwner
,
184 [in, unique] IUnknown
*punk
,
185 [out] ITfContext
**ppic
,
186 [out] TfEditCookie
*pecTextStore
);
189 [in] ITfContext
*pic
);
191 const DWORD TF_POPF_ALL
= 0x0001;
197 [out] ITfContext
**ppic
);
200 [out] ITfContext
**ppic
);
202 HRESULT EnumContexts
(
203 [out] IEnumTfContexts
**ppEnum
);
208 uuid(aa80e7fd
-2021-11d2
-93e0
-0060b067b86e
),
209 pointer_default(unique)
211 interface ITfContext
: IUnknown
213 const DWORD TF_ES_ASYNCDONTCARE
= 0x0;
214 const DWORD TF_ES_SYNC
= 0x1;
215 const DWORD TF_ES_READ
= 0x2;
216 const DWORD TF_ES_READWRITE
= 0x6;
217 const DWORD TF_ES_ASYNC
= 0x8;
219 HRESULT RequestEditSession
(
221 [in] ITfEditSession
*pes
,
223 [out] HRESULT *phrSession
);
225 HRESULT InWriteSession
(
227 [out] BOOL
*pfWriteSession
);
229 typedef [uuid(1690be9b
-d3e9
-49f6
-8d8b
-51b905af4c43
)] enum { TF_AE_NONE
, TF_AE_START
, TF_AE_END
} TfActiveSelEnd
;
231 typedef [uuid(36ae42a4
-6989-4bdc
-b48a
-6137b7bf2e42
)] struct TF_SELECTIONSTYLE
237 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
240 TF_SELECTIONSTYLE style
;
243 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
245 HRESULT GetSelection
(
246 [in] TfEditCookie ec
,
249 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
250 [out] ULONG
*pcFetched
);
252 HRESULT SetSelection
(
253 [in] TfEditCookie ec
,
255 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
258 [in] TfEditCookie ec
,
259 [out] ITfRange
**ppStart
);
262 [in] TfEditCookie ec
,
263 [out] ITfRange
**ppEnd
);
265 typedef [uuid(bc7d979a
-846a
-444d
-afef
-0a9bfa82b961
)] TS_STATUS TF_STATUS
;
266 const DWORD TF_SD_READONLY
= TS_SD_READONLY
;
267 const DWORD TF_SD_LOADING
= TS_SD_LOADING
;
268 const DWORD TF_SS_DISJOINTSEL
= TS_SS_DISJOINTSEL
;
269 const DWORD TF_SS_REGIONS
= TS_SS_REGIONS
;
270 const DWORD TF_SS_TRANSITORY
= TS_SS_TRANSITORY
;
273 HRESULT GetActiveView
(
274 [out] ITfContextView
**ppView
);
277 [out] IEnumTfContextViews
**ppEnum
);
280 [out] TF_STATUS
*pdcs
);
283 [in] REFGUID guidProp
,
284 [out] ITfProperty
**ppProp
);
286 HRESULT GetAppProperty
(
287 [in] REFGUID guidProp
,
288 [out] ITfReadOnlyProperty
**ppProp
);
290 HRESULT TrackProperties
(
291 [in, size_is(cProp
)] const GUID
**prgProp
,
293 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
295 [out] ITfReadOnlyProperty
**ppProperty
);
297 HRESULT EnumProperties
(
298 [out] IEnumTfProperties
**ppEnum
);
300 HRESULT GetDocumentMgr
(
301 [out] ITfDocumentMgr
**ppDm
);
303 HRESULT CreateRangeBackup
(
304 [in] TfEditCookie ec
,
305 [in] ITfRange
*pRange
,
306 [out] ITfRangeBackup
**ppBackup
);
312 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
313 pointer_default(unique)
315 interface ITfSource
: IUnknown
319 [in, iid_is(riid
)] IUnknown
*punk
,
320 [out] DWORD
*pdwCookie
);
322 HRESULT UnadviseSink
(
323 [in] DWORD dwCookie
);
329 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
330 pointer_default(unique)
332 interface ITfInputProcessorProfiles
: IUnknown
335 [in] REFCLSID rclsid
);
338 [in] REFCLSID rclsid
);
340 HRESULT AddLanguageProfile
(
341 [in] REFCLSID rclsid
,
343 [in] REFGUID guidProfile
,
344 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
346 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
348 [in] ULONG uIconIndex
);
350 HRESULT RemoveLanguageProfile
(
351 [in] REFCLSID rclsid
,
353 [in] REFGUID guidProfile
);
355 HRESULT EnumInputProcessorInfo
(
356 [out] IEnumGUID
**ppEnum
);
358 HRESULT GetDefaultLanguageProfile
(
362 [out] GUID
*pguidProfile
);
364 HRESULT SetDefaultLanguageProfile
(
366 [in] REFCLSID rclsid
,
367 [in] REFGUID guidProfiles
);
369 HRESULT ActivateLanguageProfile
(
370 [in] REFCLSID rclsid
,
372 [in] REFGUID guidProfiles
);
374 HRESULT GetActiveLanguageProfile
(
375 [in] REFCLSID rclsid
,
376 [out] LANGID
*plangid
,
377 [out] GUID
*pguidProfile
);
379 HRESULT GetLanguageProfileDescription
(
380 [in] REFCLSID rclsid
,
382 [in] REFGUID guidProfile
,
383 [out] BSTR *pbstrProfile
);
385 HRESULT GetCurrentLanguage
(
386 [out] LANGID
*plangid
);
388 HRESULT ChangeCurrentLanguage
(
391 HRESULT GetLanguageList
(
392 [out] LANGID
**ppLangId
,
393 [out] ULONG
*pulCount
);
395 HRESULT EnumLanguageProfiles
(
397 [out] IEnumTfLanguageProfiles
**ppEnum
);
399 HRESULT EnableLanguageProfile
(
400 [in] REFCLSID rclsid
,
402 [in] REFGUID guidProfile
,
405 HRESULT IsEnabledLanguageProfile
(
406 [in] REFCLSID rclsid
,
408 [in] REFGUID guidProfile
,
409 [out] BOOL
*pfEnable
);
411 HRESULT EnableLanguageProfileByDefault
(
412 [in] REFCLSID rclsid
,
414 [in] REFGUID guidProfile
,
417 HRESULT SubstituteKeyboardLayout
(
418 [in] REFCLSID rclsid
,
420 [in] REFGUID guidProfile
,
424 typedef [uuid(c4cc07f1
-80cc
-4a7b
-bc54
-98512782cbe3
)]
433 typedef [uuid(d9b92e21
-084a
-401b
-9c64
-1e6dad91a1ab
)]
440 typedef [uuid(90d0cb5e
-6520
-4a0f
-b47c
-c39bd955f0d6
)]
442 TF_DA_COLORTYPE type
;
443 [switch_type(TF_DA_COLORTYPE
), switch_is(type
)]
445 [case(TF_CT_SYSCOLOR
)] int nIndex
;
446 [case(TF_CT_COLORREF
)] COLORREF cr
;
450 typedef [uuid(33d2fe4b
-6c24
-4f67
-8d75
-3bc1819e4126
)]
453 TF_ATTR_TARGET_CONVERTED
= 1,
454 TF_ATTR_CONVERTED
= 2,
455 TF_ATTR_TARGET_NOTCONVERTED
= 3,
456 TF_ATTR_INPUT_ERROR
= 4,
457 TF_ATTR_FIXEDCONVERTED
= 5,
461 typedef [uuid(1bf1c305
-419b
-4182-a4d2
-9bfadc3f021f
)]
462 struct TF_DISPLAYATTRIBUTE
{
465 TF_DA_LINESTYLE lsStyle
;
468 TF_DA_ATTR_INFO bAttr
;
469 } TF_DISPLAYATTRIBUTE
;
473 uuid(70528852-2f26
-4aea
-8c96
-215150578932),
474 pointer_default(unique)
476 interface ITfDisplayAttributeInfo
: IUnknown
478 HRESULT GetGUID
([out] GUID
*pguid
);
480 HRESULT GetDescription
([out] BSTR *pbstrDesc
);
482 HRESULT GetAttributeInfo
([out] TF_DISPLAYATTRIBUTE
*pda
);
484 HRESULT SetAttributeInfo
([in] const TF_DISPLAYATTRIBUTE
*pda
);
491 uuid(7cef04d7
-cb75
-4e80
-a7ab
-5f5bc7d332de
),
492 pointer_default(unique)
494 interface IEnumTfDisplayAttributeInfo
: IUnknown
496 HRESULT Clone
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
500 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDisplayAttributeInfo
**rgInfo
,
501 [out] ULONG
*pcFetched
);
505 HRESULT Skip
([in] ULONG ulCount
);
511 uuid(8ded7393
-5db1
-475c
-9e71
-a39111b0ff67
),
512 pointer_default(unique)
514 interface ITfDisplayAttributeMgr
: IUnknown
516 HRESULT OnUpdateInfo
();
518 HRESULT EnumDisplayAttributeInfo
([out] IEnumTfDisplayAttributeInfo
**ppEnum
);
520 HRESULT GetDisplayAttributeInfo
(
522 [out] ITfDisplayAttributeInfo
**ppInfo
,
523 [out] CLSID
*pclsidOwner
);
530 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
531 pointer_default(unique)
533 interface ITfCategoryMgr
: IUnknown
535 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
539 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
543 HRESULT EnumCategoriesInItem
([in] REFGUID rguid
,
544 [out] IEnumGUID
**ppEnum
);
546 HRESULT EnumItemsInCategory
([in] REFGUID rcatid
,
547 [out] IEnumGUID
**ppEnum
);
549 HRESULT FindClosestCategory
([in] REFGUID rguid
,
551 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
554 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
556 [in, size_is(cch
)] const WCHAR
*pchDesc
,
559 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
562 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
563 [out] BSTR *pbstrDesc
);
565 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
569 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
572 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
575 HRESULT RegisterGUID
([in] REFGUID rguid
,
576 [out] TfGuidAtom
*pguidatom
);
578 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
581 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
583 [out] BOOL
*pfEqual
);
588 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
589 pointer_default(unique)
591 interface ITfTextEditSink
: IUnknown
594 [in] ITfContext
*pic
,
595 [in] TfEditCookie ecReadOnly
,
596 [in] ITfEditRecord
*pEditRecord
);
601 uuid(5F20AA40
-B57A
-4F34
-96AB
-3576F377CC79
),
602 pointer_default(unique)
604 interface ITfContextOwnerCompositionSink
: IUnknown
606 HRESULT OnStartComposition
(
607 [in] ITfCompositionView
*pComposition
,
610 HRESULT OnUpdateComposition
(
611 [in] ITfCompositionView
*pComposition
,
612 [in] ITfRange
*pRangeNew
);
614 HRESULT OnEndComposition
(
615 [in] ITfCompositionView
*pComposition
);
620 uuid(3d61bf11
-ac5f
-42c8
-a4cb
-931bcc28c744
),
621 pointer_default(unique)
623 interface IEnumTfLanguageProfiles
: IUnknown
626 [out] IEnumTfLanguageProfiles
**ppEnum
);
630 [out, size_is(ulCount
), length_is(*pcFetch
)] TF_LANGUAGEPROFILE
*pProfile
,
631 [out] ULONG
*pcFetch
);
642 uuid(aa80e7f7
-2021-11d2
-93e0
-0060b067b86e
),
643 pointer_default(unique)
645 interface ITfTextInputProcessor
: IUnknown
648 [in] ITfThreadMgr
*ptim
,
649 [in] TfClientId tid
);
651 HRESULT Deactivate
();
656 uuid(aa80e80e
-2021
-11d2
-93e0
-0060b067b86e
),
657 pointer_default(unique)
659 interface ITfThreadMgrEventSink
: IUnknown
661 HRESULT OnInitDocumentMgr
(
662 [in] ITfDocumentMgr
*pdim
);
664 HRESULT OnUninitDocumentMgr
(
665 [in] ITfDocumentMgr
*pdim
);
668 [in] ITfDocumentMgr
*pdimFocus
,
669 [in] ITfDocumentMgr
*pdimPrevFocus
);
671 HRESULT OnPushContext
(
672 [in] ITfContext
*pic
);
674 HRESULT OnPopContext
(
675 [in] ITfContext
*pic
);
681 uuid(aa80e7f0
-2021-11d2
-93e0
-0060b067b86e
),
682 pointer_default(unique)
684 interface ITfKeystrokeMgr
: IUnknown
686 HRESULT AdviseKeyEventSink
(
688 [in] ITfKeyEventSink
*pSink
,
689 [in] BOOL fForeground
);
691 HRESULT UnadviseKeyEventSink
(
692 [in] TfClientId tid
);
694 HRESULT GetForeground
(
695 [out] CLSID
*pclsid
);
700 [out] BOOL
*pfEaten
);
705 [out] BOOL
*pfEaten
);
710 [out] BOOL
*pfEaten
);
715 [out] BOOL
*pfEaten
);
717 HRESULT GetPreservedKey
(
718 [in] ITfContext
*pic
,
719 [in] const TF_PRESERVEDKEY
*pprekey
,
722 HRESULT IsPreservedKey
(
724 [in] const TF_PRESERVEDKEY
*pprekey
,
725 [out] BOOL
*pfRegistered
);
730 [in] const TF_PRESERVEDKEY
*prekey
,
731 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
734 HRESULT UnpreserveKey
(
736 [in] const TF_PRESERVEDKEY
*pprekey
);
738 HRESULT SetPreservedKeyDescription
(
740 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
743 HRESULT GetPreservedKeyDescription
(
745 [out] BSTR *pbstrDesc
);
747 HRESULT SimulatePreservedKey
(
748 [in] ITfContext
*pic
,
750 [out] BOOL
*pfEaten
);
756 uuid(aa80e7f5
-2021-11d2
-93e0
-0060b067b86e
),
757 pointer_default(unique)
759 interface ITfKeyEventSink
: IUnknown
762 [in] BOOL fForeground
);
764 HRESULT OnTestKeyDown
(
765 [in] ITfContext
*pic
,
768 [out] BOOL
*pfEaten
);
771 [in] ITfContext
*pic
,
774 [out] BOOL
*pfEaten
);
777 [in] ITfContext
*pic
,
780 [out] BOOL
*pfEaten
);
783 [in] ITfContext
*pic
,
786 [out] BOOL
*pfEaten
);
788 HRESULT OnPreservedKey
(
789 [in] ITfContext
*pic
,
791 [out] BOOL
*pfEaten
);
797 uuid(8f1b8ad8
-0b6b
-4874-90c5
-bd76011e8f7c
),
798 pointer_default(unique)
800 interface ITfMessagePump
: IUnknown
802 HRESULT PeekMessageA
(
805 [in] UINT wMsgFilterMin
,
806 [in] UINT wMsgFilterMax
,
807 [in] UINT wRemoveMsg
,
808 [out] BOOL
*pfResult
);
813 [in] UINT wMsgFilterMin
,
814 [in] UINT wMsgFilterMax
,
815 [out] BOOL
*pfResult
);
817 HRESULT PeekMessageW
(
820 [in] UINT wMsgFilterMin
,
821 [in] UINT wMsgFilterMax
,
822 [in] UINT wRemoveMsg
,
823 [out] BOOL
*pfResult
);
828 [in] UINT wMsgFilterMin
,
829 [in] UINT wMsgFilterMax
,
830 [out] BOOL
*pfResult
);
836 uuid(d60a7b49
-1b9f
-4be2
-b702
-47e9dc05dec3
),
837 pointer_default(unique)
839 interface ITfClientId
: IUnknown
842 [in] REFCLSID rclsid
,
843 [out] TfClientId
*ptid
);
848 uuid(43c9fe15
-f494
-4c17
-9de2
-b8a4ac350aa8
),
849 pointer_default(unique)
851 interface ITfLanguageProfileNotifySink
: IUnknown
853 HRESULT OnLanguageChange
(
855 [out] BOOL
*pfAccept
);
857 HRESULT OnLanguageChanged
();
862 uuid(aa80e803
-2021-11d2
-93e0
-0060b067b86e
),
863 pointer_default(unique)
865 interface ITfEditSession
: IUnknown
867 HRESULT DoEditSession
(
868 [in] TfEditCookie ec
);
873 uuid(aa80e7ff
-2021-11d2
-93e0
-0060b067b86e
),
874 pointer_default(unique)
876 interface ITfRange
: IUnknown
878 const WCHAR TF_CHAR_EMBEDDED
= TS_CHAR_EMBEDDED
;
880 typedef [uuid(cf610f06
-2882-46f6
-abe5
-298568b664c4
)] enum { TF_GRAVITY_BACKWARD
= 0, TF_GRAVITY_FORWARD
= 1 } TfGravity
;
882 typedef [uuid(1e512533
-bbdc
-4530-9a8e
-a1dc0af67468
)] enum { TF_SD_BACKWARD
= 0, TF_SD_FORWARD
= 1 } TfShiftDir
;
884 const DWORD TF_HF_OBJECT
= 1;
885 const DWORD TF_TF_MOVESTART
= 1;
886 const DWORD TF_TF_IGNOREEND
= 2;
887 const DWORD TF_ST_CORRECTION
= 1;
888 const DWORD TF_IE_CORRECTION
= 1;
890 typedef [uuid(49930d51
-7d93
-448c
-a48c
-fea5dac192b1
)] struct TF_HALTCOND
892 ITfRange
*pHaltRange
;
898 [in] TfEditCookie ec
,
900 [out, size_is(cchMax
), length_is(*pcch
)] WCHAR
*pchText
,
905 [in] TfEditCookie ec
,
907 [in, size_is(cch
), unique] const WCHAR
*pchText
,
910 HRESULT GetFormattedText
(
911 [in] TfEditCookie ec
,
912 [out] IDataObject
**ppDataObject
);
915 [in] TfEditCookie ec
,
916 [in] REFGUID rguidService
,
918 [out, iid_is(riid
)] IUnknown
**ppunk
);
920 HRESULT InsertEmbedded
(
921 [in] TfEditCookie ec
,
923 [in] IDataObject
*pDataObject
);
926 [in] TfEditCookie ec
,
929 [in, unique] const TF_HALTCOND
*pHalt
);
932 [in] TfEditCookie ec
,
935 [in, unique] const TF_HALTCOND
*pHalt
);
937 HRESULT ShiftStartToRange
(
938 [in] TfEditCookie ec
,
939 [in] ITfRange
*pRange
,
942 HRESULT ShiftEndToRange
(
943 [in] TfEditCookie ec
,
944 [in] ITfRange
*pRange
,
947 HRESULT ShiftStartRegion
(
948 [in] TfEditCookie ec
,
950 [out] BOOL
*pfNoRegion
);
952 HRESULT ShiftEndRegion
(
953 [in] TfEditCookie ec
,
955 [out] BOOL
*pfNoRegion
);
958 [in] TfEditCookie ec
,
959 [out] BOOL
*pfEmpty
);
962 [in] TfEditCookie ec
,
965 HRESULT IsEqualStart
(
966 [in] TfEditCookie ec
,
967 [in] ITfRange
*pWith
,
969 [out] BOOL
*pfEqual
);
972 [in] TfEditCookie ec
,
973 [in] ITfRange
*pWith
,
975 [out] BOOL
*pfEqual
);
977 HRESULT CompareStart
(
978 [in] TfEditCookie ec
,
979 [in] ITfRange
*pWith
,
981 [out] LONG *plResult
);
984 [in] TfEditCookie ec
,
985 [in] ITfRange
*pWith
,
987 [out] LONG *plResult
);
989 HRESULT AdjustForInsert
(
990 [in] TfEditCookie ec
,
991 [in] ULONG cchInsert
,
992 [out] BOOL
*pfInsertOk
);
995 [out] TfGravity
*pgStart
,
996 [out] TfGravity
*pgEnd
);
999 [in] TfEditCookie ec
,
1000 [in] TfGravity gStart
,
1001 [in] TfGravity gEnd
);
1004 [out] ITfRange
**ppClone
);
1007 [out] ITfContext
**ppContext
);
1012 uuid(057a6296
-029b
-4154-b79a
-0d461d4ea94c
),
1013 pointer_default(unique)
1015 interface ITfRangeACP
: ITfRange
1017 HRESULT GetExtent
([out] LONG *pacpAnchor
,
1020 HRESULT SetExtent
([in] LONG acpAnchor
,
1026 uuid(55ce16ba
-3014-41c1
-9ceb
-fade1446ac6c
),
1027 pointer_default(unique)
1029 interface ITfInsertAtSelection
: IUnknown
1031 const DWORD TF_IAS_NOQUERY
= 0x1;
1032 const DWORD TF_IAS_QUERYONLY
= 0x2;
1033 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION
= 0x80000000;
1035 HRESULT InsertTextAtSelection
(
1036 [in] TfEditCookie ec
,
1038 [in, size_is(cch
)] const WCHAR
*pchText
,
1040 [out] ITfRange
**ppRange
);
1042 HRESULT InsertEmbeddedAtSelection
(
1043 [in] TfEditCookie ec
,
1045 [in] IDataObject
*pDataObject
,
1046 [out] ITfRange
**ppRange
);
1051 uuid(6834b120
-88cb
-11d2
-bf45
-00105a2799b5
),
1052 pointer_default(unique)
1054 interface ITfPropertyStore
: IUnknown
1056 const DWORD TF_TU_CORRECTION
= 0x1;
1058 HRESULT GetType
([out] GUID
*pguid
);
1060 HRESULT GetDataType
([out] DWORD
*pdwReserved
);
1062 HRESULT GetData
([out] VARIANT *pvarValue
);
1064 HRESULT OnTextUpdated
(
1066 [in] ITfRange
*pRangeNew
,
1067 [out] BOOL
*pfAccept
);
1070 [in] ITfRange
*pRangeNew
,
1071 [out] BOOL
*pfFree
);
1074 [in] ITfRange
*pRangeThis
,
1075 [in] ITfRange
*pRangeNew
,
1076 [out] ITfPropertyStore
**ppPropStore
);
1079 [out] ITfPropertyStore
**pPropStore
);
1081 HRESULT GetPropertyRangeCreator
(
1082 [out] CLSID
*pclsid
);
1085 [in] IStream
*pStream
,
1091 uuid(f99d3f40
-8e32
-11d2
-bf46
-00105a2799b5
),
1092 pointer_default(unique)
1094 interface IEnumTfRanges
: IUnknown
1096 HRESULT Clone
([out] IEnumTfRanges
**ppEnum
);
1100 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfRange
**ppRange
,
1101 [out] ULONG
*pcFetched
);
1105 HRESULT Skip
(ULONG ulCount
);
1110 uuid(5efd22Ba
-7838-46cb
-88e2
-cadb14124f8f
),
1111 pointer_default(unique)
1113 interface IEnumITfCompositionView
: IUnknown
1115 HRESULT Clone
([out] IEnumITfCompositionView
**ppEnum
);
1119 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfCompositionView
**rgCompositionView
,
1120 [out] ULONG
*pcFetched
);
1124 HRESULT Skip
([in] ULONG ulCount
);
1129 uuid(20168d64
-5a8f
-4a5a
-b7bd
-cfa29f4D0fd9
),
1130 pointer_default(unique)
1132 interface ITfComposition
: IUnknown
1134 HRESULT GetRange
([out] ITfRange
**ppRange
);
1137 [in] TfEditCookie ecWrite
,
1138 [in] ITfRange
*pNewStart
);
1141 [in] TfEditCookie ecWrite
,
1142 [in] ITfRange
*pNewEnd
);
1144 HRESULT EndComposition
([in] TfEditCookie ecWrite
);
1149 uuid(a781718c
-579a
-4b15
-a280
-32b8577acc5e
),
1150 pointer_default(unique)
1152 interface ITfCompositionSink
: IUnknown
1154 HRESULT OnCompositionTerminated
(
1155 [in] TfEditCookie ecWrite
,
1156 [in] ITfComposition
*pComposition
);
1161 uuid(d40C8aae
-aC92
-4fc7
-9a11
-0ee0e23aa39b
),
1162 pointer_default(unique)
1164 interface ITfContextComposition
: IUnknown
1166 HRESULT StartComposition
(
1167 [in] TfEditCookie ecWrite
,
1168 [in] ITfRange
*pCompositionRange
,
1169 [in] ITfCompositionSink
*pSink
,
1170 [out] ITfComposition
**ppComposition
);
1172 HRESULT EnumCompositions
([out] IEnumITfCompositionView
**ppEnum
);
1174 HRESULT FindComposition
(
1175 [in] TfEditCookie ecRead
,
1176 [in] ITfRange
*pTestRange
,
1177 [out] IEnumITfCompositionView
**ppEnum
);
1179 HRESULT TakeOwnership
(
1180 [in] TfEditCookie ecWrite
,
1181 [in] ITfCompositionView
*pComposition
,
1182 [in] ITfCompositionSink
*pSink
,
1183 [out] ITfComposition
**ppComposition
);
1188 uuid(86462810-593b
-4916-9764-19c08e9ce110
),
1189 pointer_default(unique)
1191 interface ITfContextOwnerCompositionServices
: ITfContextComposition
1193 HRESULT TerminateComposition
([in] ITfCompositionView
*pComposition
);
1198 uuid(17d49a3d
-f8b8
-4b2f
-b254
-52319dd64c53
),
1199 pointer_default(unique)
1201 interface ITfReadOnlyProperty
: IUnknown
1203 HRESULT GetType
([out] GUID
*pguid
);
1206 [in] TfEditCookie ec
,
1207 [out] IEnumTfRanges
**ppEnum
,
1208 [in] ITfRange
*pTargetRange
);
1211 [in] TfEditCookie ec
,
1212 [in] ITfRange
*pRange
,
1213 [out] VARIANT *pvarValue
);
1215 HRESULT GetContext
([out] ITfContext
**ppContext
);
1220 uuid(e2449660
-9542-11d2
-bf46
-00105a2799b5
),
1221 pointer_default(unique)
1223 interface ITfProperty
: ITfReadOnlyProperty
1226 [in] TfEditCookie ec
,
1227 [in] ITfRange
*pRange
,
1228 [out] ITfRange
**ppRange
,
1229 [in] TfAnchor aPos
);
1231 HRESULT SetValueStore
(
1232 [in] TfEditCookie ec
,
1233 [in] ITfRange
*pRange
,
1234 [in] ITfPropertyStore
*pPropStore
);
1237 [in] TfEditCookie ec
,
1238 [in] ITfRange
*pRange
,
1239 [in] const VARIANT *pvarValue
);
1242 [in] TfEditCookie ec
,
1243 [in] ITfRange
*pRange
);
1248 uuid(bb08f7a9
-607a
-4384-8623-056892b64371
),
1249 pointer_default(unique)
1251 interface ITfCompartment
: IUnknown
1254 [in] TfClientId tid
,
1255 [in] const VARIANT *pvarValue
);
1258 [out] VARIANT *pvarValue
);
1263 uuid(7dcf57ac
-18ad
-438b
-824d
-979bffb74b7c
),
1264 pointer_default(unique)
1266 interface ITfCompartmentMgr
: IUnknown
1268 HRESULT GetCompartment
(
1270 [out] ITfCompartment
**ppcomp
);
1272 HRESULT ClearCompartment
(
1273 [in] TfClientId tid
,
1274 [in] REFGUID rguid
);
1276 HRESULT EnumCompartments
(
1277 [out] IEnumGUID
**ppEnum
);
1282 uuid(743abd5f
-f26d
-48df
-8cc5
-238492419b64
),
1283 pointer_default(unique)
1285 interface ITfCompartmentEventSink
: IUnknown
1288 [in] REFGUID rguid
);
1293 uuid(8f1a7ea6
-1654-4502-a86e
-b2902344d507
),
1294 pointer_default(unique)
1296 interface IEnumTfContexts
: IUnknown
1299 [out] IEnumTfContexts
**ppEnum
);
1303 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfContext
**rgContext
,
1304 [out] ULONG
*pcFetched
);
1309 [in] ULONG ulCount
);
1314 uuid(aa80e808
-2021-11d2
-93e0
-0060b067b86e
),
1315 pointer_default(unique)
1317 interface IEnumTfDocumentMgrs
: IUnknown
1320 [out] IEnumTfDocumentMgrs
**ppEnum
);
1324 [out, size_is(ulCount
), length_is(*pcFetched
)] ITfDocumentMgr
**rgDocumentMgr
,
1325 [out] ULONG
*pcFetched
);
1330 [in] ULONG ulCount
);
1335 uuid(73131f9c
-56a9
-49dd
-b0ee
-d046633f7528
),
1336 pointer_default(unique)
1338 interface ITfSourceSingle
: IUnknown
1340 HRESULT AdviseSingleSink
(
1341 [in] TfClientId tid
,
1343 [in, iid_is(riid
)] IUnknown
*punk
);
1345 HRESULT UnadviseSingleSink
(
1346 [in] TfClientId tid
,
1353 uuid(c0f1db0c
-3a20
-405c
-a303
-96b6010a885f
),
1354 pointer_default(unique)
1356 interface ITfThreadFocusSink
: IUnknown
1358 HRESULT OnSetThreadFocus
();
1360 HRESULT OnKillThreadFocus
();