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
;
55 uuid(aa80e801
-2021-11d2
-93e0
-0060b067b86e
),
56 pointer_default(unique)
58 interface ITfThreadMgr
: IUnknown
61 [out] TfClientId
*ptid
);
65 HRESULT CreateDocumentMgr
(
66 [out] ITfDocumentMgr
**ppdim
);
68 HRESULT EnumDocumentMgrs
(
69 [out] IEnumTfDocumentMgrs
**ppEnum
);
72 [out] ITfDocumentMgr
**ppdimFocus
);
75 [in] ITfDocumentMgr
*pdimFocus
);
77 HRESULT AssociateFocus
(
79 [in, unique] ITfDocumentMgr
*pdimNew
,
80 [out] ITfDocumentMgr
**ppdimPrev
);
82 HRESULT IsThreadFocus
(
83 [out] BOOL
*pfThreadFocus
);
85 HRESULT GetFunctionProvider
(
87 [out] ITfFunctionProvider
**ppFuncProv
);
89 HRESULT EnumFunctionProviders
(
90 [out] IEnumTfFunctionProviders
**ppEnum
);
92 HRESULT GetGlobalCompartment
(
93 [out] ITfCompartmentMgr
**ppCompMgr
);
99 uuid(aa80e7f4
-2021-11d2
-93e0
-0060b067b86e
),
100 pointer_default(unique)
102 interface ITfDocumentMgr
: IUnknown
104 HRESULT CreateContext
(
105 [in] TfClientId tidOwner
,
107 [in, unique] IUnknown
*punk
,
108 [out] ITfContext
**ppic
,
109 [out] TfEditCookie
*pecTextStore
);
112 [in] ITfContext
*pic
);
114 const DWORD TF_POPF_ALL
= 0x0001;
120 [out] ITfContext
**ppic
);
123 [out] ITfContext
**ppic
);
125 HRESULT EnumContexts
(
126 [out] IEnumTfContexts
**ppEnum
);
131 uuid(aa80e7fd
-2021-11d2
-93e0
-0060b067b86e
),
132 pointer_default(unique)
134 interface ITfContext
: IUnknown
136 const DWORD TF_ES_ASYNCDONTCARE
= 0x0;
137 const DWORD TF_ES_SYNC
= 0x1;
138 const DWORD TF_ES_READ
= 0x2;
139 const DWORD TF_ES_READWRITE
= 0x6;
140 const DWORD TF_ES_ASYNC
= 0x8;
142 HRESULT RequestEditSession
(
144 [in] ITfEditSession
*pes
,
146 [out] HRESULT *phrSession
);
148 HRESULT InWriteSession
(
150 [out] BOOL
*pfWriteSession
);
152 typedef [uuid(1690be9b
-d3e9
-49f6
-8d8b
-51b905af4c43
)] enum { TF_AE_NONE
, TF_AE_START
, TF_AE_END
} TfActiveSelEnd
;
154 typedef [uuid(36ae42a4
-6989-4bdc
-b48a
-6137b7bf2e42
)] struct TF_SELECTIONSTYLE
160 typedef [uuid(75eb22f2
-b0bf
-46a8
-8006-975a3b6efcf1
)] struct TF_SELECTION
163 TF_SELECTIONSTYLE style
;
166 const ULONG TF_DEFAULT_SELECTION
= TS_DEFAULT_SELECTION
;
168 HRESULT GetSelection
(
169 [in] TfEditCookie ec
,
172 [out, size_is(ulCount
), length_is(*pcFetched
)] TF_SELECTION
*pSelection
,
173 [out] ULONG
*pcFetched
);
175 HRESULT SetSelection
(
176 [in] TfEditCookie ec
,
178 [in, size_is(ulCount
)] const TF_SELECTION
*pSelection
);
181 [in] TfEditCookie ec
,
182 [out] ITfRange
**ppStart
);
185 [in] TfEditCookie ec
,
186 [out] ITfRange
**ppEnd
);
188 typedef [uuid(bc7d979a
-846a
-444d
-afef
-0a9bfa82b961
)] TS_STATUS TF_STATUS
;
189 const DWORD TF_SD_READONLY
= TS_SD_READONLY
;
190 const DWORD TF_SD_LOADING
= TS_SD_LOADING
;
191 const DWORD TF_SS_DISJOINTSEL
= TS_SS_DISJOINTSEL
;
192 const DWORD TF_SS_REGIONS
= TS_SS_REGIONS
;
193 const DWORD TF_SS_TRANSITORY
= TS_SS_TRANSITORY
;
196 HRESULT GetActiveView
(
197 [out] ITfContextView
**ppView
);
200 [out] IEnumTfContextViews
**ppEnum
);
203 [out] TF_STATUS
*pdcs
);
206 [in] REFGUID guidProp
,
207 [out] ITfProperty
**ppProp
);
209 HRESULT GetAppProperty
(
210 [in] REFGUID guidProp
,
211 [out] ITfReadOnlyProperty
**ppProp
);
213 HRESULT TrackProperties
(
214 [in, size_is(cProp
)] const GUID
**prgProp
,
216 [in, size_is(cAppProp
)] const GUID
**prgAppProp
,
218 [out] ITfReadOnlyProperty
**ppProperty
);
220 HRESULT EnumProperties
(
221 [out] IEnumTfProperties
**ppEnum
);
223 HRESULT GetDocumentMgr
(
224 [out] ITfDocumentMgr
**ppDm
);
226 HRESULT CreateRangeBackup
(
227 [in] TfEditCookie ec
,
228 [in] ITfRange
*pRange
,
229 [out] ITfRangeBackup
**ppBackup
);
235 uuid(4ea48a35
-60ae
-446f
-8fd6
-e6a8d82459f7
),
236 pointer_default(unique)
238 interface ITfSource
: IUnknown
242 [in, iid_is(riid
)] IUnknown
*punk
,
243 [out] DWORD
*pdwCookie
);
245 HRESULT UnadviseSink
(
246 [in] DWORD dwCookie
);
252 uuid(1F02B6C5
-7842-4EE6
-8A0B
-9A24183A95CA
),
253 pointer_default(unique)
255 interface ITfInputProcessorProfiles
: IUnknown
258 [in] REFCLSID rclsid
);
261 [in] REFCLSID rclsid
);
263 HRESULT AddLanguageProfile
(
264 [in] REFCLSID rclsid
,
266 [in] REFGUID guidProfile
,
267 [in, size_is(cchDesc
)] const WCHAR
*pchDesc
,
269 [in, size_is(cchFile
)] const WCHAR
*pchIconFile
,
271 [in] ULONG uIconIndex
);
273 HRESULT RemoveLanguageProfile
(
274 [in] REFCLSID rclsid
,
276 [in] REFGUID guidProfile
);
278 HRESULT EnumInputProcessorInfo
(
279 [out] IEnumGUID
**ppEnum
);
281 HRESULT GetDefaultLanguageProfile
(
285 [out] GUID
*pguidProfile
);
287 HRESULT SetDefaultLanguageProfile
(
289 [in] REFCLSID rclsid
,
290 [in] REFGUID guidProfiles
);
292 HRESULT ActivateLanguageProfile
(
293 [in] REFCLSID rclsid
,
295 [in] REFGUID guidProfiles
);
297 HRESULT GetActiveLanguageProfile
(
298 [in] REFCLSID rclsid
,
299 [out] LANGID
*plangid
,
300 [out] GUID
*pguidProfile
);
302 HRESULT GetLanguageProfileDescription
(
303 [in] REFCLSID rclsid
,
305 [in] REFGUID guidProfile
,
306 [out] BSTR *pbstrProfile
);
308 HRESULT GetCurrentLanguage
(
309 [out] LANGID
*plangid
);
311 HRESULT ChangeCurrentLanguage
(
314 HRESULT GetLanguageList
(
315 [out] LANGID
**ppLangId
,
316 [out] ULONG
*pulCount
);
318 HRESULT EnumLanguageProfiles
(
320 [out] IEnumTfLanguageProfiles
**ppEnum
);
322 HRESULT EnableLanguageProfile
(
323 [in] REFCLSID rclsid
,
325 [in] REFGUID guidProfile
,
328 HRESULT IsEnabledLanguageProfile
(
329 [in] REFCLSID rclsid
,
331 [in] REFGUID guidProfile
,
332 [out] BOOL
*pfEnable
);
334 HRESULT EnableLanguageProfileByDefault
(
335 [in] REFCLSID rclsid
,
337 [in] REFGUID guidProfile
,
340 HRESULT SubstituteKeyboardLayout
(
341 [in] REFCLSID rclsid
,
343 [in] REFGUID guidProfile
,
350 uuid(c3acefb5
-f69d
-4905-938f
-fcadcf4be830
),
351 pointer_default(unique)
353 interface ITfCategoryMgr
: IUnknown
355 HRESULT RegisterCategory
([in] REFCLSID rclsid
,
359 HRESULT UnregisterCategory
([in] REFCLSID rclsid
,
363 HRESULT EnumCategoriesInItem
([in] REFGUID rguid
,
364 [out] IEnumGUID
**ppEnum
);
366 HRESULT EnumItemsInCategory
([in] REFGUID rcatid
,
367 [out] IEnumGUID
**ppEnum
);
369 HRESULT FindClosestCategory
([in] REFGUID rguid
,
371 [in, size_is(ulCount
)] const GUID
**ppcatidList
,
374 HRESULT RegisterGUIDDescription
([in] REFCLSID rclsid
,
376 [in, size_is(cch
)] const WCHAR
*pchDesc
,
379 HRESULT UnregisterGUIDDescription
([in] REFCLSID rclsid
,
382 HRESULT GetGUIDDescription
([in] REFGUID rguid
,
383 [out] BSTR *pbstrDesc
);
385 HRESULT RegisterGUIDDWORD
([in] REFCLSID rclsid
,
389 HRESULT UnregisterGUIDDWORD
([in] REFCLSID rclsid
,
392 HRESULT GetGUIDDWORD
([in] REFGUID rguid
,
395 HRESULT RegisterGUID
([in] REFGUID rguid
,
396 [out] TfGuidAtom
*pguidatom
);
398 HRESULT GetGUID
([in] TfGuidAtom guidatom
,
401 HRESULT IsEqualTfGuidAtom
([in] TfGuidAtom guidatom
,
403 [out] BOOL
*pfEqual
);
408 uuid(8127d409
-ccd3
-4683-967a
-b43d5b482bf7
),
409 pointer_default(unique)
411 interface ITfTextEditSink
: IUnknown
414 [in] ITfContext
*pic
,
415 [in] TfEditCookie ecReadOnly
,
416 [in] ITfEditRecord
*pEditRecord
);