[PSDK] Update msctf.idl. CORE-10536
[reactos.git] / reactos / include / psdk / msctf.idl
1 /*
2 * Copyright 2008 Aric Stewart, CodeWeavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19 #ifndef DO_NO_IMPORTS
20 import "oaidl.idl";
21 import "comcat.idl";
22 import "textstor.idl";
23 import "ctfutb.idl";
24 #endif
25
26 cpp_quote("#define TF_E_STACKFULL MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0501)")
27 cpp_quote("#define TF_E_DISCONNECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0504)")
28 cpp_quote("#define TF_E_ALREADY_EXISTS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)")
29 cpp_quote("#define TF_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)")
30
31 cpp_quote("HRESULT WINAPI TF_CreateThreadMgr(ITfThreadMgr **pptim);")
32 cpp_quote("HRESULT WINAPI TF_GetThreadMgr(ITfThreadMgr **pptim);")
33 cpp_quote("HRESULT WINAPI TF_CreateInputProcessorProfiles(ITfInputProcessorProfiles **ppipr);")
34 cpp_quote("HRESULT WINAPI TF_CreateLangBarMgr(ITfLangBarMgr **pppbm);")
35 cpp_quote("HRESULT WINAPI TF_CreateLangBarItemMgr(ITfLangBarItemMgr **pplbim);")
36 cpp_quote("HRESULT WINAPI TF_InvalidAssemblyListCacheIfExist(void);")
37
38 cpp_quote("EXTERN_C const GUID GUID_PROP_TEXTOWNER;")
39 cpp_quote("DEFINE_GUID(GUID_PROP_ATTRIBUTE,0x34b45670,0x7526,0x11d2,0xa1,0x47,0x00,0x10,0x5a,0x27,0x99,0xb5);")
40 cpp_quote("EXTERN_C const GUID GUID_PROP_LANGID;")
41 cpp_quote("EXTERN_C const GUID GUID_PROP_READING;")
42 cpp_quote("EXTERN_C const GUID GUID_PROP_COMPOSING;")
43
44 cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
45 cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
46 cpp_quote("EXTERN_C const CLSID CLSID_TF_LangBarMgr;")
47 cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
48 cpp_quote("EXTERN_C const CLSID CLSID_TF_DisplayAttributeMgr;")
49
50 /* GUIDs for Compartments */
51 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_DISABLED;")
52 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_KEYBOARD_OPENCLOSE;")
53 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_HANDWRITING_OPENCLOSE;")
54 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_DISABLED;")
55 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_OPENCLOSE;")
56 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_SPEECH_GLOBALSTATE;")
57 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_PERSISTMENUENABLED;")
58 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_EMPTYCONTEXT;")
59 cpp_quote("EXTERN_C const GUID GUID_COMPARTMENT_TIPUISTATUS;")
60
61 /* GUIDs for Categories */
62 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
63 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
64 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
65 cpp_quote("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
66
67 typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)] DWORD TfEditCookie;
68 typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
69 typedef [uuid(88a9c478-f3ec-4763-8345-cd9250443f8d)] DWORD TfGuidAtom;
70
71 cpp_quote("#define TF_MOD_ALT 0x0001")
72 cpp_quote("#define TF_MOD_CONTROL 0x0002")
73 cpp_quote("#define TF_MOD_SHIFT 0x0004")
74 cpp_quote("#define TF_MOD_RALT 0x0008")
75 cpp_quote("#define TF_MOD_RCONTROL 0x0010")
76 cpp_quote("#define TF_MOD_RSHIFT 0x0020")
77 cpp_quote("#define TF_MOD_LALT 0x0040")
78 cpp_quote("#define TF_MOD_LCONTROL 0x0080")
79 cpp_quote("#define TF_MOD_LSHIFT 0x0100")
80 cpp_quote("#define TF_MOD_ON_KEYUP 0x0200")
81 cpp_quote("#define TF_MOD_IGNORE_ALL_MODIFIER 0x0400")
82
83 cpp_quote("#define TF_PROFILETYPE_INPUTPROCESSOR 0x0001")
84 cpp_quote("#define TF_PROFILETYPE_KEYBOARDLAYOUT 0x0002")
85
86 cpp_quote("#define TF_IPSINK_FLAG_ACTIVE 0x0001")
87
88 interface ITfDocumentMgr;
89 interface ITfContext;
90 interface IEnumTfDocumentMgrs;
91 interface IEnumTfContexts;
92 interface ITfCompartmentMgr;
93 interface ITfEditSession;
94 interface ITfRange;
95 interface ITfProperty;
96 interface ITfReadOnlyProperty;
97 interface IEnumTfLanguageProfiles;
98 interface ITfCompositionView;
99 interface ITfKeyEventSink;
100
101 cpp_quote("#if 0")
102 typedef [uuid(4f5d560f-5ab5-4dde-8c4d-404592857ab0)] UINT_PTR HKL;
103 cpp_quote("#endif")
104
105 typedef [uuid(e26d9e1d-691e-4f29-90d7-338dcf1f8cef)] struct TF_PERSISTENT_PROPERTY_HEADER_ACP
106 {
107 GUID guidType;
108 LONG ichStart;
109 LONG cch;
110 ULONG cb;
111 DWORD dwPrivate;
112 CLSID clsidTIP;
113 } TF_PERSISTENT_PROPERTY_HEADER_ACP;
114
115 typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
116 {
117 CLSID clsid;
118 LANGID langid;
119 GUID catid;
120 BOOL fActive;
121 GUID guidProfile;
122 } TF_LANGUAGEPROFILE;
123
124 typedef [uuid(77c12f95-b783-450d-879f-1cd2362c6521)] struct TF_PRESERVEDKEY
125 {
126 UINT uVKey;
127 UINT uModifiers;
128 } TF_PRESERVEDKEY;
129
130 typedef [uuid(5a886226-ae9a-489b-b991-2b1e25ee59a9)] enum { TF_ANCHOR_START = 0, TF_ANCHOR_END = 1 } TfAnchor;
131
132 [
133 object,
134 uuid(101d6610-0990-11d3-8df0-00105a2799b5),
135 pointer_default(unique)
136 ]
137 interface ITfFunctionProvider : IUnknown
138 {
139 HRESULT GetType(
140 [out] GUID *guid);
141
142 HRESULT GetDescription(
143 [out] BSTR *desc);
144
145 HRESULT GetFunction(
146 [in] REFGUID guid,
147 [in] REFIID riid,
148 [out, iid_is(riid)] IUnknown **func);
149 }
150
151 [
152 object,
153 uuid(e4b24db0-0990-11d3-8df0-00105a2799b5),
154 pointer_default(unique)
155 ]
156 interface IEnumTfFunctionProviders : IUnknown
157 {
158 HRESULT Clone(
159 [out] IEnumTfFunctionProviders **ret);
160
161 HRESULT Next(
162 [in] ULONG count,
163 [out, size_is(count), length_is(*fetched)] ITfFunctionProvider **prov,
164 [out] ULONG *fetched);
165
166 HRESULT Reset();
167
168 HRESULT Skip(
169 [in] ULONG count);
170 }
171
172 [
173 object,
174 uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
175 pointer_default(unique)
176 ]
177 interface ITfThreadMgr: IUnknown
178 {
179 HRESULT Activate(
180 [out] TfClientId *ptid);
181
182 HRESULT Deactivate();
183
184 HRESULT CreateDocumentMgr(
185 [out] ITfDocumentMgr **ppdim);
186
187 HRESULT EnumDocumentMgrs(
188 [out] IEnumTfDocumentMgrs **ppEnum);
189
190 HRESULT GetFocus(
191 [out] ITfDocumentMgr **ppdimFocus);
192
193 HRESULT SetFocus(
194 [in] ITfDocumentMgr *pdimFocus);
195
196 HRESULT AssociateFocus(
197 [in] HWND hwnd,
198 [in, unique] ITfDocumentMgr *pdimNew,
199 [out] ITfDocumentMgr **ppdimPrev);
200
201 HRESULT IsThreadFocus(
202 [out] BOOL *pfThreadFocus);
203
204 HRESULT GetFunctionProvider(
205 [in] REFCLSID clsid,
206 [out] ITfFunctionProvider **ppFuncProv);
207
208 HRESULT EnumFunctionProviders(
209 [out] IEnumTfFunctionProviders **ppEnum);
210
211 HRESULT GetGlobalCompartment(
212 [out] ITfCompartmentMgr **ppCompMgr);
213 }
214
215 [
216 object,
217 uuid(3e90ade3-7594-4cb0-bb58-69628f5f458c),
218 pointer_default(unique)
219 ]
220 interface ITfThreadMgrEx : ITfThreadMgr
221 {
222 HRESULT ActivateEx(
223 [out] TfClientId *id,
224 [in] DWORD flags);
225 HRESULT GetActiveFlags(
226 [out] DWORD *flags);
227 }
228
229 [
230 object,
231 uuid(d7540241-f9a1-4364-befc-dbcd2c4395b7),
232 pointer_default(unique)
233 ]
234 interface ITfCompositionView : IUnknown
235 {
236 HRESULT GetOwnerClsid([out] CLSID *pclsid);
237
238 HRESULT GetRange([out] ITfRange **ppRange);
239 }
240
241 [
242 object,
243 uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
244 pointer_default(unique)
245 ]
246 interface ITfDocumentMgr: IUnknown
247 {
248 HRESULT CreateContext(
249 [in] TfClientId tidOwner,
250 [in] DWORD dwFlags,
251 [in, unique] IUnknown *punk,
252 [out] ITfContext **ppic,
253 [out] TfEditCookie *pecTextStore);
254
255 HRESULT Push(
256 [in] ITfContext *pic);
257
258 const DWORD TF_POPF_ALL = 0x0001;
259
260 HRESULT Pop(
261 [in] DWORD dwFlags);
262
263 HRESULT GetTop(
264 [out] ITfContext **ppic);
265
266 HRESULT GetBase(
267 [out] ITfContext **ppic);
268
269 HRESULT EnumContexts(
270 [out] IEnumTfContexts **ppEnum);
271 }
272
273 [
274 object,
275 uuid(2433bf8e-0f9b-435c-ba2c-180611978c30),
276 pointer_default(unique)
277 ]
278 interface ITfContextView : IUnknown
279 {
280 HRESULT GetRangeFromPoint(
281 [in] TfEditCookie cookie,
282 [in] const POINT *pt,
283 [in] DWORD flags,
284 [out] ITfRange **range);
285
286 HRESULT GetTextExt(
287 [in] TfEditCookie cookie,
288 [in] ITfRange *range,
289 [out] RECT *rect,
290 [out] BOOL *clipped);
291
292 HRESULT GetScreenExt(
293 [out] RECT *rect);
294
295 HRESULT GetWnd(
296 [out] HWND *hwnd);
297 }
298
299 [
300 object,
301 uuid(f0c0f8dd-cf38-44e1-bb0f-68cf0d551c78),
302 pointer_default(unique)
303 ]
304 interface IEnumTfContextViews : IUnknown
305 {
306 HRESULT Clone(
307 [out] IEnumTfContextViews **ret);
308
309 HRESULT Next(
310 [in] ULONG count,
311 [out, size_is(count), length_is(*fetched)] ITfContextView **views,
312 [out] ULONG *fetched);
313
314 HRESULT Reset();
315
316 HRESULT Skip(
317 [in] ULONG count);
318 }
319
320 [
321 object,
322 uuid(19188cb0-aca9-11d2-afc5-00105a2799b5),
323 pointer_default(unique)
324 ]
325 interface IEnumTfProperties : IUnknown
326 {
327 HRESULT Clone(
328 [out] IEnumTfProperties **ret);
329
330 HRESULT Next(
331 [in] ULONG count,
332 [out, size_is(count), length_is(*fetched)] ITfProperty **props,
333 [out] ULONG *fetched);
334
335 HRESULT Reset();
336
337 HRESULT Skip(
338 [in] ULONG count);
339 }
340
341 [
342 object,
343 uuid(463a506d-6992-49d2-9b88-93d55e70bb16),
344 pointer_default(unique)
345 ]
346 interface ITfRangeBackup : IUnknown
347 {
348 HRESULT Restore(
349 [in] TfEditCookie cookie,
350 [in] ITfRange *range);
351 }
352
353 [
354 object,
355 uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
356 pointer_default(unique)
357 ]
358 interface ITfContext : IUnknown
359 {
360 const DWORD TF_ES_ASYNCDONTCARE = 0x0;
361 const DWORD TF_ES_SYNC = 0x1;
362 const DWORD TF_ES_READ = 0x2;
363 const DWORD TF_ES_READWRITE = 0x6;
364 const DWORD TF_ES_ASYNC = 0x8;
365
366 HRESULT RequestEditSession(
367 [in] TfClientId tid,
368 [in] ITfEditSession *pes,
369 [in] DWORD dwFlags,
370 [out] HRESULT *phrSession);
371
372 HRESULT InWriteSession(
373 [in] TfClientId tid,
374 [out] BOOL *pfWriteSession);
375
376 typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
377
378 typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
379 {
380 TfActiveSelEnd ase;
381 BOOL fInterimChar;
382 } TF_SELECTIONSTYLE;
383
384 typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
385 {
386 ITfRange *range;
387 TF_SELECTIONSTYLE style;
388 } TF_SELECTION;
389
390 const ULONG TF_DEFAULT_SELECTION = TS_DEFAULT_SELECTION;
391
392 HRESULT GetSelection(
393 [in] TfEditCookie ec,
394 [in] ULONG ulIndex,
395 [in] ULONG ulCount,
396 [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
397 [out] ULONG *pcFetched);
398
399 HRESULT SetSelection(
400 [in] TfEditCookie ec,
401 [in] ULONG ulCount,
402 [in, size_is(ulCount)] const TF_SELECTION *pSelection);
403
404 HRESULT GetStart(
405 [in] TfEditCookie ec,
406 [out] ITfRange **ppStart);
407
408 HRESULT GetEnd(
409 [in] TfEditCookie ec,
410 [out] ITfRange **ppEnd);
411
412 typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
413 const DWORD TF_SD_READONLY = TS_SD_READONLY;
414 const DWORD TF_SD_LOADING = TS_SD_LOADING;
415 const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
416 const DWORD TF_SS_REGIONS = TS_SS_REGIONS;
417 const DWORD TF_SS_TRANSITORY = TS_SS_TRANSITORY;
418
419
420 HRESULT GetActiveView(
421 [out] ITfContextView **ppView);
422
423 HRESULT EnumViews(
424 [out] IEnumTfContextViews **ppEnum);
425
426 HRESULT GetStatus(
427 [out] TF_STATUS *pdcs);
428
429 HRESULT GetProperty(
430 [in] REFGUID guidProp,
431 [out] ITfProperty **ppProp);
432
433 HRESULT GetAppProperty(
434 [in] REFGUID guidProp,
435 [out] ITfReadOnlyProperty **ppProp);
436
437 HRESULT TrackProperties(
438 [in, size_is(cProp)] const GUID **prgProp,
439 [in] ULONG cProp,
440 [in, size_is(cAppProp)] const GUID **prgAppProp,
441 [in] ULONG cAppProp,
442 [out] ITfReadOnlyProperty **ppProperty);
443
444 HRESULT EnumProperties(
445 [out] IEnumTfProperties **ppEnum);
446
447 HRESULT GetDocumentMgr(
448 [out] ITfDocumentMgr **ppDm);
449
450 HRESULT CreateRangeBackup(
451 [in] TfEditCookie ec,
452 [in] ITfRange *pRange,
453 [out] ITfRangeBackup **ppBackup);
454 }
455
456 const DWORD TF_INVALID_COOKIE = 0xffffffff;
457
458 [
459 object,
460 uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
461 pointer_default(unique)
462 ]
463 interface ITfSource : IUnknown
464 {
465 HRESULT AdviseSink(
466 [in] REFIID riid,
467 [in, iid_is(riid)] IUnknown *punk,
468 [out] DWORD *pdwCookie);
469
470 HRESULT UnadviseSink(
471 [in] DWORD dwCookie);
472 }
473
474 [
475 object,
476 local,
477 uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
478 pointer_default(unique)
479 ]
480 interface ITfInputProcessorProfiles : IUnknown
481 {
482 HRESULT Register(
483 [in] REFCLSID rclsid);
484
485 HRESULT Unregister(
486 [in] REFCLSID rclsid);
487
488 HRESULT AddLanguageProfile(
489 [in] REFCLSID rclsid,
490 [in] LANGID langid,
491 [in] REFGUID guidProfile,
492 [in, size_is(cchDesc)] const WCHAR *pchDesc,
493 [in] ULONG cchDesc,
494 [in, size_is(cchFile)] const WCHAR *pchIconFile,
495 [in] ULONG cchFile,
496 [in] ULONG uIconIndex);
497
498 HRESULT RemoveLanguageProfile(
499 [in] REFCLSID rclsid,
500 [in] LANGID langid,
501 [in] REFGUID guidProfile);
502
503 HRESULT EnumInputProcessorInfo(
504 [out] IEnumGUID **ppEnum);
505
506 HRESULT GetDefaultLanguageProfile(
507 [in] LANGID langid,
508 [in] REFGUID catid,
509 [out] CLSID *pclsid,
510 [out] GUID *pguidProfile);
511
512 HRESULT SetDefaultLanguageProfile(
513 [in] LANGID langid,
514 [in] REFCLSID rclsid,
515 [in] REFGUID guidProfiles);
516
517 HRESULT ActivateLanguageProfile(
518 [in] REFCLSID rclsid,
519 [in] LANGID langid,
520 [in] REFGUID guidProfiles);
521
522 HRESULT GetActiveLanguageProfile(
523 [in] REFCLSID rclsid,
524 [out] LANGID *plangid,
525 [out] GUID *pguidProfile);
526
527 HRESULT GetLanguageProfileDescription(
528 [in] REFCLSID rclsid,
529 [in] LANGID langid,
530 [in] REFGUID guidProfile,
531 [out] BSTR *pbstrProfile);
532
533 HRESULT GetCurrentLanguage(
534 [out] LANGID *plangid);
535
536 HRESULT ChangeCurrentLanguage(
537 [in] LANGID langid);
538
539 HRESULT GetLanguageList(
540 [out] LANGID **ppLangId,
541 [out] ULONG *pulCount);
542
543 HRESULT EnumLanguageProfiles(
544 [in] LANGID langid,
545 [out] IEnumTfLanguageProfiles **ppEnum);
546
547 HRESULT EnableLanguageProfile(
548 [in] REFCLSID rclsid,
549 [in] LANGID langid,
550 [in] REFGUID guidProfile,
551 [in] BOOL fEnable);
552
553 HRESULT IsEnabledLanguageProfile(
554 [in] REFCLSID rclsid,
555 [in] LANGID langid,
556 [in] REFGUID guidProfile,
557 [out] BOOL *pfEnable);
558
559 HRESULT EnableLanguageProfileByDefault(
560 [in] REFCLSID rclsid,
561 [in] LANGID langid,
562 [in] REFGUID guidProfile,
563 [in] BOOL fEnable);
564
565 HRESULT SubstituteKeyboardLayout(
566 [in] REFCLSID rclsid,
567 [in] LANGID langid,
568 [in] REFGUID guidProfile,
569 [in] HKL hKL);
570 }
571
572 typedef [uuid(44d2825a-10e5-43b2-877f-6cb2f43b7e7e)]
573 struct TF_INPUTPROCESSORPROFILE {
574 DWORD dwProfileType;
575 LANGID langid;
576 CLSID clsid;
577 GUID guidProfile;
578 GUID catid;
579 HKL hklSubstitute;
580 DWORD dwCaps;
581 HKL hkl;
582 DWORD dwFlags;
583 } TF_INPUTPROCESSORPROFILE;
584
585 [
586 object,
587 uuid(71c6e74d-0f28-11d8-a82a-00065b84435c),
588 pointer_default(unique)
589 ]
590 interface IEnumTfInputProcessorProfiles : IUnknown
591 {
592 HRESULT Clone(
593 [out] IEnumTfInputProcessorProfiles **ppEnum);
594
595 HRESULT Next(
596 [in] ULONG ulCount,
597 [out, size_is(ulCount), length_is(*pcFetch)] TF_INPUTPROCESSORPROFILE *pProfile,
598 [out] ULONG *pcFetch);
599
600 HRESULT Reset();
601
602 HRESULT Skip(
603 [in] ULONG ulCount);
604 }
605
606 [
607 object,
608 uuid(71c6e74c-0f28-11d8-a82a-00065b84435c),
609 pointer_default(unique)
610 ]
611 interface ITfInputProcessorProfileMgr : IUnknown
612 {
613 HRESULT ActivateProfile(
614 [in] DWORD dwProfileType,
615 [in] LANGID langid,
616 [in] REFCLSID clsid,
617 [in] REFGUID guidProfile,
618 [in] HKL hkl,
619 [in] DWORD dwFlags);
620
621 HRESULT DeactivateProfile(
622 [in] DWORD dwProfileType,
623 [in] LANGID langid,
624 [in] REFCLSID clsid,
625 [in] REFGUID guidProfile,
626 [in] HKL hkl,
627 [in] DWORD dwFlags);
628
629 HRESULT GetProfile(
630 [in] DWORD dwProfileType,
631 [in] LANGID langid,
632 [in] REFCLSID clsid,
633 [in] REFGUID guidProfile,
634 [in] HKL hkl,
635 [out] TF_INPUTPROCESSORPROFILE *pProfile);
636
637
638 HRESULT EnumProfiles(
639 [in] LANGID langid,
640 [out] IEnumTfInputProcessorProfiles **ppEnum);
641
642 HRESULT ReleaseInputProcessor(
643 [in] REFCLSID rclsid,
644 [in] DWORD dwFlags);
645
646 HRESULT RegisterProfile(
647 [in] REFCLSID rclsid,
648 [in] LANGID langid,
649 [in] REFGUID guidProfile,
650 [in, size_is(cchDesc)] const WCHAR *pchDesc,
651 [in] ULONG cchDesc,
652 [in, size_is(cchFile)] const WCHAR *pchIconFile,
653 [in] ULONG cchFile,
654 [in] ULONG uIconIndex,
655 [in] HKL hklsubstitute,
656 [in] DWORD dwPreferredLayout,
657 [in] BOOL bEnabledByDefault,
658 [in] DWORD dwFlags);
659
660 HRESULT UnregisterProfile(
661 [in] REFCLSID rclsid,
662 [in] LANGID langid,
663 [in] REFGUID guidProfile,
664 [in] DWORD dwFlags);
665
666 HRESULT GetActiveProfile(
667 [in] REFGUID catid,
668 [out] TF_INPUTPROCESSORPROFILE *pProfile);
669 }
670
671 typedef [uuid(c4cc07f1-80cc-4a7b-bc54-98512782cbe3)]
672 enum {
673 TF_LS_NONE = 0,
674 TF_LS_SOLID = 1,
675 TF_LS_DOT = 2,
676 TF_LS_DASH = 3,
677 TF_LS_SQUIGGLE = 4
678 } TF_DA_LINESTYLE;
679
680 typedef [uuid(d9b92e21-084a-401b-9c64-1e6dad91a1ab)]
681 enum {
682 TF_CT_NONE = 0,
683 TF_CT_SYSCOLOR = 1,
684 TF_CT_COLORREF = 2
685 } TF_DA_COLORTYPE;
686
687 typedef [uuid(90d0cb5e-6520-4a0f-b47c-c39bd955f0d6)]
688 struct TF_DA_COLOR {
689 TF_DA_COLORTYPE type;
690 [switch_type(TF_DA_COLORTYPE), switch_is(type)]
691 union {
692 [case(TF_CT_SYSCOLOR)] int nIndex;
693 [case(TF_CT_COLORREF)] COLORREF cr;
694 };
695 } TF_DA_COLOR;
696
697 typedef [uuid(33d2fe4b-6c24-4f67-8d75-3bc1819e4126)]
698 enum {
699 TF_ATTR_INPUT = 0,
700 TF_ATTR_TARGET_CONVERTED = 1,
701 TF_ATTR_CONVERTED = 2,
702 TF_ATTR_TARGET_NOTCONVERTED = 3,
703 TF_ATTR_INPUT_ERROR = 4,
704 TF_ATTR_FIXEDCONVERTED = 5,
705 TF_ATTR_OTHER = -1
706 } TF_DA_ATTR_INFO;
707
708 typedef [uuid(1bf1c305-419b-4182-a4d2-9bfadc3f021f)]
709 struct TF_DISPLAYATTRIBUTE {
710 TF_DA_COLOR crText;
711 TF_DA_COLOR crBk;
712 TF_DA_LINESTYLE lsStyle;
713 BOOL fBoldLine;
714 TF_DA_COLOR crLine;
715 TF_DA_ATTR_INFO bAttr;
716 } TF_DISPLAYATTRIBUTE;
717
718 [
719 object,
720 uuid(70528852-2f26-4aea-8c96-215150578932),
721 pointer_default(unique)
722 ]
723 interface ITfDisplayAttributeInfo : IUnknown
724 {
725 HRESULT GetGUID([out] GUID *pguid);
726
727 HRESULT GetDescription([out] BSTR *pbstrDesc);
728
729 HRESULT GetAttributeInfo([out] TF_DISPLAYATTRIBUTE *pda);
730
731 HRESULT SetAttributeInfo([in] const TF_DISPLAYATTRIBUTE *pda);
732
733 HRESULT Reset();
734 }
735
736 [
737 object,
738 uuid(7cef04d7-cb75-4e80-a7ab-5f5bc7d332de),
739 pointer_default(unique)
740 ]
741 interface IEnumTfDisplayAttributeInfo : IUnknown
742 {
743 HRESULT Clone([out] IEnumTfDisplayAttributeInfo **ppEnum);
744
745 HRESULT Next(
746 [in] ULONG ulCount,
747 [out, size_is(ulCount), length_is(*pcFetched)] ITfDisplayAttributeInfo **rgInfo,
748 [out] ULONG *pcFetched);
749
750 HRESULT Reset();
751
752 HRESULT Skip([in] ULONG ulCount);
753 }
754
755 [
756 object,
757 local,
758 uuid(8ded7393-5db1-475c-9e71-a39111b0ff67),
759 pointer_default(unique)
760 ]
761 interface ITfDisplayAttributeMgr : IUnknown
762 {
763 HRESULT OnUpdateInfo();
764
765 HRESULT EnumDisplayAttributeInfo([out] IEnumTfDisplayAttributeInfo **ppEnum);
766
767 HRESULT GetDisplayAttributeInfo(
768 [in] REFGUID guid,
769 [out] ITfDisplayAttributeInfo **ppInfo,
770 [out] CLSID *pclsidOwner);
771
772 }
773
774 [
775 object,
776 local,
777 uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
778 pointer_default(unique)
779 ]
780 interface ITfCategoryMgr : IUnknown
781 {
782 HRESULT RegisterCategory([in] REFCLSID rclsid,
783 [in] REFGUID rcatid,
784 [in] REFGUID rguid);
785
786 HRESULT UnregisterCategory([in] REFCLSID rclsid,
787 [in] REFGUID rcatid,
788 [in] REFGUID rguid);
789
790 HRESULT EnumCategoriesInItem([in] REFGUID rguid,
791 [out] IEnumGUID **ppEnum);
792
793 HRESULT EnumItemsInCategory([in] REFGUID rcatid,
794 [out] IEnumGUID **ppEnum);
795
796 HRESULT FindClosestCategory([in] REFGUID rguid,
797 [out] GUID *pcatid,
798 [in, size_is(ulCount)] const GUID **ppcatidList,
799 [in] ULONG ulCount);
800
801 HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
802 [in] REFGUID rguid,
803 [in, size_is(cch)] const WCHAR *pchDesc,
804 [in] ULONG cch);
805
806 HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
807 [in] REFGUID rguid);
808
809 HRESULT GetGUIDDescription([in] REFGUID rguid,
810 [out] BSTR *pbstrDesc);
811
812 HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
813 [in] REFGUID rguid,
814 [in] DWORD dw);
815
816 HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
817 [in] REFGUID rguid);
818
819 HRESULT GetGUIDDWORD([in] REFGUID rguid,
820 [out] DWORD *pdw);
821
822 HRESULT RegisterGUID([in] REFGUID rguid,
823 [out] TfGuidAtom *pguidatom);
824
825 HRESULT GetGUID([in] TfGuidAtom guidatom,
826 [out] GUID *pguid);
827
828 HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
829 [in] REFGUID rguid,
830 [out] BOOL *pfEqual);
831 }
832
833 [
834 object,
835 uuid(f99d3f40-8e32-11d2-bf46-00105a2799b5),
836 pointer_default(unique)
837 ]
838 interface IEnumTfRanges : IUnknown
839 {
840 HRESULT Clone([out] IEnumTfRanges **ppEnum);
841
842 HRESULT Next(
843 [in] ULONG ulCount,
844 [out, size_is(ulCount), length_is(*pcFetched)] ITfRange **ppRange,
845 [out] ULONG *pcFetched);
846
847 HRESULT Reset();
848
849 HRESULT Skip(ULONG ulCount);
850 }
851
852 [
853 object,
854 uuid(42d4d099-7c1a-4a89-b836-6c6f22160df0),
855 pointer_default(unique)
856 ]
857 interface ITfEditRecord : IUnknown
858 {
859 const DWORD TF_GTP_INCL_TEXT = 0x1;
860
861 HRESULT GetSelectionStatus(
862 [out] BOOL *changed);
863
864 HRESULT GetTextAndPropertyUpdates(
865 [in] DWORD flags,
866 [in, size_is(count)] const GUID **props,
867 [in] ULONG count,
868 [out] IEnumTfRanges **ret);
869 }
870
871 [
872 object,
873 uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
874 pointer_default(unique)
875 ]
876 interface ITfTextEditSink : IUnknown
877 {
878 HRESULT OnEndEdit(
879 [in] ITfContext *pic,
880 [in] TfEditCookie ecReadOnly,
881 [in] ITfEditRecord *pEditRecord);
882 }
883
884 [
885 object,
886 uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
887 pointer_default(unique)
888 ]
889 interface ITfContextOwnerCompositionSink : IUnknown
890 {
891 HRESULT OnStartComposition(
892 [in] ITfCompositionView *pComposition,
893 [out] BOOL *pfOk);
894
895 HRESULT OnUpdateComposition(
896 [in] ITfCompositionView *pComposition,
897 [in] ITfRange *pRangeNew);
898
899 HRESULT OnEndComposition(
900 [in] ITfCompositionView *pComposition);
901 }
902
903 [
904 object,
905 uuid(b246cb75-a93e-4652-bf8c-b3fe0cfd7e57),
906 pointer_default(unique)
907 ]
908 interface ITfActiveLanguageProfileNotifySink : IUnknown
909 {
910 HRESULT OnActivated(
911 [in] REFCLSID clsid,
912 [in] REFGUID guidProfile,
913 [in] BOOL fActivated);
914 }
915
916 [
917 object,
918 uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
919 pointer_default(unique)
920 ]
921 interface IEnumTfLanguageProfiles : IUnknown
922 {
923 HRESULT Clone(
924 [out] IEnumTfLanguageProfiles **ppEnum);
925
926 HRESULT Next(
927 [in] ULONG ulCount,
928 [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
929 [out] ULONG *pcFetch);
930
931 HRESULT Reset();
932
933 HRESULT Skip(
934 [in] ULONG ulCount);
935 }
936
937 [
938 object,
939 local,
940 uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
941 pointer_default(unique)
942 ]
943 interface ITfTextInputProcessor : IUnknown
944 {
945 HRESULT Activate(
946 [in] ITfThreadMgr *ptim,
947 [in] TfClientId tid);
948
949 HRESULT Deactivate();
950 }
951
952 [
953 object,
954 uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
955 pointer_default(unique)
956 ]
957 interface ITfThreadMgrEventSink : IUnknown
958 {
959 HRESULT OnInitDocumentMgr(
960 [in] ITfDocumentMgr *pdim);
961
962 HRESULT OnUninitDocumentMgr(
963 [in] ITfDocumentMgr *pdim);
964
965 HRESULT OnSetFocus(
966 [in] ITfDocumentMgr *pdimFocus,
967 [in] ITfDocumentMgr *pdimPrevFocus);
968
969 HRESULT OnPushContext(
970 [in] ITfContext *pic);
971
972 HRESULT OnPopContext(
973 [in] ITfContext *pic);
974 }
975
976 [
977 object,
978 local,
979 uuid(aa80e7f0-2021-11d2-93e0-0060b067b86e),
980 pointer_default(unique)
981 ]
982 interface ITfKeystrokeMgr : IUnknown
983 {
984 HRESULT AdviseKeyEventSink(
985 [in] TfClientId tid,
986 [in] ITfKeyEventSink *pSink,
987 [in] BOOL fForeground);
988
989 HRESULT UnadviseKeyEventSink(
990 [in] TfClientId tid);
991
992 HRESULT GetForeground(
993 [out] CLSID *pclsid);
994
995 HRESULT TestKeyDown(
996 [in] WPARAM wParam,
997 [in] LPARAM lParam,
998 [out] BOOL *pfEaten);
999
1000 HRESULT TestKeyUp(
1001 [in] WPARAM wParam,
1002 [in] LPARAM lParam,
1003 [out] BOOL *pfEaten);
1004
1005 HRESULT KeyDown(
1006 [in] WPARAM wParam,
1007 [in] LPARAM lParam,
1008 [out] BOOL *pfEaten);
1009
1010 HRESULT KeyUp(
1011 [in] WPARAM wParam,
1012 [in] LPARAM lParam,
1013 [out] BOOL *pfEaten);
1014
1015 HRESULT GetPreservedKey(
1016 [in] ITfContext *pic,
1017 [in] const TF_PRESERVEDKEY *pprekey,
1018 [out] GUID *pguid);
1019
1020 HRESULT IsPreservedKey(
1021 [in] REFGUID rguid,
1022 [in] const TF_PRESERVEDKEY *pprekey,
1023 [out] BOOL *pfRegistered);
1024
1025 HRESULT PreserveKey(
1026 [in] TfClientId tid,
1027 [in] REFGUID rguid,
1028 [in] const TF_PRESERVEDKEY *prekey,
1029 [in, size_is(cchDesc)] const WCHAR *pchDesc,
1030 [in] ULONG cchDesc);
1031
1032 HRESULT UnpreserveKey(
1033 [in] REFGUID rguid,
1034 [in] const TF_PRESERVEDKEY *pprekey);
1035
1036 HRESULT SetPreservedKeyDescription(
1037 [in] REFGUID rguid,
1038 [in, size_is(cchDesc)] const WCHAR *pchDesc,
1039 [in] ULONG cchDesc);
1040
1041 HRESULT GetPreservedKeyDescription(
1042 [in] REFGUID rguid,
1043 [out] BSTR *pbstrDesc);
1044
1045 HRESULT SimulatePreservedKey(
1046 [in] ITfContext *pic,
1047 [in] REFGUID rguid,
1048 [out] BOOL *pfEaten);
1049 }
1050
1051 [
1052 object,
1053 local,
1054 uuid(aa80e7f5-2021-11d2-93e0-0060b067b86e),
1055 pointer_default(unique)
1056 ]
1057 interface ITfKeyEventSink : IUnknown
1058 {
1059 HRESULT OnSetFocus(
1060 [in] BOOL fForeground);
1061
1062 HRESULT OnTestKeyDown(
1063 [in] ITfContext *pic,
1064 [in] WPARAM wParam,
1065 [in] LPARAM lParam,
1066 [out] BOOL *pfEaten);
1067
1068 HRESULT OnTestKeyUp(
1069 [in] ITfContext *pic,
1070 [in] WPARAM wParam,
1071 [in] LPARAM lParam,
1072 [out] BOOL *pfEaten);
1073
1074 HRESULT OnKeyDown(
1075 [in] ITfContext *pic,
1076 [in] WPARAM wParam,
1077 [in] LPARAM lParam,
1078 [out] BOOL *pfEaten);
1079
1080 HRESULT OnKeyUp(
1081 [in] ITfContext *pic,
1082 [in] WPARAM wParam,
1083 [in] LPARAM lParam,
1084 [out] BOOL *pfEaten);
1085
1086 HRESULT OnPreservedKey(
1087 [in] ITfContext *pic,
1088 [in] REFGUID rguid,
1089 [out] BOOL *pfEaten);
1090 }
1091
1092 [
1093 object,
1094 local,
1095 uuid(8f1b8ad8-0b6b-4874-90c5-bd76011e8f7c),
1096 pointer_default(unique)
1097 ]
1098 interface ITfMessagePump : IUnknown
1099 {
1100 HRESULT PeekMessageA(
1101 [out] LPMSG pMsg,
1102 [in] HWND hwnd,
1103 [in] UINT wMsgFilterMin,
1104 [in] UINT wMsgFilterMax,
1105 [in] UINT wRemoveMsg,
1106 [out] BOOL *pfResult);
1107
1108 HRESULT GetMessageA(
1109 [out] LPMSG pMsg,
1110 [in] HWND hwnd,
1111 [in] UINT wMsgFilterMin,
1112 [in] UINT wMsgFilterMax,
1113 [out] BOOL *pfResult);
1114
1115 HRESULT PeekMessageW(
1116 [out] LPMSG pMsg,
1117 [in] HWND hwnd,
1118 [in] UINT wMsgFilterMin,
1119 [in] UINT wMsgFilterMax,
1120 [in] UINT wRemoveMsg,
1121 [out] BOOL *pfResult);
1122
1123 HRESULT GetMessageW(
1124 [out] LPMSG pMsg,
1125 [in] HWND hwnd,
1126 [in] UINT wMsgFilterMin,
1127 [in] UINT wMsgFilterMax,
1128 [out] BOOL *pfResult);
1129 }
1130
1131 [
1132 object,
1133 local,
1134 uuid(d60a7b49-1b9f-4be2-b702-47e9dc05dec3),
1135 pointer_default(unique)
1136 ]
1137 interface ITfClientId : IUnknown
1138 {
1139 HRESULT GetClientId(
1140 [in] REFCLSID rclsid,
1141 [out] TfClientId *ptid);
1142 }
1143
1144 [
1145 object,
1146 uuid(43c9fe15-f494-4c17-9de2-b8a4ac350aa8),
1147 pointer_default(unique)
1148 ]
1149 interface ITfLanguageProfileNotifySink : IUnknown
1150 {
1151 HRESULT OnLanguageChange(
1152 [in] LANGID langid,
1153 [out] BOOL *pfAccept);
1154
1155 HRESULT OnLanguageChanged();
1156 }
1157
1158 [
1159 object,
1160 uuid(aa80e803-2021-11d2-93e0-0060b067b86e),
1161 pointer_default(unique)
1162 ]
1163 interface ITfEditSession : IUnknown
1164 {
1165 HRESULT DoEditSession(
1166 [in] TfEditCookie ec);
1167 }
1168
1169 [
1170 object,
1171 uuid(aa80e7ff-2021-11d2-93e0-0060b067b86e),
1172 pointer_default(unique)
1173 ]
1174 interface ITfRange : IUnknown
1175 {
1176 const WCHAR TF_CHAR_EMBEDDED = TS_CHAR_EMBEDDED;
1177
1178 typedef [uuid(cf610f06-2882-46f6-abe5-298568b664c4)] enum { TF_GRAVITY_BACKWARD = 0, TF_GRAVITY_FORWARD = 1 } TfGravity;
1179
1180 typedef [uuid(1e512533-bbdc-4530-9a8e-a1dc0af67468)] enum { TF_SD_BACKWARD = 0, TF_SD_FORWARD = 1 } TfShiftDir;
1181
1182 const DWORD TF_HF_OBJECT = 1;
1183 const DWORD TF_TF_MOVESTART = 1;
1184 const DWORD TF_TF_IGNOREEND = 2;
1185 const DWORD TF_ST_CORRECTION = 1;
1186 const DWORD TF_IE_CORRECTION = 1;
1187
1188 typedef [uuid(49930d51-7d93-448c-a48c-fea5dac192b1)] struct TF_HALTCOND
1189 {
1190 ITfRange *pHaltRange;
1191 TfAnchor aHaltPos;
1192 DWORD dwFlags;
1193 } TF_HALTCOND;
1194
1195 HRESULT GetText(
1196 [in] TfEditCookie ec,
1197 [in] DWORD dwFlags,
1198 [out, size_is(cchMax), length_is(*pcch)] WCHAR *pchText,
1199 [in] ULONG cchMax,
1200 [out] ULONG *pcch);
1201
1202 HRESULT SetText(
1203 [in] TfEditCookie ec,
1204 [in] DWORD dwFlags,
1205 [in, size_is(cch), unique] const WCHAR *pchText,
1206 [in] LONG cch);
1207
1208 HRESULT GetFormattedText(
1209 [in] TfEditCookie ec,
1210 [out] IDataObject **ppDataObject);
1211
1212 HRESULT GetEmbedded(
1213 [in] TfEditCookie ec,
1214 [in] REFGUID rguidService,
1215 [in] REFIID riid,
1216 [out, iid_is(riid)] IUnknown **ppunk);
1217
1218 HRESULT InsertEmbedded(
1219 [in] TfEditCookie ec,
1220 [in] DWORD dwFlags,
1221 [in] IDataObject *pDataObject);
1222
1223 HRESULT ShiftStart(
1224 [in] TfEditCookie ec,
1225 [in] LONG cchReq,
1226 [out] LONG *pcch,
1227 [in, unique] const TF_HALTCOND *pHalt);
1228
1229 HRESULT ShiftEnd(
1230 [in] TfEditCookie ec,
1231 [in] LONG cchReq,
1232 [out] LONG *pcch,
1233 [in, unique] const TF_HALTCOND *pHalt);
1234
1235 HRESULT ShiftStartToRange(
1236 [in] TfEditCookie ec,
1237 [in] ITfRange *pRange,
1238 [in] TfAnchor aPos);
1239
1240 HRESULT ShiftEndToRange(
1241 [in] TfEditCookie ec,
1242 [in] ITfRange *pRange,
1243 [in] TfAnchor aPos);
1244
1245 HRESULT ShiftStartRegion(
1246 [in] TfEditCookie ec,
1247 [in] TfShiftDir dir,
1248 [out] BOOL *pfNoRegion);
1249
1250 HRESULT ShiftEndRegion(
1251 [in] TfEditCookie ec,
1252 [in] TfShiftDir dir,
1253 [out] BOOL *pfNoRegion);
1254
1255 HRESULT IsEmpty(
1256 [in] TfEditCookie ec,
1257 [out] BOOL *pfEmpty);
1258
1259 HRESULT Collapse(
1260 [in] TfEditCookie ec,
1261 [in] TfAnchor aPos);
1262
1263 HRESULT IsEqualStart(
1264 [in] TfEditCookie ec,
1265 [in] ITfRange *pWith,
1266 [in] TfAnchor aPos,
1267 [out] BOOL *pfEqual);
1268
1269 HRESULT IsEqualEnd(
1270 [in] TfEditCookie ec,
1271 [in] ITfRange *pWith,
1272 [in] TfAnchor aPos,
1273 [out] BOOL *pfEqual);
1274
1275 HRESULT CompareStart(
1276 [in] TfEditCookie ec,
1277 [in] ITfRange *pWith,
1278 [in] TfAnchor aPos,
1279 [out] LONG *plResult);
1280
1281 HRESULT CompareEnd(
1282 [in] TfEditCookie ec,
1283 [in] ITfRange *pWith,
1284 [in] TfAnchor aPos,
1285 [out] LONG *plResult);
1286
1287 HRESULT AdjustForInsert(
1288 [in] TfEditCookie ec,
1289 [in] ULONG cchInsert,
1290 [out] BOOL *pfInsertOk);
1291
1292 HRESULT GetGravity(
1293 [out] TfGravity *pgStart,
1294 [out] TfGravity *pgEnd);
1295
1296 HRESULT SetGravity(
1297 [in] TfEditCookie ec,
1298 [in] TfGravity gStart,
1299 [in] TfGravity gEnd);
1300
1301 HRESULT Clone(
1302 [out] ITfRange **ppClone);
1303
1304 HRESULT GetContext(
1305 [out] ITfContext **ppContext);
1306 }
1307
1308 [
1309 object,
1310 uuid(057a6296-029b-4154-b79a-0d461d4ea94c),
1311 pointer_default(unique)
1312 ]
1313 interface ITfRangeACP : ITfRange
1314 {
1315 HRESULT GetExtent([out] LONG *pacpAnchor,
1316 [out] LONG *pcch);
1317
1318 HRESULT SetExtent([in] LONG acpAnchor,
1319 [in] LONG cch);
1320 }
1321
1322 [
1323 object,
1324 uuid(55ce16ba-3014-41c1-9ceb-fade1446ac6c),
1325 pointer_default(unique)
1326 ]
1327 interface ITfInsertAtSelection : IUnknown
1328 {
1329 const DWORD TF_IAS_NOQUERY = 0x1;
1330 const DWORD TF_IAS_QUERYONLY = 0x2;
1331 const DWORD TF_IAS_NO_DEFAULT_COMPOSITION = 0x80000000;
1332
1333 HRESULT InsertTextAtSelection(
1334 [in] TfEditCookie ec,
1335 [in] DWORD dwFlags,
1336 [in, size_is(cch)] const WCHAR *pchText,
1337 [in] LONG cch,
1338 [out] ITfRange **ppRange);
1339
1340 HRESULT InsertEmbeddedAtSelection(
1341 [in] TfEditCookie ec,
1342 [in] DWORD dwFlags,
1343 [in] IDataObject *pDataObject,
1344 [out] ITfRange **ppRange);
1345 }
1346
1347 [
1348 object,
1349 uuid(6834b120-88cb-11d2-bf45-00105a2799b5),
1350 pointer_default(unique)
1351 ]
1352 interface ITfPropertyStore : IUnknown
1353 {
1354 const DWORD TF_TU_CORRECTION = 0x1;
1355
1356 HRESULT GetType([out] GUID *pguid);
1357
1358 HRESULT GetDataType([out] DWORD *pdwReserved);
1359
1360 HRESULT GetData([out] VARIANT *pvarValue);
1361
1362 HRESULT OnTextUpdated(
1363 [in] DWORD dwFlags,
1364 [in] ITfRange *pRangeNew,
1365 [out] BOOL *pfAccept);
1366
1367 HRESULT Shrink(
1368 [in] ITfRange *pRangeNew,
1369 [out] BOOL *pfFree);
1370
1371 HRESULT Divide(
1372 [in] ITfRange *pRangeThis,
1373 [in] ITfRange *pRangeNew,
1374 [out] ITfPropertyStore **ppPropStore);
1375
1376 HRESULT Clone(
1377 [out] ITfPropertyStore **pPropStore);
1378
1379 HRESULT GetPropertyRangeCreator(
1380 [out] CLSID *pclsid);
1381
1382 HRESULT Serialize(
1383 [in] IStream *pStream,
1384 [out] ULONG *pcb);
1385 }
1386
1387 [
1388 object,
1389 uuid(5efd22Ba-7838-46cb-88e2-cadb14124f8f),
1390 pointer_default(unique)
1391 ]
1392 interface IEnumITfCompositionView : IUnknown
1393 {
1394 HRESULT Clone([out] IEnumITfCompositionView **ppEnum);
1395
1396 HRESULT Next(
1397 [in] ULONG ulCount,
1398 [out, size_is(ulCount), length_is(*pcFetched)] ITfCompositionView **rgCompositionView,
1399 [out] ULONG *pcFetched);
1400
1401 HRESULT Reset();
1402
1403 HRESULT Skip([in] ULONG ulCount);
1404 }
1405
1406 [
1407 object,
1408 uuid(20168d64-5a8f-4a5a-b7bd-cfa29f4D0fd9),
1409 pointer_default(unique)
1410 ]
1411 interface ITfComposition : IUnknown
1412 {
1413 HRESULT GetRange([out] ITfRange **ppRange);
1414
1415 HRESULT ShiftStart(
1416 [in] TfEditCookie ecWrite,
1417 [in] ITfRange *pNewStart);
1418
1419 HRESULT ShiftEnd(
1420 [in] TfEditCookie ecWrite,
1421 [in] ITfRange *pNewEnd);
1422
1423 HRESULT EndComposition([in] TfEditCookie ecWrite);
1424 }
1425
1426 [
1427 object,
1428 uuid(a781718c-579a-4b15-a280-32b8577acc5e),
1429 pointer_default(unique)
1430 ]
1431 interface ITfCompositionSink : IUnknown
1432 {
1433 HRESULT OnCompositionTerminated(
1434 [in] TfEditCookie ecWrite,
1435 [in] ITfComposition *pComposition);
1436 }
1437
1438 [
1439 object,
1440 uuid(d40C8aae-aC92-4fc7-9a11-0ee0e23aa39b),
1441 pointer_default(unique)
1442 ]
1443 interface ITfContextComposition : IUnknown
1444 {
1445 HRESULT StartComposition(
1446 [in] TfEditCookie ecWrite,
1447 [in] ITfRange *pCompositionRange,
1448 [in] ITfCompositionSink *pSink,
1449 [out] ITfComposition **ppComposition);
1450
1451 HRESULT EnumCompositions([out] IEnumITfCompositionView **ppEnum);
1452
1453 HRESULT FindComposition(
1454 [in] TfEditCookie ecRead,
1455 [in] ITfRange *pTestRange,
1456 [out] IEnumITfCompositionView **ppEnum);
1457
1458 HRESULT TakeOwnership(
1459 [in] TfEditCookie ecWrite,
1460 [in] ITfCompositionView *pComposition,
1461 [in] ITfCompositionSink *pSink,
1462 [out] ITfComposition **ppComposition);
1463 }
1464
1465 [
1466 object,
1467 uuid(86462810-593b-4916-9764-19c08e9ce110),
1468 pointer_default(unique)
1469 ]
1470 interface ITfContextOwnerCompositionServices : ITfContextComposition
1471 {
1472 HRESULT TerminateComposition([in] ITfCompositionView *pComposition);
1473 }
1474
1475 [
1476 object,
1477 uuid(4ef89150-0807-11d3-8df0-00105a2799b5),
1478 pointer_default(unique)
1479 ]
1480 interface ITfPersistentPropertyLoaderACP : IUnknown
1481 {
1482 HRESULT LoadProperty(
1483 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
1484 [out] IStream **ppStream);
1485 }
1486
1487 [
1488 object,
1489 uuid(b23eb630-3e1c-11d3-a745-0050040ab407),
1490 pointer_default(unique)
1491 ]
1492 interface ITfContextOwnerServices : IUnknown
1493 {
1494 HRESULT OnLayoutChange();
1495
1496 HRESULT OnStatusChange([in] DWORD dwFlags);
1497
1498 HRESULT OnAttributeChange([in] REFGUID rguidAttribute);
1499
1500 HRESULT Serialize(
1501 [in] ITfProperty *pProp,
1502 [in] ITfRange *pRange,
1503 [out] TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
1504 [in] IStream *pStream);
1505
1506 HRESULT Unserialize(
1507 [in] ITfProperty *pProp,
1508 [in] const TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
1509 [in] IStream *pStream,
1510 [in] ITfPersistentPropertyLoaderACP *pLoader);
1511
1512 HRESULT ForceLoadProperty([in] ITfProperty *pProp);
1513
1514 HRESULT CreateRange(
1515 [in] LONG acpStart,
1516 [in] LONG acpEnd,
1517 [out] ITfRangeACP **ppRange);
1518 }
1519
1520 [
1521 object,
1522 uuid(17d49a3d-f8b8-4b2f-b254-52319dd64c53),
1523 pointer_default(unique)
1524 ]
1525 interface ITfReadOnlyProperty : IUnknown
1526 {
1527 HRESULT GetType([out] GUID *pguid);
1528
1529 HRESULT EnumRanges(
1530 [in] TfEditCookie ec,
1531 [out] IEnumTfRanges **ppEnum,
1532 [in] ITfRange *pTargetRange);
1533
1534 HRESULT GetValue(
1535 [in] TfEditCookie ec,
1536 [in] ITfRange *pRange,
1537 [out] VARIANT *pvarValue);
1538
1539 HRESULT GetContext([out] ITfContext **ppContext);
1540 }
1541
1542 [
1543 object,
1544 uuid(e2449660-9542-11d2-bf46-00105a2799b5),
1545 pointer_default(unique)
1546 ]
1547 interface ITfProperty : ITfReadOnlyProperty
1548 {
1549 HRESULT FindRange(
1550 [in] TfEditCookie ec,
1551 [in] ITfRange *pRange,
1552 [out] ITfRange **ppRange,
1553 [in] TfAnchor aPos);
1554
1555 HRESULT SetValueStore(
1556 [in] TfEditCookie ec,
1557 [in] ITfRange *pRange,
1558 [in] ITfPropertyStore *pPropStore);
1559
1560 HRESULT SetValue(
1561 [in] TfEditCookie ec,
1562 [in] ITfRange *pRange,
1563 [in] const VARIANT *pvarValue);
1564
1565 HRESULT Clear(
1566 [in] TfEditCookie ec,
1567 [in] ITfRange *pRange);
1568 }
1569
1570 [
1571 object,
1572 uuid(bb08f7a9-607a-4384-8623-056892b64371),
1573 pointer_default(unique)
1574 ]
1575 interface ITfCompartment : IUnknown
1576 {
1577 HRESULT SetValue(
1578 [in] TfClientId tid,
1579 [in] const VARIANT *pvarValue);
1580
1581 HRESULT GetValue(
1582 [out] VARIANT *pvarValue);
1583 }
1584
1585 [
1586 object,
1587 uuid(7dcf57ac-18ad-438b-824d-979bffb74b7c),
1588 pointer_default(unique)
1589 ]
1590 interface ITfCompartmentMgr : IUnknown
1591 {
1592 HRESULT GetCompartment(
1593 [in] REFGUID rguid,
1594 [out] ITfCompartment **ppcomp);
1595
1596 HRESULT ClearCompartment(
1597 [in] TfClientId tid,
1598 [in] REFGUID rguid);
1599
1600 HRESULT EnumCompartments(
1601 [out] IEnumGUID **ppEnum);
1602 }
1603
1604 [
1605 object,
1606 uuid(743abd5f-f26d-48df-8cc5-238492419b64),
1607 pointer_default(unique)
1608 ]
1609 interface ITfCompartmentEventSink : IUnknown
1610 {
1611 HRESULT OnChange(
1612 [in] REFGUID rguid);
1613 }
1614
1615 [
1616 object,
1617 uuid(8f1a7ea6-1654-4502-a86e-b2902344d507),
1618 pointer_default(unique)
1619 ]
1620 interface IEnumTfContexts : IUnknown
1621 {
1622 HRESULT Clone(
1623 [out] IEnumTfContexts **ppEnum);
1624
1625 HRESULT Next(
1626 [in] ULONG ulCount,
1627 [out, size_is(ulCount), length_is(*pcFetched)] ITfContext **rgContext,
1628 [out] ULONG *pcFetched);
1629
1630 HRESULT Reset();
1631
1632 HRESULT Skip(
1633 [in] ULONG ulCount);
1634 }
1635
1636 [
1637 object,
1638 uuid(aa80e808-2021-11d2-93e0-0060b067b86e),
1639 pointer_default(unique)
1640 ]
1641 interface IEnumTfDocumentMgrs : IUnknown
1642 {
1643 HRESULT Clone(
1644 [out] IEnumTfDocumentMgrs **ppEnum);
1645
1646 HRESULT Next(
1647 [in] ULONG ulCount,
1648 [out, size_is(ulCount), length_is(*pcFetched)] ITfDocumentMgr **rgDocumentMgr,
1649 [out] ULONG *pcFetched);
1650
1651 HRESULT Reset();
1652
1653 HRESULT Skip(
1654 [in] ULONG ulCount);
1655 }
1656
1657 [
1658 object,
1659 local,
1660 uuid(ea1ea137-19df-11d7-a6d2-00065b84435c),
1661 pointer_default(unique)
1662 ]
1663 interface ITfUIElement : IUnknown
1664 {
1665 HRESULT GetDescription(
1666 [out] BSTR *description);
1667
1668 HRESULT GetGUID(
1669 [out] GUID *guid);
1670
1671 HRESULT Show(
1672 [in] BOOL show);
1673
1674 HRESULT IsShown(
1675 [out] BOOL *show);
1676 }
1677
1678 [
1679 object,
1680 local,
1681 uuid(887aa91e-acba-4931-84da-3c5208cf543f),
1682 pointer_default(unique)
1683 ]
1684 interface IEnumTfUIElements : IUnknown
1685 {
1686 HRESULT Clone(
1687 [out] IEnumTfUIElements **enum_elements);
1688
1689 HRESULT Next(
1690 [in] ULONG count,
1691 [out, size_is(count), length_is(fetched)] ITfUIElement **element,
1692 [out] ULONG fetched);
1693
1694 HRESULT Reset();
1695
1696 HRESULT Skip(
1697 [in] ULONG count);
1698 }
1699
1700 [
1701 object,
1702 local,
1703 uuid(ea1ea135-19df-11d7-a6d2-00065b84435c),
1704 pointer_default(unique)
1705 ]
1706 interface ITfUIElementMgr : IUnknown
1707 {
1708 HRESULT BeginUIElement(
1709 [in] ITfUIElement *element,
1710 [in, out] BOOL *show,
1711 [out] DWORD *id);
1712
1713 HRESULT UpdateUIElement(
1714 [in] DWORD id);
1715
1716 HRESULT EndUIElement(
1717 [in] DWORD id);
1718
1719 HRESULT GetUIElement(
1720 [in] DWORD id,
1721 [out] ITfUIElement **element);
1722
1723 HRESULT EnumUIElements(
1724 [out] IEnumTfUIElements **enum_elements);
1725 }
1726
1727 [
1728 object,
1729 uuid(73131f9c-56a9-49dd-b0ee-d046633f7528),
1730 pointer_default(unique)
1731 ]
1732 interface ITfSourceSingle : IUnknown
1733 {
1734 HRESULT AdviseSingleSink(
1735 [in] TfClientId tid,
1736 [in] REFIID riid,
1737 [in, iid_is(riid)] IUnknown *punk);
1738
1739 HRESULT UnadviseSingleSink(
1740 [in] TfClientId tid,
1741 [in] REFIID riid);
1742 }
1743
1744 [
1745 object,
1746 local,
1747 uuid(c0f1db0c-3a20-405c-a303-96b6010a885f),
1748 pointer_default(unique)
1749 ]
1750 interface ITfThreadFocusSink : IUnknown
1751 {
1752 HRESULT OnSetThreadFocus();
1753
1754 HRESULT OnKillThreadFocus();
1755 }
1756
1757 [
1758 object,
1759 uuid(71c6e74e-0f28-11d8-a82a-00065b84435c),
1760 pointer_default(unique)
1761 ]
1762 interface ITfInputProcessorProfileActivationSink : IUnknown
1763 {
1764 HRESULT OnActivated(
1765 [in] DWORD dwProfileType,
1766 [in] LANGID langid,
1767 [in] REFCLSID clsid,
1768 [in] REFGUID catid,
1769 [in] REFGUID guidProfile,
1770 [in] HKL hkl,
1771 [in] DWORD dwFlags);
1772 }
1773
1774 [
1775 object,
1776 local,
1777 uuid(a1adaaa2-3a24-449d-ac96-5183e7f5c217),
1778 pointer_default(unique)
1779 ]
1780 interface ITfMouseSink : IUnknown
1781 {
1782 HRESULT OnMouseEvent(
1783 [in] ULONG uEdge,
1784 [in] ULONG uQuadrant,
1785 [in] DWORD dwBtnStatus,
1786 [out] BOOL *pfEaten);
1787 }
1788
1789 [
1790 object,
1791 uuid(09d146cd-a544-4132-925b-7afa8ef322d0),
1792 pointer_default(unique)
1793 ]
1794 interface ITfMouseTracker : IUnknown
1795 {
1796 HRESULT AdviseMouseSink(
1797 [in] ITfRange *range,
1798 [in] ITfMouseSink *pSink,
1799 [out] DWORD *pdwCookie);
1800
1801 HRESULT UnadviseMouseSink([in] DWORD dwCookie);
1802 }
1803
1804 [
1805 object,
1806 uuid(3bdd78e2-c16e-47fd-b883-ce6facc1a208),
1807 pointer_default(unique)
1808 ]
1809 interface ITfMouseTrackerACP : IUnknown
1810 {
1811 HRESULT AdviseMouseSink(
1812 [in] ITfRangeACP *range,
1813 [in] ITfMouseSink *pSink,
1814 [out] DWORD *pdwCookie);
1815
1816 HRESULT UnadviseMouseSink([in] DWORD dwCookie);
1817 }