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