winegstreamer: Create media source presentation descriptor as needed.
[wine.git] / include / textstor.idl
blob5aa1279bbde1d2d054186d92b9964038ad0af871
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;
42 const DWORD TS_SD_RESERVED = 0x004;
43 const DWORD TS_SD_TKBAUTOCORRECTENABLE = 0x008;
44 const DWORD TS_SD_TKBPREDICTIONENABLE = 0x010;
45 const DWORD TS_SD_UIINTEGRATIONENABLE = 0x020;
46 const DWORD TS_SD_INPUTPANEMANUALDISPLAYENABLE = 0x040;
47 const DWORD TS_SD_EMBEDDEDHANDWRITINGVIEW_ENABLED = 0x080;
48 const DWORD TS_SD_EMBEDDEDHANDWRITINGVIEW_VISIBLE = 0x100;
50 const DWORD TS_SD_MASKALL = (TS_SD_READONLY | TS_SD_LOADING);
52 const DWORD TS_SS_DISJOINTSEL = 0x001;
53 const DWORD TS_SS_REGIONS = 0x002;
54 const DWORD TS_SS_TRANSITORY = 0x004;
55 const DWORD TS_SS_NOHIDDENTEXT = 0x008;
56 const DWORD TS_SS_TKBAUTOCORRECTENABLE = 0x010;
57 const DWORD TS_SS_TKBPREDICTIONENABLE = 0x020;
58 const DWORD TS_SS_UWPCONTROL = 0x040;
60 const DWORD TS_AS_TEXT_CHANGE = 0x01;
61 const DWORD TS_AS_SEL_CHANGE = 0x02;
62 const DWORD TS_AS_LAYOUT_CHANGE = 0x04;
63 const DWORD TS_AS_ATTR_CHANGE = 0x08;
64 const DWORD TS_AS_STATUS_CHANGE = 0x10;
66 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);
68 const DWORD TS_LF_SYNC = 0x1;
69 const DWORD TS_LF_READ = 0x2;
70 const DWORD TS_LF_READWRITE = 0x6;
72 const WCHAR TS_CHAR_EMBEDDED = 0xfffc;
73 const WCHAR TS_CHAR_REGION = 0x0000;
74 const WCHAR TS_CHAR_REPLACEMENT = 0xfffd;
76 const DWORD TS_IAS_NOQUERY = 0x1;
77 const DWORD TS_IAS_QUERYONLY = 0x2;
79 const DWORD TS_ST_CORRECTION = 0x1;
81 const DWORD GXFPF_ROUND_NEAREST = 0x1;
82 const DWORD GXFPF_NEAREST = 0x2;
84 typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)] enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
85 typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)] enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
86 typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)] GUID TS_ATTRID;
88 typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
90 DWORD dwDynamicFlags;
91 DWORD dwStaticFlags;
92 } TS_STATUS;
94 typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)] struct TS_TEXTCHANGE
96 LONG acpStart;
97 LONG acpOldEnd;
98 LONG acpNewEnd;
99 } TS_TEXTCHANGE;
101 typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)] struct TS_SELECTIONSTYLE
103 TsActiveSelEnd ase;
104 BOOL fInterimChar;
105 } TS_SELECTIONSTYLE;
107 typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)] struct TS_SELECTION_ACP
109 LONG acpStart;
110 LONG acpEnd;
111 TS_SELECTIONSTYLE style;
112 } TS_SELECTION_ACP;
114 typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)] struct TS_RUNINFO
116 ULONG uCount;
117 TsRunType type;
118 } TS_RUNINFO;
120 typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)] struct TS_ATTRVAL
122 TS_ATTRID idAttr;
123 DWORD dwOverlapId;
124 VARIANT varValue;
125 } TS_ATTRVAL;
127 const DWORD TS_ATTR_FIND_BACKWARDS = 0x0001;
128 const DWORD TS_ATTR_FIND_WANT_OFFSET = 0x0002;
129 const DWORD TS_ATTR_FIND_UPDATESTART = 0x0004;
130 const DWORD TS_ATTR_FIND_WANT_VALUE = 0x0008;
131 const DWORD TS_ATTR_FIND_WANT_END = 0x0010;
132 const DWORD TS_ATTR_FIND_HIDDEN = 0x0020;
134 typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)] enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
135 typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)] DWORD TsViewCookie;
138 object,
139 uuid(22d44c94-a419-4542-a272-ae26093ececf),
140 pointer_default(unique)
142 interface ITextStoreACPSink : IUnknown
144 HRESULT OnTextChange(
145 [in] DWORD dwFlags,
146 [in] const TS_TEXTCHANGE *pChange);
148 HRESULT OnSelectionChange();
150 HRESULT OnLayoutChange(
151 [in] TsLayoutCode lcode,
152 [in] TsViewCookie vcView);
154 HRESULT OnStatusChange(
155 [in] DWORD dwFlags);
157 HRESULT OnAttrsChange(
158 [in] LONG acpStart,
159 [in] LONG acpEnd,
160 [in] ULONG cAttrs,
161 [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
163 HRESULT OnLockGranted(
164 [in] DWORD dwLockFlags);
166 HRESULT OnStartEditTransaction();
168 HRESULT OnEndEditTransaction();
172 object,
173 uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
174 pointer_default(unique)
176 interface ITextStoreACP : IUnknown
178 HRESULT AdviseSink(
179 [in] REFIID riid,
180 [in, iid_is(riid)] IUnknown *punk,
181 [in] DWORD dwMask);
183 HRESULT UnadviseSink(
184 [in] IUnknown *punk);
186 HRESULT RequestLock(
187 [in] DWORD dwLockFlags,
188 [out] HRESULT *phrSession);
190 HRESULT GetStatus(
191 [out] TS_STATUS *pdcs);
193 HRESULT QueryInsert(
194 [in] LONG acpTestStart,
195 [in] LONG acpTestEnd,
196 [in] ULONG cch,
197 [out] LONG *pacpResultStart,
198 [out] LONG *pacpResultEnd);
200 HRESULT GetSelection(
201 [in] ULONG ulIndex,
202 [in] ULONG ulCount,
203 [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
204 [out] ULONG *pcFetched);
206 HRESULT SetSelection(
207 [in] ULONG ulCount,
208 [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
210 HRESULT GetText(
211 [in] LONG acpStart,
212 [in] LONG acpEnd,
213 [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
214 [in] ULONG cchPlainReq,
215 [out] ULONG *pcchPlainRet,
216 [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
217 [in] ULONG cRunInfoReq,
218 [out] ULONG *pcRunInfoRet,
219 [out] LONG *pacpNext);
221 HRESULT SetText(
222 [in] DWORD dwFlags,
223 [in] LONG acpStart,
224 [in] LONG acpEnd,
225 [in, size_is(cch)] const WCHAR *pchText,
226 [in] ULONG cch,
227 [out] TS_TEXTCHANGE *pChange);
229 HRESULT GetFormattedText(
230 [in] LONG acpStart,
231 [in] LONG acpEnd,
232 [out] IDataObject **ppDataObject);
234 HRESULT GetEmbedded(
235 [in] LONG acpPos,
236 [in] REFGUID rguidService,
237 [in] REFIID riid,
238 [out, iid_is(riid)] IUnknown **ppunk);
240 HRESULT QueryInsertEmbedded(
241 [in] const GUID *pguidService,
242 [in] const FORMATETC *pFormatEtc,
243 [out] BOOL *pfInsertable);
245 HRESULT InsertEmbedded(
246 [in] DWORD dwFlags,
247 [in] LONG acpStart,
248 [in] LONG acpEnd,
249 [in] IDataObject *pDataObject,
250 [out] TS_TEXTCHANGE *pChange);
253 HRESULT InsertTextAtSelection(
254 [in] DWORD dwFlags,
255 [in, size_is(cch)] const WCHAR *pchText,
256 [in] ULONG cch,
257 [out] LONG *pacpStart,
258 [out] LONG *pacpEnd,
259 [out] TS_TEXTCHANGE *pChange);
261 HRESULT InsertEmbeddedAtSelection(
262 [in] DWORD dwFlags,
263 [in] IDataObject *pDataObject,
264 [out] LONG *pacpStart,
265 [out] LONG *pacpEnd,
266 [out] TS_TEXTCHANGE *pChange);
268 HRESULT RequestSupportedAttrs(
269 [in] DWORD dwFlags,
270 [in] ULONG cFilterAttrs,
271 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
273 HRESULT RequestAttrsAtPosition(
274 [in] LONG acpPos,
275 [in] ULONG cFilterAttrs,
276 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
277 [in] DWORD dwFlags);
279 HRESULT RequestAttrsTransitioningAtPosition(
280 [in] LONG acpPos,
281 [in] ULONG cFilterAttrs,
282 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
283 [in] DWORD dwFlags);
285 HRESULT FindNextAttrTransition(
286 [in] LONG acpStart,
287 [in] LONG acpHalt,
288 [in] ULONG cFilterAttrs,
289 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
290 [in] DWORD dwFlags,
291 [out] LONG *pacpNext,
292 [out] BOOL *pfFound,
293 [out] LONG *plFoundOffset);
295 HRESULT RetrieveRequestedAttrs(
296 [in] ULONG ulCount,
297 [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
298 [out] ULONG *pcFetched);
300 HRESULT GetEndACP(
301 [out] LONG *pacp);
303 HRESULT GetActiveView(
304 [out] TsViewCookie *pvcView);
306 HRESULT GetACPFromPoint(
307 [in] TsViewCookie vcView,
308 [in] const POINT *ptScreen,
309 [in] DWORD dwFlags,
310 [out] LONG *pacp);
312 HRESULT GetTextExt(
313 [in] TsViewCookie vcView,
314 [in] LONG acpStart,
315 [in] LONG acpEnd,
316 [out] RECT *prc,
317 [out] BOOL *pfClipped);
319 HRESULT GetScreenExt(
320 [in] TsViewCookie vcView,
321 [out] RECT *prc);
323 HRESULT GetWnd(
324 [in] TsViewCookie vcView,
325 [out] HWND *phwnd);