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