comctl32/syslink: Fix painting of background color for transparent controls.
[wine/multimedia.git] / include / msctf.idl
blob2ed3866b7bb2d99da75fcc9edecd1d355b609919
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
25 cpp_quote("#include <winuser.h>")
27 cpp_quote("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
28 cpp_quote("#define TF_E_DISCONNECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0504)")
29 cpp_quote("#define TF_E_ALREADY_EXISTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)")
30 cpp_quote("#define TF_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)")
32 cpp_quote("HRESULT WINAPI TF_CreateThreadMgr(ITfThreadMgr **pptim);")
33 cpp_quote("HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim);")
34 cpp_quote("HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr);")
35 cpp_quote("HRESULT WINAPI TF_CreateLangBarMgr(ITfLangBarMgr **pppbm);")
37 cpp_quote("EXTERN_C const GUID GUID_PROP_TEXTOWNER;")
38 cpp_quote("DEFINE_GUID(GUID_PROP_ATTRIBUTE,0x34b45670,0x7526,0x11d2,0xa1,0x47,0x00,0x10,0x5a,0x27,0x99,0xb5);")
39 cpp_quote("EXTERN_C const GUID GUID_PROP_LANGID;")
40 cpp_quote("EXTERN_C const GUID GUID_PROP_READING;")
41 cpp_quote("EXTERN_C const GUID GUID_PROP_COMPOSING;")
43 cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
44 cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
45 cpp_quote("EXTERN_C const CLSID CLSID_TF_LangBarMgr;")
46 cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
47 cpp_quote("EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr;")
49 /* GUIDs for Compartments */
50 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")
51 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;")
52 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;")
53 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;")
54 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;")
55 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;")
56 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;")
57 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;")
58 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;")
60 /* GUIDs for Categories */
61 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
62 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
63 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
64 cpp_quote("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
66 typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie;
67 typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
68 typedef [uuid(88a9c478-f3ec-4763-8345-cd9250443f8d)] DWORD TfGuidAtom;
70 cpp_quote("#define TF_MOD_ALT 0x0001")
71 cpp_quote("#define TF_MOD_CONTROL 0x0002")
72 cpp_quote("#define TF_MOD_SHIFT 0x0004")
73 cpp_quote("#define TF_MOD_RALT 0x0008")
74 cpp_quote("#define TF_MOD_RCONTROL 0x0010")
75 cpp_quote("#define TF_MOD_RSHIFT 0x0020")
76 cpp_quote("#define TF_MOD_LALT 0x0040")
77 cpp_quote("#define TF_MOD_LCONTROL 0x0080")
78 cpp_quote("#define TF_MOD_LSHIFT 0x0100")
79 cpp_quote("#define TF_MOD_ON_KEYUP 0x0200")
80 cpp_quote("#define TF_MOD_IGNORE_ALL_MODIFIER 0x0400")
82 interface ITfDocumentMgr;
83 interface ITfContext;
84 interface IEnumTfDocumentMgrs;
85 interface IEnumTfContexts;
86 interface ITfFunctionProvider;
87 interface IEnumTfFunctionProviders;
88 interface ITfCompartmentMgr;
89 interface ITfEditSession;
90 interface ITfRange;
91 interface ITfContextView;
92 interface IEnumTfContextViews;
93 interface ITfProperty;
94 interface ITfReadOnlyProperty;
95 interface IEnumTfProperties;
96 interface ITfRangeBackup;
97 interface IEnumTfLanguageProfiles;
98 interface ITfEditRecord;
99 interface ITfCompositionView;
100 interface ITfKeyEventSink;
102 typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
104 CLSID clsid;
105 LANGID langid;
106 GUID catid;
107 BOOL fActive;
108 GUID guidProfile;
109 } TF_LANGUAGEPROFILE;
111 typedef [uuid(77c12f95-b783-450d-879f-1cd2362c6521)] struct TF_PRESERVEDKEY
113 UINT uVKey;
114 UINT uModifiers;
115 } TF_PRESERVEDKEY;
117 typedef [uuid(5a886226-ae9a-489b-b991-2b1e25ee59a9)] enum { TF_ANCHOR_START = 0, TF_ANCHOR_END = 1 } TfAnchor;
120 object,
121 uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
122 pointer_default(unique)
124 interface ITfThreadMgr: IUnknown
126 HRESULT Activate(
127 [out] TfClientId *ptid);
129 HRESULT Deactivate();
131 HRESULT CreateDocumentMgr(
132 [out] ITfDocumentMgr **ppdim);
134 HRESULT EnumDocumentMgrs(
135 [out] IEnumTfDocumentMgrs **ppEnum);
137 HRESULT GetFocus(
138 [out] ITfDocumentMgr **ppdimFocus);
140 HRESULT SetFocus(
141 [in] ITfDocumentMgr *pdimFocus);
143 HRESULT AssociateFocus(
144 [in] HWND hwnd,
145 [in, unique] ITfDocumentMgr *pdimNew,
146 [out] ITfDocumentMgr **ppdimPrev);
148 HRESULT IsThreadFocus(
149 [out] BOOL *pfThreadFocus);
151 HRESULT GetFunctionProvider(
152 [in] REFCLSID clsid,
153 [out] ITfFunctionProvider **ppFuncProv);
155 HRESULT EnumFunctionProviders(
156 [out] IEnumTfFunctionProviders **ppEnum);
158 HRESULT GetGlobalCompartment(
159 [out] ITfCompartmentMgr **ppCompMgr);
163 object,
164 uuid(d7540241-f9a1-4364-befc-dbcd2c4395b7),
165 pointer_default(unique)
167 interface ITfCompositionView : IUnknown
169 HRESULT GetOwnerClsid([out] CLSID *pclsid);
171 HRESULT GetRange([out] ITfRange **ppRange);
175 object,
176 uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
177 pointer_default(unique)
179 interface ITfDocumentMgr: IUnknown
181 HRESULT CreateContext(
182 [in] TfClientId tidOwner,
183 [in] DWORD dwFlags,
184 [in, unique] IUnknown *punk,
185 [out] ITfContext **ppic,
186 [out] TfEditCookie *pecTextStore);
188 HRESULT Push(
189 [in] ITfContext *pic);
191 const DWORD TF_POPF_ALL = 0x0001;
193 HRESULT Pop(
194 [in] DWORD dwFlags);
196 HRESULT GetTop(
197 [out] ITfContext **ppic);
199 HRESULT GetBase(
200 [out] ITfContext **ppic);
202 HRESULT EnumContexts(
203 [out] IEnumTfContexts **ppEnum);
207 object,
208 uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
209 pointer_default(unique)
211 interface ITfContext : IUnknown
213 const DWORD TF_ES_ASYNCDONTCARE = 0x0;
214 const DWORD TF_ES_SYNC = 0x1;
215 const DWORD TF_ES_READ = 0x2;
216 const DWORD TF_ES_READWRITE = 0x6;
217 const DWORD TF_ES_ASYNC = 0x8;
219 HRESULT RequestEditSession(
220 [in] TfClientId tid,
221 [in] ITfEditSession *pes,
222 [in] DWORD dwFlags,
223 [out] HRESULT *phrSession);
225 HRESULT InWriteSession(
226 [in] TfClientId tid,
227 [out] BOOL *pfWriteSession);
229 typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
231 typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
233 TfActiveSelEnd ase;
234 BOOL fInterimChar;
235 } TF_SELECTIONSTYLE;
237 typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
239 ITfRange *range;
240 TF_SELECTIONSTYLE style;
241 } TF_SELECTION;
243 const ULONG TF_DEFAULT_SELECTION = TS_DEFAULT_SELECTION;
245 HRESULT GetSelection(
246 [in] TfEditCookie ec,
247 [in] ULONG ulIndex,
248 [in] ULONG ulCount,
249 [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
250 [out] ULONG *pcFetched);
252 HRESULT SetSelection(
253 [in] TfEditCookie ec,
254 [in] ULONG ulCount,
255 [in, size_is(ulCount)] const TF_SELECTION *pSelection);
257 HRESULT GetStart(
258 [in] TfEditCookie ec,
259 [out] ITfRange **ppStart);
261 HRESULT GetEnd(
262 [in] TfEditCookie ec,
263 [out] ITfRange **ppEnd);
265 typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
266 const DWORD TF_SD_READONLY = TS_SD_READONLY;
267 const DWORD TF_SD_LOADING = TS_SD_LOADING;
268 const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
269 const DWORD TF_SS_REGIONS = TS_SS_REGIONS;
270 const DWORD TF_SS_TRANSITORY = TS_SS_TRANSITORY;
273 HRESULT GetActiveView(
274 [out] ITfContextView **ppView);
276 HRESULT EnumViews(
277 [out] IEnumTfContextViews **ppEnum);
279 HRESULT GetStatus(
280 [out] TF_STATUS *pdcs);
282 HRESULT GetProperty(
283 [in] REFGUID guidProp,
284 [out] ITfProperty **ppProp);
286 HRESULT GetAppProperty(
287 [in] REFGUID guidProp,
288 [out] ITfReadOnlyProperty **ppProp);
290 HRESULT TrackProperties(
291 [in, size_is(cProp)] const GUID **prgProp,
292 [in] ULONG cProp,
293 [in, size_is(cAppProp)] const GUID **prgAppProp,
294 [in] ULONG cAppProp,
295 [out] ITfReadOnlyProperty **ppProperty);
297 HRESULT EnumProperties(
298 [out] IEnumTfProperties **ppEnum);
300 HRESULT GetDocumentMgr(
301 [out] ITfDocumentMgr **ppDm);
303 HRESULT CreateRangeBackup(
304 [in] TfEditCookie ec,
305 [in] ITfRange *pRange,
306 [out] ITfRangeBackup **ppBackup);
311 object,
312 uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
313 pointer_default(unique)
315 interface ITfSource : IUnknown
317 HRESULT AdviseSink(
318 [in] REFIID riid,
319 [in, iid_is(riid)] IUnknown *punk,
320 [out] DWORD *pdwCookie);
322 HRESULT UnadviseSink(
323 [in] DWORD dwCookie);
327 object,
328 local,
329 uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
330 pointer_default(unique)
332 interface ITfInputProcessorProfiles : IUnknown
334 HRESULT Register(
335 [in] REFCLSID rclsid);
337 HRESULT Unregister(
338 [in] REFCLSID rclsid);
340 HRESULT AddLanguageProfile(
341 [in] REFCLSID rclsid,
342 [in] LANGID langid,
343 [in] REFGUID guidProfile,
344 [in, size_is(cchDesc)] const WCHAR *pchDesc,
345 [in] ULONG cchDesc,
346 [in, size_is(cchFile)] const WCHAR *pchIconFile,
347 [in] ULONG cchFile,
348 [in] ULONG uIconIndex);
350 HRESULT RemoveLanguageProfile(
351 [in] REFCLSID rclsid,
352 [in] LANGID langid,
353 [in] REFGUID guidProfile);
355 HRESULT EnumInputProcessorInfo(
356 [out] IEnumGUID **ppEnum);
358 HRESULT GetDefaultLanguageProfile(
359 [in] LANGID langid,
360 [in] REFGUID catid,
361 [out] CLSID *pclsid,
362 [out] GUID *pguidProfile);
364 HRESULT SetDefaultLanguageProfile(
365 [in] LANGID langid,
366 [in] REFCLSID rclsid,
367 [in] REFGUID guidProfiles);
369 HRESULT ActivateLanguageProfile(
370 [in] REFCLSID rclsid,
371 [in] LANGID langid,
372 [in] REFGUID guidProfiles);
374 HRESULT GetActiveLanguageProfile(
375 [in] REFCLSID rclsid,
376 [out] LANGID *plangid,
377 [out] GUID *pguidProfile);
379 HRESULT GetLanguageProfileDescription(
380 [in] REFCLSID rclsid,
381 [in] LANGID langid,
382 [in] REFGUID guidProfile,
383 [out] BSTR *pbstrProfile);
385 HRESULT GetCurrentLanguage(
386 [out] LANGID *plangid);
388 HRESULT ChangeCurrentLanguage(
389 [in] LANGID langid);
391 HRESULT GetLanguageList(
392 [out] LANGID **ppLangId,
393 [out] ULONG *pulCount);
395 HRESULT EnumLanguageProfiles(
396 [in] LANGID langid,
397 [out] IEnumTfLanguageProfiles **ppEnum);
399 HRESULT EnableLanguageProfile(
400 [in] REFCLSID rclsid,
401 [in] LANGID langid,
402 [in] REFGUID guidProfile,
403 [in] BOOL fEnable);
405 HRESULT IsEnabledLanguageProfile(
406 [in] REFCLSID rclsid,
407 [in] LANGID langid,
408 [in] REFGUID guidProfile,
409 [out] BOOL *pfEnable);
411 HRESULT EnableLanguageProfileByDefault(
412 [in] REFCLSID rclsid,
413 [in] LANGID langid,
414 [in] REFGUID guidProfile,
415 [in] BOOL fEnable);
417 HRESULT SubstituteKeyboardLayout(
418 [in] REFCLSID rclsid,
419 [in] LANGID langid,
420 [in] REFGUID guidProfile,
421 [in] HKL hKL);
424 typedef [uuid(c4cc07f1-80cc-4a7b-bc54-98512782cbe3)]
425 enum {
426 TF_LS_NONE = 0,
427 TF_LS_SOLID = 1,
428 TF_LS_DOT = 2,
429 TF_LS_DASH = 3,
430 TF_LS_SQUIGGLE = 4
431 } TF_DA_LINESTYLE;
433 typedef [uuid(d9b92e21-084a-401b-9c64-1e6dad91a1ab)]
434 enum {
435 TF_CT_NONE = 0,
436 TF_CT_SYSCOLOR = 1,
437 TF_CT_COLORREF = 2
438 } TF_DA_COLORTYPE;
440 typedef [uuid(90d0cb5e-6520-4a0f-b47c-c39bd955f0d6)]
441 struct TF_DA_COLOR {
442 TF_DA_COLORTYPE type;
443 [switch_type(TF_DA_COLORTYPE), switch_is(type)]
444 union {
445 [case(TF_CT_SYSCOLOR)] int nIndex;
446 [case(TF_CT_COLORREF)] COLORREF cr;
448 } TF_DA_COLOR;
450 typedef [uuid(33d2fe4b-6c24-4f67-8d75-3bc1819e4126)]
451 enum {
452 TF_ATTR_INPUT = 0,
453 TF_ATTR_TARGET_CONVERTED = 1,
454 TF_ATTR_CONVERTED = 2,
455 TF_ATTR_TARGET_NOTCONVERTED = 3,
456 TF_ATTR_INPUT_ERROR = 4,
457 TF_ATTR_FIXEDCONVERTED = 5,
458 TF_ATTR_OTHER = -1
459 } TF_DA_ATTR_INFO;
461 typedef [uuid(1bf1c305-419b-4182-a4d2-9bfadc3f021f)]
462 struct TF_DISPLAYATTRIBUTE {
463 TF_DA_COLOR crText;
464 TF_DA_COLOR crBk;
465 TF_DA_LINESTYLE lsStyle;
466 BOOL fBoldLine;
467 TF_DA_COLOR crLine;
468 TF_DA_ATTR_INFO bAttr;
469 } TF_DISPLAYATTRIBUTE;
472 object,
473 uuid(70528852-2f26-4aea-8c96-215150578932),
474 pointer_default(unique)
476 interface ITfDisplayAttributeInfo : IUnknown
478 HRESULT GetGUID([out] GUID *pguid);
480 HRESULT GetDescription([out] BSTR *pbstrDesc);
482 HRESULT GetAttributeInfo([out] TF_DISPLAYATTRIBUTE *pda);
484 HRESULT SetAttributeInfo([in] const TF_DISPLAYATTRIBUTE *pda);
486 HRESULT Reset();
490 object,
491 uuid(7cef04d7-cb75-4e80-a7ab-5f5bc7d332de),
492 pointer_default(unique)
494 interface IEnumTfDisplayAttributeInfo : IUnknown
496 HRESULT Clone([out] IEnumTfDisplayAttributeInfo **ppEnum);
498 HRESULT Next(
499 [in] ULONG ulCount,
500 [out, size_is(ulCount), length_is(*pcFetched)] ITfDisplayAttributeInfo **rgInfo,
501 [out] ULONG *pcFetched);
503 HRESULT Reset();
505 HRESULT Skip([in] ULONG ulCount);
509 object,
510 local,
511 uuid(8ded7393-5db1-475c-9e71-a39111b0ff67),
512 pointer_default(unique)
514 interface ITfDisplayAttributeMgr : IUnknown
516 HRESULT OnUpdateInfo();
518 HRESULT EnumDisplayAttributeInfo([out] IEnumTfDisplayAttributeInfo **ppEnum);
520 HRESULT GetDisplayAttributeInfo(
521 [in] REFGUID guid,
522 [out] ITfDisplayAttributeInfo **ppInfo,
523 [out] CLSID *pclsidOwner);
528 object,
529 local,
530 uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
531 pointer_default(unique)
533 interface ITfCategoryMgr : IUnknown
535 HRESULT RegisterCategory([in] REFCLSID rclsid,
536 [in] REFGUID rcatid,
537 [in] REFGUID rguid);
539 HRESULT UnregisterCategory([in] REFCLSID rclsid,
540 [in] REFGUID rcatid,
541 [in] REFGUID rguid);
543 HRESULT EnumCategoriesInItem([in] REFGUID rguid,
544 [out] IEnumGUID **ppEnum);
546 HRESULT EnumItemsInCategory([in] REFGUID rcatid,
547 [out] IEnumGUID **ppEnum);
549 HRESULT FindClosestCategory([in] REFGUID rguid,
550 [out] GUID *pcatid,
551 [in, size_is(ulCount)] const GUID **ppcatidList,
552 [in] ULONG ulCount);
554 HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
555 [in] REFGUID rguid,
556 [in, size_is(cch)] const WCHAR *pchDesc,
557 [in] ULONG cch);
559 HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
560 [in] REFGUID rguid);
562 HRESULT GetGUIDDescription([in] REFGUID rguid,
563 [out] BSTR *pbstrDesc);
565 HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
566 [in] REFGUID rguid,
567 [in] DWORD dw);
569 HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
570 [in] REFGUID rguid);
572 HRESULT GetGUIDDWORD([in] REFGUID rguid,
573 [out] DWORD *pdw);
575 HRESULT RegisterGUID([in] REFGUID rguid,
576 [out] TfGuidAtom *pguidatom);
578 HRESULT GetGUID([in] TfGuidAtom guidatom,
579 [out] GUID *pguid);
581 HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
582 [in] REFGUID rguid,
583 [out] BOOL *pfEqual);
587 object,
588 uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
589 pointer_default(unique)
591 interface ITfTextEditSink : IUnknown
593 HRESULT OnEndEdit(
594 [in] ITfContext *pic,
595 [in] TfEditCookie ecReadOnly,
596 [in] ITfEditRecord *pEditRecord);
600 object,
601 uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
602 pointer_default(unique)
604 interface ITfContextOwnerCompositionSink : IUnknown
606 HRESULT OnStartComposition(
607 [in] ITfCompositionView *pComposition,
608 [out] BOOL *pfOk);
610 HRESULT OnUpdateComposition(
611 [in] ITfCompositionView *pComposition,
612 [in] ITfRange *pRangeNew);
614 HRESULT OnEndComposition(
615 [in] ITfCompositionView *pComposition);
619 object,
620 uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
621 pointer_default(unique)
623 interface IEnumTfLanguageProfiles : IUnknown
625 HRESULT Clone(
626 [out] IEnumTfLanguageProfiles **ppEnum);
628 HRESULT Next(
629 [in] ULONG ulCount,
630 [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
631 [out] ULONG *pcFetch);
633 HRESULT Reset();
635 HRESULT Skip(
636 [in] ULONG ulCount);
640 object,
641 local,
642 uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
643 pointer_default(unique)
645 interface ITfTextInputProcessor : IUnknown
647 HRESULT Activate(
648 [in] ITfThreadMgr *ptim,
649 [in] TfClientId tid);
651 HRESULT Deactivate();
655 object,
656 uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
657 pointer_default(unique)
659 interface ITfThreadMgrEventSink : IUnknown
661 HRESULT OnInitDocumentMgr(
662 [in] ITfDocumentMgr *pdim);
664 HRESULT OnUninitDocumentMgr(
665 [in] ITfDocumentMgr *pdim);
667 HRESULT OnSetFocus(
668 [in] ITfDocumentMgr *pdimFocus,
669 [in] ITfDocumentMgr *pdimPrevFocus);
671 HRESULT OnPushContext(
672 [in] ITfContext *pic);
674 HRESULT OnPopContext(
675 [in] ITfContext *pic);
679 object,
680 local,
681 uuid(aa80e7f0-2021-11d2-93e0-0060b067b86e),
682 pointer_default(unique)
684 interface ITfKeystrokeMgr : IUnknown
686 HRESULT AdviseKeyEventSink(
687 [in] TfClientId tid,
688 [in] ITfKeyEventSink *pSink,
689 [in] BOOL fForeground);
691 HRESULT UnadviseKeyEventSink(
692 [in] TfClientId tid);
694 HRESULT GetForeground(
695 [out] CLSID *pclsid);
697 HRESULT TestKeyDown(
698 [in] WPARAM wParam,
699 [in] LPARAM lParam,
700 [out] BOOL *pfEaten);
702 HRESULT TestKeyUp(
703 [in] WPARAM wParam,
704 [in] LPARAM lParam,
705 [out] BOOL *pfEaten);
707 HRESULT KeyDown(
708 [in] WPARAM wParam,
709 [in] LPARAM lParam,
710 [out] BOOL *pfEaten);
712 HRESULT KeyUp(
713 [in] WPARAM wParam,
714 [in] LPARAM lParam,
715 [out] BOOL *pfEaten);
717 HRESULT GetPreservedKey(
718 [in] ITfContext *pic,
719 [in] const TF_PRESERVEDKEY *pprekey,
720 [out] GUID *pguid);
722 HRESULT IsPreservedKey(
723 [in] REFGUID rguid,
724 [in] const TF_PRESERVEDKEY *pprekey,
725 [out] BOOL *pfRegistered);
727 HRESULT PreserveKey(
728 [in] TfClientId tid,
729 [in] REFGUID rguid,
730 [in] const TF_PRESERVEDKEY *prekey,
731 [in, size_is(cchDesc)] const WCHAR *pchDesc,
732 [in] ULONG cchDesc);
734 HRESULT UnpreserveKey(
735 [in] REFGUID rguid,
736 [in] const TF_PRESERVEDKEY *pprekey);
738 HRESULT SetPreservedKeyDescription(
739 [in] REFGUID rguid,
740 [in, size_is(cchDesc)] const WCHAR *pchDesc,
741 [in] ULONG cchDesc);
743 HRESULT GetPreservedKeyDescription(
744 [in] REFGUID rguid,
745 [out] BSTR *pbstrDesc);
747 HRESULT SimulatePreservedKey(
748 [in] ITfContext *pic,
749 [in] REFGUID rguid,
750 [out] BOOL *pfEaten);
754 object,
755 local,
756 uuid(aa80e7f5-2021-11d2-93e0-0060b067b86e),
757 pointer_default(unique)
759 interface ITfKeyEventSink : IUnknown
761 HRESULT OnSetFocus(
762 [in] BOOL fForeground);
764 HRESULT OnTestKeyDown(
765 [in] ITfContext *pic,
766 [in] WPARAM wParam,
767 [in] LPARAM lParam,
768 [out] BOOL *pfEaten);
770 HRESULT OnTestKeyUp(
771 [in] ITfContext *pic,
772 [in] WPARAM wParam,
773 [in] LPARAM lParam,
774 [out] BOOL *pfEaten);
776 HRESULT OnKeyDown(
777 [in] ITfContext *pic,
778 [in] WPARAM wParam,
779 [in] LPARAM lParam,
780 [out] BOOL *pfEaten);
782 HRESULT OnKeyUp(
783 [in] ITfContext *pic,
784 [in] WPARAM wParam,
785 [in] LPARAM lParam,
786 [out] BOOL *pfEaten);
788 HRESULT OnPreservedKey(
789 [in] ITfContext *pic,
790 [in] REFGUID rguid,
791 [out] BOOL *pfEaten);
795 object,
796 local,
797 uuid(8f1b8ad8-0b6b-4874-90c5-bd76011e8f7c),
798 pointer_default(unique)
800 interface ITfMessagePump : IUnknown
802 HRESULT PeekMessageA(
803 [out] LPMSG pMsg,
804 [in] HWND hwnd,
805 [in] UINT wMsgFilterMin,
806 [in] UINT wMsgFilterMax,
807 [in] UINT wRemoveMsg,
808 [out] BOOL *pfResult);
810 HRESULT GetMessageA(
811 [out] LPMSG pMsg,
812 [in] HWND hwnd,
813 [in] UINT wMsgFilterMin,
814 [in] UINT wMsgFilterMax,
815 [out] BOOL *pfResult);
817 HRESULT PeekMessageW(
818 [out] LPMSG pMsg,
819 [in] HWND hwnd,
820 [in] UINT wMsgFilterMin,
821 [in] UINT wMsgFilterMax,
822 [in] UINT wRemoveMsg,
823 [out] BOOL *pfResult);
825 HRESULT GetMessageW(
826 [out] LPMSG pMsg,
827 [in] HWND hwnd,
828 [in] UINT wMsgFilterMin,
829 [in] UINT wMsgFilterMax,
830 [out] BOOL *pfResult);
834 object,
835 local,
836 uuid(d60a7b49-1b9f-4be2-b702-47e9dc05dec3),
837 pointer_default(unique)
839 interface ITfClientId : IUnknown
841 HRESULT GetClientId(
842 [in] REFCLSID rclsid,
843 [out] TfClientId *ptid);
847 object,
848 uuid(43c9fe15-f494-4c17-9de2-b8a4ac350aa8),
849 pointer_default(unique)
851 interface ITfLanguageProfileNotifySink : IUnknown
853 HRESULT OnLanguageChange(
854 [in] LANGID langid,
855 [out] BOOL *pfAccept);
857 HRESULT OnLanguageChanged();
861 object,
862 uuid(aa80e803-2021-11d2-93e0-0060b067b86e),
863 pointer_default(unique)
865 interface ITfEditSession : IUnknown
867 HRESULT DoEditSession(
868 [in] TfEditCookie ec);
872 object,
873 uuid(aa80e7ff-2021-11d2-93e0-0060b067b86e),
874 pointer_default(unique)
876 interface ITfRange : IUnknown
878 const WCHAR TF_CHAR_EMBEDDED = TS_CHAR_EMBEDDED;
880 typedef [uuid(cf610f06-2882-46f6-abe5-298568b664c4)] enum { TF_GRAVITY_BACKWARD = 0, TF_GRAVITY_FORWARD = 1 } TfGravity;
882 typedef [uuid(1e512533-bbdc-4530-9a8e-a1dc0af67468)] enum { TF_SD_BACKWARD = 0, TF_SD_FORWARD = 1 } TfShiftDir;
884 const DWORD TF_HF_OBJECT = 1;
885 const DWORD TF_TF_MOVESTART = 1;
886 const DWORD TF_TF_IGNOREEND = 2;
887 const DWORD TF_ST_CORRECTION = 1;
888 const DWORD TF_IE_CORRECTION = 1;
890 typedef [uuid(49930d51-7d93-448c-a48c-fea5dac192b1)] struct TF_HALTCOND
892 ITfRange *pHaltRange;
893 TfAnchor aHaltPos;
894 DWORD dwFlags;
895 } TF_HALTCOND;
897 HRESULT GetText(
898 [in] TfEditCookie ec,
899 [in] DWORD dwFlags,
900 [out, size_is(cchMax), length_is(*pcch)] WCHAR *pchText,
901 [in] ULONG cchMax,
902 [out] ULONG *pcch);
904 HRESULT SetText(
905 [in] TfEditCookie ec,
906 [in] DWORD dwFlags,
907 [in, size_is(cch), unique] const WCHAR *pchText,
908 [in] LONG cch);
910 HRESULT GetFormattedText(
911 [in] TfEditCookie ec,
912 [out] IDataObject **ppDataObject);
914 HRESULT GetEmbedded(
915 [in] TfEditCookie ec,
916 [in] REFGUID rguidService,
917 [in] REFIID riid,
918 [out, iid_is(riid)] IUnknown **ppunk);
920 HRESULT InsertEmbedded(
921 [in] TfEditCookie ec,
922 [in] DWORD dwFlags,
923 [in] IDataObject *pDataObject);
925 HRESULT ShiftStart(
926 [in] TfEditCookie ec,
927 [in] LONG cchReq,
928 [out] LONG *pcch,
929 [in, unique] const TF_HALTCOND *pHalt);
931 HRESULT ShiftEnd(
932 [in] TfEditCookie ec,
933 [in] LONG cchReq,
934 [out] LONG *pcch,
935 [in, unique] const TF_HALTCOND *pHalt);
937 HRESULT ShiftStartToRange(
938 [in] TfEditCookie ec,
939 [in] ITfRange *pRange,
940 [in] TfAnchor aPos);
942 HRESULT ShiftEndToRange(
943 [in] TfEditCookie ec,
944 [in] ITfRange *pRange,
945 [in] TfAnchor aPos);
947 HRESULT ShiftStartRegion(
948 [in] TfEditCookie ec,
949 [in] TfShiftDir dir,
950 [out] BOOL *pfNoRegion);
952 HRESULT ShiftEndRegion(
953 [in] TfEditCookie ec,
954 [in] TfShiftDir dir,
955 [out] BOOL *pfNoRegion);
957 HRESULT IsEmpty(
958 [in] TfEditCookie ec,
959 [out] BOOL *pfEmpty);
961 HRESULT Collapse(
962 [in] TfEditCookie ec,
963 [in] TfAnchor aPos);
965 HRESULT IsEqualStart(
966 [in] TfEditCookie ec,
967 [in] ITfRange *pWith,
968 [in] TfAnchor aPos,
969 [out] BOOL *pfEqual);
971 HRESULT IsEqualEnd(
972 [in] TfEditCookie ec,
973 [in] ITfRange *pWith,
974 [in] TfAnchor aPos,
975 [out] BOOL *pfEqual);
977 HRESULT CompareStart(
978 [in] TfEditCookie ec,
979 [in] ITfRange *pWith,
980 [in] TfAnchor aPos,
981 [out] LONG *plResult);
983 HRESULT CompareEnd(
984 [in] TfEditCookie ec,
985 [in] ITfRange *pWith,
986 [in] TfAnchor aPos,
987 [out] LONG *plResult);
989 HRESULT AdjustForInsert(
990 [in] TfEditCookie ec,
991 [in] ULONG cchInsert,
992 [out] BOOL *pfInsertOk);
994 HRESULT GetGravity(
995 [out] TfGravity *pgStart,
996 [out] TfGravity *pgEnd);
998 HRESULT SetGravity(
999 [in] TfEditCookie ec,
1000 [in] TfGravity gStart,
1001 [in] TfGravity gEnd);
1003 HRESULT Clone(
1004 [out] ITfRange **ppClone);
1006 HRESULT GetContext(
1007 [out] ITfContext **ppContext);
1011 object,
1012 uuid(057a6296-029b-4154-b79a-0d461d4ea94c),
1013 pointer_default(unique)
1015 interface ITfRangeACP : ITfRange
1017 HRESULT GetExtent([out] LONG *pacpAnchor,
1018 [out] LONG *pcch);
1020 HRESULT SetExtent([in] LONG acpAnchor,
1021 [in] LONG cch);
1025 object,
1026 uuid(55ce16ba-3014-41c1-9ceb-fade1446ac6c),
1027 pointer_default(unique)
1029 interface ITfInsertAtSelection : IUnknown
1031 const DWORD TF_IAS_NOQUERY = 0x1;
1032 const DWORD TF_IAS_QUERYONLY = 0x2;
1033 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION = 0x80000000;
1035 HRESULT InsertTextAtSelection(
1036 [in] TfEditCookie ec,
1037 [in] DWORD dwFlags,
1038 [in, size_is(cch)] const WCHAR *pchText,
1039 [in] LONG cch,
1040 [out] ITfRange **ppRange);
1042 HRESULT InsertEmbeddedAtSelection(
1043 [in] TfEditCookie ec,
1044 [in] DWORD dwFlags,
1045 [in] IDataObject *pDataObject,
1046 [out] ITfRange **ppRange);
1050 object,
1051 uuid(6834b120-88cb-11d2-bf45-00105a2799b5),
1052 pointer_default(unique)
1054 interface ITfPropertyStore : IUnknown
1056 const DWORD TF_TU_CORRECTION = 0x1;
1058 HRESULT GetType([out] GUID *pguid);
1060 HRESULT GetDataType([out] DWORD *pdwReserved);
1062 HRESULT GetData([out] VARIANT *pvarValue);
1064 HRESULT OnTextUpdated(
1065 [in] DWORD dwFlags,
1066 [in] ITfRange *pRangeNew,
1067 [out] BOOL *pfAccept);
1069 HRESULT Shrink(
1070 [in] ITfRange *pRangeNew,
1071 [out] BOOL *pfFree);
1073 HRESULT Divide(
1074 [in] ITfRange *pRangeThis,
1075 [in] ITfRange *pRangeNew,
1076 [out] ITfPropertyStore **ppPropStore);
1078 HRESULT Clone(
1079 [out] ITfPropertyStore **pPropStore);
1081 HRESULT GetPropertyRangeCreator(
1082 [out] CLSID *pclsid);
1084 HRESULT Serialize(
1085 [in] IStream *pStream,
1086 [out] ULONG *pcb);
1090 object,
1091 uuid(f99d3f40-8e32-11d2-bf46-00105a2799b5),
1092 pointer_default(unique)
1094 interface IEnumTfRanges : IUnknown
1096 HRESULT Clone([out] IEnumTfRanges **ppEnum);
1098 HRESULT Next(
1099 [in] ULONG ulCount,
1100 [out, size_is(ulCount), length_is(*pcFetched)] ITfRange **ppRange,
1101 [out] ULONG *pcFetched);
1103 HRESULT Reset();
1105 HRESULT Skip(ULONG ulCount);
1109 object,
1110 uuid(5efd22Ba-7838-46cb-88e2-cadb14124f8f),
1111 pointer_default(unique)
1113 interface IEnumITfCompositionView : IUnknown
1115 HRESULT Clone([out] IEnumITfCompositionView **ppEnum);
1117 HRESULT Next(
1118 [in] ULONG ulCount,
1119 [out, size_is(ulCount), length_is(*pcFetched)] ITfCompositionView **rgCompositionView,
1120 [out] ULONG *pcFetched);
1122 HRESULT Reset();
1124 HRESULT Skip([in] ULONG ulCount);
1128 object,
1129 uuid(20168d64-5a8f-4a5a-b7bd-cfa29f4D0fd9),
1130 pointer_default(unique)
1132 interface ITfComposition : IUnknown
1134 HRESULT GetRange([out] ITfRange **ppRange);
1136 HRESULT ShiftStart(
1137 [in] TfEditCookie ecWrite,
1138 [in] ITfRange *pNewStart);
1140 HRESULT ShiftEnd(
1141 [in] TfEditCookie ecWrite,
1142 [in] ITfRange *pNewEnd);
1144 HRESULT EndComposition([in] TfEditCookie ecWrite);
1148 object,
1149 uuid(a781718c-579a-4b15-a280-32b8577acc5e),
1150 pointer_default(unique)
1152 interface ITfCompositionSink : IUnknown
1154 HRESULT OnCompositionTerminated(
1155 [in] TfEditCookie ecWrite,
1156 [in] ITfComposition *pComposition);
1160 object,
1161 uuid(d40C8aae-aC92-4fc7-9a11-0ee0e23aa39b),
1162 pointer_default(unique)
1164 interface ITfContextComposition : IUnknown
1166 HRESULT StartComposition(
1167 [in] TfEditCookie ecWrite,
1168 [in] ITfRange *pCompositionRange,
1169 [in] ITfCompositionSink *pSink,
1170 [out] ITfComposition **ppComposition);
1172 HRESULT EnumCompositions([out] IEnumITfCompositionView **ppEnum);
1174 HRESULT FindComposition(
1175 [in] TfEditCookie ecRead,
1176 [in] ITfRange *pTestRange,
1177 [out] IEnumITfCompositionView **ppEnum);
1179 HRESULT TakeOwnership(
1180 [in] TfEditCookie ecWrite,
1181 [in] ITfCompositionView *pComposition,
1182 [in] ITfCompositionSink *pSink,
1183 [out] ITfComposition **ppComposition);
1187 object,
1188 uuid(86462810-593b-4916-9764-19c08e9ce110),
1189 pointer_default(unique)
1191 interface ITfContextOwnerCompositionServices : ITfContextComposition
1193 HRESULT TerminateComposition([in] ITfCompositionView *pComposition);
1197 object,
1198 uuid(17d49a3d-f8b8-4b2f-b254-52319dd64c53),
1199 pointer_default(unique)
1201 interface ITfReadOnlyProperty : IUnknown
1203 HRESULT GetType([out] GUID *pguid);
1205 HRESULT EnumRanges(
1206 [in] TfEditCookie ec,
1207 [out] IEnumTfRanges **ppEnum,
1208 [in] ITfRange *pTargetRange);
1210 HRESULT GetValue(
1211 [in] TfEditCookie ec,
1212 [in] ITfRange *pRange,
1213 [out] VARIANT *pvarValue);
1215 HRESULT GetContext([out] ITfContext **ppContext);
1219 object,
1220 uuid(e2449660-9542-11d2-bf46-00105a2799b5),
1221 pointer_default(unique)
1223 interface ITfProperty : ITfReadOnlyProperty
1225 HRESULT FindRange(
1226 [in] TfEditCookie ec,
1227 [in] ITfRange *pRange,
1228 [out] ITfRange **ppRange,
1229 [in] TfAnchor aPos);
1231 HRESULT SetValueStore(
1232 [in] TfEditCookie ec,
1233 [in] ITfRange *pRange,
1234 [in] ITfPropertyStore *pPropStore);
1236 HRESULT SetValue(
1237 [in] TfEditCookie ec,
1238 [in] ITfRange *pRange,
1239 [in] const VARIANT *pvarValue);
1241 HRESULT Clear(
1242 [in] TfEditCookie ec,
1243 [in] ITfRange *pRange);
1247 object,
1248 uuid(bb08f7a9-607a-4384-8623-056892b64371),
1249 pointer_default(unique)
1251 interface ITfCompartment : IUnknown
1253 HRESULT SetValue(
1254 [in] TfClientId tid,
1255 [in] const VARIANT *pvarValue);
1257 HRESULT GetValue(
1258 [out] VARIANT *pvarValue);
1262 object,
1263 uuid(7dcf57ac-18ad-438b-824d-979bffb74b7c),
1264 pointer_default(unique)
1266 interface ITfCompartmentMgr : IUnknown
1268 HRESULT GetCompartment(
1269 [in] REFGUID rguid,
1270 [out] ITfCompartment **ppcomp);
1272 HRESULT ClearCompartment(
1273 [in] TfClientId tid,
1274 [in] REFGUID rguid);
1276 HRESULT EnumCompartments(
1277 [out] IEnumGUID **ppEnum);
1281 object,
1282 uuid(743abd5f-f26d-48df-8cc5-238492419b64),
1283 pointer_default(unique)
1285 interface ITfCompartmentEventSink : IUnknown
1287 HRESULT OnChange(
1288 [in] REFGUID rguid);
1292 object,
1293 uuid(8f1a7ea6-1654-4502-a86e-b2902344d507),
1294 pointer_default(unique)
1296 interface IEnumTfContexts : IUnknown
1298 HRESULT Clone(
1299 [out] IEnumTfContexts **ppEnum);
1301 HRESULT Next(
1302 [in] ULONG ulCount,
1303 [out, size_is(ulCount), length_is(*pcFetched)] ITfContext **rgContext,
1304 [out] ULONG *pcFetched);
1306 HRESULT Reset();
1308 HRESULT Skip(
1309 [in] ULONG ulCount);
1313 object,
1314 uuid(aa80e808-2021-11d2-93e0-0060b067b86e),
1315 pointer_default(unique)
1317 interface IEnumTfDocumentMgrs : IUnknown
1319 HRESULT Clone(
1320 [out] IEnumTfDocumentMgrs **ppEnum);
1322 HRESULT Next(
1323 [in] ULONG ulCount,
1324 [out, size_is(ulCount), length_is(*pcFetched)] ITfDocumentMgr **rgDocumentMgr,
1325 [out] ULONG *pcFetched);
1327 HRESULT Reset();
1329 HRESULT Skip(
1330 [in] ULONG ulCount);
1334 object,
1335 uuid(73131f9c-56a9-49dd-b0ee-d046633f7528),
1336 pointer_default(unique)
1338 interface ITfSourceSingle : IUnknown
1340 HRESULT AdviseSingleSink(
1341 [in] TfClientId tid,
1342 [in] REFIID riid,
1343 [in, iid_is(riid)] IUnknown *punk);
1345 HRESULT UnadviseSingleSink(
1346 [in] TfClientId tid,
1347 [in] REFIID riid);
1351 object,
1352 local,
1353 uuid(c0f1db0c-3a20-405c-a303-96b6010a885f),
1354 pointer_default(unique)
1356 interface ITfThreadFocusSink : IUnknown
1358 HRESULT OnSetThreadFocus();
1360 HRESULT OnKillThreadFocus();