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