gdiplus: Add tests for GdipGet/SetLineBlend.
[wine] / include / 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_ALREADY_EXISTS  MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0506)")
28 cpp_quote("EXTERN_C const CLSID CLSID_TF_ThreadMgr;")
29 cpp_quote("EXTERN_C const CLSID CLSID_TF_InputProcessorProfiles;")
30 cpp_quote("EXTERN_C const CLSID CLSID_TF_CategoryMgr;")
31
32 /* GUIDs for Categories */
33 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;")
34 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_SPEECH;")
35 cpp_quote("EXTERN_C const GUID GUID_TFCAT_TIP_HANDWRITING;")
36 cpp_quote("EXTERN_C const GUID GUID_TFCAT_DISPLAYATTRIBUTEPROVIDER;")
37
38 typedef [uuid(7213778c-7bb0-4270-b050-6189ee594e97)]  DWORD TfEditCookie;
39 typedef [uuid(de403c21-89fd-4f85-8b87-64584d063fbc)] DWORD TfClientId;
40 typedef [uuid(88a9c478-f3ec-4763-8345-cd9250443f8d)] DWORD TfGuidAtom;
41
42 cpp_quote("#define TF_MOD_ALT                   0x0001")
43 cpp_quote("#define TF_MOD_CONTROL               0x0002")
44 cpp_quote("#define TF_MOD_SHIFT                 0x0004")
45 cpp_quote("#define TF_MOD_RALT                  0x0008")
46 cpp_quote("#define TF_MOD_RCONTROL              0x0010")
47 cpp_quote("#define TF_MOD_RSHIFT                0x0020")
48 cpp_quote("#define TF_MOD_LALT                  0x0040")
49 cpp_quote("#define TF_MOD_LCONTROL              0x0080")
50 cpp_quote("#define TF_MOD_LSHIFT                0x0100")
51 cpp_quote("#define TF_MOD_ON_KEYUP              0x0200")
52 cpp_quote("#define TF_MOD_IGNORE_ALL_MODIFIER   0x0400")
53
54 interface ITfDocumentMgr;
55 interface ITfContext;
56 interface IEnumTfDocumentMgrs;
57 interface IEnumTfContexts;
58 interface ITfFunctionProvider;
59 interface IEnumTfFunctionProviders;
60 interface ITfCompartmentMgr;
61 interface ITfEditSession;
62 interface ITfRange;
63 interface ITfContextView;
64 interface IEnumTfContextViews;
65 interface ITfProperty;
66 interface ITfReadOnlyProperty;
67 interface IEnumTfProperties;
68 interface ITfRangeBackup;
69 interface IEnumTfLanguageProfiles;
70 interface ITfEditRecord;
71 interface ITfCompositionView;
72 interface ITfKeyEventSink;
73
74 typedef [uuid(e1b5808d-1e46-4c19-84dc-68c5f5978cc8)] struct TF_LANGUAGEPROFILE
75 {
76     CLSID clsid;
77     LANGID langid;
78     GUID catid;
79     BOOL fActive;
80     GUID guidProfile;
81 } TF_LANGUAGEPROFILE;
82
83 typedef [uuid(77c12f95-b783-450d-879f-1cd2362c6521)] struct TF_PRESERVEDKEY
84 {
85     UINT uVKey;
86     UINT uModifiers;
87 } TF_PRESERVEDKEY;
88
89 [
90     object,
91     uuid(aa80e801-2021-11d2-93e0-0060b067b86e),
92     pointer_default(unique)
93 ]
94 interface ITfThreadMgr: IUnknown
95 {
96     HRESULT Activate(
97         [out] TfClientId *ptid);
98
99     HRESULT Deactivate();
100
101     HRESULT CreateDocumentMgr(
102         [out] ITfDocumentMgr **ppdim);
103
104     HRESULT EnumDocumentMgrs(
105         [out] IEnumTfDocumentMgrs **ppEnum);
106
107     HRESULT GetFocus(
108         [out] ITfDocumentMgr **ppdimFocus);
109
110     HRESULT SetFocus(
111         [in] ITfDocumentMgr *pdimFocus);
112
113     HRESULT AssociateFocus(
114         [in] HWND hwnd,
115         [in, unique] ITfDocumentMgr *pdimNew,
116         [out] ITfDocumentMgr **ppdimPrev);
117
118     HRESULT IsThreadFocus(
119         [out] BOOL *pfThreadFocus);
120
121     HRESULT GetFunctionProvider(
122         [in] REFCLSID clsid,
123         [out] ITfFunctionProvider **ppFuncProv);
124
125     HRESULT EnumFunctionProviders(
126         [out] IEnumTfFunctionProviders **ppEnum);
127
128     HRESULT GetGlobalCompartment(
129         [out] ITfCompartmentMgr **ppCompMgr);
130 };
131
132
133 [
134     object,
135     uuid(aa80e7f4-2021-11d2-93e0-0060b067b86e),
136     pointer_default(unique)
137 ]
138 interface ITfDocumentMgr: IUnknown
139 {
140     HRESULT CreateContext(
141         [in] TfClientId tidOwner,
142         [in] DWORD dwFlags,
143         [in, unique] IUnknown *punk,
144         [out] ITfContext **ppic,
145         [out] TfEditCookie *pecTextStore);
146
147     HRESULT Push(
148         [in] ITfContext *pic);
149
150     const DWORD TF_POPF_ALL = 0x0001;
151
152     HRESULT Pop(
153         [in] DWORD dwFlags);
154
155     HRESULT GetTop(
156         [out] ITfContext **ppic);
157
158     HRESULT GetBase(
159         [out] ITfContext **ppic);
160
161     HRESULT EnumContexts(
162         [out] IEnumTfContexts **ppEnum);
163 };
164
165 [
166     object,
167     uuid(aa80e7fd-2021-11d2-93e0-0060b067b86e),
168     pointer_default(unique)
169 ]
170 interface ITfContext : IUnknown
171 {
172     const DWORD TF_ES_ASYNCDONTCARE = 0x0;
173     const DWORD TF_ES_SYNC          = 0x1;
174     const DWORD TF_ES_READ          = 0x2;
175     const DWORD TF_ES_READWRITE     = 0x6;
176     const DWORD TF_ES_ASYNC         = 0x8;
177
178     HRESULT RequestEditSession(
179         [in] TfClientId tid,
180         [in] ITfEditSession *pes,
181         [in] DWORD dwFlags,
182         [out] HRESULT *phrSession);
183
184     HRESULT InWriteSession(
185         [in] TfClientId tid,
186         [out] BOOL *pfWriteSession);
187
188     typedef [uuid(1690be9b-d3e9-49f6-8d8b-51b905af4c43)] enum { TF_AE_NONE, TF_AE_START, TF_AE_END } TfActiveSelEnd;
189
190     typedef [uuid(36ae42a4-6989-4bdc-b48a-6137b7bf2e42)] struct TF_SELECTIONSTYLE
191     {
192         TfActiveSelEnd ase;
193         BOOL fInterimChar;
194     } TF_SELECTIONSTYLE;
195
196     typedef [uuid(75eb22f2-b0bf-46a8-8006-975a3b6efcf1)] struct TF_SELECTION
197     {
198         ITfRange *range;
199         TF_SELECTIONSTYLE style;
200     } TF_SELECTION;
201
202     const ULONG TF_DEFAULT_SELECTION =  TS_DEFAULT_SELECTION;
203
204     HRESULT GetSelection(
205         [in] TfEditCookie ec,
206         [in] ULONG ulIndex,
207         [in] ULONG ulCount,
208         [out, size_is(ulCount), length_is(*pcFetched)] TF_SELECTION *pSelection,
209         [out] ULONG *pcFetched);
210
211     HRESULT SetSelection(
212         [in] TfEditCookie ec,
213         [in] ULONG ulCount,
214         [in, size_is(ulCount)] const TF_SELECTION *pSelection);
215
216     HRESULT GetStart(
217         [in] TfEditCookie ec,
218         [out] ITfRange **ppStart);
219
220     HRESULT GetEnd(
221         [in] TfEditCookie ec,
222         [out] ITfRange **ppEnd);
223
224     typedef [uuid(bc7d979a-846a-444d-afef-0a9bfa82b961)] TS_STATUS TF_STATUS;
225     const DWORD TF_SD_READONLY    = TS_SD_READONLY;
226     const DWORD TF_SD_LOADING     = TS_SD_LOADING;
227     const DWORD TF_SS_DISJOINTSEL = TS_SS_DISJOINTSEL;
228     const DWORD TF_SS_REGIONS     = TS_SS_REGIONS;
229     const DWORD TF_SS_TRANSITORY  = TS_SS_TRANSITORY;
230
231
232     HRESULT GetActiveView(
233         [out] ITfContextView **ppView);
234
235     HRESULT EnumViews(
236         [out] IEnumTfContextViews **ppEnum);
237
238     HRESULT GetStatus(
239         [out] TF_STATUS *pdcs);
240
241     HRESULT GetProperty(
242         [in] REFGUID guidProp,
243         [out] ITfProperty **ppProp);
244
245     HRESULT GetAppProperty(
246         [in] REFGUID guidProp,
247         [out] ITfReadOnlyProperty **ppProp);
248
249     HRESULT TrackProperties(
250         [in, size_is(cProp)] const GUID **prgProp,
251         [in] ULONG cProp,
252         [in, size_is(cAppProp)] const GUID **prgAppProp,
253         [in] ULONG cAppProp,
254         [out] ITfReadOnlyProperty **ppProperty);
255
256     HRESULT EnumProperties(
257         [out] IEnumTfProperties **ppEnum);
258
259     HRESULT GetDocumentMgr(
260         [out] ITfDocumentMgr **ppDm);
261
262     HRESULT CreateRangeBackup(
263         [in] TfEditCookie ec,
264         [in] ITfRange *pRange,
265         [out] ITfRangeBackup **ppBackup);
266
267 };
268
269 [
270   object,
271   uuid(4ea48a35-60ae-446f-8fd6-e6a8d82459f7),
272   pointer_default(unique)
273 ]
274 interface ITfSource : IUnknown
275 {
276     HRESULT AdviseSink(
277         [in] REFIID riid,
278         [in, iid_is(riid)] IUnknown *punk,
279         [out] DWORD *pdwCookie);
280
281     HRESULT UnadviseSink(
282         [in] DWORD dwCookie);
283 };
284
285 [
286   object,
287   local,
288   uuid(1F02B6C5-7842-4EE6-8A0B-9A24183A95CA),
289   pointer_default(unique)
290 ]
291 interface ITfInputProcessorProfiles : IUnknown
292 {
293     HRESULT Register(
294         [in] REFCLSID rclsid);
295
296     HRESULT Unregister(
297         [in] REFCLSID rclsid);
298
299     HRESULT AddLanguageProfile(
300         [in] REFCLSID rclsid,
301         [in] LANGID langid,
302         [in] REFGUID guidProfile,
303         [in, size_is(cchDesc)] const WCHAR *pchDesc,
304         [in] ULONG cchDesc,
305         [in, size_is(cchFile)] const WCHAR *pchIconFile,
306         [in] ULONG cchFile,
307         [in] ULONG uIconIndex);
308
309     HRESULT RemoveLanguageProfile(
310         [in] REFCLSID rclsid,
311         [in] LANGID langid,
312         [in] REFGUID guidProfile);
313
314     HRESULT EnumInputProcessorInfo(
315         [out] IEnumGUID **ppEnum);
316
317     HRESULT GetDefaultLanguageProfile(
318         [in] LANGID langid,
319         [in] REFGUID catid,
320         [out] CLSID *pclsid,
321         [out] GUID *pguidProfile);
322
323     HRESULT SetDefaultLanguageProfile(
324         [in] LANGID langid,
325         [in] REFCLSID rclsid,
326         [in] REFGUID guidProfiles);
327
328     HRESULT ActivateLanguageProfile(
329         [in] REFCLSID rclsid,
330         [in] LANGID langid,
331         [in] REFGUID guidProfiles);
332
333     HRESULT GetActiveLanguageProfile(
334         [in] REFCLSID rclsid,
335         [out] LANGID *plangid,
336         [out] GUID *pguidProfile);
337
338     HRESULT GetLanguageProfileDescription(
339         [in] REFCLSID rclsid,
340         [in] LANGID langid,
341         [in] REFGUID guidProfile,
342         [out] BSTR *pbstrProfile);
343
344     HRESULT GetCurrentLanguage(
345         [out] LANGID *plangid);
346
347     HRESULT ChangeCurrentLanguage(
348         [in] LANGID langid);
349
350     HRESULT GetLanguageList(
351         [out] LANGID **ppLangId,
352         [out] ULONG *pulCount);
353
354     HRESULT EnumLanguageProfiles(
355         [in] LANGID langid,
356         [out] IEnumTfLanguageProfiles **ppEnum);
357
358     HRESULT EnableLanguageProfile(
359         [in] REFCLSID rclsid,
360         [in] LANGID langid,
361         [in] REFGUID guidProfile,
362         [in] BOOL fEnable);
363
364     HRESULT IsEnabledLanguageProfile(
365         [in] REFCLSID rclsid,
366         [in] LANGID langid,
367         [in] REFGUID guidProfile,
368         [out] BOOL *pfEnable);
369
370     HRESULT EnableLanguageProfileByDefault(
371         [in] REFCLSID rclsid,
372         [in] LANGID langid,
373         [in] REFGUID guidProfile,
374         [in] BOOL fEnable);
375
376     HRESULT SubstituteKeyboardLayout(
377         [in] REFCLSID rclsid,
378         [in] LANGID langid,
379         [in] REFGUID guidProfile,
380         [in] HKL hKL);
381 };
382
383 [
384   object,
385   local,
386   uuid(c3acefb5-f69d-4905-938f-fcadcf4be830),
387   pointer_default(unique)
388 ]
389 interface ITfCategoryMgr : IUnknown
390 {
391     HRESULT RegisterCategory([in] REFCLSID rclsid,
392                              [in] REFGUID rcatid,
393                              [in] REFGUID rguid);
394
395     HRESULT UnregisterCategory([in] REFCLSID rclsid,
396                                [in] REFGUID rcatid,
397                                [in] REFGUID rguid);
398
399     HRESULT EnumCategoriesInItem([in] REFGUID rguid,
400                                  [out] IEnumGUID **ppEnum);
401
402     HRESULT EnumItemsInCategory([in] REFGUID rcatid,
403                                 [out] IEnumGUID **ppEnum);
404
405     HRESULT FindClosestCategory([in] REFGUID rguid,
406                                 [out] GUID *pcatid,
407                                 [in, size_is(ulCount)] const GUID **ppcatidList,
408                                 [in] ULONG ulCount);
409
410     HRESULT RegisterGUIDDescription([in] REFCLSID rclsid,
411                                     [in] REFGUID rguid,
412                                     [in, size_is(cch)] const WCHAR *pchDesc,
413                                     [in] ULONG cch);
414
415     HRESULT UnregisterGUIDDescription([in] REFCLSID rclsid,
416                                       [in] REFGUID rguid);
417
418     HRESULT GetGUIDDescription([in] REFGUID rguid,
419                                [out] BSTR *pbstrDesc);
420
421     HRESULT RegisterGUIDDWORD([in] REFCLSID rclsid,
422                               [in] REFGUID rguid,
423                               [in] DWORD dw);
424
425     HRESULT UnregisterGUIDDWORD([in] REFCLSID rclsid,
426                                 [in] REFGUID rguid);
427
428     HRESULT GetGUIDDWORD([in] REFGUID rguid,
429                          [out] DWORD *pdw);
430
431     HRESULT RegisterGUID([in] REFGUID rguid,
432                          [out] TfGuidAtom *pguidatom);
433
434     HRESULT GetGUID([in] TfGuidAtom guidatom,
435                     [out] GUID *pguid);
436
437     HRESULT IsEqualTfGuidAtom([in] TfGuidAtom guidatom,
438                               [in] REFGUID rguid,
439                               [out] BOOL *pfEqual);
440 };
441
442 [
443   object,
444   uuid(8127d409-ccd3-4683-967a-b43d5b482bf7),
445   pointer_default(unique)
446 ]
447 interface ITfTextEditSink : IUnknown
448 {
449     HRESULT OnEndEdit(
450         [in] ITfContext *pic,
451         [in] TfEditCookie ecReadOnly,
452         [in] ITfEditRecord *pEditRecord);
453 };
454
455 [
456     object,
457     uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79),
458     pointer_default(unique)
459 ]
460 interface ITfContextOwnerCompositionSink : IUnknown
461 {
462     HRESULT OnStartComposition(
463         [in] ITfCompositionView *pComposition,
464         [out] BOOL *pfOk);
465
466     HRESULT OnUpdateComposition(
467         [in] ITfCompositionView *pComposition,
468         [in] ITfRange *pRangeNew);
469
470     HRESULT OnEndComposition(
471         [in] ITfCompositionView *pComposition);
472 };
473
474 [
475   object,
476   uuid(3d61bf11-ac5f-42c8-a4cb-931bcc28c744),
477   pointer_default(unique)
478 ]
479 interface IEnumTfLanguageProfiles : IUnknown
480 {
481     HRESULT Clone(
482         [out] IEnumTfLanguageProfiles **ppEnum);
483
484     HRESULT Next(
485         [in] ULONG ulCount,
486         [out, size_is(ulCount), length_is(*pcFetch)] TF_LANGUAGEPROFILE *pProfile,
487         [out] ULONG *pcFetch);
488
489     HRESULT Reset();
490
491     HRESULT Skip(
492         [in] ULONG ulCount);
493 };
494
495 [
496   object,
497   local,
498   uuid(aa80e7f7-2021-11d2-93e0-0060b067b86e),
499   pointer_default(unique)
500 ]
501 interface ITfTextInputProcessor : IUnknown
502 {
503     HRESULT Activate(
504         [in] ITfThreadMgr *ptim,
505         [in] TfClientId tid);
506
507     HRESULT Deactivate();
508 };
509
510 [
511   object,
512   uuid(aa80e80e-2021-11d2-93e0-0060b067b86e),
513   pointer_default(unique)
514 ]
515 interface ITfThreadMgrEventSink : IUnknown
516 {
517     HRESULT OnInitDocumentMgr(
518         [in] ITfDocumentMgr *pdim);
519
520     HRESULT OnUninitDocumentMgr(
521         [in] ITfDocumentMgr *pdim);
522
523     HRESULT OnSetFocus(
524         [in] ITfDocumentMgr *pdimFocus,
525         [in] ITfDocumentMgr *pdimPrevFocus);
526
527     HRESULT OnPushContext(
528         [in] ITfContext *pic);
529
530     HRESULT OnPopContext(
531         [in] ITfContext *pic);
532 };
533
534 [
535   object,
536   local,
537   uuid(aa80e7f0-2021-11d2-93e0-0060b067b86e),
538   pointer_default(unique)
539 ]
540 interface ITfKeystrokeMgr : IUnknown
541 {
542     HRESULT AdviseKeyEventSink(
543         [in] TfClientId tid,
544         [in] ITfKeyEventSink *pSink,
545         [in] BOOL fForeground);
546
547     HRESULT UnadviseKeyEventSink(
548         [in] TfClientId tid);
549
550     HRESULT GetForeground(
551         [out] CLSID *pclsid);
552
553     HRESULT TestKeyDown(
554         [in] WPARAM wParam,
555         [in] LPARAM lParam,
556         [out] BOOL *pfEaten);
557
558     HRESULT TestKeyUp(
559         [in] WPARAM wParam,
560         [in] LPARAM lParam,
561         [out] BOOL *pfEaten);
562
563     HRESULT KeyDown(
564         [in] WPARAM wParam,
565         [in] LPARAM lParam,
566         [out] BOOL *pfEaten);
567
568     HRESULT KeyUp(
569         [in] WPARAM wParam,
570         [in] LPARAM lParam,
571         [out] BOOL *pfEaten);
572
573     HRESULT GetPreservedKey(
574         [in] ITfContext *pic,
575         [in] const TF_PRESERVEDKEY *pprekey,
576         [out] GUID *pguid);
577
578     HRESULT IsPreservedKey(
579         [in] REFGUID rguid,
580         [in] const TF_PRESERVEDKEY *pprekey,
581         [out] BOOL *pfRegistered);
582
583     HRESULT PreserveKey(
584         [in] TfClientId tid,
585         [in] REFGUID rguid,
586         [in] const TF_PRESERVEDKEY *prekey,
587         [in, size_is(cchDesc)] const WCHAR *pchDesc,
588         [in] ULONG cchDesc);
589
590     HRESULT UnpreserveKey(
591         [in] REFGUID rguid,
592         [in] const TF_PRESERVEDKEY *pprekey);
593
594     HRESULT SetPreservedKeyDescription(
595         [in] REFGUID rguid,
596         [in, size_is(cchDesc)] const WCHAR *pchDesc,
597         [in] ULONG cchDesc);
598
599     HRESULT GetPreservedKeyDescription(
600         [in] REFGUID rguid,
601         [out] BSTR *pbstrDesc);
602
603     HRESULT SimulatePreservedKey(
604         [in] ITfContext *pic,
605         [in] REFGUID rguid,
606         [out] BOOL *pfEaten);
607 };
608
609 [
610   object,
611   local,
612   uuid(aa80e7f5-2021-11d2-93e0-0060b067b86e),
613   pointer_default(unique)
614 ]
615 interface ITfKeyEventSink : IUnknown
616 {
617     HRESULT OnSetFocus(
618         [in] BOOL fForeground);
619
620     HRESULT OnTestKeyDown(
621         [in] ITfContext *pic,
622         [in] WPARAM wParam,
623         [in] LPARAM lParam,
624         [out] BOOL *pfEaten);
625
626     HRESULT OnTestKeyUp(
627         [in] ITfContext *pic,
628         [in] WPARAM wParam,
629         [in] LPARAM lParam,
630         [out] BOOL *pfEaten);
631
632     HRESULT OnKeyDown(
633         [in] ITfContext *pic,
634         [in] WPARAM wParam,
635         [in] LPARAM lParam,
636         [out] BOOL *pfEaten);
637
638     HRESULT OnKeyUp(
639         [in] ITfContext *pic,
640         [in] WPARAM wParam,
641         [in] LPARAM lParam,
642         [out] BOOL *pfEaten);
643
644     HRESULT OnPreservedKey(
645         [in] ITfContext *pic,
646         [in] REFGUID rguid,
647         [out] BOOL *pfEaten);
648 };