source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/textstor.idl@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 10.3 KB
RevLine 
[1166]1/*
2 * Copyright 2009 Aric Stewart, CodeWeavers
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 * * Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * * Redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution.
11 * * Neither the name of the mingw-w64 nor the
12 * names of its contributors may be used to endorse or promote products
13 * derived from this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#ifndef DO_NO_IMPORTS
28import "oaidl.idl";
29#endif
30
31cpp_quote("#define TS_E_INVALIDPOS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0200)")
32cpp_quote("#define TS_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)")
33cpp_quote("#define TS_E_NOOBJECT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0202)")
34cpp_quote("#define TS_E_NOSERVICE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0203)")
35cpp_quote("#define TS_E_NOINTERFACE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0204)")
36cpp_quote("#define TS_E_NOSELECTION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0205)")
37cpp_quote("#define TS_E_NOLAYOUT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0206)")
38cpp_quote("#define TS_E_INVALIDPOINT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0207)")
39cpp_quote("#define TS_E_SYNCHRONOUS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0208)")
40cpp_quote("#define TS_E_READONLY MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0209)")
41cpp_quote("#define TS_E_FORMAT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020a)")
42
43cpp_quote("#define TS_S_ASYNC MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x0300)")
44
45
46const ULONG TS_DEFAULT_SELECTION = ~0u;
47
48const DWORD TS_SD_READONLY = 0x001;
49const DWORD TS_SD_LOADING = 0x002;
50
51const DWORD TS_SS_DISJOINTSEL = 0x001;
52const DWORD TS_SS_REGIONS = 0x002;
53const DWORD TS_SS_TRANSITORY = 0x004;
54const DWORD TS_SS_NOHIDDENTEXT = 0x008;
55
56const DWORD TS_AS_TEXT_CHANGE = 0x01;
57const DWORD TS_AS_SEL_CHANGE = 0x02;
58const DWORD TS_AS_LAYOUT_CHANGE = 0x04;
59const DWORD TS_AS_ATTR_CHANGE = 0x08;
60const DWORD TS_AS_STATUS_CHANGE = 0x10;
61
62const 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);
63
64const DWORD TS_LF_SYNC = 0x1;
65const DWORD TS_LF_READ = 0x2;
66const DWORD TS_LF_READWRITE = 0x6;
67
68const WCHAR TS_CHAR_EMBEDDED = 0xfffc;
69const WCHAR TS_CHAR_REGION = 0x0000;
70const WCHAR TS_CHAR_REPLACEMENT = 0xfffd;
71
72const DWORD TS_IAS_NOQUERY = 0x1;
73const DWORD TS_IAS_QUERYONLY = 0x2;
74
75const DWORD TS_ST_CORRECTION = 0x1;
76
77const DWORD GXFPF_ROUND_NEAREST = 0x1;
78const DWORD GXFPF_NEAREST = 0x2;
79
80typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)] enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
81typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)] enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
82typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)] GUID TS_ATTRID;
83
84typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
85{
86 DWORD dwDynamicFlags;
87 DWORD dwStaticFlags;
88} TS_STATUS;
89
90typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)] struct TS_TEXTCHANGE
91{
92 LONG acpStart;
93 LONG acpOldEnd;
94 LONG acpNewEnd;
95} TS_TEXTCHANGE;
96
97typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)] struct TS_SELECTIONSTYLE
98{
99 TsActiveSelEnd ase;
100 BOOL fInterimChar;
101} TS_SELECTIONSTYLE;
102
103typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)] struct TS_SELECTION_ACP
104{
105 LONG acpStart;
106 LONG acpEnd;
107 TS_SELECTIONSTYLE style;
108} TS_SELECTION_ACP;
109
110typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)] struct TS_RUNINFO
111{
112 ULONG uCount;
113 TsRunType type;
114} TS_RUNINFO;
115
116typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)] struct TS_ATTRVAL
117{
118 TS_ATTRID idAttr;
119 DWORD dwOverlapId;
120 VARIANT varValue;
121} TS_ATTRVAL;
122
123const DWORD TS_ATTR_FIND_BACKWARDS = 0x0001;
124const DWORD TS_ATTR_FIND_WANT_OFFSET = 0x0002;
125const DWORD TS_ATTR_FIND_UPDATESTART = 0x0004;
126const DWORD TS_ATTR_FIND_WANT_VALUE = 0x0008;
127const DWORD TS_ATTR_FIND_WANT_END = 0x0010;
128const DWORD TS_ATTR_FIND_HIDDEN = 0x0020;
129
130typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)] enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
131typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)] DWORD TsViewCookie;
132
133[
134 object,
135 uuid(22d44c94-a419-4542-a272-ae26093ececf),
136 pointer_default(unique)
137]
138interface ITextStoreACPSink : IUnknown
139{
140 HRESULT OnTextChange(
141 [in] DWORD dwFlags,
142 [in] const TS_TEXTCHANGE *pChange);
143
144 HRESULT OnSelectionChange();
145
146 HRESULT OnLayoutChange(
147 [in] TsLayoutCode lcode,
148 [in] TsViewCookie vcView);
149
150 HRESULT OnStatusChange(
151 [in] DWORD dwFlags);
152
153 HRESULT OnAttrsChange(
154 [in] LONG acpStart,
155 [in] LONG acpEnd,
156 [in] ULONG cAttrs,
157 [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
158
159 HRESULT OnLockGranted(
160 [in] DWORD dwLockFlags);
161
162 HRESULT OnStartEditTransaction();
163
164 HRESULT OnEndEditTransaction();
165};
166
167[
168 object,
169 uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
170 pointer_default(unique)
171]
172interface ITextStoreACP : IUnknown
173{
174 HRESULT AdviseSink(
175 [in] REFIID riid,
176 [in, iid_is(riid)] IUnknown *punk,
177 [in] DWORD dwMask);
178
179 HRESULT UnadviseSink(
180 [in] IUnknown *punk);
181
182 HRESULT RequestLock(
183 [in] DWORD dwLockFlags,
184 [out] HRESULT *phrSession);
185
186 HRESULT GetStatus(
187 [out] TS_STATUS *pdcs);
188
189 HRESULT QueryInsert(
190 [in] LONG acpTestStart,
191 [in] LONG acpTestEnd,
192 [in] ULONG cch,
193 [out] LONG *pacpResultStart,
194 [out] LONG *pacpResultEnd);
195
196 HRESULT GetSelection(
197 [in] ULONG ulIndex,
198 [in] ULONG ulCount,
199 [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
200 [out] ULONG *pcFetched);
201
202 HRESULT SetSelection(
203 [in] ULONG ulCount,
204 [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
205
206 HRESULT GetText(
207 [in] LONG acpStart,
208 [in] LONG acpEnd,
209 [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
210 [in] ULONG cchPlainReq,
211 [out] ULONG *pcchPlainRet,
212 [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
213 [in] ULONG cRunInfoReq,
214 [out] ULONG *pcRunInfoRet,
215 [out] LONG *pacpNext);
216
217 HRESULT SetText(
218 [in] DWORD dwFlags,
219 [in] LONG acpStart,
220 [in] LONG acpEnd,
221 [in, size_is(cch)] const WCHAR *pchText,
222 [in] ULONG cch,
223 [out] TS_TEXTCHANGE *pChange);
224
225 HRESULT GetFormattedText(
226 [in] LONG acpStart,
227 [in] LONG acpEnd,
228 [out] IDataObject **ppDataObject);
229
230 HRESULT GetEmbedded(
231 [in] LONG acpPos,
232 [in] REFGUID rguidService,
233 [in] REFIID riid,
234 [out, iid_is(riid)] IUnknown **ppunk);
235
236 HRESULT QueryInsertEmbedded(
237 [in] const GUID *pguidService,
238 [in] const FORMATETC *pFormatEtc,
239 [out] BOOL *pfInsertable);
240
241 HRESULT InsertEmbedded(
242 [in] DWORD dwFlags,
243 [in] LONG acpStart,
244 [in] LONG acpEnd,
245 [in] IDataObject *pDataObject,
246 [out] TS_TEXTCHANGE *pChange);
247
248
249 HRESULT InsertTextAtSelection(
250 [in] DWORD dwFlags,
251 [in, size_is(cch)] const WCHAR *pchText,
252 [in] ULONG cch,
253 [out] LONG *pacpStart,
254 [out] LONG *pacpEnd,
255 [out] TS_TEXTCHANGE *pChange);
256
257 HRESULT InsertEmbeddedAtSelection(
258 [in] DWORD dwFlags,
259 [in] IDataObject *pDataObject,
260 [out] LONG *pacpStart,
261 [out] LONG *pacpEnd,
262 [out] TS_TEXTCHANGE *pChange);
263
264 HRESULT RequestSupportedAttrs(
265 [in] DWORD dwFlags,
266 [in] ULONG cFilterAttrs,
267 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
268
269 HRESULT RequestAttrsAtPosition(
270 [in] LONG acpPos,
271 [in] ULONG cFilterAttrs,
272 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
273 [in] DWORD dwFlags);
274
275 HRESULT RequestAttrsTransitioningAtPosition(
276 [in] LONG acpPos,
277 [in] ULONG cFilterAttrs,
278 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
279 [in] DWORD dwFlags);
280
281 HRESULT FindNextAttrTransition(
282 [in] LONG acpStart,
283 [in] LONG acpHalt,
284 [in] ULONG cFilterAttrs,
285 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
286 [in] DWORD dwFlags,
287 [out] LONG *pacpNext,
288 [out] BOOL *pfFound,
289 [out] LONG *plFoundOffset);
290
291 HRESULT RetrieveRequestedAttrs(
292 [in] ULONG ulCount,
293 [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
294 [out] ULONG *pcFetched);
295
296 HRESULT GetEndACP(
297 [out] LONG *pacp);
298
299 HRESULT GetActiveView(
300 [out] TsViewCookie *pvcView);
301
302 HRESULT GetACPFromPoint(
303 [in] TsViewCookie vcView,
304 [in] const POINT *ptScreen,
305 [in] DWORD dwFlags,
306 [out] LONG *pacp);
307
308 HRESULT GetTextExt(
309 [in] TsViewCookie vcView,
310 [in] LONG acpStart,
311 [in] LONG acpEnd,
312 [out] RECT *prc,
313 [out] BOOL *pfClipped);
314
315 HRESULT GetScreenExt(
316 [in] TsViewCookie vcView,
317 [out] RECT *prc);
318
319 HRESULT GetWnd(
320 [in] TsViewCookie vcView,
321 [out] HWND *phwnd);
322};
Note: See TracBrowser for help on using the repository browser.