fonts: Fix a typo in copyright text.
[wine/hacks.git] / include / textstor.idl
blobb6031988b875fbdad221a1a5781539574fea4e21
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);
41 const DWORD TS_LF_SYNC = 0x1;
42 const DWORD TS_LF_READ = 0x2;
43 const DWORD TS_LF_READWRITE = 0x6;
45 typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)] enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
46 typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)] enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
47 typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)] GUID TS_ATTRID;
49 typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
51 DWORD dwDynamicFlags;
52 DWORD dwStaticFlags;
53 } TS_STATUS;
55 typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)] struct TS_TEXTCHANGE
57 LONG acpStart;
58 LONG acpOldEnd;
59 LONG acpNewEnd;
60 } TS_TEXTCHANGE;
62 typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)] struct TS_SELECTIONSTYLE
64 TsActiveSelEnd ase;
65 BOOL fInterimChar;
66 } TS_SELECTIONSTYLE;
68 typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)] struct TS_SELECTION_ACP
70 LONG acpStart;
71 LONG acpEnd;
72 TS_SELECTIONSTYLE style;
73 } TS_SELECTION_ACP;
75 typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)] struct TS_RUNINFO
77 ULONG uCount;
78 TsRunType type;
79 } TS_RUNINFO;
81 typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)] struct TS_ATTRVAL
83 TS_ATTRID idAttr;
84 DWORD dwOverlapId;
85 VARIANT varValue;
86 } TS_ATTRVAL;
88 typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)] enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
89 typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)] DWORD TsViewCookie;
92 object,
93 uuid(22d44c94-a419-4542-a272-ae26093ececf),
94 pointer_default(unique)
96 interface ITextStoreACPSink : IUnknown
98 HRESULT OnTextChange(
99 [in] DWORD dwFlags,
100 [in] const TS_TEXTCHANGE *pChange);
102 HRESULT OnSelectionChange();
104 HRESULT OnLayoutChange(
105 [in] TsLayoutCode lcode,
106 [in] TsViewCookie vcView);
108 HRESULT OnStatusChange(
109 [in] DWORD dwFlags);
111 HRESULT OnAttrsChange(
112 [in] LONG acpStart,
113 [in] LONG acpEnd,
114 [in] ULONG cAttrs,
115 [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
117 HRESULT OnLockGranted(
118 [in] DWORD dwLockFlags);
120 HRESULT OnStartEditTransaction();
122 HRESULT OnEndEditTransaction();
126 object,
127 uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
128 pointer_default(unique)
130 interface ITextStoreACP : IUnknown
132 HRESULT AdviseSink(
133 [in] REFIID riid,
134 [in, iid_is(riid)] IUnknown *punk,
135 [in] DWORD dwMask);
137 HRESULT UnadviseSink(
138 [in] IUnknown *punk);
140 HRESULT RequestLock(
141 [in] DWORD dwLockFlags,
142 [out] HRESULT *phrSession);
144 HRESULT GetStatus(
145 [out] TS_STATUS *pdcs);
147 HRESULT QueryInsert(
148 [in] LONG acpTestStart,
149 [in] LONG acpTestEnd,
150 [in] ULONG cch,
151 [out] LONG *pacpResultStart,
152 [out] LONG *pacpResultEnd);
154 HRESULT GetSelection(
155 [in] ULONG ulIndex,
156 [in] ULONG ulCount,
157 [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
158 [out] ULONG *pcFetched);
160 HRESULT SetSelection(
161 [in] ULONG ulCount,
162 [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
164 HRESULT GetText(
165 [in] LONG acpStart,
166 [in] LONG acpEnd,
167 [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
168 [in] ULONG cchPlainReq,
169 [out] ULONG *pcchPlainRet,
170 [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
171 [in] ULONG cRunInfoReq,
172 [out] ULONG *pcRunInfoRet,
173 [out] LONG *pacpNext);
175 HRESULT SetText(
176 [in] DWORD dwFlags,
177 [in] LONG acpStart,
178 [in] LONG acpEnd,
179 [in, size_is(cch)] const WCHAR *pchText,
180 [in] ULONG cch,
181 [out] TS_TEXTCHANGE *pChange);
183 HRESULT GetFormattedText(
184 [in] LONG acpStart,
185 [in] LONG acpEnd,
186 [out] IDataObject **ppDataObject);
188 HRESULT GetEmbedded(
189 [in] LONG acpPos,
190 [in] REFGUID rguidService,
191 [in] REFIID riid,
192 [out, iid_is(riid)] IUnknown **ppunk);
194 HRESULT QueryInsertEmbedded(
195 [in] const GUID *pguidService,
196 [in] const FORMATETC *pFormatEtc,
197 [out] BOOL *pfInsertable);
199 HRESULT InsertEmbedded(
200 [in] DWORD dwFlags,
201 [in] LONG acpStart,
202 [in] LONG acpEnd,
203 [in] IDataObject *pDataObject,
204 [out] TS_TEXTCHANGE *pChange);
207 HRESULT InsertTextAtSelection(
208 [in] DWORD dwFlags,
209 [in, size_is(cch)] const WCHAR *pchText,
210 [in] ULONG cch,
211 [out] LONG *pacpStart,
212 [out] LONG *pacpEnd,
213 [out] TS_TEXTCHANGE *pChange);
215 HRESULT InsertEmbeddedAtSelection(
216 [in] DWORD dwFlags,
217 [in] IDataObject *pDataObject,
218 [out] LONG *pacpStart,
219 [out] LONG *pacpEnd,
220 [out] TS_TEXTCHANGE *pChange);
222 HRESULT RequestSupportedAttrs(
223 [in] DWORD dwFlags,
224 [in] ULONG cFilterAttrs,
225 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
227 HRESULT RequestAttrsAtPosition(
228 [in] LONG acpPos,
229 [in] ULONG cFilterAttrs,
230 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
231 [in] DWORD dwFlags);
233 HRESULT RequestAttrsTransitioningAtPosition(
234 [in] LONG acpPos,
235 [in] ULONG cFilterAttrs,
236 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
237 [in] DWORD dwFlags);
239 HRESULT FindNextAttrTransition(
240 [in] LONG acpStart,
241 [in] LONG acpHalt,
242 [in] ULONG cFilterAttrs,
243 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
244 [in] DWORD dwFlags,
245 [out] LONG *pacpNext,
246 [out] BOOL *pfFound,
247 [out] LONG *plFoundOffset);
249 HRESULT RetrieveRequestedAttrs(
250 [in] ULONG ulCount,
251 [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
252 [out] ULONG *pcFetched);
254 HRESULT GetEndACP(
255 [out] LONG *pacp);
257 HRESULT GetActiveView(
258 [out] TsViewCookie *pvcView);
260 HRESULT GetACPFromPoint(
261 [in] TsViewCookie vcView,
262 [in] const POINT *ptScreen,
263 [in] DWORD dwFlags,
264 [out] LONG *pacp);
266 HRESULT GetTextExt(
267 [in] TsViewCookie vcView,
268 [in] LONG acpStart,
269 [in] LONG acpEnd,
270 [out] RECT *prc,
271 [out] BOOL *pfClipped);
273 HRESULT GetScreenExt(
274 [in] TsViewCookie vcView,
275 [out] RECT *prc);
277 HRESULT GetWnd(
278 [in] TsViewCookie vcView,
279 [out] HWND *phwnd);