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 typedef [uuid(7213778c
-7bb0
-4270-b050
-6189ee594e97
)] DWORD TfEditCookie
;
32 typedef [uuid(de403c21
-89fd
-4f85
-8b87
-64584d063fbc
)] DWORD TfClientId
;
33 typedef [uuid(88a9c478
-f3ec
-4763-8345-cd9250443f8d
)] DWORD TfGuidAtom
;
35 interface ITfDocumentMgr
;
37 interface IEnumTfDocumentMgrs
;
38 interface IEnumTfContexts
;
39 interface ITfFunctionProvider
;
40 interface IEnumTfFunctionProviders
;
41 interface ITfCompartmentMgr
;
42 interface ITfEditSession
;
44 interface ITfContextView
;
45 interface IEnumTfContextViews
;
46 interface ITfProperty
;
47 interface ITfReadOnlyProperty
;
48 interface IEnumTfProperties
;
49 interface ITfRangeBackup
;
50 interface IEnumTfLanguageProfiles
;
51 interface ITfEditRecord
;
52 interface ITfCompositionView
;
56 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
57 pointer_default(unique)
59 interface ITfThreadMgr
: IUnknown
62 [out] TfClientId
*ptid
);
66 HRESULT CreateDocumentMgr
(
67 [out] ITfDocumentMgr
**ppdim
);
69 HRESULT EnumDocumentMgrs
(
70 [out] IEnumTfDocumentMgrs
**ppEnum
);
73 [out] ITfDocumentMgr
**ppdimFocus
);
76 [in] ITfDocumentMgr
*pdimFocus
);
78 HRESULT AssociateFocus
(
80 [in, unique] ITfDocumentMgr
*pdimNew
,
81 [out] ITfDocumentMgr
**ppdimPrev
);
83 HRESULT IsThreadFocus
(
84 [out] BOOL
*pfThreadFocus
);
86 HRESULT GetFunctionProvider
(
88 [out] ITfFunctionProvider
**ppFuncProv
);
90 HRESULT EnumFunctionProviders
(
91 [out] IEnumTfFunctionProviders
**ppEnum
);
93 HRESULT GetGlobalCompartment
(
94 [out] ITfCompartmentMgr
**ppCompMgr
);
100 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
101 pointer_default(unique)
103 interface ITfDocumentMgr
: IUnknown
105 HRESULT CreateContext
(
106 [in] TfClientId tidOwner
,
108 [in, unique] IUnknown
*punk
,
109 [out] ITfContext
**ppic
,
110 [out] TfEditCookie
*pecTextStore
);
113 [in] ITfContext
*pic
);
115 const DWORD TF_POPF_ALL
= 0x0001;
121 [out] ITfContext
**ppic
);
124 [out] ITfContext
**ppic
);
126 HRESULT EnumContexts
(
127 [out] IEnumTfContexts
**ppEnum
);
132 uuid(aa80e7fd
-2021-11d2
-93e0
-0060b067b86e
),
133 pointer_default(unique)
135 interface ITfContext
: IUnknown
137 const DWORD TF_ES_ASYNCDONTCARE
= 0x0;
138 const DWORD TF_ES_SYNC
= 0x1;
139 const DWORD TF_ES_READ
= 0x2;
140 const DWORD TF_ES_READWRITE
= 0x6;
141 const DWORD TF_ES_ASYNC
= 0x8;
143 HRESULT RequestEditSession
(
145 [in] ITfEditSession
*pes
,
147 [out] HRESULT *phrSession
);
149 HRESULT InWriteSession
(
151 [out] BOOL
*pfWriteSession
);
153 typedef [uuid(1690be9b
-d3e9
-49f6
-8d8b
-51b905af4c43
)] enum { TF_AE_NONE
, TF_AE_START
, TF_AE_END
} TfActiveSelEnd
;
155 typedef [uuid(36ae42a4
-6989-4bdc
-b48a
-6137b7bf2e42
)] struct TF_SELECTIONSTYLE
161 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
164 TF_SELECTIONSTYLE style
;
167 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
169 HRESULT GetSelection
(
170 [in] TfEditCookie ec
,
173 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
174 [out] ULONG
*pcFetched
);
176 HRESULT SetSelection
(
177 [in] TfEditCookie ec
,
179 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
182 [in] TfEditCookie ec
,
183 [out] ITfRange
**ppStart
);
186 [in] TfEditCookie ec
,
187 [out] ITfRange
**ppEnd
);
189 typedef [uuid(bc7d979a
-846a
-444d
-afef
-0a9bfa82b961
)] TS_STATUS TF_STATUS
;
190 const DWORD TF_SD_READONLY
= TS_SD_READONLY
;
191 const DWORD TF_SD_LOADING
= TS_SD_LOADING
;
192 const DWORD TF_SS_DISJOINTSEL
= TS_SS_DISJOINTSEL
;
193 const DWORD TF_SS_REGIONS
= TS_SS_REGIONS
;
194 const DWORD TF_SS_TRANSITORY
= TS_SS_TRANSITORY
;
197 HRESULT GetActiveView
(
198 [out] ITfContextView
**ppView
);
201 [out] IEnumTfContextViews
**ppEnum
);
204 [out] TF_STATUS
*pdcs
);
207 [in] REFGUID guidProp
,
208 [out] ITfProperty
**ppProp
);
210 HRESULT GetAppProperty
(
211 [in] REFGUID guidProp
,
212 [out] ITfReadOnlyProperty
**ppProp
);
214 HRESULT TrackProperties
(
215 [in, size_is(cProp
)] const GUID
**prgProp
,
217 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
219 [out] ITfReadOnlyProperty
**ppProperty
);
221 HRESULT EnumProperties
(
222 [out] IEnumTfProperties
**ppEnum
);
224 HRESULT GetDocumentMgr
(
225 [out] ITfDocumentMgr
**ppDm
);
227 HRESULT CreateRangeBackup
(
228 [in] TfEditCookie ec
,
229 [in] ITfRange
*pRange
,
230 [out] ITfRangeBackup
**ppBackup
);
236 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
237 pointer_default(unique)
239 interface ITfSource
: IUnknown
243 [in, iid_is(riid
)] IUnknown
*punk
,
244 [out] DWORD
*pdwCookie
);
246 HRESULT UnadviseSink
(
247 [in] DWORD dwCookie
);
253 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
254 pointer_default(unique)
256 interface ITfInputProcessorProfiles
: IUnknown
259 [in] REFCLSID rclsid
);
262 [in] REFCLSID rclsid
);
264 HRESULT AddLanguageProfile
(
265 [in] REFCLSID rclsid
,
267 [in] REFGUID guidProfile
,
268 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
270 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
272 [in] ULONG uIconIndex
);
274 HRESULT RemoveLanguageProfile
(
275 [in] REFCLSID rclsid
,
277 [in] REFGUID guidProfile
);
279 HRESULT EnumInputProcessorInfo
(
280 [out] IEnumGUID
**ppEnum
);
282 HRESULT GetDefaultLanguageProfile
(
286 [out] GUID
*pguidProfile
);
288 HRESULT SetDefaultLanguageProfile
(
290 [in] REFCLSID rclsid
,
291 [in] REFGUID guidProfiles
);
293 HRESULT ActivateLanguageProfile
(
294 [in] REFCLSID rclsid
,
296 [in] REFGUID guidProfiles
);
298 HRESULT GetActiveLanguageProfile
(
299 [in] REFCLSID rclsid
,
300 [out] LANGID
*plangid
,
301 [out] GUID
*pguidProfile
);
303 HRESULT GetLanguageProfileDescription
(
304 [in] REFCLSID rclsid
,
306 [in] REFGUID guidProfile
,
307 [out] BSTR *pbstrProfile
);
309 HRESULT GetCurrentLanguage
(
310 [out] LANGID
*plangid
);
312 HRESULT ChangeCurrentLanguage
(
315 HRESULT GetLanguageList
(
316 [out] LANGID
**ppLangId
,
317 [out] ULONG
*pulCount
);
319 HRESULT EnumLanguageProfiles
(
321 [out] IEnumTfLanguageProfiles
**ppEnum
);
323 HRESULT EnableLanguageProfile
(
324 [in] REFCLSID rclsid
,
326 [in] REFGUID guidProfile
,
329 HRESULT IsEnabledLanguageProfile
(
330 [in] REFCLSID rclsid
,
332 [in] REFGUID guidProfile
,
333 [out] BOOL
*pfEnable
);
335 HRESULT EnableLanguageProfileByDefault
(
336 [in] REFCLSID rclsid
,
338 [in] REFGUID guidProfile
,
341 HRESULT SubstituteKeyboardLayout
(
342 [in] REFCLSID rclsid
,
344 [in] REFGUID guidProfile
,
351 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
352 pointer_default(unique)
354 interface ITfCategoryMgr
: IUnknown
356 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
360 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
364 HRESULT EnumCategoriesInItem
([in] REFGUID rguid
,
365 [out] IEnumGUID
**ppEnum
);
367 HRESULT EnumItemsInCategory
([in] REFGUID rcatid
,
368 [out] IEnumGUID
**ppEnum
);
370 HRESULT FindClosestCategory
([in] REFGUID rguid
,
372 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
375 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
377 [in, size_is(cch
)] const WCHAR
*pchDesc
,
380 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
383 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
384 [out] BSTR *pbstrDesc
);
386 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
390 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
393 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
396 HRESULT RegisterGUID
([in] REFGUID rguid
,
397 [out] TfGuidAtom
*pguidatom
);
399 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
402 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
404 [out] BOOL
*pfEqual
);
409 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
410 pointer_default(unique)
412 interface ITfTextEditSink
: IUnknown
415 [in] ITfContext
*pic
,
416 [in] TfEditCookie ecReadOnly
,
417 [in] ITfEditRecord
*pEditRecord
);
422 uuid(5F20AA40
-B57A
-4F34
-96AB
-3576F377CC79
),
423 pointer_default(unique)
425 interface ITfContextOwnerCompositionSink
: IUnknown
427 HRESULT OnStartComposition
(
428 [in] ITfCompositionView
*pComposition
,
431 HRESULT OnUpdateComposition
(
432 [in] ITfCompositionView
*pComposition
,
433 [in] ITfRange
*pRangeNew
);
435 HRESULT OnEndComposition
(
436 [in] ITfCompositionView
*pComposition
);