winemaker: Add odbccp32 to default link list.
[wine/multimedia.git] / include / msctf.idl
blob47bec7161a5a0f5e3d0502c0f7a619213328d0e8
1 /*
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
19 #ifndef DO_NO_IMPORTS
20 import "oaidl.idl";
21 import "comcat.idl";
22 import "textstor.idl";
23 /* import "ctfutb.idl"; */
24 #endif
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;
36 interface ITfContext;
37 interface IEnumTfDocumentMgrs;
38 interface IEnumTfContexts;
39 interface ITfFunctionProvider;
40 interface IEnumTfFunctionProviders;
41 interface ITfCompartmentMgr;
42 interface ITfEditSession;
43 interface ITfRange;
44 interface ITfContextView;
45 interface IEnumTfContextViews;
46 interface ITfProperty;
47 interface ITfReadOnlyProperty;
48 interface IEnumTfProperties;
49 interface ITfRangeBackup;
50 interface IEnumTfLanguageProfiles;
51 interface ITfEditRecord;
54 object,
55 uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
56 pointer_default(unique)
58 interface ITfThreadMgr: IUnknown
60 HRESULT Activate(
61 [out] TfClientId *ptid);
63 HRESULT Deactivate();
65 HRESULT CreateDocumentMgr(
66 [out] ITfDocumentMgr **ppdim);
68 HRESULT EnumDocumentMgrs(
69 [out] IEnumTfDocumentMgrs **ppEnum);
71 HRESULT GetFocus(
72 [out] ITfDocumentMgr **ppdimFocus);
74 HRESULT SetFocus(
75 [in] ITfDocumentMgr *pdimFocus);
77 HRESULT AssociateFocus(
78 [in] HWND hwnd,
79 [in, unique] ITfDocumentMgr *pdimNew,
80 [out] ITfDocumentMgr **ppdimPrev);
82 HRESULT IsThreadFocus(
83 [out] BOOL *pfThreadFocus);
85 HRESULT GetFunctionProvider(
86 [in] REFCLSID clsid,
87 [out] ITfFunctionProvider **ppFuncProv);
89 HRESULT EnumFunctionProviders(
90 [out] IEnumTfFunctionProviders **ppEnum);
92 HRESULT GetGlobalCompartment(
93 [out] ITfCompartmentMgr **ppCompMgr);
98 object,
99 uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
100 pointer_default(unique)
102 interface ITfDocumentMgr: IUnknown
104 HRESULT CreateContext(
105 [in] TfClientId tidOwner,
106 [in] DWORD dwFlags,
107 [in, unique] IUnknown *punk,
108 [out] ITfContext **ppic,
109 [out] TfEditCookie *pecTextStore);
111 HRESULT Push(
112 [in] ITfContext *pic);
114 const DWORD TF_POPF_ALL = 0x0001;
116 HRESULT Pop(
117 [in] DWORD dwFlags);
119 HRESULT GetTop(
120 [out] ITfContext **ppic);
122 HRESULT GetBase(
123 [out] ITfContext **ppic);
125 HRESULT EnumContexts(
126 [out] IEnumTfContexts **ppEnum);
130 object,
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(
143 [in] TfClientId tid,
144 [in] ITfEditSession *pes,
145 [in] DWORD dwFlags,
146 [out] HRESULT *phrSession);
148 HRESULT InWriteSession(
149 [in] TfClientId tid,
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
156 TfActiveSelEnd ase;
157 BOOL fInterimChar;
158 } TF_SELECTIONSTYLE;
160 typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
162 ITfRange *range;
163 TF_SELECTIONSTYLE style;
164 } TF_SELECTION;
166 const ULONG TF_DEFAULT_SELECTION = TS_DEFAULT_SELECTION;
168 HRESULT GetSelection(
169 [in] TfEditCookie ec,
170 [in] ULONG ulIndex,
171 [in] ULONG ulCount,
172 [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
173 [out] ULONG *pcFetched);
175 HRESULT SetSelection(
176 [in] TfEditCookie ec,
177 [in] ULONG ulCount,
178 [in, size_is(ulCount)] const TF_SELECTION *pSelection);
180 HRESULT GetStart(
181 [in] TfEditCookie ec,
182 [out] ITfRange **ppStart);
184 HRESULT GetEnd(
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);
199 HRESULT EnumViews(
200 [out] IEnumTfContextViews **ppEnum);
202 HRESULT GetStatus(
203 [out] TF_STATUS *pdcs);
205 HRESULT GetProperty(
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,
215 [in] ULONG cProp,
216 [in, size_is(cAppProp)] const GUID **prgAppProp,
217 [in] ULONG cAppProp,
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);
234 object,
235 uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
236 pointer_default(unique)
238 interface ITfSource : IUnknown
240 HRESULT AdviseSink(
241 [in] REFIID riid,
242 [in, iid_is(riid)] IUnknown *punk,
243 [out] DWORD *pdwCookie);
245 HRESULT UnadviseSink(
246 [in] DWORD dwCookie);
250 object,
251 local,
252 uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
253 pointer_default(unique)
255 interface ITfInputProcessorProfiles : IUnknown
257 HRESULT Register(
258 [in] REFCLSID rclsid);
260 HRESULT Unregister(
261 [in] REFCLSID rclsid);
263 HRESULT AddLanguageProfile(
264 [in] REFCLSID rclsid,
265 [in] LANGID langid,
266 [in] REFGUID guidProfile,
267 [in, size_is(cchDesc)] const WCHAR *pchDesc,
268 [in] ULONG cchDesc,
269 [in, size_is(cchFile)] const WCHAR *pchIconFile,
270 [in] ULONG cchFile,
271 [in] ULONG uIconIndex);
273 HRESULT RemoveLanguageProfile(
274 [in] REFCLSID rclsid,
275 [in] LANGID langid,
276 [in] REFGUID guidProfile);
278 HRESULT EnumInputProcessorInfo(
279 [out] IEnumGUID **ppEnum);
281 HRESULT GetDefaultLanguageProfile(
282 [in] LANGID langid,
283 [in] REFGUID catid,
284 [out] CLSID *pclsid,
285 [out] GUID *pguidProfile);
287 HRESULT SetDefaultLanguageProfile(
288 [in] LANGID langid,
289 [in] REFCLSID rclsid,
290 [in] REFGUID guidProfiles);
292 HRESULT ActivateLanguageProfile(
293 [in] REFCLSID rclsid,
294 [in] LANGID langid,
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,
304 [in] LANGID langid,
305 [in] REFGUID guidProfile,
306 [out] BSTR *pbstrProfile);
308 HRESULT GetCurrentLanguage(
309 [out] LANGID *plangid);
311 HRESULT ChangeCurrentLanguage(
312 [in] LANGID langid);
314 HRESULT GetLanguageList(
315 [out] LANGID **ppLangId,
316 [out] ULONG *pulCount);
318 HRESULT EnumLanguageProfiles(
319 [in] LANGID langid,
320 [out] IEnumTfLanguageProfiles **ppEnum);
322 HRESULT EnableLanguageProfile(
323 [in] REFCLSID rclsid,
324 [in] LANGID langid,
325 [in] REFGUID guidProfile,
326 [in] BOOL fEnable);
328 HRESULT IsEnabledLanguageProfile(
329 [in] REFCLSID rclsid,
330 [in] LANGID langid,
331 [in] REFGUID guidProfile,
332 [out] BOOL *pfEnable);
334 HRESULT EnableLanguageProfileByDefault(
335 [in] REFCLSID rclsid,
336 [in] LANGID langid,
337 [in] REFGUID guidProfile,
338 [in] BOOL fEnable);
340 HRESULT SubstituteKeyboardLayout(
341 [in] REFCLSID rclsid,
342 [in] LANGID langid,
343 [in] REFGUID guidProfile,
344 [in] HKL hKL);
348 object,
349 local,
350 uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
351 pointer_default(unique)
353 interface ITfCategoryMgr : IUnknown
355 HRESULT RegisterCategory([in] REFCLSID rclsid,
356 [in] REFGUID rcatid,
357 [in] REFGUID rguid);
359 HRESULT UnregisterCategory([in] REFCLSID rclsid,
360 [in] REFGUID rcatid,
361 [in] REFGUID rguid);
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,
370 [out] GUID *pcatid,
371 [in, size_is(ulCount)] const GUID **ppcatidList,
372 [in] ULONG ulCount);
374 HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
375 [in] REFGUID rguid,
376 [in, size_is(cch)] const WCHAR *pchDesc,
377 [in] ULONG cch);
379 HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
380 [in] REFGUID rguid);
382 HRESULT GetGUIDDescription([in] REFGUID rguid,
383 [out] BSTR *pbstrDesc);
385 HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
386 [in] REFGUID rguid,
387 [in] DWORD dw);
389 HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
390 [in] REFGUID rguid);
392 HRESULT GetGUIDDWORD([in] REFGUID rguid,
393 [out] DWORD *pdw);
395 HRESULT RegisterGUID([in] REFGUID rguid,
396 [out] TfGuidAtom *pguidatom);
398 HRESULT GetGUID([in] TfGuidAtom guidatom,
399 [out] GUID *pguid);
401 HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
402 [in] REFGUID rguid,
403 [out] BOOL *pfEqual);
407 object,
408 uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
409 pointer_default(unique)
411 interface ITfTextEditSink : IUnknown
413 HRESULT OnEndEdit(
414 [in] ITfContext *pic,
415 [in] TfEditCookie ecReadOnly,
416 [in] ITfEditRecord *pEditRecord);