winemaker: Update man page.
[wine.git] / include / msctf.idl
blobc81c0dae9b8906ead59d0280048133aa6393b90c
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 /* 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;
42 interface ITfContext;
43 interface IEnumTfDocumentMgrs;
44 interface IEnumTfContexts;
45 interface ITfFunctionProvider;
46 interface IEnumTfFunctionProviders;
47 interface ITfCompartmentMgr;
48 interface ITfEditSession;
49 interface ITfRange;
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;
60 typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
62 CLSID clsid;
63 LANGID langid;
64 GUID catid;
65 BOOL fActive;
66 GUID guidProfile;
67 } TF_LANGUAGEPROFILE;
70 object,
71 uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
72 pointer_default(unique)
74 interface ITfThreadMgr: IUnknown
76 HRESULT Activate(
77 [out] TfClientId *ptid);
79 HRESULT Deactivate();
81 HRESULT CreateDocumentMgr(
82 [out] ITfDocumentMgr **ppdim);
84 HRESULT EnumDocumentMgrs(
85 [out] IEnumTfDocumentMgrs **ppEnum);
87 HRESULT GetFocus(
88 [out] ITfDocumentMgr **ppdimFocus);
90 HRESULT SetFocus(
91 [in] ITfDocumentMgr *pdimFocus);
93 HRESULT AssociateFocus(
94 [in] HWND hwnd,
95 [in, unique] ITfDocumentMgr *pdimNew,
96 [out] ITfDocumentMgr **ppdimPrev);
98 HRESULT IsThreadFocus(
99 [out] BOOL *pfThreadFocus);
101 HRESULT GetFunctionProvider(
102 [in] REFCLSID clsid,
103 [out] ITfFunctionProvider **ppFuncProv);
105 HRESULT EnumFunctionProviders(
106 [out] IEnumTfFunctionProviders **ppEnum);
108 HRESULT GetGlobalCompartment(
109 [out] ITfCompartmentMgr **ppCompMgr);
114 object,
115 uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
116 pointer_default(unique)
118 interface ITfDocumentMgr: IUnknown
120 HRESULT CreateContext(
121 [in] TfClientId tidOwner,
122 [in] DWORD dwFlags,
123 [in, unique] IUnknown *punk,
124 [out] ITfContext **ppic,
125 [out] TfEditCookie *pecTextStore);
127 HRESULT Push(
128 [in] ITfContext *pic);
130 const DWORD TF_POPF_ALL = 0x0001;
132 HRESULT Pop(
133 [in] DWORD dwFlags);
135 HRESULT GetTop(
136 [out] ITfContext **ppic);
138 HRESULT GetBase(
139 [out] ITfContext **ppic);
141 HRESULT EnumContexts(
142 [out] IEnumTfContexts **ppEnum);
146 object,
147 uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
148 pointer_default(unique)
150 interface ITfContext : IUnknown
152 const DWORD TF_ES_ASYNCDONTCARE = 0x0;
153 const DWORD TF_ES_SYNC = 0x1;
154 const DWORD TF_ES_READ = 0x2;
155 const DWORD TF_ES_READWRITE = 0x6;
156 const DWORD TF_ES_ASYNC = 0x8;
158 HRESULT RequestEditSession(
159 [in] TfClientId tid,
160 [in] ITfEditSession *pes,
161 [in] DWORD dwFlags,
162 [out] HRESULT *phrSession);
164 HRESULT InWriteSession(
165 [in] TfClientId tid,
166 [out] BOOL *pfWriteSession);
168 typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
170 typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
172 TfActiveSelEnd ase;
173 BOOL fInterimChar;
174 } TF_SELECTIONSTYLE;
176 typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
178 ITfRange *range;
179 TF_SELECTIONSTYLE style;
180 } TF_SELECTION;
182 const ULONG TF_DEFAULT_SELECTION = TS_DEFAULT_SELECTION;
184 HRESULT GetSelection(
185 [in] TfEditCookie ec,
186 [in] ULONG ulIndex,
187 [in] ULONG ulCount,
188 [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
189 [out] ULONG *pcFetched);
191 HRESULT SetSelection(
192 [in] TfEditCookie ec,
193 [in] ULONG ulCount,
194 [in, size_is(ulCount)] const TF_SELECTION *pSelection);
196 HRESULT GetStart(
197 [in] TfEditCookie ec,
198 [out] ITfRange **ppStart);
200 HRESULT GetEnd(
201 [in] TfEditCookie ec,
202 [out] ITfRange **ppEnd);
204 typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
205 const DWORD TF_SD_READONLY = TS_SD_READONLY;
206 const DWORD TF_SD_LOADING = TS_SD_LOADING;
207 const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
208 const DWORD TF_SS_REGIONS = TS_SS_REGIONS;
209 const DWORD TF_SS_TRANSITORY = TS_SS_TRANSITORY;
212 HRESULT GetActiveView(
213 [out] ITfContextView **ppView);
215 HRESULT EnumViews(
216 [out] IEnumTfContextViews **ppEnum);
218 HRESULT GetStatus(
219 [out] TF_STATUS *pdcs);
221 HRESULT GetProperty(
222 [in] REFGUID guidProp,
223 [out] ITfProperty **ppProp);
225 HRESULT GetAppProperty(
226 [in] REFGUID guidProp,
227 [out] ITfReadOnlyProperty **ppProp);
229 HRESULT TrackProperties(
230 [in, size_is(cProp)] const GUID **prgProp,
231 [in] ULONG cProp,
232 [in, size_is(cAppProp)] const GUID **prgAppProp,
233 [in] ULONG cAppProp,
234 [out] ITfReadOnlyProperty **ppProperty);
236 HRESULT EnumProperties(
237 [out] IEnumTfProperties **ppEnum);
239 HRESULT GetDocumentMgr(
240 [out] ITfDocumentMgr **ppDm);
242 HRESULT CreateRangeBackup(
243 [in] TfEditCookie ec,
244 [in] ITfRange *pRange,
245 [out] ITfRangeBackup **ppBackup);
250 object,
251 uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
252 pointer_default(unique)
254 interface ITfSource : IUnknown
256 HRESULT AdviseSink(
257 [in] REFIID riid,
258 [in, iid_is(riid)] IUnknown *punk,
259 [out] DWORD *pdwCookie);
261 HRESULT UnadviseSink(
262 [in] DWORD dwCookie);
266 object,
267 local,
268 uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
269 pointer_default(unique)
271 interface ITfInputProcessorProfiles : IUnknown
273 HRESULT Register(
274 [in] REFCLSID rclsid);
276 HRESULT Unregister(
277 [in] REFCLSID rclsid);
279 HRESULT AddLanguageProfile(
280 [in] REFCLSID rclsid,
281 [in] LANGID langid,
282 [in] REFGUID guidProfile,
283 [in, size_is(cchDesc)] const WCHAR *pchDesc,
284 [in] ULONG cchDesc,
285 [in, size_is(cchFile)] const WCHAR *pchIconFile,
286 [in] ULONG cchFile,
287 [in] ULONG uIconIndex);
289 HRESULT RemoveLanguageProfile(
290 [in] REFCLSID rclsid,
291 [in] LANGID langid,
292 [in] REFGUID guidProfile);
294 HRESULT EnumInputProcessorInfo(
295 [out] IEnumGUID **ppEnum);
297 HRESULT GetDefaultLanguageProfile(
298 [in] LANGID langid,
299 [in] REFGUID catid,
300 [out] CLSID *pclsid,
301 [out] GUID *pguidProfile);
303 HRESULT SetDefaultLanguageProfile(
304 [in] LANGID langid,
305 [in] REFCLSID rclsid,
306 [in] REFGUID guidProfiles);
308 HRESULT ActivateLanguageProfile(
309 [in] REFCLSID rclsid,
310 [in] LANGID langid,
311 [in] REFGUID guidProfiles);
313 HRESULT GetActiveLanguageProfile(
314 [in] REFCLSID rclsid,
315 [out] LANGID *plangid,
316 [out] GUID *pguidProfile);
318 HRESULT GetLanguageProfileDescription(
319 [in] REFCLSID rclsid,
320 [in] LANGID langid,
321 [in] REFGUID guidProfile,
322 [out] BSTR *pbstrProfile);
324 HRESULT GetCurrentLanguage(
325 [out] LANGID *plangid);
327 HRESULT ChangeCurrentLanguage(
328 [in] LANGID langid);
330 HRESULT GetLanguageList(
331 [out] LANGID **ppLangId,
332 [out] ULONG *pulCount);
334 HRESULT EnumLanguageProfiles(
335 [in] LANGID langid,
336 [out] IEnumTfLanguageProfiles **ppEnum);
338 HRESULT EnableLanguageProfile(
339 [in] REFCLSID rclsid,
340 [in] LANGID langid,
341 [in] REFGUID guidProfile,
342 [in] BOOL fEnable);
344 HRESULT IsEnabledLanguageProfile(
345 [in] REFCLSID rclsid,
346 [in] LANGID langid,
347 [in] REFGUID guidProfile,
348 [out] BOOL *pfEnable);
350 HRESULT EnableLanguageProfileByDefault(
351 [in] REFCLSID rclsid,
352 [in] LANGID langid,
353 [in] REFGUID guidProfile,
354 [in] BOOL fEnable);
356 HRESULT SubstituteKeyboardLayout(
357 [in] REFCLSID rclsid,
358 [in] LANGID langid,
359 [in] REFGUID guidProfile,
360 [in] HKL hKL);
364 object,
365 local,
366 uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
367 pointer_default(unique)
369 interface ITfCategoryMgr : IUnknown
371 HRESULT RegisterCategory([in] REFCLSID rclsid,
372 [in] REFGUID rcatid,
373 [in] REFGUID rguid);
375 HRESULT UnregisterCategory([in] REFCLSID rclsid,
376 [in] REFGUID rcatid,
377 [in] REFGUID rguid);
379 HRESULT EnumCategoriesInItem([in] REFGUID rguid,
380 [out] IEnumGUID **ppEnum);
382 HRESULT EnumItemsInCategory([in] REFGUID rcatid,
383 [out] IEnumGUID **ppEnum);
385 HRESULT FindClosestCategory([in] REFGUID rguid,
386 [out] GUID *pcatid,
387 [in, size_is(ulCount)] const GUID **ppcatidList,
388 [in] ULONG ulCount);
390 HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
391 [in] REFGUID rguid,
392 [in, size_is(cch)] const WCHAR *pchDesc,
393 [in] ULONG cch);
395 HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
396 [in] REFGUID rguid);
398 HRESULT GetGUIDDescription([in] REFGUID rguid,
399 [out] BSTR *pbstrDesc);
401 HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
402 [in] REFGUID rguid,
403 [in] DWORD dw);
405 HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
406 [in] REFGUID rguid);
408 HRESULT GetGUIDDWORD([in] REFGUID rguid,
409 [out] DWORD *pdw);
411 HRESULT RegisterGUID([in] REFGUID rguid,
412 [out] TfGuidAtom *pguidatom);
414 HRESULT GetGUID([in] TfGuidAtom guidatom,
415 [out] GUID *pguid);
417 HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
418 [in] REFGUID rguid,
419 [out] BOOL *pfEqual);
423 object,
424 uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
425 pointer_default(unique)
427 interface ITfTextEditSink : IUnknown
429 HRESULT OnEndEdit(
430 [in] ITfContext *pic,
431 [in] TfEditCookie ecReadOnly,
432 [in] ITfEditRecord *pEditRecord);
436 object,
437 uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
438 pointer_default(unique)
440 interface ITfContextOwnerCompositionSink : IUnknown
442 HRESULT OnStartComposition(
443 [in] ITfCompositionView *pComposition,
444 [out] BOOL *pfOk);
446 HRESULT OnUpdateComposition(
447 [in] ITfCompositionView *pComposition,
448 [in] ITfRange *pRangeNew);
450 HRESULT OnEndComposition(
451 [in] ITfCompositionView *pComposition);
455 object,
456 uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
457 pointer_default(unique)
459 interface IEnumTfLanguageProfiles : IUnknown
461 HRESULT Clone(
462 [out] IEnumTfLanguageProfiles **ppEnum);
464 HRESULT Next(
465 [in] ULONG ulCount,
466 [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
467 [out] ULONG *pcFetch);
469 HRESULT Reset();
471 HRESULT Skip(
472 [in] ULONG ulCount);
476 object,
477 local,
478 uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
479 pointer_default(unique)
481 interface ITfTextInputProcessor : IUnknown
483 HRESULT Activate(
484 [in] ITfThreadMgr *ptim,
485 [in] TfClientId tid);
487 HRESULT Deactivate();
491 object,
492 uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
493 pointer_default(unique)
495 interface ITfThreadMgrEventSink : IUnknown
497 HRESULT OnInitDocumentMgr(
498 [in] ITfDocumentMgr *pdim);
500 HRESULT OnUninitDocumentMgr(
501 [in] ITfDocumentMgr *pdim);
503 HRESULT OnSetFocus(
504 [in] ITfDocumentMgr *pdimFocus,
505 [in] ITfDocumentMgr *pdimPrevFocus);
507 HRESULT OnPushContext(
508 [in] ITfContext *pic);
510 HRESULT OnPopContext(
511 [in] ITfContext *pic);