dbghelp: For codeview/bprel symbols force the register to be EBP, other CPUs should...
[wine/multimedia.git] / include / textstor.idl
blob25f7749477b68b6fa8fa054055ff12cde4dc34d3
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 typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)] enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
68 typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)] enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
69 typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)] GUID TS_ATTRID;
71 typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
73 DWORD dwDynamicFlags;
74 DWORD dwStaticFlags;
75 } TS_STATUS;
77 typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)] struct TS_TEXTCHANGE
79 LONG acpStart;
80 LONG acpOldEnd;
81 LONG acpNewEnd;
82 } TS_TEXTCHANGE;
84 typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)] struct TS_SELECTIONSTYLE
86 TsActiveSelEnd ase;
87 BOOL fInterimChar;
88 } TS_SELECTIONSTYLE;
90 typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)] struct TS_SELECTION_ACP
92 LONG acpStart;
93 LONG acpEnd;
94 TS_SELECTIONSTYLE style;
95 } TS_SELECTION_ACP;
97 typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)] struct TS_RUNINFO
99 ULONG uCount;
100 TsRunType type;
101 } TS_RUNINFO;
103 typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)] struct TS_ATTRVAL
105 TS_ATTRID idAttr;
106 DWORD dwOverlapId;
107 VARIANT varValue;
108 } TS_ATTRVAL;
110 typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)] enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
111 typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)] DWORD TsViewCookie;
114 object,
115 uuid(22d44c94-a419-4542-a272-ae26093ececf),
116 pointer_default(unique)
118 interface ITextStoreACPSink : IUnknown
120 HRESULT OnTextChange(
121 [in] DWORD dwFlags,
122 [in] const TS_TEXTCHANGE *pChange);
124 HRESULT OnSelectionChange();
126 HRESULT OnLayoutChange(
127 [in] TsLayoutCode lcode,
128 [in] TsViewCookie vcView);
130 HRESULT OnStatusChange(
131 [in] DWORD dwFlags);
133 HRESULT OnAttrsChange(
134 [in] LONG acpStart,
135 [in] LONG acpEnd,
136 [in] ULONG cAttrs,
137 [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
139 HRESULT OnLockGranted(
140 [in] DWORD dwLockFlags);
142 HRESULT OnStartEditTransaction();
144 HRESULT OnEndEditTransaction();
148 object,
149 uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
150 pointer_default(unique)
152 interface ITextStoreACP : IUnknown
154 HRESULT AdviseSink(
155 [in] REFIID riid,
156 [in, iid_is(riid)] IUnknown *punk,
157 [in] DWORD dwMask);
159 HRESULT UnadviseSink(
160 [in] IUnknown *punk);
162 HRESULT RequestLock(
163 [in] DWORD dwLockFlags,
164 [out] HRESULT *phrSession);
166 HRESULT GetStatus(
167 [out] TS_STATUS *pdcs);
169 HRESULT QueryInsert(
170 [in] LONG acpTestStart,
171 [in] LONG acpTestEnd,
172 [in] ULONG cch,
173 [out] LONG *pacpResultStart,
174 [out] LONG *pacpResultEnd);
176 HRESULT GetSelection(
177 [in] ULONG ulIndex,
178 [in] ULONG ulCount,
179 [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
180 [out] ULONG *pcFetched);
182 HRESULT SetSelection(
183 [in] ULONG ulCount,
184 [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
186 HRESULT GetText(
187 [in] LONG acpStart,
188 [in] LONG acpEnd,
189 [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
190 [in] ULONG cchPlainReq,
191 [out] ULONG *pcchPlainRet,
192 [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
193 [in] ULONG cRunInfoReq,
194 [out] ULONG *pcRunInfoRet,
195 [out] LONG *pacpNext);
197 HRESULT SetText(
198 [in] DWORD dwFlags,
199 [in] LONG acpStart,
200 [in] LONG acpEnd,
201 [in, size_is(cch)] const WCHAR *pchText,
202 [in] ULONG cch,
203 [out] TS_TEXTCHANGE *pChange);
205 HRESULT GetFormattedText(
206 [in] LONG acpStart,
207 [in] LONG acpEnd,
208 [out] IDataObject **ppDataObject);
210 HRESULT GetEmbedded(
211 [in] LONG acpPos,
212 [in] REFGUID rguidService,
213 [in] REFIID riid,
214 [out, iid_is(riid)] IUnknown **ppunk);
216 HRESULT QueryInsertEmbedded(
217 [in] const GUID *pguidService,
218 [in] const FORMATETC *pFormatEtc,
219 [out] BOOL *pfInsertable);
221 HRESULT InsertEmbedded(
222 [in] DWORD dwFlags,
223 [in] LONG acpStart,
224 [in] LONG acpEnd,
225 [in] IDataObject *pDataObject,
226 [out] TS_TEXTCHANGE *pChange);
229 HRESULT InsertTextAtSelection(
230 [in] DWORD dwFlags,
231 [in, size_is(cch)] const WCHAR *pchText,
232 [in] ULONG cch,
233 [out] LONG *pacpStart,
234 [out] LONG *pacpEnd,
235 [out] TS_TEXTCHANGE *pChange);
237 HRESULT InsertEmbeddedAtSelection(
238 [in] DWORD dwFlags,
239 [in] IDataObject *pDataObject,
240 [out] LONG *pacpStart,
241 [out] LONG *pacpEnd,
242 [out] TS_TEXTCHANGE *pChange);
244 HRESULT RequestSupportedAttrs(
245 [in] DWORD dwFlags,
246 [in] ULONG cFilterAttrs,
247 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
249 HRESULT RequestAttrsAtPosition(
250 [in] LONG acpPos,
251 [in] ULONG cFilterAttrs,
252 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
253 [in] DWORD dwFlags);
255 HRESULT RequestAttrsTransitioningAtPosition(
256 [in] LONG acpPos,
257 [in] ULONG cFilterAttrs,
258 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
259 [in] DWORD dwFlags);
261 HRESULT FindNextAttrTransition(
262 [in] LONG acpStart,
263 [in] LONG acpHalt,
264 [in] ULONG cFilterAttrs,
265 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
266 [in] DWORD dwFlags,
267 [out] LONG *pacpNext,
268 [out] BOOL *pfFound,
269 [out] LONG *plFoundOffset);
271 HRESULT RetrieveRequestedAttrs(
272 [in] ULONG ulCount,
273 [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
274 [out] ULONG *pcFetched);
276 HRESULT GetEndACP(
277 [out] LONG *pacp);
279 HRESULT GetActiveView(
280 [out] TsViewCookie *pvcView);
282 HRESULT GetACPFromPoint(
283 [in] TsViewCookie vcView,
284 [in] const POINT *ptScreen,
285 [in] DWORD dwFlags,
286 [out] LONG *pacp);
288 HRESULT GetTextExt(
289 [in] TsViewCookie vcView,
290 [in] LONG acpStart,
291 [in] LONG acpEnd,
292 [out] RECT *prc,
293 [out] BOOL *pfClipped);
295 HRESULT GetScreenExt(
296 [in] TsViewCookie vcView,
297 [out] RECT *prc);
299 HRESULT GetWnd(
300 [in] TsViewCookie vcView,
301 [out] HWND *phwnd);