dmusic: Set synth sink master clock when creating port.
[wine.git] / include / msctf.idl
blob6a9b36a670e9639c926b072e273e596bfc1be9ca
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_LOCKED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0500)")
27 cpp_quote("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
28 cpp_quote("#define TF_E_NOTOWNEDRANGE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0502)")
29 cpp_quote("#define TF_E_NOPROVIDER MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0503)")
30 cpp_quote("#define TF_E_DISCONNECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0504)")
31 cpp_quote("#define TF_E_INVALIDVIEW MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0505)")
32 cpp_quote("#define TF_E_ALREADY_EXISTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)")
33 cpp_quote("#define TF_E_RANGE_NOT_COVERED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0507)")
34 cpp_quote("#define TF_E_COMPOSITION_REJECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0508)")
35 cpp_quote("#define TF_E_EMPTYCONTEXT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0509)")
36 cpp_quote("#define TF_E_INVALIDPOS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0200)")
37 cpp_quote("#define TF_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)")
38 cpp_quote("#define TF_E_NOOBJECT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0202)")
39 cpp_quote("#define TF_E_NOSERVICE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0203)")
40 cpp_quote("#define TF_E_NOINTERFACE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0204)")
41 cpp_quote("#define TF_E_NOSELECTION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0205)")
42 cpp_quote("#define TF_E_NOLAYOUT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0206)")
43 cpp_quote("#define TF_E_INVALIDPOINT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0207)")
44 cpp_quote("#define TF_E_SYNCHRONOUS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0208)")
45 cpp_quote("#define TF_E_READONLY MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0209)")
46 cpp_quote("#define TF_E_FORMAT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020a)")
47 cpp_quote("#define TF_S_ASYNC MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x0300)")
49 cpp_quote("HRESULT WINAPI TF_CreateThreadMgr(ITfThreadMgr **pptim);")
50 cpp_quote("HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim);")
51 cpp_quote("HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr);")
52 cpp_quote("HRESULT WINAPI TF_CreateLangBarMgr(ITfLangBarMgr **pppbm);")
53 cpp_quote("HRESULT WINAPI TF_CreateLangBarItemMgr(ITfLangBarItemMgr **pplbim);")
54 cpp_quote("HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist(void);")
56 cpp_quote("EXTERN_C const GUID GUID_PROP_TEXTOWNER;")
57 cpp_quote("DEFINE_GUID(GUID_PROP_ATTRIBUTE,0x34b45670,0x7526,0x11d2,0xa1,0x47,0x00,0x10,0x5a,0x27,0x99,0xb5);")
58 cpp_quote("EXTERN_C const GUID GUID_PROP_LANGID;")
59 cpp_quote("EXTERN_C const GUID GUID_PROP_READING;")
60 cpp_quote("EXTERN_C const GUID GUID_PROP_COMPOSING;")
62 cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
63 cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
64 cpp_quote("EXTERN_C const CLSID CLSID_TF_LangBarMgr;")
65 cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
66 cpp_quote("EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr;")
68 /* GUIDs for Compartments */
69 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")
70 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;")
71 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;")
72 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;")
73 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;")
74 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;")
75 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;")
76 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;")
77 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;")
79 /* GUIDs for Categories */
80 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
81 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
82 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
83 cpp_quote("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
85 typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie;
86 typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
87 typedef [uuid(88a9c478-f3ec-4763-8345-cd9250443f8d)] DWORD TfGuidAtom;
89 cpp_quote("#define TF_MOD_ALT 0x0001")
90 cpp_quote("#define TF_MOD_CONTROL 0x0002")
91 cpp_quote("#define TF_MOD_SHIFT 0x0004")
92 cpp_quote("#define TF_MOD_RALT 0x0008")
93 cpp_quote("#define TF_MOD_RCONTROL 0x0010")
94 cpp_quote("#define TF_MOD_RSHIFT 0x0020")
95 cpp_quote("#define TF_MOD_LALT 0x0040")
96 cpp_quote("#define TF_MOD_LCONTROL 0x0080")
97 cpp_quote("#define TF_MOD_LSHIFT 0x0100")
98 cpp_quote("#define TF_MOD_ON_KEYUP 0x0200")
99 cpp_quote("#define TF_MOD_IGNORE_ALL_MODIFIER 0x0400")
101 cpp_quote("#define TF_PROFILETYPE_INPUTPROCESSOR 0x0001")
102 cpp_quote("#define TF_PROFILETYPE_KEYBOARDLAYOUT 0x0002")
104 cpp_quote("#define TF_IPSINK_FLAG_ACTIVE 0x0001")
106 cpp_quote("#define TF_TMAE_NOACTIVATETIP 0x00000001")
107 cpp_quote("#define TF_TMAE_SECUREMODE 0x00000002")
108 cpp_quote("#define TF_TMAE_UIELEMENTENABLEDONLY 0x00000004")
109 cpp_quote("#define TF_TMAE_COMLESS 0x00000008")
110 cpp_quote("#define TF_TMAE_WOW16 0x00000010")
111 cpp_quote("#define TF_TMAE_NOACTIVATEKEYBOARDLAYOUT 0x00000020")
112 cpp_quote("#define TF_TMAE_CONSOLE 0x00000040")
114 cpp_quote("#define TF_TMF_NOACTIVATETIP TF_TMAE_NOACTIVATETIP")
115 cpp_quote("#define TF_TMF_SECUREMODE TF_TMAE_SECUREMODE")
116 cpp_quote("#define TF_TMF_UIELEMENTENABLEDONLY TF_TMAE_UIELEMENTENABLEDONLY")
117 cpp_quote("#define TF_TMF_COMLESS TF_TMAE_COMLESS")
118 cpp_quote("#define TF_TMF_WOW16 TF_TMAE_WOW16")
119 cpp_quote("#define TF_TMF_CONSOLE TF_TMAE_CONSOLE")
120 cpp_quote("#define TF_TMF_IMMERSIVEMODE 0x40000000")
121 cpp_quote("#define TF_TMF_ACTIVATED 0x80000000")
123 interface ITfDocumentMgr;
124 interface ITfContext;
125 interface IEnumTfDocumentMgrs;
126 interface IEnumTfContexts;
127 interface ITfCompartmentMgr;
128 interface ITfEditSession;
129 interface ITfRange;
130 interface ITfProperty;
131 interface ITfReadOnlyProperty;
132 interface IEnumTfLanguageProfiles;
133 interface ITfCompositionView;
134 interface ITfKeyEventSink;
135 interface ITfPersistentPropertyLoaderACP;
136 interface ITfRangeACP;
138 cpp_quote("#if 0")
139 typedef [uuid(4f5d560f-5ab5-4dde-8c4d-404592857ab0)] UINT_PTR HKL;
140 cpp_quote("#endif")
142 typedef [uuid(e26d9e1d-691e-4f29-90d7-338dcf1f8cef)] struct TF_PERSISTENT_PROPERTY_HEADER_ACP
144 GUID guidType;
145 LONG ichStart;
146 LONG cch;
147 ULONG cb;
148 DWORD dwPrivate;
149 CLSID clsidTIP;
150 } TF_PERSISTENT_PROPERTY_HEADER_ACP;
152 typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
154 CLSID clsid;
155 LANGID langid;
156 GUID catid;
157 BOOL fActive;
158 GUID guidProfile;
159 } TF_LANGUAGEPROFILE;
161 typedef [uuid(77c12f95-b783-450d-879f-1cd2362c6521)] struct TF_PRESERVEDKEY
163 UINT uVKey;
164 UINT uModifiers;
165 } TF_PRESERVEDKEY;
167 typedef [uuid(5a886226-ae9a-489b-b991-2b1e25ee59a9)] enum { TF_ANCHOR_START = 0, TF_ANCHOR_END = 1 } TfAnchor;
169 typedef [uuid(d678c645-eb6a-45c9-b4ee-0f3e3a991348)] struct TF_PROPERTYVAL
171 GUID guidId;
172 VARIANT varValue;
173 } TF_PROPERTYVAL;
176 object,
177 uuid(101d6610-0990-11d3-8df0-00105a2799b5),
178 pointer_default(unique)
180 interface ITfFunctionProvider : IUnknown
182 HRESULT GetType(
183 [out] GUID *guid);
185 HRESULT GetDescription(
186 [out] BSTR *desc);
188 HRESULT GetFunction(
189 [in] REFGUID guid,
190 [in] REFIID riid,
191 [out, iid_is(riid)] IUnknown **func);
195 object,
196 uuid(e4b24db0-0990-11d3-8df0-00105a2799b5),
197 pointer_default(unique)
199 interface IEnumTfFunctionProviders : IUnknown
201 HRESULT Clone(
202 [out] IEnumTfFunctionProviders **ret);
204 HRESULT Next(
205 [in] ULONG count,
206 [out, size_is(count), length_is(*fetched)] ITfFunctionProvider **prov,
207 [out] ULONG *fetched);
209 HRESULT Reset();
211 HRESULT Skip(
212 [in] ULONG count);
216 object,
217 uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
218 pointer_default(unique)
220 interface ITfThreadMgr: IUnknown
222 HRESULT Activate(
223 [out] TfClientId *ptid);
225 HRESULT Deactivate();
227 HRESULT CreateDocumentMgr(
228 [out] ITfDocumentMgr **ppdim);
230 HRESULT EnumDocumentMgrs(
231 [out] IEnumTfDocumentMgrs **ppEnum);
233 HRESULT GetFocus(
234 [out] ITfDocumentMgr **ppdimFocus);
236 HRESULT SetFocus(
237 [in] ITfDocumentMgr *pdimFocus);
239 HRESULT AssociateFocus(
240 [in] HWND hwnd,
241 [in, unique] ITfDocumentMgr *pdimNew,
242 [out] ITfDocumentMgr **ppdimPrev);
244 HRESULT IsThreadFocus(
245 [out] BOOL *pfThreadFocus);
247 HRESULT GetFunctionProvider(
248 [in] REFCLSID clsid,
249 [out] ITfFunctionProvider **ppFuncProv);
251 HRESULT EnumFunctionProviders(
252 [out] IEnumTfFunctionProviders **ppEnum);
254 HRESULT GetGlobalCompartment(
255 [out] ITfCompartmentMgr **ppCompMgr);
259 object,
260 uuid(3e90ade3-7594-4cb0-bb58-69628f5f458c),
261 pointer_default(unique)
263 interface ITfThreadMgrEx : ITfThreadMgr
265 HRESULT ActivateEx(
266 [out] TfClientId *id,
267 [in] DWORD flags);
268 HRESULT GetActiveFlags(
269 [out] DWORD *flags);
273 object,
274 uuid(d7540241-f9a1-4364-befc-dbcd2c4395b7),
275 pointer_default(unique)
277 interface ITfCompositionView : IUnknown
279 HRESULT GetOwnerClsid([out] CLSID *pclsid);
281 HRESULT GetRange([out] ITfRange **ppRange);
285 object,
286 uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
287 pointer_default(unique)
289 interface ITfDocumentMgr: IUnknown
291 HRESULT CreateContext(
292 [in] TfClientId tidOwner,
293 [in] DWORD dwFlags,
294 [in, unique] IUnknown *punk,
295 [out] ITfContext **ppic,
296 [out] TfEditCookie *pecTextStore);
298 HRESULT Push(
299 [in] ITfContext *pic);
301 const DWORD TF_POPF_ALL = 0x0001;
303 HRESULT Pop(
304 [in] DWORD dwFlags);
306 HRESULT GetTop(
307 [out] ITfContext **ppic);
309 HRESULT GetBase(
310 [out] ITfContext **ppic);
312 HRESULT EnumContexts(
313 [out] IEnumTfContexts **ppEnum);
317 object,
318 uuid(2433bf8e-0f9b-435c-ba2c-180611978c30),
319 pointer_default(unique)
321 interface ITfContextView : IUnknown
323 HRESULT GetRangeFromPoint(
324 [in] TfEditCookie cookie,
325 [in] const POINT *pt,
326 [in] DWORD flags,
327 [out] ITfRange **range);
329 HRESULT GetTextExt(
330 [in] TfEditCookie cookie,
331 [in] ITfRange *range,
332 [out] RECT *rect,
333 [out] BOOL *clipped);
335 HRESULT GetScreenExt(
336 [out] RECT *rect);
338 HRESULT GetWnd(
339 [out] HWND *hwnd);
343 object,
344 uuid(f0c0f8dd-cf38-44e1-bb0f-68cf0d551c78),
345 pointer_default(unique)
347 interface IEnumTfContextViews : IUnknown
349 HRESULT Clone(
350 [out] IEnumTfContextViews **ret);
352 HRESULT Next(
353 [in] ULONG count,
354 [out, size_is(count), length_is(*fetched)] ITfContextView **views,
355 [out] ULONG *fetched);
357 HRESULT Reset();
359 HRESULT Skip(
360 [in] ULONG count);
364 object,
365 uuid(19188cb0-aca9-11d2-afc5-00105a2799b5),
366 pointer_default(unique)
368 interface IEnumTfProperties : IUnknown
370 HRESULT Clone(
371 [out] IEnumTfProperties **ret);
373 HRESULT Next(
374 [in] ULONG count,
375 [out, size_is(count), length_is(*fetched)] ITfProperty **props,
376 [out] ULONG *fetched);
378 HRESULT Reset();
380 HRESULT Skip(
381 [in] ULONG count);
385 object,
386 uuid(8ed8981b-7c10-4d7d-9fb3-ab72e9c75f72),
387 pointer_default(unique)
389 interface IEnumTfPropertyValue : IUnknown
391 HRESULT Clone(
392 [out] IEnumTfPropertyValue **property_value);
394 HRESULT Next(
395 [in] ULONG count,
396 [out, size_is(count), length_is(*fetched)] TF_PROPERTYVAL *values,
397 [out] ULONG *fetched);
399 HRESULT Reset();
401 HRESULT Skip(
402 [in] ULONG count);
406 object,
407 uuid(463a506d-6992-49d2-9b88-93d55e70bb16),
408 pointer_default(unique)
410 interface ITfRangeBackup : IUnknown
412 HRESULT Restore(
413 [in] TfEditCookie cookie,
414 [in] ITfRange *range);
418 object,
419 uuid(aa80e901-2021-11d2-93e0-0060b067b86e),
420 pointer_default(unique)
422 interface ITextStoreACPServices : IUnknown
424 HRESULT Serialize(
425 [in] ITfProperty *prop,
426 [in] ITfRange *range,
427 [out] TF_PERSISTENT_PROPERTY_HEADER_ACP *header,
428 [in] IStream *stream);
430 HRESULT Unserialize(
431 [in] ITfProperty *prop,
432 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP *header,
433 [in] IStream *stream,
434 [in] ITfPersistentPropertyLoaderACP *loader);
436 HRESULT ForceLoadProperty(
437 [in] ITfProperty *prop);
439 HRESULT CreateRange(
440 [in] LONG start,
441 [in] LONG end,
442 [out] ITfRangeACP **range);
446 object,
447 uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
448 pointer_default(unique)
450 interface ITfContext : IUnknown
452 const DWORD TF_ES_ASYNCDONTCARE = 0x0;
453 const DWORD TF_ES_SYNC = 0x1;
454 const DWORD TF_ES_READ = 0x2;
455 const DWORD TF_ES_READWRITE = 0x6;
456 const DWORD TF_ES_ASYNC = 0x8;
458 HRESULT RequestEditSession(
459 [in] TfClientId tid,
460 [in] ITfEditSession *pes,
461 [in] DWORD dwFlags,
462 [out] HRESULT *phrSession);
464 HRESULT InWriteSession(
465 [in] TfClientId tid,
466 [out] BOOL *pfWriteSession);
468 typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
470 typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
472 TfActiveSelEnd ase;
473 BOOL fInterimChar;
474 } TF_SELECTIONSTYLE;
476 typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
478 ITfRange *range;
479 TF_SELECTIONSTYLE style;
480 } TF_SELECTION;
482 const ULONG TF_DEFAULT_SELECTION = TS_DEFAULT_SELECTION;
484 HRESULT GetSelection(
485 [in] TfEditCookie ec,
486 [in] ULONG ulIndex,
487 [in] ULONG ulCount,
488 [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
489 [out] ULONG *pcFetched);
491 HRESULT SetSelection(
492 [in] TfEditCookie ec,
493 [in] ULONG ulCount,
494 [in, size_is(ulCount)] const TF_SELECTION *pSelection);
496 HRESULT GetStart(
497 [in] TfEditCookie ec,
498 [out] ITfRange **ppStart);
500 HRESULT GetEnd(
501 [in] TfEditCookie ec,
502 [out] ITfRange **ppEnd);
504 typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
505 const DWORD TF_SD_READONLY = TS_SD_READONLY;
506 const DWORD TF_SD_LOADING = TS_SD_LOADING;
507 const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
508 const DWORD TF_SS_REGIONS = TS_SS_REGIONS;
509 const DWORD TF_SS_TRANSITORY = TS_SS_TRANSITORY;
512 HRESULT GetActiveView(
513 [out] ITfContextView **ppView);
515 HRESULT EnumViews(
516 [out] IEnumTfContextViews **ppEnum);
518 HRESULT GetStatus(
519 [out] TF_STATUS *pdcs);
521 HRESULT GetProperty(
522 [in] REFGUID guidProp,
523 [out] ITfProperty **ppProp);
525 HRESULT GetAppProperty(
526 [in] REFGUID guidProp,
527 [out] ITfReadOnlyProperty **ppProp);
529 HRESULT TrackProperties(
530 [in, size_is(cProp)] const GUID **prgProp,
531 [in] ULONG cProp,
532 [in, size_is(cAppProp)] const GUID **prgAppProp,
533 [in] ULONG cAppProp,
534 [out] ITfReadOnlyProperty **ppProperty);
536 HRESULT EnumProperties(
537 [out] IEnumTfProperties **ppEnum);
539 HRESULT GetDocumentMgr(
540 [out] ITfDocumentMgr **ppDm);
542 HRESULT CreateRangeBackup(
543 [in] TfEditCookie ec,
544 [in] ITfRange *pRange,
545 [out] ITfRangeBackup **ppBackup);
548 const DWORD TF_INVALID_COOKIE = 0xffffffff;
551 object,
552 uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
553 pointer_default(unique)
555 interface ITfSource : IUnknown
557 HRESULT AdviseSink(
558 [in] REFIID riid,
559 [in, iid_is(riid)] IUnknown *punk,
560 [out] DWORD *pdwCookie);
562 HRESULT UnadviseSink(
563 [in] DWORD dwCookie);
567 object,
568 local,
569 uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
570 pointer_default(unique)
572 interface ITfInputProcessorProfiles : IUnknown
574 HRESULT Register(
575 [in] REFCLSID rclsid);
577 HRESULT Unregister(
578 [in] REFCLSID rclsid);
580 HRESULT AddLanguageProfile(
581 [in] REFCLSID rclsid,
582 [in] LANGID langid,
583 [in] REFGUID guidProfile,
584 [in, size_is(cchDesc)] const WCHAR *pchDesc,
585 [in] ULONG cchDesc,
586 [in, size_is(cchFile)] const WCHAR *pchIconFile,
587 [in] ULONG cchFile,
588 [in] ULONG uIconIndex);
590 HRESULT RemoveLanguageProfile(
591 [in] REFCLSID rclsid,
592 [in] LANGID langid,
593 [in] REFGUID guidProfile);
595 HRESULT EnumInputProcessorInfo(
596 [out] IEnumGUID **ppEnum);
598 HRESULT GetDefaultLanguageProfile(
599 [in] LANGID langid,
600 [in] REFGUID catid,
601 [out] CLSID *pclsid,
602 [out] GUID *pguidProfile);
604 HRESULT SetDefaultLanguageProfile(
605 [in] LANGID langid,
606 [in] REFCLSID rclsid,
607 [in] REFGUID guidProfiles);
609 HRESULT ActivateLanguageProfile(
610 [in] REFCLSID rclsid,
611 [in] LANGID langid,
612 [in] REFGUID guidProfiles);
614 HRESULT GetActiveLanguageProfile(
615 [in] REFCLSID rclsid,
616 [out] LANGID *plangid,
617 [out] GUID *pguidProfile);
619 HRESULT GetLanguageProfileDescription(
620 [in] REFCLSID rclsid,
621 [in] LANGID langid,
622 [in] REFGUID guidProfile,
623 [out] BSTR *pbstrProfile);
625 HRESULT GetCurrentLanguage(
626 [out] LANGID *plangid);
628 HRESULT ChangeCurrentLanguage(
629 [in] LANGID langid);
631 HRESULT GetLanguageList(
632 [out] LANGID **ppLangId,
633 [out] ULONG *pulCount);
635 HRESULT EnumLanguageProfiles(
636 [in] LANGID langid,
637 [out] IEnumTfLanguageProfiles **ppEnum);
639 HRESULT EnableLanguageProfile(
640 [in] REFCLSID rclsid,
641 [in] LANGID langid,
642 [in] REFGUID guidProfile,
643 [in] BOOL fEnable);
645 HRESULT IsEnabledLanguageProfile(
646 [in] REFCLSID rclsid,
647 [in] LANGID langid,
648 [in] REFGUID guidProfile,
649 [out] BOOL *pfEnable);
651 HRESULT EnableLanguageProfileByDefault(
652 [in] REFCLSID rclsid,
653 [in] LANGID langid,
654 [in] REFGUID guidProfile,
655 [in] BOOL fEnable);
657 HRESULT SubstituteKeyboardLayout(
658 [in] REFCLSID rclsid,
659 [in] LANGID langid,
660 [in] REFGUID guidProfile,
661 [in] HKL hKL);
664 typedef [uuid(44d2825a-10e5-43b2-877f-6cb2f43b7e7e)]
665 struct TF_INPUTPROCESSORPROFILE {
666 DWORD dwProfileType;
667 LANGID langid;
668 CLSID clsid;
669 GUID guidProfile;
670 GUID catid;
671 HKL hklSubstitute;
672 DWORD dwCaps;
673 HKL hkl;
674 DWORD dwFlags;
675 } TF_INPUTPROCESSORPROFILE;
678 object,
679 uuid(71c6e74d-0f28-11d8-a82a-00065b84435c),
680 pointer_default(unique)
682 interface IEnumTfInputProcessorProfiles : IUnknown
684 HRESULT Clone(
685 [out] IEnumTfInputProcessorProfiles **ppEnum);
687 HRESULT Next(
688 [in] ULONG ulCount,
689 [out, size_is(ulCount), length_is(*pcFetch)] TF_INPUTPROCESSORPROFILE *pProfile,
690 [out] ULONG *pcFetch);
692 HRESULT Reset();
694 HRESULT Skip(
695 [in] ULONG ulCount);
699 object,
700 uuid(71c6e74c-0f28-11d8-a82a-00065b84435c),
701 pointer_default(unique)
703 interface ITfInputProcessorProfileMgr : IUnknown
705 HRESULT ActivateProfile(
706 [in] DWORD dwProfileType,
707 [in] LANGID langid,
708 [in] REFCLSID clsid,
709 [in] REFGUID guidProfile,
710 [in] HKL hkl,
711 [in] DWORD dwFlags);
713 HRESULT DeactivateProfile(
714 [in] DWORD dwProfileType,
715 [in] LANGID langid,
716 [in] REFCLSID clsid,
717 [in] REFGUID guidProfile,
718 [in] HKL hkl,
719 [in] DWORD dwFlags);
721 HRESULT GetProfile(
722 [in] DWORD dwProfileType,
723 [in] LANGID langid,
724 [in] REFCLSID clsid,
725 [in] REFGUID guidProfile,
726 [in] HKL hkl,
727 [out] TF_INPUTPROCESSORPROFILE *pProfile);
730 HRESULT EnumProfiles(
731 [in] LANGID langid,
732 [out] IEnumTfInputProcessorProfiles **ppEnum);
734 HRESULT ReleaseInputProcessor(
735 [in] REFCLSID rclsid,
736 [in] DWORD dwFlags);
738 HRESULT RegisterProfile(
739 [in] REFCLSID rclsid,
740 [in] LANGID langid,
741 [in] REFGUID guidProfile,
742 [in, size_is(cchDesc)] const WCHAR *pchDesc,
743 [in] ULONG cchDesc,
744 [in, size_is(cchFile)] const WCHAR *pchIconFile,
745 [in] ULONG cchFile,
746 [in] ULONG uIconIndex,
747 [in] HKL hklsubstitute,
748 [in] DWORD dwPreferredLayout,
749 [in] BOOL bEnabledByDefault,
750 [in] DWORD dwFlags);
752 HRESULT UnregisterProfile(
753 [in] REFCLSID rclsid,
754 [in] LANGID langid,
755 [in] REFGUID guidProfile,
756 [in] DWORD dwFlags);
758 HRESULT GetActiveProfile(
759 [in] REFGUID catid,
760 [out] TF_INPUTPROCESSORPROFILE *pProfile);
763 typedef [uuid(c4cc07f1-80cc-4a7b-bc54-98512782cbe3)]
764 enum {
765 TF_LS_NONE = 0,
766 TF_LS_SOLID = 1,
767 TF_LS_DOT = 2,
768 TF_LS_DASH = 3,
769 TF_LS_SQUIGGLE = 4
770 } TF_DA_LINESTYLE;
772 typedef [uuid(d9b92e21-084a-401b-9c64-1e6dad91a1ab)]
773 enum {
774 TF_CT_NONE = 0,
775 TF_CT_SYSCOLOR = 1,
776 TF_CT_COLORREF = 2
777 } TF_DA_COLORTYPE;
779 typedef [uuid(90d0cb5e-6520-4a0f-b47c-c39bd955f0d6)]
780 struct TF_DA_COLOR {
781 TF_DA_COLORTYPE type;
782 [switch_type(TF_DA_COLORTYPE), switch_is(type)]
783 union {
784 [case(TF_CT_SYSCOLOR)] int nIndex;
785 [case(TF_CT_COLORREF)] COLORREF cr;
787 } TF_DA_COLOR;
789 typedef [uuid(33d2fe4b-6c24-4f67-8d75-3bc1819e4126)]
790 enum {
791 TF_ATTR_INPUT = 0,
792 TF_ATTR_TARGET_CONVERTED = 1,
793 TF_ATTR_CONVERTED = 2,
794 TF_ATTR_TARGET_NOTCONVERTED = 3,
795 TF_ATTR_INPUT_ERROR = 4,
796 TF_ATTR_FIXEDCONVERTED = 5,
797 TF_ATTR_OTHER = -1
798 } TF_DA_ATTR_INFO;
800 typedef [uuid(1bf1c305-419b-4182-a4d2-9bfadc3f021f)]
801 struct TF_DISPLAYATTRIBUTE {
802 TF_DA_COLOR crText;
803 TF_DA_COLOR crBk;
804 TF_DA_LINESTYLE lsStyle;
805 BOOL fBoldLine;
806 TF_DA_COLOR crLine;
807 TF_DA_ATTR_INFO bAttr;
808 } TF_DISPLAYATTRIBUTE;
811 object,
812 uuid(70528852-2f26-4aea-8c96-215150578932),
813 pointer_default(unique)
815 interface ITfDisplayAttributeInfo : IUnknown
817 HRESULT GetGUID([out] GUID *pguid);
819 HRESULT GetDescription([out] BSTR *pbstrDesc);
821 HRESULT GetAttributeInfo([out] TF_DISPLAYATTRIBUTE *pda);
823 HRESULT SetAttributeInfo([in] const TF_DISPLAYATTRIBUTE *pda);
825 HRESULT Reset();
829 object,
830 uuid(7cef04d7-cb75-4e80-a7ab-5f5bc7d332de),
831 pointer_default(unique)
833 interface IEnumTfDisplayAttributeInfo : IUnknown
835 HRESULT Clone([out] IEnumTfDisplayAttributeInfo **ppEnum);
837 HRESULT Next(
838 [in] ULONG ulCount,
839 [out, size_is(ulCount), length_is(*pcFetched)] ITfDisplayAttributeInfo **rgInfo,
840 [out] ULONG *pcFetched);
842 HRESULT Reset();
844 HRESULT Skip([in] ULONG ulCount);
848 object,
849 local,
850 uuid(8ded7393-5db1-475c-9e71-a39111b0ff67),
851 pointer_default(unique)
853 interface ITfDisplayAttributeMgr : IUnknown
855 HRESULT OnUpdateInfo();
857 HRESULT EnumDisplayAttributeInfo([out] IEnumTfDisplayAttributeInfo **ppEnum);
859 HRESULT GetDisplayAttributeInfo(
860 [in] REFGUID guid,
861 [out] ITfDisplayAttributeInfo **ppInfo,
862 [out] CLSID *pclsidOwner);
867 object,
868 local,
869 uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
870 pointer_default(unique)
872 interface ITfCategoryMgr : IUnknown
874 HRESULT RegisterCategory([in] REFCLSID rclsid,
875 [in] REFGUID rcatid,
876 [in] REFGUID rguid);
878 HRESULT UnregisterCategory([in] REFCLSID rclsid,
879 [in] REFGUID rcatid,
880 [in] REFGUID rguid);
882 HRESULT EnumCategoriesInItem([in] REFGUID rguid,
883 [out] IEnumGUID **ppEnum);
885 HRESULT EnumItemsInCategory([in] REFGUID rcatid,
886 [out] IEnumGUID **ppEnum);
888 HRESULT FindClosestCategory([in] REFGUID rguid,
889 [out] GUID *pcatid,
890 [in, size_is(ulCount)] const GUID **ppcatidList,
891 [in] ULONG ulCount);
893 HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
894 [in] REFGUID rguid,
895 [in, size_is(cch)] const WCHAR *pchDesc,
896 [in] ULONG cch);
898 HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
899 [in] REFGUID rguid);
901 HRESULT GetGUIDDescription([in] REFGUID rguid,
902 [out] BSTR *pbstrDesc);
904 HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
905 [in] REFGUID rguid,
906 [in] DWORD dw);
908 HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
909 [in] REFGUID rguid);
911 HRESULT GetGUIDDWORD([in] REFGUID rguid,
912 [out] DWORD *pdw);
914 HRESULT RegisterGUID([in] REFGUID rguid,
915 [out] TfGuidAtom *pguidatom);
917 HRESULT GetGUID([in] TfGuidAtom guidatom,
918 [out] GUID *pguid);
920 HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
921 [in] REFGUID rguid,
922 [out] BOOL *pfEqual);
926 object,
927 uuid(f99d3f40-8e32-11d2-bf46-00105a2799b5),
928 pointer_default(unique)
930 interface IEnumTfRanges : IUnknown
932 HRESULT Clone([out] IEnumTfRanges **ppEnum);
934 HRESULT Next(
935 [in] ULONG ulCount,
936 [out, size_is(ulCount), length_is(*pcFetched)] ITfRange **ppRange,
937 [out] ULONG *pcFetched);
939 HRESULT Reset();
941 HRESULT Skip(ULONG ulCount);
945 object,
946 uuid(42d4d099-7c1a-4a89-b836-6c6f22160df0),
947 pointer_default(unique)
949 interface ITfEditRecord : IUnknown
951 const DWORD TF_GTP_INCL_TEXT = 0x1;
953 HRESULT GetSelectionStatus(
954 [out] BOOL *changed);
956 HRESULT GetTextAndPropertyUpdates(
957 [in] DWORD flags,
958 [in, size_is(count)] const GUID **props,
959 [in] ULONG count,
960 [out] IEnumTfRanges **ret);
964 object,
965 uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
966 pointer_default(unique)
968 interface ITfTextEditSink : IUnknown
970 HRESULT OnEndEdit(
971 [in] ITfContext *pic,
972 [in] TfEditCookie ecReadOnly,
973 [in] ITfEditRecord *pEditRecord);
977 object,
978 uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
979 pointer_default(unique)
981 interface ITfContextOwnerCompositionSink : IUnknown
983 HRESULT OnStartComposition(
984 [in] ITfCompositionView *pComposition,
985 [out] BOOL *pfOk);
987 HRESULT OnUpdateComposition(
988 [in] ITfCompositionView *pComposition,
989 [in] ITfRange *pRangeNew);
991 HRESULT OnEndComposition(
992 [in] ITfCompositionView *pComposition);
996 object,
997 uuid(b246cb75-a93e-4652-bf8c-b3fe0cfd7e57),
998 pointer_default(unique)
1000 interface ITfActiveLanguageProfileNotifySink : IUnknown
1002 HRESULT OnActivated(
1003 [in] REFCLSID clsid,
1004 [in] REFGUID guidProfile,
1005 [in] BOOL fActivated);
1009 object,
1010 uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
1011 pointer_default(unique)
1013 interface IEnumTfLanguageProfiles : IUnknown
1015 HRESULT Clone(
1016 [out] IEnumTfLanguageProfiles **ppEnum);
1018 HRESULT Next(
1019 [in] ULONG ulCount,
1020 [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
1021 [out] ULONG *pcFetch);
1023 HRESULT Reset();
1025 HRESULT Skip(
1026 [in] ULONG ulCount);
1030 object,
1031 local,
1032 uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
1033 pointer_default(unique)
1035 interface ITfTextInputProcessor : IUnknown
1037 HRESULT Activate(
1038 [in] ITfThreadMgr *ptim,
1039 [in] TfClientId tid);
1041 HRESULT Deactivate();
1045 object,
1046 uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
1047 pointer_default(unique)
1049 interface ITfThreadMgrEventSink : IUnknown
1051 HRESULT OnInitDocumentMgr(
1052 [in] ITfDocumentMgr *pdim);
1054 HRESULT OnUninitDocumentMgr(
1055 [in] ITfDocumentMgr *pdim);
1057 HRESULT OnSetFocus(
1058 [in] ITfDocumentMgr *pdimFocus,
1059 [in] ITfDocumentMgr *pdimPrevFocus);
1061 HRESULT OnPushContext(
1062 [in] ITfContext *pic);
1064 HRESULT OnPopContext(
1065 [in] ITfContext *pic);
1069 object,
1070 local,
1071 uuid(aa80e7f0-2021-11d2-93e0-0060b067b86e),
1072 pointer_default(unique)
1074 interface ITfKeystrokeMgr : IUnknown
1076 HRESULT AdviseKeyEventSink(
1077 [in] TfClientId tid,
1078 [in] ITfKeyEventSink *pSink,
1079 [in] BOOL fForeground);
1081 HRESULT UnadviseKeyEventSink(
1082 [in] TfClientId tid);
1084 HRESULT GetForeground(
1085 [out] CLSID *pclsid);
1087 HRESULT TestKeyDown(
1088 [in] WPARAM wParam,
1089 [in] LPARAM lParam,
1090 [out] BOOL *pfEaten);
1092 HRESULT TestKeyUp(
1093 [in] WPARAM wParam,
1094 [in] LPARAM lParam,
1095 [out] BOOL *pfEaten);
1097 HRESULT KeyDown(
1098 [in] WPARAM wParam,
1099 [in] LPARAM lParam,
1100 [out] BOOL *pfEaten);
1102 HRESULT KeyUp(
1103 [in] WPARAM wParam,
1104 [in] LPARAM lParam,
1105 [out] BOOL *pfEaten);
1107 HRESULT GetPreservedKey(
1108 [in] ITfContext *pic,
1109 [in] const TF_PRESERVEDKEY *pprekey,
1110 [out] GUID *pguid);
1112 HRESULT IsPreservedKey(
1113 [in] REFGUID rguid,
1114 [in] const TF_PRESERVEDKEY *pprekey,
1115 [out] BOOL *pfRegistered);
1117 HRESULT PreserveKey(
1118 [in] TfClientId tid,
1119 [in] REFGUID rguid,
1120 [in] const TF_PRESERVEDKEY *prekey,
1121 [in, size_is(cchDesc)] const WCHAR *pchDesc,
1122 [in] ULONG cchDesc);
1124 HRESULT UnpreserveKey(
1125 [in] REFGUID rguid,
1126 [in] const TF_PRESERVEDKEY *pprekey);
1128 HRESULT SetPreservedKeyDescription(
1129 [in] REFGUID rguid,
1130 [in, size_is(cchDesc)] const WCHAR *pchDesc,
1131 [in] ULONG cchDesc);
1133 HRESULT GetPreservedKeyDescription(
1134 [in] REFGUID rguid,
1135 [out] BSTR *pbstrDesc);
1137 HRESULT SimulatePreservedKey(
1138 [in] ITfContext *pic,
1139 [in] REFGUID rguid,
1140 [out] BOOL *pfEaten);
1144 object,
1145 local,
1146 uuid(aa80e7f5-2021-11d2-93e0-0060b067b86e),
1147 pointer_default(unique)
1149 interface ITfKeyEventSink : IUnknown
1151 HRESULT OnSetFocus(
1152 [in] BOOL fForeground);
1154 HRESULT OnTestKeyDown(
1155 [in] ITfContext *pic,
1156 [in] WPARAM wParam,
1157 [in] LPARAM lParam,
1158 [out] BOOL *pfEaten);
1160 HRESULT OnTestKeyUp(
1161 [in] ITfContext *pic,
1162 [in] WPARAM wParam,
1163 [in] LPARAM lParam,
1164 [out] BOOL *pfEaten);
1166 HRESULT OnKeyDown(
1167 [in] ITfContext *pic,
1168 [in] WPARAM wParam,
1169 [in] LPARAM lParam,
1170 [out] BOOL *pfEaten);
1172 HRESULT OnKeyUp(
1173 [in] ITfContext *pic,
1174 [in] WPARAM wParam,
1175 [in] LPARAM lParam,
1176 [out] BOOL *pfEaten);
1178 HRESULT OnPreservedKey(
1179 [in] ITfContext *pic,
1180 [in] REFGUID rguid,
1181 [out] BOOL *pfEaten);
1185 object,
1186 local,
1187 uuid(1cd4c13b-1c36-4191-a70a-7f3e611f367d),
1188 pointer_default(unique)
1190 interface ITfKeyTraceEventSink : IUnknown
1192 HRESULT OnKeyTraceDown(
1193 [in] WPARAM wParam,
1194 [in] LPARAM lParam);
1196 HRESULT OnKeyTraceUp(
1197 [in] WPARAM wParam,
1198 [in] LPARAM lParam);
1202 object,
1203 local,
1204 uuid(ea1ea136-19df-11d7-a6d2-00065b84435c),
1205 pointer_default(unique)
1207 interface ITfUIElementSink : IUnknown
1209 HRESULT BeginUIElement(
1210 [in] DWORD id,
1211 [in, out] BOOL *show);
1213 HRESULT UpdateUIElement(
1214 [in] DWORD id);
1216 HRESULT EndUIElement(
1217 [in] DWORD id);
1221 object,
1222 local,
1223 uuid(8f1b8ad8-0b6b-4874-90c5-bd76011e8f7c),
1224 pointer_default(unique)
1226 interface ITfMessagePump : IUnknown
1228 HRESULT PeekMessageA(
1229 [out] LPMSG pMsg,
1230 [in] HWND hwnd,
1231 [in] UINT wMsgFilterMin,
1232 [in] UINT wMsgFilterMax,
1233 [in] UINT wRemoveMsg,
1234 [out] BOOL *pfResult);
1236 HRESULT GetMessageA(
1237 [out] LPMSG pMsg,
1238 [in] HWND hwnd,
1239 [in] UINT wMsgFilterMin,
1240 [in] UINT wMsgFilterMax,
1241 [out] BOOL *pfResult);
1243 HRESULT PeekMessageW(
1244 [out] LPMSG pMsg,
1245 [in] HWND hwnd,
1246 [in] UINT wMsgFilterMin,
1247 [in] UINT wMsgFilterMax,
1248 [in] UINT wRemoveMsg,
1249 [out] BOOL *pfResult);
1251 HRESULT GetMessageW(
1252 [out] LPMSG pMsg,
1253 [in] HWND hwnd,
1254 [in] UINT wMsgFilterMin,
1255 [in] UINT wMsgFilterMax,
1256 [out] BOOL *pfResult);
1260 object,
1261 local,
1262 uuid(d60a7b49-1b9f-4be2-b702-47e9dc05dec3),
1263 pointer_default(unique)
1265 interface ITfClientId : IUnknown
1267 HRESULT GetClientId(
1268 [in] REFCLSID rclsid,
1269 [out] TfClientId *ptid);
1273 object,
1274 uuid(43c9fe15-f494-4c17-9de2-b8a4ac350aa8),
1275 pointer_default(unique)
1277 interface ITfLanguageProfileNotifySink : IUnknown
1279 HRESULT OnLanguageChange(
1280 [in] LANGID langid,
1281 [out] BOOL *pfAccept);
1283 HRESULT OnLanguageChanged();
1287 object,
1288 uuid(aa80e803-2021-11d2-93e0-0060b067b86e),
1289 pointer_default(unique)
1291 interface ITfEditSession : IUnknown
1293 HRESULT DoEditSession(
1294 [in] TfEditCookie ec);
1298 object,
1299 uuid(aa80e7ff-2021-11d2-93e0-0060b067b86e),
1300 pointer_default(unique)
1302 interface ITfRange : IUnknown
1304 const WCHAR TF_CHAR_EMBEDDED = TS_CHAR_EMBEDDED;
1306 typedef [uuid(cf610f06-2882-46f6-abe5-298568b664c4)] enum { TF_GRAVITY_BACKWARD = 0, TF_GRAVITY_FORWARD = 1 } TfGravity;
1308 typedef [uuid(1e512533-bbdc-4530-9a8e-a1dc0af67468)] enum { TF_SD_BACKWARD = 0, TF_SD_FORWARD = 1 } TfShiftDir;
1310 const DWORD TF_HF_OBJECT = 1;
1311 const DWORD TF_TF_MOVESTART = 1;
1312 const DWORD TF_TF_IGNOREEND = 2;
1313 const DWORD TF_ST_CORRECTION = 1;
1314 const DWORD TF_IE_CORRECTION = 1;
1316 typedef [uuid(49930d51-7d93-448c-a48c-fea5dac192b1)] struct TF_HALTCOND
1318 ITfRange *pHaltRange;
1319 TfAnchor aHaltPos;
1320 DWORD dwFlags;
1321 } TF_HALTCOND;
1323 HRESULT GetText(
1324 [in] TfEditCookie ec,
1325 [in] DWORD dwFlags,
1326 [out, size_is(cchMax), length_is(*pcch)] WCHAR *pchText,
1327 [in] ULONG cchMax,
1328 [out] ULONG *pcch);
1330 HRESULT SetText(
1331 [in] TfEditCookie ec,
1332 [in] DWORD dwFlags,
1333 [in, size_is(cch), unique] const WCHAR *pchText,
1334 [in] LONG cch);
1336 HRESULT GetFormattedText(
1337 [in] TfEditCookie ec,
1338 [out] IDataObject **ppDataObject);
1340 HRESULT GetEmbedded(
1341 [in] TfEditCookie ec,
1342 [in] REFGUID rguidService,
1343 [in] REFIID riid,
1344 [out, iid_is(riid)] IUnknown **ppunk);
1346 HRESULT InsertEmbedded(
1347 [in] TfEditCookie ec,
1348 [in] DWORD dwFlags,
1349 [in] IDataObject *pDataObject);
1351 HRESULT ShiftStart(
1352 [in] TfEditCookie ec,
1353 [in] LONG cchReq,
1354 [out] LONG *pcch,
1355 [in, unique] const TF_HALTCOND *pHalt);
1357 HRESULT ShiftEnd(
1358 [in] TfEditCookie ec,
1359 [in] LONG cchReq,
1360 [out] LONG *pcch,
1361 [in, unique] const TF_HALTCOND *pHalt);
1363 HRESULT ShiftStartToRange(
1364 [in] TfEditCookie ec,
1365 [in] ITfRange *pRange,
1366 [in] TfAnchor aPos);
1368 HRESULT ShiftEndToRange(
1369 [in] TfEditCookie ec,
1370 [in] ITfRange *pRange,
1371 [in] TfAnchor aPos);
1373 HRESULT ShiftStartRegion(
1374 [in] TfEditCookie ec,
1375 [in] TfShiftDir dir,
1376 [out] BOOL *pfNoRegion);
1378 HRESULT ShiftEndRegion(
1379 [in] TfEditCookie ec,
1380 [in] TfShiftDir dir,
1381 [out] BOOL *pfNoRegion);
1383 HRESULT IsEmpty(
1384 [in] TfEditCookie ec,
1385 [out] BOOL *pfEmpty);
1387 HRESULT Collapse(
1388 [in] TfEditCookie ec,
1389 [in] TfAnchor aPos);
1391 HRESULT IsEqualStart(
1392 [in] TfEditCookie ec,
1393 [in] ITfRange *pWith,
1394 [in] TfAnchor aPos,
1395 [out] BOOL *pfEqual);
1397 HRESULT IsEqualEnd(
1398 [in] TfEditCookie ec,
1399 [in] ITfRange *pWith,
1400 [in] TfAnchor aPos,
1401 [out] BOOL *pfEqual);
1403 HRESULT CompareStart(
1404 [in] TfEditCookie ec,
1405 [in] ITfRange *pWith,
1406 [in] TfAnchor aPos,
1407 [out] LONG *plResult);
1409 HRESULT CompareEnd(
1410 [in] TfEditCookie ec,
1411 [in] ITfRange *pWith,
1412 [in] TfAnchor aPos,
1413 [out] LONG *plResult);
1415 HRESULT AdjustForInsert(
1416 [in] TfEditCookie ec,
1417 [in] ULONG cchInsert,
1418 [out] BOOL *pfInsertOk);
1420 HRESULT GetGravity(
1421 [out] TfGravity *pgStart,
1422 [out] TfGravity *pgEnd);
1424 HRESULT SetGravity(
1425 [in] TfEditCookie ec,
1426 [in] TfGravity gStart,
1427 [in] TfGravity gEnd);
1429 HRESULT Clone(
1430 [out] ITfRange **ppClone);
1432 HRESULT GetContext(
1433 [out] ITfContext **ppContext);
1437 object,
1438 uuid(057a6296-029b-4154-b79a-0d461d4ea94c),
1439 pointer_default(unique)
1441 interface ITfRangeACP : ITfRange
1443 HRESULT GetExtent([out] LONG *pacpAnchor,
1444 [out] LONG *pcch);
1446 HRESULT SetExtent([in] LONG acpAnchor,
1447 [in] LONG cch);
1451 object,
1452 uuid(55ce16ba-3014-41c1-9ceb-fade1446ac6c),
1453 pointer_default(unique)
1455 interface ITfInsertAtSelection : IUnknown
1457 const DWORD TF_IAS_NOQUERY = 0x1;
1458 const DWORD TF_IAS_QUERYONLY = 0x2;
1459 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION = 0x80000000;
1461 HRESULT InsertTextAtSelection(
1462 [in] TfEditCookie ec,
1463 [in] DWORD dwFlags,
1464 [in, size_is(cch)] const WCHAR *pchText,
1465 [in] LONG cch,
1466 [out] ITfRange **ppRange);
1468 HRESULT InsertEmbeddedAtSelection(
1469 [in] TfEditCookie ec,
1470 [in] DWORD dwFlags,
1471 [in] IDataObject *pDataObject,
1472 [out] ITfRange **ppRange);
1476 object,
1477 uuid(6834b120-88cb-11d2-bf45-00105a2799b5),
1478 pointer_default(unique)
1480 interface ITfPropertyStore : IUnknown
1482 const DWORD TF_TU_CORRECTION = 0x1;
1484 HRESULT GetType([out] GUID *pguid);
1486 HRESULT GetDataType([out] DWORD *pdwReserved);
1488 HRESULT GetData([out] VARIANT *pvarValue);
1490 HRESULT OnTextUpdated(
1491 [in] DWORD dwFlags,
1492 [in] ITfRange *pRangeNew,
1493 [out] BOOL *pfAccept);
1495 HRESULT Shrink(
1496 [in] ITfRange *pRangeNew,
1497 [out] BOOL *pfFree);
1499 HRESULT Divide(
1500 [in] ITfRange *pRangeThis,
1501 [in] ITfRange *pRangeNew,
1502 [out] ITfPropertyStore **ppPropStore);
1504 HRESULT Clone(
1505 [out] ITfPropertyStore **pPropStore);
1507 HRESULT GetPropertyRangeCreator(
1508 [out] CLSID *pclsid);
1510 HRESULT Serialize(
1511 [in] IStream *pStream,
1512 [out] ULONG *pcb);
1516 object,
1517 uuid(5efd22Ba-7838-46cb-88e2-cadb14124f8f),
1518 pointer_default(unique)
1520 interface IEnumITfCompositionView : IUnknown
1522 HRESULT Clone([out] IEnumITfCompositionView **ppEnum);
1524 HRESULT Next(
1525 [in] ULONG ulCount,
1526 [out, size_is(ulCount), length_is(*pcFetched)] ITfCompositionView **rgCompositionView,
1527 [out] ULONG *pcFetched);
1529 HRESULT Reset();
1531 HRESULT Skip([in] ULONG ulCount);
1535 object,
1536 uuid(20168d64-5a8f-4a5a-b7bd-cfa29f4D0fd9),
1537 pointer_default(unique)
1539 interface ITfComposition : IUnknown
1541 HRESULT GetRange([out] ITfRange **ppRange);
1543 HRESULT ShiftStart(
1544 [in] TfEditCookie ecWrite,
1545 [in] ITfRange *pNewStart);
1547 HRESULT ShiftEnd(
1548 [in] TfEditCookie ecWrite,
1549 [in] ITfRange *pNewEnd);
1551 HRESULT EndComposition([in] TfEditCookie ecWrite);
1555 object,
1556 uuid(a781718c-579a-4b15-a280-32b8577acc5e),
1557 pointer_default(unique)
1559 interface ITfCompositionSink : IUnknown
1561 HRESULT OnCompositionTerminated(
1562 [in] TfEditCookie ecWrite,
1563 [in] ITfComposition *pComposition);
1567 object,
1568 uuid(d40C8aae-aC92-4fc7-9a11-0ee0e23aa39b),
1569 pointer_default(unique)
1571 interface ITfContextComposition : IUnknown
1573 HRESULT StartComposition(
1574 [in] TfEditCookie ecWrite,
1575 [in] ITfRange *pCompositionRange,
1576 [in] ITfCompositionSink *pSink,
1577 [out] ITfComposition **ppComposition);
1579 HRESULT EnumCompositions([out] IEnumITfCompositionView **ppEnum);
1581 HRESULT FindComposition(
1582 [in] TfEditCookie ecRead,
1583 [in] ITfRange *pTestRange,
1584 [out] IEnumITfCompositionView **ppEnum);
1586 HRESULT TakeOwnership(
1587 [in] TfEditCookie ecWrite,
1588 [in] ITfCompositionView *pComposition,
1589 [in] ITfCompositionSink *pSink,
1590 [out] ITfComposition **ppComposition);
1594 object,
1595 uuid(86462810-593b-4916-9764-19c08e9ce110),
1596 pointer_default(unique)
1598 interface ITfContextOwnerCompositionServices : ITfContextComposition
1600 HRESULT TerminateComposition([in] ITfCompositionView *pComposition);
1604 object,
1605 uuid(4ef89150-0807-11d3-8df0-00105a2799b5),
1606 pointer_default(unique)
1608 interface ITfPersistentPropertyLoaderACP : IUnknown
1610 HRESULT LoadProperty(
1611 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
1612 [out] IStream **ppStream);
1616 object,
1617 uuid(b23eb630-3e1c-11d3-a745-0050040ab407),
1618 pointer_default(unique)
1620 interface ITfContextOwnerServices : IUnknown
1622 HRESULT OnLayoutChange();
1624 HRESULT OnStatusChange([in] DWORD dwFlags);
1626 HRESULT OnAttributeChange([in] REFGUID rguidAttribute);
1628 HRESULT Serialize(
1629 [in] ITfProperty *pProp,
1630 [in] ITfRange *pRange,
1631 [out] TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
1632 [in] IStream *pStream);
1634 HRESULT Unserialize(
1635 [in] ITfProperty *pProp,
1636 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
1637 [in] IStream *pStream,
1638 [in] ITfPersistentPropertyLoaderACP *pLoader);
1640 HRESULT ForceLoadProperty([in] ITfProperty *pProp);
1642 HRESULT CreateRange(
1643 [in] LONG acpStart,
1644 [in] LONG acpEnd,
1645 [out] ITfRangeACP **ppRange);
1649 object,
1650 uuid(17d49a3d-f8b8-4b2f-b254-52319dd64c53),
1651 pointer_default(unique)
1653 interface ITfReadOnlyProperty : IUnknown
1655 HRESULT GetType([out] GUID *pguid);
1657 HRESULT EnumRanges(
1658 [in] TfEditCookie ec,
1659 [out] IEnumTfRanges **ppEnum,
1660 [in] ITfRange *pTargetRange);
1662 HRESULT GetValue(
1663 [in] TfEditCookie ec,
1664 [in] ITfRange *pRange,
1665 [out] VARIANT *pvarValue);
1667 HRESULT GetContext([out] ITfContext **ppContext);
1671 object,
1672 uuid(e2449660-9542-11d2-bf46-00105a2799b5),
1673 pointer_default(unique)
1675 interface ITfProperty : ITfReadOnlyProperty
1677 HRESULT FindRange(
1678 [in] TfEditCookie ec,
1679 [in] ITfRange *pRange,
1680 [out] ITfRange **ppRange,
1681 [in] TfAnchor aPos);
1683 HRESULT SetValueStore(
1684 [in] TfEditCookie ec,
1685 [in] ITfRange *pRange,
1686 [in] ITfPropertyStore *pPropStore);
1688 HRESULT SetValue(
1689 [in] TfEditCookie ec,
1690 [in] ITfRange *pRange,
1691 [in] const VARIANT *pvarValue);
1693 HRESULT Clear(
1694 [in] TfEditCookie ec,
1695 [in] ITfRange *pRange);
1699 object,
1700 uuid(bb08f7a9-607a-4384-8623-056892b64371),
1701 pointer_default(unique)
1703 interface ITfCompartment : IUnknown
1705 HRESULT SetValue(
1706 [in] TfClientId tid,
1707 [in] const VARIANT *pvarValue);
1709 HRESULT GetValue(
1710 [out] VARIANT *pvarValue);
1714 object,
1715 uuid(7dcf57ac-18ad-438b-824d-979bffb74b7c),
1716 pointer_default(unique)
1718 interface ITfCompartmentMgr : IUnknown
1720 HRESULT GetCompartment(
1721 [in] REFGUID rguid,
1722 [out] ITfCompartment **ppcomp);
1724 HRESULT ClearCompartment(
1725 [in] TfClientId tid,
1726 [in] REFGUID rguid);
1728 HRESULT EnumCompartments(
1729 [out] IEnumGUID **ppEnum);
1733 object,
1734 uuid(743abd5f-f26d-48df-8cc5-238492419b64),
1735 pointer_default(unique)
1737 interface ITfCompartmentEventSink : IUnknown
1739 HRESULT OnChange(
1740 [in] REFGUID rguid);
1744 object,
1745 uuid(8f1a7ea6-1654-4502-a86e-b2902344d507),
1746 pointer_default(unique)
1748 interface IEnumTfContexts : IUnknown
1750 HRESULT Clone(
1751 [out] IEnumTfContexts **ppEnum);
1753 HRESULT Next(
1754 [in] ULONG ulCount,
1755 [out, size_is(ulCount), length_is(*pcFetched)] ITfContext **rgContext,
1756 [out] ULONG *pcFetched);
1758 HRESULT Reset();
1760 HRESULT Skip(
1761 [in] ULONG ulCount);
1765 object,
1766 uuid(aa80e808-2021-11d2-93e0-0060b067b86e),
1767 pointer_default(unique)
1769 interface IEnumTfDocumentMgrs : IUnknown
1771 HRESULT Clone(
1772 [out] IEnumTfDocumentMgrs **ppEnum);
1774 HRESULT Next(
1775 [in] ULONG ulCount,
1776 [out, size_is(ulCount), length_is(*pcFetched)] ITfDocumentMgr **rgDocumentMgr,
1777 [out] ULONG *pcFetched);
1779 HRESULT Reset();
1781 HRESULT Skip(
1782 [in] ULONG ulCount);
1786 object,
1787 local,
1788 uuid(ea1ea137-19df-11d7-a6d2-00065b84435c),
1789 pointer_default(unique)
1791 interface ITfUIElement : IUnknown
1793 HRESULT GetDescription(
1794 [out] BSTR *description);
1796 HRESULT GetGUID(
1797 [out] GUID *guid);
1799 HRESULT Show(
1800 [in] BOOL show);
1802 HRESULT IsShown(
1803 [out] BOOL *show);
1807 object,
1808 local,
1809 uuid(887aa91e-acba-4931-84da-3c5208cf543f),
1810 pointer_default(unique)
1812 interface IEnumTfUIElements : IUnknown
1814 HRESULT Clone(
1815 [out] IEnumTfUIElements **enum_elements);
1817 HRESULT Next(
1818 [in] ULONG count,
1819 [out, size_is(count), length_is(fetched)] ITfUIElement **element,
1820 [out] ULONG fetched);
1822 HRESULT Reset();
1824 HRESULT Skip(
1825 [in] ULONG count);
1829 object,
1830 local,
1831 uuid(ea1ea135-19df-11d7-a6d2-00065b84435c),
1832 pointer_default(unique)
1834 interface ITfUIElementMgr : IUnknown
1836 HRESULT BeginUIElement(
1837 [in] ITfUIElement *element,
1838 [in, out] BOOL *show,
1839 [out] DWORD *id);
1841 HRESULT UpdateUIElement(
1842 [in] DWORD id);
1844 HRESULT EndUIElement(
1845 [in] DWORD id);
1847 HRESULT GetUIElement(
1848 [in] DWORD id,
1849 [out] ITfUIElement **element);
1851 HRESULT EnumUIElements(
1852 [out] IEnumTfUIElements **enum_elements);
1856 object,
1857 uuid(73131f9c-56a9-49dd-b0ee-d046633f7528),
1858 pointer_default(unique)
1860 interface ITfSourceSingle : IUnknown
1862 HRESULT AdviseSingleSink(
1863 [in] TfClientId tid,
1864 [in] REFIID riid,
1865 [in, iid_is(riid)] IUnknown *punk);
1867 HRESULT UnadviseSingleSink(
1868 [in] TfClientId tid,
1869 [in] REFIID riid);
1873 object,
1874 local,
1875 uuid(c0f1db0c-3a20-405c-a303-96b6010a885f),
1876 pointer_default(unique)
1878 interface ITfThreadFocusSink : IUnknown
1880 HRESULT OnSetThreadFocus();
1882 HRESULT OnKillThreadFocus();
1886 object,
1887 uuid(71c6e74e-0f28-11d8-a82a-00065b84435c),
1888 pointer_default(unique)
1890 interface ITfInputProcessorProfileActivationSink : IUnknown
1892 HRESULT OnActivated(
1893 [in] DWORD dwProfileType,
1894 [in] LANGID langid,
1895 [in] REFCLSID clsid,
1896 [in] REFGUID catid,
1897 [in] REFGUID guidProfile,
1898 [in] HKL hkl,
1899 [in] DWORD dwFlags);
1903 object,
1904 local,
1905 uuid(a1adaaa2-3a24-449d-ac96-5183e7f5c217),
1906 pointer_default(unique)
1908 interface ITfMouseSink : IUnknown
1910 HRESULT OnMouseEvent(
1911 [in] ULONG uEdge,
1912 [in] ULONG uQuadrant,
1913 [in] DWORD dwBtnStatus,
1914 [out] BOOL *pfEaten);
1918 object,
1919 uuid(09d146cd-a544-4132-925b-7afa8ef322d0),
1920 pointer_default(unique)
1922 interface ITfMouseTracker : IUnknown
1924 HRESULT AdviseMouseSink(
1925 [in] ITfRange *range,
1926 [in] ITfMouseSink *pSink,
1927 [out] DWORD *pdwCookie);
1929 HRESULT UnadviseMouseSink([in] DWORD dwCookie);
1933 object,
1934 uuid(3bdd78e2-c16e-47fd-b883-ce6facc1a208),
1935 pointer_default(unique)
1937 interface ITfMouseTrackerACP : IUnknown
1939 HRESULT AdviseMouseSink(
1940 [in] ITfRangeACP *range,
1941 [in] ITfMouseSink *pSink,
1942 [out] DWORD *pdwCookie);
1944 HRESULT UnadviseMouseSink([in] DWORD dwCookie);
1948 object,
1949 local,
1950 uuid(a615096f-1c57-4813-8a15-55ee6e5a839c),
1951 pointer_default(unique)
1953 interface ITfTransitoryExtensionSink : IUnknown
1955 HRESULT OnTransitoryExtensionUpdated(
1956 [in] ITfContext *pic,
1957 [in] TfEditCookie ecReadOnly,
1958 [in] ITfRange *pResultRange,
1959 [in] ITfRange *pCompositionRange,
1960 [out] BOOL *pfDeleteResultRange);