crypt32: Fix some test failures on older versions of Windows.
[wine/hacks.git] / include / textstor.idl
blob08ee21d793ccf6f1a24427cf0982d95f3ee49b30
1 /*
2 * Copyright 2009 Aric Stewart, CodeWeavers
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.
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.
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
19 #ifndef DO_NO_IMPORTS
20 import "oaidl.idl";
21 #endif
23 const ULONG TS_DEFAULT_SELECTION = ~0u;
25 const DWORD TS_SD_READONLY = 0x001;
26 const DWORD TS_SD_LOADING = 0x002;
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;
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;
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);
42 typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)] enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
43 typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)] enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
44 typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)] GUID TS_ATTRID;
46 typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
48 DWORD dwDynamicFlags;
49 DWORD dwStaticFlags;
50 } TS_STATUS;
52 typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)] struct TS_TEXTCHANGE
54 LONG acpStart;
55 LONG acpOldEnd;
56 LONG acpNewEnd;
57 } TS_TEXTCHANGE;
59 typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)] struct TS_SELECTIONSTYLE
61 TsActiveSelEnd ase;
62 BOOL fInterimChar;
63 } TS_SELECTIONSTYLE;
65 typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)] struct TS_SELECTION_ACP
67 LONG acpStart;
68 LONG acpEnd;
69 TS_SELECTIONSTYLE style;
70 } TS_SELECTION_ACP;
72 typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)] struct TS_RUNINFO
74 ULONG uCount;
75 TsRunType type;
76 } TS_RUNINFO;
78 typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)] struct TS_ATTRVAL
80 TS_ATTRID idAttr;
81 DWORD dwOverlapId;
82 VARIANT varValue;
83 } TS_ATTRVAL;
85 typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)] enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
86 typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)] DWORD TsViewCookie;
89 object,
90 uuid(22d44c94-a419-4542-a272-ae26093ececf),
91 pointer_default(unique)
93 interface ITextStoreACPSink : IUnknown
95 HRESULT OnTextChange(
96 [in] DWORD dwFlags,
97 [in] const TS_TEXTCHANGE *pChange);
99 HRESULT OnSelectionChange();
101 HRESULT OnLayoutChange(
102 [in] TsLayoutCode lcode,
103 [in] TsViewCookie vcView);
105 HRESULT OnStatusChange(
106 [in] DWORD dwFlags);
108 HRESULT OnAttrsChange(
109 [in] LONG acpStart,
110 [in] LONG acpEnd,
111 [in] ULONG cAttrs,
112 [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
114 HRESULT OnLockGranted(
115 [in] DWORD dwLockFlags);
117 HRESULT OnStartEditTransaction();
119 HRESULT OnEndEditTransaction();
123 object,
124 uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
125 pointer_default(unique)
127 interface ITextStoreACP : IUnknown
129 HRESULT AdviseSink(
130 [in] REFIID riid,
131 [in, iid_is(riid)] IUnknown *punk,
132 [in] DWORD dwMask);
134 HRESULT UnadviseSink(
135 [in] IUnknown *punk);
137 HRESULT RequestLock(
138 [in] DWORD dwLockFlags,
139 [out] HRESULT *phrSession);
141 HRESULT GetStatus(
142 [out] TS_STATUS *pdcs);
144 HRESULT QueryInsert(
145 [in] LONG acpTestStart,
146 [in] LONG acpTestEnd,
147 [in] ULONG cch,
148 [out] LONG *pacpResultStart,
149 [out] LONG *pacpResultEnd);
151 HRESULT GetSelection(
152 [in] ULONG ulIndex,
153 [in] ULONG ulCount,
154 [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
155 [out] ULONG *pcFetched);
157 HRESULT SetSelection(
158 [in] ULONG ulCount,
159 [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
161 HRESULT GetText(
162 [in] LONG acpStart,
163 [in] LONG acpEnd,
164 [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
165 [in] ULONG cchPlainReq,
166 [out] ULONG *pcchPlainRet,
167 [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
168 [in] ULONG cRunInfoReq,
169 [out] ULONG *pcRunInfoRet,
170 [out] LONG *pacpNext);
172 HRESULT SetText(
173 [in] DWORD dwFlags,
174 [in] LONG acpStart,
175 [in] LONG acpEnd,
176 [in, size_is(cch)] const WCHAR *pchText,
177 [in] ULONG cch,
178 [out] TS_TEXTCHANGE *pChange);
180 HRESULT GetFormattedText(
181 [in] LONG acpStart,
182 [in] LONG acpEnd,
183 [out] IDataObject **ppDataObject);
185 HRESULT GetEmbedded(
186 [in] LONG acpPos,
187 [in] REFGUID rguidService,
188 [in] REFIID riid,
189 [out, iid_is(riid)] IUnknown **ppunk);
191 HRESULT QueryInsertEmbedded(
192 [in] const GUID *pguidService,
193 [in] const FORMATETC *pFormatEtc,
194 [out] BOOL *pfInsertable);
196 HRESULT InsertEmbedded(
197 [in] DWORD dwFlags,
198 [in] LONG acpStart,
199 [in] LONG acpEnd,
200 [in] IDataObject *pDataObject,
201 [out] TS_TEXTCHANGE *pChange);
204 HRESULT InsertTextAtSelection(
205 [in] DWORD dwFlags,
206 [in, size_is(cch)] const WCHAR *pchText,
207 [in] ULONG cch,
208 [out] LONG *pacpStart,
209 [out] LONG *pacpEnd,
210 [out] TS_TEXTCHANGE *pChange);
212 HRESULT InsertEmbeddedAtSelection(
213 [in] DWORD dwFlags,
214 [in] IDataObject *pDataObject,
215 [out] LONG *pacpStart,
216 [out] LONG *pacpEnd,
217 [out] TS_TEXTCHANGE *pChange);
219 HRESULT RequestSupportedAttrs(
220 [in] DWORD dwFlags,
221 [in] ULONG cFilterAttrs,
222 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
224 HRESULT RequestAttrsAtPosition(
225 [in] LONG acpPos,
226 [in] ULONG cFilterAttrs,
227 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
228 [in] DWORD dwFlags);
230 HRESULT RequestAttrsTransitioningAtPosition(
231 [in] LONG acpPos,
232 [in] ULONG cFilterAttrs,
233 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
234 [in] DWORD dwFlags);
236 HRESULT FindNextAttrTransition(
237 [in] LONG acpStart,
238 [in] LONG acpHalt,
239 [in] ULONG cFilterAttrs,
240 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
241 [in] DWORD dwFlags,
242 [out] LONG *pacpNext,
243 [out] BOOL *pfFound,
244 [out] LONG *plFoundOffset);
246 HRESULT RetrieveRequestedAttrs(
247 [in] ULONG ulCount,
248 [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
249 [out] ULONG *pcFetched);
251 HRESULT GetEndACP(
252 [out] LONG *pacp);
254 HRESULT GetActiveView(
255 [out] TsViewCookie *pvcView);
257 HRESULT GetACPFromPoint(
258 [in] TsViewCookie vcView,
259 [in] const POINT *ptScreen,
260 [in] DWORD dwFlags,
261 [out] LONG *pacp);
263 HRESULT GetTextExt(
264 [in] TsViewCookie vcView,
265 [in] LONG acpStart,
266 [in] LONG acpEnd,
267 [out] RECT *prc,
268 [out] BOOL *pfClipped);
270 HRESULT GetScreenExt(
271 [in] TsViewCookie vcView,
272 [out] RECT *prc);
274 HRESULT GetWnd(
275 [in] TsViewCookie vcView,
276 [out] HWND *phwnd);