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"; */
26 cpp_quote
("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
27 cpp_quote
("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
28 cpp_quote
("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
29 cpp_quote
("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
31 /* GUIDs for Categories */
32 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
33 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
34 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
35 cpp_quote
("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
37 typedef [uuid(7213778c
-7bb0
-4270-b050
-6189ee594e97
)] DWORD TfEditCookie
;
38 typedef [uuid(de403c21
-89fd
-4f85
-8b87
-64584d063fbc
)] DWORD TfClientId
;
39 typedef [uuid(88a9c478
-f3ec
-4763-8345-cd9250443f8d
)] DWORD TfGuidAtom
;
41 interface ITfDocumentMgr
;
43 interface IEnumTfDocumentMgrs
;
44 interface IEnumTfContexts
;
45 interface ITfFunctionProvider
;
46 interface IEnumTfFunctionProviders
;
47 interface ITfCompartmentMgr
;
48 interface ITfEditSession
;
50 interface ITfContextView
;
51 interface IEnumTfContextViews
;
52 interface ITfProperty
;
53 interface ITfReadOnlyProperty
;
54 interface IEnumTfProperties
;
55 interface ITfRangeBackup
;
56 interface IEnumTfLanguageProfiles
;
57 interface ITfEditRecord
;
58 interface ITfCompositionView
;
62 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
63 pointer_default(unique)
65 interface ITfThreadMgr
: IUnknown
68 [out] TfClientId
*ptid
);
72 HRESULT CreateDocumentMgr
(
73 [out] ITfDocumentMgr
**ppdim
);
75 HRESULT EnumDocumentMgrs
(
76 [out] IEnumTfDocumentMgrs
**ppEnum
);
79 [out] ITfDocumentMgr
**ppdimFocus
);
82 [in] ITfDocumentMgr
*pdimFocus
);
84 HRESULT AssociateFocus
(
86 [in, unique] ITfDocumentMgr
*pdimNew
,
87 [out] ITfDocumentMgr
**ppdimPrev
);
89 HRESULT IsThreadFocus
(
90 [out] BOOL
*pfThreadFocus
);
92 HRESULT GetFunctionProvider
(
94 [out] ITfFunctionProvider
**ppFuncProv
);
96 HRESULT EnumFunctionProviders
(
97 [out] IEnumTfFunctionProviders
**ppEnum
);
99 HRESULT GetGlobalCompartment
(
100 [out] ITfCompartmentMgr
**ppCompMgr
);
106 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
107 pointer_default(unique)
109 interface ITfDocumentMgr
: IUnknown
111 HRESULT CreateContext
(
112 [in] TfClientId tidOwner
,
114 [in, unique] IUnknown
*punk
,
115 [out] ITfContext
**ppic
,
116 [out] TfEditCookie
*pecTextStore
);
119 [in] ITfContext
*pic
);
121 const DWORD TF_POPF_ALL
= 0x0001;
127 [out] ITfContext
**ppic
);
130 [out] ITfContext
**ppic
);
132 HRESULT EnumContexts
(
133 [out] IEnumTfContexts
**ppEnum
);
138 uuid(aa80e7fd
-2021-11d2
-93e0
-0060b067b86e
),
139 pointer_default(unique)
141 interface ITfContext
: IUnknown
143 const DWORD TF_ES_ASYNCDONTCARE
= 0x0;
144 const DWORD TF_ES_SYNC
= 0x1;
145 const DWORD TF_ES_READ
= 0x2;
146 const DWORD TF_ES_READWRITE
= 0x6;
147 const DWORD TF_ES_ASYNC
= 0x8;
149 HRESULT RequestEditSession
(
151 [in] ITfEditSession
*pes
,
153 [out] HRESULT *phrSession
);
155 HRESULT InWriteSession
(
157 [out] BOOL
*pfWriteSession
);
159 typedef [uuid(1690be9b
-d3e9
-49f6
-8d8b
-51b905af4c43
)] enum { TF_AE_NONE
, TF_AE_START
, TF_AE_END
} TfActiveSelEnd
;
161 typedef [uuid(36ae42a4
-6989-4bdc
-b48a
-6137b7bf2e42
)] struct TF_SELECTIONSTYLE
167 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
170 TF_SELECTIONSTYLE style
;
173 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
175 HRESULT GetSelection
(
176 [in] TfEditCookie ec
,
179 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
180 [out] ULONG
*pcFetched
);
182 HRESULT SetSelection
(
183 [in] TfEditCookie ec
,
185 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
188 [in] TfEditCookie ec
,
189 [out] ITfRange
**ppStart
);
192 [in] TfEditCookie ec
,
193 [out] ITfRange
**ppEnd
);
195 typedef [uuid(bc7d979a
-846a
-444d
-afef
-0a9bfa82b961
)] TS_STATUS TF_STATUS
;
196 const DWORD TF_SD_READONLY
= TS_SD_READONLY
;
197 const DWORD TF_SD_LOADING
= TS_SD_LOADING
;
198 const DWORD TF_SS_DISJOINTSEL
= TS_SS_DISJOINTSEL
;
199 const DWORD TF_SS_REGIONS
= TS_SS_REGIONS
;
200 const DWORD TF_SS_TRANSITORY
= TS_SS_TRANSITORY
;
203 HRESULT GetActiveView
(
204 [out] ITfContextView
**ppView
);
207 [out] IEnumTfContextViews
**ppEnum
);
210 [out] TF_STATUS
*pdcs
);
213 [in] REFGUID guidProp
,
214 [out] ITfProperty
**ppProp
);
216 HRESULT GetAppProperty
(
217 [in] REFGUID guidProp
,
218 [out] ITfReadOnlyProperty
**ppProp
);
220 HRESULT TrackProperties
(
221 [in, size_is(cProp
)] const GUID
**prgProp
,
223 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
225 [out] ITfReadOnlyProperty
**ppProperty
);
227 HRESULT EnumProperties
(
228 [out] IEnumTfProperties
**ppEnum
);
230 HRESULT GetDocumentMgr
(
231 [out] ITfDocumentMgr
**ppDm
);
233 HRESULT CreateRangeBackup
(
234 [in] TfEditCookie ec
,
235 [in] ITfRange
*pRange
,
236 [out] ITfRangeBackup
**ppBackup
);
242 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
243 pointer_default(unique)
245 interface ITfSource
: IUnknown
249 [in, iid_is(riid
)] IUnknown
*punk
,
250 [out] DWORD
*pdwCookie
);
252 HRESULT UnadviseSink
(
253 [in] DWORD dwCookie
);
259 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
260 pointer_default(unique)
262 interface ITfInputProcessorProfiles
: IUnknown
265 [in] REFCLSID rclsid
);
268 [in] REFCLSID rclsid
);
270 HRESULT AddLanguageProfile
(
271 [in] REFCLSID rclsid
,
273 [in] REFGUID guidProfile
,
274 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
276 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
278 [in] ULONG uIconIndex
);
280 HRESULT RemoveLanguageProfile
(
281 [in] REFCLSID rclsid
,
283 [in] REFGUID guidProfile
);
285 HRESULT EnumInputProcessorInfo
(
286 [out] IEnumGUID
**ppEnum
);
288 HRESULT GetDefaultLanguageProfile
(
292 [out] GUID
*pguidProfile
);
294 HRESULT SetDefaultLanguageProfile
(
296 [in] REFCLSID rclsid
,
297 [in] REFGUID guidProfiles
);
299 HRESULT ActivateLanguageProfile
(
300 [in] REFCLSID rclsid
,
302 [in] REFGUID guidProfiles
);
304 HRESULT GetActiveLanguageProfile
(
305 [in] REFCLSID rclsid
,
306 [out] LANGID
*plangid
,
307 [out] GUID
*pguidProfile
);
309 HRESULT GetLanguageProfileDescription
(
310 [in] REFCLSID rclsid
,
312 [in] REFGUID guidProfile
,
313 [out] BSTR *pbstrProfile
);
315 HRESULT GetCurrentLanguage
(
316 [out] LANGID
*plangid
);
318 HRESULT ChangeCurrentLanguage
(
321 HRESULT GetLanguageList
(
322 [out] LANGID
**ppLangId
,
323 [out] ULONG
*pulCount
);
325 HRESULT EnumLanguageProfiles
(
327 [out] IEnumTfLanguageProfiles
**ppEnum
);
329 HRESULT EnableLanguageProfile
(
330 [in] REFCLSID rclsid
,
332 [in] REFGUID guidProfile
,
335 HRESULT IsEnabledLanguageProfile
(
336 [in] REFCLSID rclsid
,
338 [in] REFGUID guidProfile
,
339 [out] BOOL
*pfEnable
);
341 HRESULT EnableLanguageProfileByDefault
(
342 [in] REFCLSID rclsid
,
344 [in] REFGUID guidProfile
,
347 HRESULT SubstituteKeyboardLayout
(
348 [in] REFCLSID rclsid
,
350 [in] REFGUID guidProfile
,
357 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
358 pointer_default(unique)
360 interface ITfCategoryMgr
: IUnknown
362 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
366 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
370 HRESULT EnumCategoriesInItem
([in] REFGUID rguid
,
371 [out] IEnumGUID
**ppEnum
);
373 HRESULT EnumItemsInCategory
([in] REFGUID rcatid
,
374 [out] IEnumGUID
**ppEnum
);
376 HRESULT FindClosestCategory
([in] REFGUID rguid
,
378 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
381 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
383 [in, size_is(cch
)] const WCHAR
*pchDesc
,
386 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
389 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
390 [out] BSTR *pbstrDesc
);
392 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
396 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
399 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
402 HRESULT RegisterGUID
([in] REFGUID rguid
,
403 [out] TfGuidAtom
*pguidatom
);
405 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
408 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
410 [out] BOOL
*pfEqual
);
415 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
416 pointer_default(unique)
418 interface ITfTextEditSink
: IUnknown
421 [in] ITfContext
*pic
,
422 [in] TfEditCookie ecReadOnly
,
423 [in] ITfEditRecord
*pEditRecord
);
428 uuid(5F20AA40
-B57A
-4F34
-96AB
-3576F377CC79
),
429 pointer_default(unique)
431 interface ITfContextOwnerCompositionSink
: IUnknown
433 HRESULT OnStartComposition
(
434 [in] ITfCompositionView
*pComposition
,
437 HRESULT OnUpdateComposition
(
438 [in] ITfCompositionView
*pComposition
,
439 [in] ITfRange
*pRangeNew
);
441 HRESULT OnEndComposition
(
442 [in] ITfCompositionView
*pComposition
);