kernel32/tests: Fix a race condition in test_QueryInformationJobObject().
[wine.git] / include / textstor.idl
blobc6d88c7d04a653bb0b4cfbe490f7640bc49e687b
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 cpp_quote("#define TS_E_INVALIDPOS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0200)")
24 cpp_quote("#define TS_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)")
25 cpp_quote("#define TS_E_NOOBJECT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0202)")
26 cpp_quote("#define TS_E_NOSERVICE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0203)")
27 cpp_quote("#define TS_E_NOINTERFACE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0204)")
28 cpp_quote("#define TS_E_NOSELECTION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0205)")
29 cpp_quote("#define TS_E_NOLAYOUT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0206)")
30 cpp_quote("#define TS_E_INVALIDPOINT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0207)")
31 cpp_quote("#define TS_E_SYNCHRONOUS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0208)")
32 cpp_quote("#define TS_E_READONLY MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0209)")
33 cpp_quote("#define TS_E_FORMAT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020a)")
35 cpp_quote("#define TS_S_ASYNC MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x0300)")
38 const ULONG TS_DEFAULT_SELECTION = ~0u;
40 const DWORD TS_SD_READONLY = 0x001;
41 const DWORD TS_SD_LOADING = 0x002;
43 const DWORD TS_SS_DISJOINTSEL = 0x001;
44 const DWORD TS_SS_REGIONS = 0x002;
45 const DWORD TS_SS_TRANSITORY = 0x004;
46 const DWORD TS_SS_NOHIDDENTEXT = 0x008;
48 const DWORD TS_AS_TEXT_CHANGE = 0x01;
49 const DWORD TS_AS_SEL_CHANGE = 0x02;
50 const DWORD TS_AS_LAYOUT_CHANGE = 0x04;
51 const DWORD TS_AS_ATTR_CHANGE = 0x08;
52 const DWORD TS_AS_STATUS_CHANGE = 0x10;
54 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);
56 const DWORD TS_LF_SYNC = 0x1;
57 const DWORD TS_LF_READ = 0x2;
58 const DWORD TS_LF_READWRITE = 0x6;
60 const WCHAR TS_CHAR_EMBEDDED = 0xfffc;
61 const WCHAR TS_CHAR_REGION = 0x0000;
62 const WCHAR TS_CHAR_REPLACEMENT = 0xfffd;
64 const DWORD TS_IAS_NOQUERY = 0x1;
65 const DWORD TS_IAS_QUERYONLY = 0x2;
67 const DWORD TS_ST_CORRECTION = 0x1;
69 const DWORD GXFPF_ROUND_NEAREST = 0x1;
70 const DWORD GXFPF_NEAREST = 0x2;
72 typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)] enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
73 typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)] enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
74 typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)] GUID TS_ATTRID;
76 typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
78 DWORD dwDynamicFlags;
79 DWORD dwStaticFlags;
80 } TS_STATUS;
82 typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)] struct TS_TEXTCHANGE
84 LONG acpStart;
85 LONG acpOldEnd;
86 LONG acpNewEnd;
87 } TS_TEXTCHANGE;
89 typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)] struct TS_SELECTIONSTYLE
91 TsActiveSelEnd ase;
92 BOOL fInterimChar;
93 } TS_SELECTIONSTYLE;
95 typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)] struct TS_SELECTION_ACP
97 LONG acpStart;
98 LONG acpEnd;
99 TS_SELECTIONSTYLE style;
100 } TS_SELECTION_ACP;
102 typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)] struct TS_RUNINFO
104 ULONG uCount;
105 TsRunType type;
106 } TS_RUNINFO;
108 typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)] struct TS_ATTRVAL
110 TS_ATTRID idAttr;
111 DWORD dwOverlapId;
112 VARIANT varValue;
113 } TS_ATTRVAL;
115 const DWORD TS_ATTR_FIND_BACKWARDS = 0x0001;
116 const DWORD TS_ATTR_FIND_WANT_OFFSET = 0x0002;
117 const DWORD TS_ATTR_FIND_UPDATESTART = 0x0004;
118 const DWORD TS_ATTR_FIND_WANT_VALUE = 0x0008;
119 const DWORD TS_ATTR_FIND_WANT_END = 0x0010;
120 const DWORD TS_ATTR_FIND_HIDDEN = 0x0020;
122 typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)] enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
123 typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)] DWORD TsViewCookie;
126 object,
127 uuid(22d44c94-a419-4542-a272-ae26093ececf),
128 pointer_default(unique)
130 interface ITextStoreACPSink : IUnknown
132 HRESULT OnTextChange(
133 [in] DWORD dwFlags,
134 [in] const TS_TEXTCHANGE *pChange);
136 HRESULT OnSelectionChange();
138 HRESULT OnLayoutChange(
139 [in] TsLayoutCode lcode,
140 [in] TsViewCookie vcView);
142 HRESULT OnStatusChange(
143 [in] DWORD dwFlags);
145 HRESULT OnAttrsChange(
146 [in] LONG acpStart,
147 [in] LONG acpEnd,
148 [in] ULONG cAttrs,
149 [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
151 HRESULT OnLockGranted(
152 [in] DWORD dwLockFlags);
154 HRESULT OnStartEditTransaction();
156 HRESULT OnEndEditTransaction();
160 object,
161 uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
162 pointer_default(unique)
164 interface ITextStoreACP : IUnknown
166 HRESULT AdviseSink(
167 [in] REFIID riid,
168 [in, iid_is(riid)] IUnknown *punk,
169 [in] DWORD dwMask);
171 HRESULT UnadviseSink(
172 [in] IUnknown *punk);
174 HRESULT RequestLock(
175 [in] DWORD dwLockFlags,
176 [out] HRESULT *phrSession);
178 HRESULT GetStatus(
179 [out] TS_STATUS *pdcs);
181 HRESULT QueryInsert(
182 [in] LONG acpTestStart,
183 [in] LONG acpTestEnd,
184 [in] ULONG cch,
185 [out] LONG *pacpResultStart,
186 [out] LONG *pacpResultEnd);
188 HRESULT GetSelection(
189 [in] ULONG ulIndex,
190 [in] ULONG ulCount,
191 [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
192 [out] ULONG *pcFetched);
194 HRESULT SetSelection(
195 [in] ULONG ulCount,
196 [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
198 HRESULT GetText(
199 [in] LONG acpStart,
200 [in] LONG acpEnd,
201 [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
202 [in] ULONG cchPlainReq,
203 [out] ULONG *pcchPlainRet,
204 [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
205 [in] ULONG cRunInfoReq,
206 [out] ULONG *pcRunInfoRet,
207 [out] LONG *pacpNext);
209 HRESULT SetText(
210 [in] DWORD dwFlags,
211 [in] LONG acpStart,
212 [in] LONG acpEnd,
213 [in, size_is(cch)] const WCHAR *pchText,
214 [in] ULONG cch,
215 [out] TS_TEXTCHANGE *pChange);
217 HRESULT GetFormattedText(
218 [in] LONG acpStart,
219 [in] LONG acpEnd,
220 [out] IDataObject **ppDataObject);
222 HRESULT GetEmbedded(
223 [in] LONG acpPos,
224 [in] REFGUID rguidService,
225 [in] REFIID riid,
226 [out, iid_is(riid)] IUnknown **ppunk);
228 HRESULT QueryInsertEmbedded(
229 [in] const GUID *pguidService,
230 [in] const FORMATETC *pFormatEtc,
231 [out] BOOL *pfInsertable);
233 HRESULT InsertEmbedded(
234 [in] DWORD dwFlags,
235 [in] LONG acpStart,
236 [in] LONG acpEnd,
237 [in] IDataObject *pDataObject,
238 [out] TS_TEXTCHANGE *pChange);
241 HRESULT InsertTextAtSelection(
242 [in] DWORD dwFlags,
243 [in, size_is(cch)] const WCHAR *pchText,
244 [in] ULONG cch,
245 [out] LONG *pacpStart,
246 [out] LONG *pacpEnd,
247 [out] TS_TEXTCHANGE *pChange);
249 HRESULT InsertEmbeddedAtSelection(
250 [in] DWORD dwFlags,
251 [in] IDataObject *pDataObject,
252 [out] LONG *pacpStart,
253 [out] LONG *pacpEnd,
254 [out] TS_TEXTCHANGE *pChange);
256 HRESULT RequestSupportedAttrs(
257 [in] DWORD dwFlags,
258 [in] ULONG cFilterAttrs,
259 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
261 HRESULT RequestAttrsAtPosition(
262 [in] LONG acpPos,
263 [in] ULONG cFilterAttrs,
264 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
265 [in] DWORD dwFlags);
267 HRESULT RequestAttrsTransitioningAtPosition(
268 [in] LONG acpPos,
269 [in] ULONG cFilterAttrs,
270 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
271 [in] DWORD dwFlags);
273 HRESULT FindNextAttrTransition(
274 [in] LONG acpStart,
275 [in] LONG acpHalt,
276 [in] ULONG cFilterAttrs,
277 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
278 [in] DWORD dwFlags,
279 [out] LONG *pacpNext,
280 [out] BOOL *pfFound,
281 [out] LONG *plFoundOffset);
283 HRESULT RetrieveRequestedAttrs(
284 [in] ULONG ulCount,
285 [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
286 [out] ULONG *pcFetched);
288 HRESULT GetEndACP(
289 [out] LONG *pacp);
291 HRESULT GetActiveView(
292 [out] TsViewCookie *pvcView);
294 HRESULT GetACPFromPoint(
295 [in] TsViewCookie vcView,
296 [in] const POINT *ptScreen,
297 [in] DWORD dwFlags,
298 [out] LONG *pacp);
300 HRESULT GetTextExt(
301 [in] TsViewCookie vcView,
302 [in] LONG acpStart,
303 [in] LONG acpEnd,
304 [out] RECT *prc,
305 [out] BOOL *pfClipped);
307 HRESULT GetScreenExt(
308 [in] TsViewCookie vcView,
309 [out] RECT *prc);
311 HRESULT GetWnd(
312 [in] TsViewCookie vcView,
313 [out] HWND *phwnd);