1 | /*
|
---|
2 | * Copyright 2009 Aric Stewart, CodeWeavers
|
---|
3 | *
|
---|
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.
|
---|
8 | *
|
---|
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.
|
---|
13 | *
|
---|
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
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef DO_NO_IMPORTS
|
---|
29 | import "oaidl.idl";
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | cpp_quote("#define TS_E_INVALIDPOS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0200)")
|
---|
33 | cpp_quote("#define TS_E_NOLOCK MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)")
|
---|
34 | cpp_quote("#define TS_E_NOOBJECT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0202)")
|
---|
35 | cpp_quote("#define TS_E_NOSERVICE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0203)")
|
---|
36 | cpp_quote("#define TS_E_NOINTERFACE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0204)")
|
---|
37 | cpp_quote("#define TS_E_NOSELECTION MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0205)")
|
---|
38 | cpp_quote("#define TS_E_NOLAYOUT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0206)")
|
---|
39 | cpp_quote("#define TS_E_INVALIDPOINT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0207)")
|
---|
40 | cpp_quote("#define TS_E_SYNCHRONOUS MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0208)")
|
---|
41 | cpp_quote("#define TS_E_READONLY MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0209)")
|
---|
42 | cpp_quote("#define TS_E_FORMAT MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020a)")
|
---|
43 |
|
---|
44 | cpp_quote("#define TS_S_ASYNC MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x0300)")
|
---|
45 |
|
---|
46 |
|
---|
47 | const ULONG TS_DEFAULT_SELECTION = ~0u;
|
---|
48 |
|
---|
49 | const DWORD TS_SD_READONLY = 0x001;
|
---|
50 | const DWORD TS_SD_LOADING = 0x002;
|
---|
51 |
|
---|
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 |
|
---|
57 | const DWORD TS_AS_TEXT_CHANGE = 0x01;
|
---|
58 | const DWORD TS_AS_SEL_CHANGE = 0x02;
|
---|
59 | const DWORD TS_AS_LAYOUT_CHANGE = 0x04;
|
---|
60 | const DWORD TS_AS_ATTR_CHANGE = 0x08;
|
---|
61 | const DWORD TS_AS_STATUS_CHANGE = 0x10;
|
---|
62 |
|
---|
63 | 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);
|
---|
64 |
|
---|
65 | const DWORD TS_LF_SYNC = 0x1;
|
---|
66 | const DWORD TS_LF_READ = 0x2;
|
---|
67 | const DWORD TS_LF_READWRITE = 0x6;
|
---|
68 |
|
---|
69 | const WCHAR TS_CHAR_EMBEDDED = 0xfffc;
|
---|
70 | const WCHAR TS_CHAR_REGION = 0x0000;
|
---|
71 | const WCHAR TS_CHAR_REPLACEMENT = 0xfffd;
|
---|
72 |
|
---|
73 | const DWORD TS_IAS_NOQUERY = 0x1;
|
---|
74 | const DWORD TS_IAS_QUERYONLY = 0x2;
|
---|
75 |
|
---|
76 | typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)] enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
|
---|
77 | typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)] enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
|
---|
78 | typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)] GUID TS_ATTRID;
|
---|
79 |
|
---|
80 | typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
|
---|
81 | {
|
---|
82 | DWORD dwDynamicFlags;
|
---|
83 | DWORD dwStaticFlags;
|
---|
84 | } TS_STATUS;
|
---|
85 |
|
---|
86 | typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)] struct TS_TEXTCHANGE
|
---|
87 | {
|
---|
88 | LONG acpStart;
|
---|
89 | LONG acpOldEnd;
|
---|
90 | LONG acpNewEnd;
|
---|
91 | } TS_TEXTCHANGE;
|
---|
92 |
|
---|
93 | typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)] struct TS_SELECTIONSTYLE
|
---|
94 | {
|
---|
95 | TsActiveSelEnd ase;
|
---|
96 | BOOL fInterimChar;
|
---|
97 | } TS_SELECTIONSTYLE;
|
---|
98 |
|
---|
99 | typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)] struct TS_SELECTION_ACP
|
---|
100 | {
|
---|
101 | LONG acpStart;
|
---|
102 | LONG acpEnd;
|
---|
103 | TS_SELECTIONSTYLE style;
|
---|
104 | } TS_SELECTION_ACP;
|
---|
105 |
|
---|
106 | typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)] struct TS_RUNINFO
|
---|
107 | {
|
---|
108 | ULONG uCount;
|
---|
109 | TsRunType type;
|
---|
110 | } TS_RUNINFO;
|
---|
111 |
|
---|
112 | typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)] struct TS_ATTRVAL
|
---|
113 | {
|
---|
114 | TS_ATTRID idAttr;
|
---|
115 | DWORD dwOverlapId;
|
---|
116 | VARIANT varValue;
|
---|
117 | } TS_ATTRVAL;
|
---|
118 |
|
---|
119 | typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)] enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
|
---|
120 | typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)] DWORD TsViewCookie;
|
---|
121 |
|
---|
122 | [
|
---|
123 | object,
|
---|
124 | uuid(22d44c94-a419-4542-a272-ae26093ececf),
|
---|
125 | pointer_default(unique)
|
---|
126 | ]
|
---|
127 | interface ITextStoreACPSink : IUnknown
|
---|
128 | {
|
---|
129 | HRESULT OnTextChange(
|
---|
130 | [in] DWORD dwFlags,
|
---|
131 | [in] const TS_TEXTCHANGE *pChange);
|
---|
132 |
|
---|
133 | HRESULT OnSelectionChange();
|
---|
134 |
|
---|
135 | HRESULT OnLayoutChange(
|
---|
136 | [in] TsLayoutCode lcode,
|
---|
137 | [in] TsViewCookie vcView);
|
---|
138 |
|
---|
139 | HRESULT OnStatusChange(
|
---|
140 | [in] DWORD dwFlags);
|
---|
141 |
|
---|
142 | HRESULT OnAttrsChange(
|
---|
143 | [in] LONG acpStart,
|
---|
144 | [in] LONG acpEnd,
|
---|
145 | [in] ULONG cAttrs,
|
---|
146 | [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
|
---|
147 |
|
---|
148 | HRESULT OnLockGranted(
|
---|
149 | [in] DWORD dwLockFlags);
|
---|
150 |
|
---|
151 | HRESULT OnStartEditTransaction();
|
---|
152 |
|
---|
153 | HRESULT OnEndEditTransaction();
|
---|
154 | };
|
---|
155 |
|
---|
156 | [
|
---|
157 | object,
|
---|
158 | uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
|
---|
159 | pointer_default(unique)
|
---|
160 | ]
|
---|
161 | interface ITextStoreACP : IUnknown
|
---|
162 | {
|
---|
163 | HRESULT AdviseSink(
|
---|
164 | [in] REFIID riid,
|
---|
165 | [in, iid_is(riid)] IUnknown *punk,
|
---|
166 | [in] DWORD dwMask);
|
---|
167 |
|
---|
168 | HRESULT UnadviseSink(
|
---|
169 | [in] IUnknown *punk);
|
---|
170 |
|
---|
171 | HRESULT RequestLock(
|
---|
172 | [in] DWORD dwLockFlags,
|
---|
173 | [out] HRESULT *phrSession);
|
---|
174 |
|
---|
175 | HRESULT GetStatus(
|
---|
176 | [out] TS_STATUS *pdcs);
|
---|
177 |
|
---|
178 | HRESULT QueryInsert(
|
---|
179 | [in] LONG acpTestStart,
|
---|
180 | [in] LONG acpTestEnd,
|
---|
181 | [in] ULONG cch,
|
---|
182 | [out] LONG *pacpResultStart,
|
---|
183 | [out] LONG *pacpResultEnd);
|
---|
184 |
|
---|
185 | HRESULT GetSelection(
|
---|
186 | [in] ULONG ulIndex,
|
---|
187 | [in] ULONG ulCount,
|
---|
188 | [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
|
---|
189 | [out] ULONG *pcFetched);
|
---|
190 |
|
---|
191 | HRESULT SetSelection(
|
---|
192 | [in] ULONG ulCount,
|
---|
193 | [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
|
---|
194 |
|
---|
195 | HRESULT GetText(
|
---|
196 | [in] LONG acpStart,
|
---|
197 | [in] LONG acpEnd,
|
---|
198 | [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
|
---|
199 | [in] ULONG cchPlainReq,
|
---|
200 | [out] ULONG *pcchPlainRet,
|
---|
201 | [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
|
---|
202 | [in] ULONG cRunInfoReq,
|
---|
203 | [out] ULONG *pcRunInfoRet,
|
---|
204 | [out] LONG *pacpNext);
|
---|
205 |
|
---|
206 | HRESULT SetText(
|
---|
207 | [in] DWORD dwFlags,
|
---|
208 | [in] LONG acpStart,
|
---|
209 | [in] LONG acpEnd,
|
---|
210 | [in, size_is(cch)] const WCHAR *pchText,
|
---|
211 | [in] ULONG cch,
|
---|
212 | [out] TS_TEXTCHANGE *pChange);
|
---|
213 |
|
---|
214 | HRESULT GetFormattedText(
|
---|
215 | [in] LONG acpStart,
|
---|
216 | [in] LONG acpEnd,
|
---|
217 | [out] IDataObject **ppDataObject);
|
---|
218 |
|
---|
219 | HRESULT GetEmbedded(
|
---|
220 | [in] LONG acpPos,
|
---|
221 | [in] REFGUID rguidService,
|
---|
222 | [in] REFIID riid,
|
---|
223 | [out, iid_is(riid)] IUnknown **ppunk);
|
---|
224 |
|
---|
225 | HRESULT QueryInsertEmbedded(
|
---|
226 | [in] const GUID *pguidService,
|
---|
227 | [in] const FORMATETC *pFormatEtc,
|
---|
228 | [out] BOOL *pfInsertable);
|
---|
229 |
|
---|
230 | HRESULT InsertEmbedded(
|
---|
231 | [in] DWORD dwFlags,
|
---|
232 | [in] LONG acpStart,
|
---|
233 | [in] LONG acpEnd,
|
---|
234 | [in] IDataObject *pDataObject,
|
---|
235 | [out] TS_TEXTCHANGE *pChange);
|
---|
236 |
|
---|
237 |
|
---|
238 | HRESULT InsertTextAtSelection(
|
---|
239 | [in] DWORD dwFlags,
|
---|
240 | [in, size_is(cch)] const WCHAR *pchText,
|
---|
241 | [in] ULONG cch,
|
---|
242 | [out] LONG *pacpStart,
|
---|
243 | [out] LONG *pacpEnd,
|
---|
244 | [out] TS_TEXTCHANGE *pChange);
|
---|
245 |
|
---|
246 | HRESULT InsertEmbeddedAtSelection(
|
---|
247 | [in] DWORD dwFlags,
|
---|
248 | [in] IDataObject *pDataObject,
|
---|
249 | [out] LONG *pacpStart,
|
---|
250 | [out] LONG *pacpEnd,
|
---|
251 | [out] TS_TEXTCHANGE *pChange);
|
---|
252 |
|
---|
253 | HRESULT RequestSupportedAttrs(
|
---|
254 | [in] DWORD dwFlags,
|
---|
255 | [in] ULONG cFilterAttrs,
|
---|
256 | [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
|
---|
257 |
|
---|
258 | HRESULT RequestAttrsAtPosition(
|
---|
259 | [in] LONG acpPos,
|
---|
260 | [in] ULONG cFilterAttrs,
|
---|
261 | [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
|
---|
262 | [in] DWORD dwFlags);
|
---|
263 |
|
---|
264 | HRESULT RequestAttrsTransitioningAtPosition(
|
---|
265 | [in] LONG acpPos,
|
---|
266 | [in] ULONG cFilterAttrs,
|
---|
267 | [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
|
---|
268 | [in] DWORD dwFlags);
|
---|
269 |
|
---|
270 | HRESULT FindNextAttrTransition(
|
---|
271 | [in] LONG acpStart,
|
---|
272 | [in] LONG acpHalt,
|
---|
273 | [in] ULONG cFilterAttrs,
|
---|
274 | [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
|
---|
275 | [in] DWORD dwFlags,
|
---|
276 | [out] LONG *pacpNext,
|
---|
277 | [out] BOOL *pfFound,
|
---|
278 | [out] LONG *plFoundOffset);
|
---|
279 |
|
---|
280 | HRESULT RetrieveRequestedAttrs(
|
---|
281 | [in] ULONG ulCount,
|
---|
282 | [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
|
---|
283 | [out] ULONG *pcFetched);
|
---|
284 |
|
---|
285 | HRESULT GetEndACP(
|
---|
286 | [out] LONG *pacp);
|
---|
287 |
|
---|
288 | HRESULT GetActiveView(
|
---|
289 | [out] TsViewCookie *pvcView);
|
---|
290 |
|
---|
291 | HRESULT GetACPFromPoint(
|
---|
292 | [in] TsViewCookie vcView,
|
---|
293 | [in] const POINT *ptScreen,
|
---|
294 | [in] DWORD dwFlags,
|
---|
295 | [out] LONG *pacp);
|
---|
296 |
|
---|
297 | HRESULT GetTextExt(
|
---|
298 | [in] TsViewCookie vcView,
|
---|
299 | [in] LONG acpStart,
|
---|
300 | [in] LONG acpEnd,
|
---|
301 | [out] RECT *prc,
|
---|
302 | [out] BOOL *pfClipped);
|
---|
303 |
|
---|
304 | HRESULT GetScreenExt(
|
---|
305 | [in] TsViewCookie vcView,
|
---|
306 | [out] RECT *prc);
|
---|
307 |
|
---|
308 | HRESULT GetWnd(
|
---|
309 | [in] TsViewCookie vcView,
|
---|
310 | [out] HWND *phwnd);
|
---|
311 | };
|
---|