comctl32/listview: Remove superfluous forward declarations.
[wine] / include / textstor.idl
1 /*
2  * Copyright 2009 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 #endif
22
23 const ULONG TS_DEFAULT_SELECTION = ~0u;
24
25 const DWORD TS_SD_READONLY     = 0x001;
26 const DWORD TS_SD_LOADING      = 0x002;
27
28 const DWORD TS_SS_DISJOINTSEL  = 0x001;
29 const DWORD TS_SS_REGIONS      = 0x002;
30 const DWORD TS_SS_TRANSITORY   = 0x004;
31 const DWORD TS_SS_NOHIDDENTEXT = 0x008;
32
33 const DWORD TS_AS_TEXT_CHANGE      = 0x01;
34 const DWORD TS_AS_SEL_CHANGE       = 0x02;
35 const DWORD TS_AS_LAYOUT_CHANGE    = 0x04;
36 const DWORD TS_AS_ATTR_CHANGE      = 0x08;
37 const DWORD TS_AS_STATUS_CHANGE    = 0x10;
38
39 const DWORD TS_AS_ALL_SINKS = (TS_AS_TEXT_CHANGE | TS_AS_SEL_CHANGE | TS_AS_LAYOUT_CHANGE | TS_AS_ATTR_CHANGE | TS_AS_STATUS_CHANGE);
40
41 const DWORD TS_LF_SYNC            = 0x1;
42 const DWORD TS_LF_READ            = 0x2;
43 const DWORD TS_LF_READWRITE       = 0x6;
44
45 typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)]  enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
46 typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)]  enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
47 typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)]  GUID TS_ATTRID;
48
49 typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
50 {
51     DWORD dwDynamicFlags;
52     DWORD dwStaticFlags;
53 } TS_STATUS;
54
55 typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)]  struct TS_TEXTCHANGE
56 {
57     LONG acpStart;
58     LONG acpOldEnd;
59     LONG acpNewEnd;
60 } TS_TEXTCHANGE;
61
62 typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)]  struct TS_SELECTIONSTYLE
63 {
64     TsActiveSelEnd ase;
65     BOOL fInterimChar;
66 } TS_SELECTIONSTYLE;
67
68 typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)]  struct TS_SELECTION_ACP
69 {
70     LONG acpStart;
71     LONG acpEnd;
72     TS_SELECTIONSTYLE style;
73 } TS_SELECTION_ACP;
74
75 typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)]  struct TS_RUNINFO
76 {
77     ULONG uCount;
78     TsRunType type;
79 } TS_RUNINFO;
80
81 typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)]  struct TS_ATTRVAL
82 {
83     TS_ATTRID idAttr;
84     DWORD dwOverlapId;
85     VARIANT varValue;
86 } TS_ATTRVAL;
87
88 typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)]  enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
89 typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)]  DWORD TsViewCookie;
90
91 [
92   object,
93   uuid(22d44c94-a419-4542-a272-ae26093ececf),
94   pointer_default(unique)
95 ]
96 interface ITextStoreACPSink : IUnknown
97 {
98     HRESULT OnTextChange(
99         [in] DWORD dwFlags,
100         [in] const TS_TEXTCHANGE *pChange);
101
102     HRESULT OnSelectionChange();
103
104     HRESULT OnLayoutChange(
105         [in] TsLayoutCode lcode,
106         [in] TsViewCookie vcView);
107
108     HRESULT OnStatusChange(
109         [in] DWORD dwFlags);
110
111     HRESULT OnAttrsChange(
112         [in] LONG acpStart,
113         [in] LONG acpEnd,
114         [in] ULONG cAttrs,
115         [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
116
117     HRESULT OnLockGranted(
118         [in] DWORD dwLockFlags);
119
120     HRESULT OnStartEditTransaction();
121
122     HRESULT OnEndEditTransaction();
123 };
124
125 [
126   object,
127   uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
128   pointer_default(unique)
129 ]
130 interface ITextStoreACP : IUnknown
131 {
132     HRESULT AdviseSink(
133         [in] REFIID riid,
134         [in, iid_is(riid)] IUnknown *punk,
135         [in] DWORD dwMask);
136
137     HRESULT UnadviseSink(
138         [in] IUnknown *punk);
139
140     HRESULT RequestLock(
141         [in] DWORD dwLockFlags,
142         [out] HRESULT *phrSession);
143
144     HRESULT GetStatus(
145         [out] TS_STATUS *pdcs);
146
147     HRESULT QueryInsert(
148         [in] LONG acpTestStart,
149         [in] LONG acpTestEnd,
150         [in] ULONG cch,
151         [out] LONG *pacpResultStart,
152         [out] LONG *pacpResultEnd);
153
154     HRESULT GetSelection(
155         [in] ULONG ulIndex,
156         [in] ULONG ulCount,
157         [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
158         [out] ULONG *pcFetched);
159
160     HRESULT SetSelection(
161         [in] ULONG ulCount,
162         [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
163
164     HRESULT GetText(
165         [in] LONG acpStart,
166         [in] LONG acpEnd,
167         [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
168         [in] ULONG cchPlainReq,
169         [out] ULONG *pcchPlainRet,
170         [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
171         [in] ULONG cRunInfoReq,
172         [out] ULONG *pcRunInfoRet,
173         [out] LONG *pacpNext);
174
175     HRESULT SetText(
176         [in] DWORD dwFlags,
177         [in] LONG acpStart,
178         [in] LONG acpEnd,
179         [in, size_is(cch)] const WCHAR *pchText,
180         [in] ULONG cch,
181         [out] TS_TEXTCHANGE *pChange);
182
183     HRESULT GetFormattedText(
184         [in] LONG acpStart,
185         [in] LONG acpEnd,
186         [out] IDataObject **ppDataObject);
187
188     HRESULT GetEmbedded(
189         [in] LONG acpPos,
190         [in] REFGUID rguidService,
191         [in] REFIID riid,
192         [out, iid_is(riid)] IUnknown **ppunk);
193
194     HRESULT QueryInsertEmbedded(
195         [in] const GUID *pguidService,
196         [in] const FORMATETC *pFormatEtc,
197         [out] BOOL *pfInsertable);
198
199     HRESULT InsertEmbedded(
200         [in] DWORD dwFlags,
201         [in] LONG acpStart,
202         [in] LONG acpEnd,
203         [in] IDataObject *pDataObject,
204         [out] TS_TEXTCHANGE *pChange);
205
206
207     HRESULT InsertTextAtSelection(
208         [in] DWORD dwFlags,
209         [in, size_is(cch)] const WCHAR *pchText,
210         [in] ULONG cch,
211         [out] LONG *pacpStart,
212         [out] LONG *pacpEnd,
213         [out] TS_TEXTCHANGE *pChange);
214
215     HRESULT InsertEmbeddedAtSelection(
216         [in] DWORD dwFlags,
217         [in] IDataObject *pDataObject,
218         [out] LONG *pacpStart,
219         [out] LONG *pacpEnd,
220         [out] TS_TEXTCHANGE *pChange);
221
222     HRESULT RequestSupportedAttrs(
223         [in] DWORD dwFlags,
224         [in] ULONG cFilterAttrs,
225         [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
226
227     HRESULT RequestAttrsAtPosition(
228         [in] LONG acpPos,
229         [in] ULONG cFilterAttrs,
230         [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
231         [in] DWORD dwFlags);
232
233     HRESULT RequestAttrsTransitioningAtPosition(
234         [in] LONG acpPos,
235         [in] ULONG cFilterAttrs,
236         [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
237         [in] DWORD dwFlags);
238
239     HRESULT FindNextAttrTransition(
240         [in] LONG acpStart,
241         [in] LONG acpHalt,
242         [in] ULONG cFilterAttrs,
243         [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
244         [in] DWORD dwFlags,
245         [out] LONG *pacpNext,
246         [out] BOOL *pfFound,
247         [out] LONG *plFoundOffset);
248
249     HRESULT RetrieveRequestedAttrs(
250         [in] ULONG ulCount,
251         [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
252         [out] ULONG *pcFetched);
253
254     HRESULT GetEndACP(
255         [out] LONG *pacp);
256
257     HRESULT GetActiveView(
258         [out] TsViewCookie *pvcView);
259
260     HRESULT GetACPFromPoint(
261         [in] TsViewCookie vcView,
262         [in] const POINT *ptScreen,
263         [in] DWORD dwFlags,
264         [out] LONG *pacp);
265
266     HRESULT GetTextExt(
267         [in] TsViewCookie vcView,
268         [in] LONG acpStart,
269         [in] LONG acpEnd,
270         [out] RECT *prc,
271         [out] BOOL *pfClipped);
272
273     HRESULT GetScreenExt(
274         [in] TsViewCookie vcView,
275         [out] RECT *prc);
276
277     HRESULT GetWnd(
278         [in] TsViewCookie vcView,
279         [out] HWND *phwnd);
280 };