gdiplus: Test also lf.lfEscapement and lf.lfOrientation returned by GdipGetLogFont.
[wine.git] / include / textstor.idl
blob59285693ee82f1f81b6972d7636481541c633334
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 const DWORD TS_ST_CORRECTION = 0x1;
69 typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)] enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
70 typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)] enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
71 typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)] GUID TS_ATTRID;
73 typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
75 DWORD dwDynamicFlags;
76 DWORD dwStaticFlags;
77 } TS_STATUS;
79 typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)] struct TS_TEXTCHANGE
81 LONG acpStart;
82 LONG acpOldEnd;
83 LONG acpNewEnd;
84 } TS_TEXTCHANGE;
86 typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)] struct TS_SELECTIONSTYLE
88 TsActiveSelEnd ase;
89 BOOL fInterimChar;
90 } TS_SELECTIONSTYLE;
92 typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)] struct TS_SELECTION_ACP
94 LONG acpStart;
95 LONG acpEnd;
96 TS_SELECTIONSTYLE style;
97 } TS_SELECTION_ACP;
99 typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)] struct TS_RUNINFO
101 ULONG uCount;
102 TsRunType type;
103 } TS_RUNINFO;
105 typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)] struct TS_ATTRVAL
107 TS_ATTRID idAttr;
108 DWORD dwOverlapId;
109 VARIANT varValue;
110 } TS_ATTRVAL;
112 typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)] enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
113 typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)] DWORD TsViewCookie;
116 object,
117 uuid(22d44c94-a419-4542-a272-ae26093ececf),
118 pointer_default(unique)
120 interface ITextStoreACPSink : IUnknown
122 HRESULT OnTextChange(
123 [in] DWORD dwFlags,
124 [in] const TS_TEXTCHANGE *pChange);
126 HRESULT OnSelectionChange();
128 HRESULT OnLayoutChange(
129 [in] TsLayoutCode lcode,
130 [in] TsViewCookie vcView);
132 HRESULT OnStatusChange(
133 [in] DWORD dwFlags);
135 HRESULT OnAttrsChange(
136 [in] LONG acpStart,
137 [in] LONG acpEnd,
138 [in] ULONG cAttrs,
139 [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);
141 HRESULT OnLockGranted(
142 [in] DWORD dwLockFlags);
144 HRESULT OnStartEditTransaction();
146 HRESULT OnEndEditTransaction();
150 object,
151 uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
152 pointer_default(unique)
154 interface ITextStoreACP : IUnknown
156 HRESULT AdviseSink(
157 [in] REFIID riid,
158 [in, iid_is(riid)] IUnknown *punk,
159 [in] DWORD dwMask);
161 HRESULT UnadviseSink(
162 [in] IUnknown *punk);
164 HRESULT RequestLock(
165 [in] DWORD dwLockFlags,
166 [out] HRESULT *phrSession);
168 HRESULT GetStatus(
169 [out] TS_STATUS *pdcs);
171 HRESULT QueryInsert(
172 [in] LONG acpTestStart,
173 [in] LONG acpTestEnd,
174 [in] ULONG cch,
175 [out] LONG *pacpResultStart,
176 [out] LONG *pacpResultEnd);
178 HRESULT GetSelection(
179 [in] ULONG ulIndex,
180 [in] ULONG ulCount,
181 [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
182 [out] ULONG *pcFetched);
184 HRESULT SetSelection(
185 [in] ULONG ulCount,
186 [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);
188 HRESULT GetText(
189 [in] LONG acpStart,
190 [in] LONG acpEnd,
191 [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
192 [in] ULONG cchPlainReq,
193 [out] ULONG *pcchPlainRet,
194 [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
195 [in] ULONG cRunInfoReq,
196 [out] ULONG *pcRunInfoRet,
197 [out] LONG *pacpNext);
199 HRESULT SetText(
200 [in] DWORD dwFlags,
201 [in] LONG acpStart,
202 [in] LONG acpEnd,
203 [in, size_is(cch)] const WCHAR *pchText,
204 [in] ULONG cch,
205 [out] TS_TEXTCHANGE *pChange);
207 HRESULT GetFormattedText(
208 [in] LONG acpStart,
209 [in] LONG acpEnd,
210 [out] IDataObject **ppDataObject);
212 HRESULT GetEmbedded(
213 [in] LONG acpPos,
214 [in] REFGUID rguidService,
215 [in] REFIID riid,
216 [out, iid_is(riid)] IUnknown **ppunk);
218 HRESULT QueryInsertEmbedded(
219 [in] const GUID *pguidService,
220 [in] const FORMATETC *pFormatEtc,
221 [out] BOOL *pfInsertable);
223 HRESULT InsertEmbedded(
224 [in] DWORD dwFlags,
225 [in] LONG acpStart,
226 [in] LONG acpEnd,
227 [in] IDataObject *pDataObject,
228 [out] TS_TEXTCHANGE *pChange);
231 HRESULT InsertTextAtSelection(
232 [in] DWORD dwFlags,
233 [in, size_is(cch)] const WCHAR *pchText,
234 [in] ULONG cch,
235 [out] LONG *pacpStart,
236 [out] LONG *pacpEnd,
237 [out] TS_TEXTCHANGE *pChange);
239 HRESULT InsertEmbeddedAtSelection(
240 [in] DWORD dwFlags,
241 [in] IDataObject *pDataObject,
242 [out] LONG *pacpStart,
243 [out] LONG *pacpEnd,
244 [out] TS_TEXTCHANGE *pChange);
246 HRESULT RequestSupportedAttrs(
247 [in] DWORD dwFlags,
248 [in] ULONG cFilterAttrs,
249 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);
251 HRESULT RequestAttrsAtPosition(
252 [in] LONG acpPos,
253 [in] ULONG cFilterAttrs,
254 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
255 [in] DWORD dwFlags);
257 HRESULT RequestAttrsTransitioningAtPosition(
258 [in] LONG acpPos,
259 [in] ULONG cFilterAttrs,
260 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
261 [in] DWORD dwFlags);
263 HRESULT FindNextAttrTransition(
264 [in] LONG acpStart,
265 [in] LONG acpHalt,
266 [in] ULONG cFilterAttrs,
267 [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
268 [in] DWORD dwFlags,
269 [out] LONG *pacpNext,
270 [out] BOOL *pfFound,
271 [out] LONG *plFoundOffset);
273 HRESULT RetrieveRequestedAttrs(
274 [in] ULONG ulCount,
275 [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
276 [out] ULONG *pcFetched);
278 HRESULT GetEndACP(
279 [out] LONG *pacp);
281 HRESULT GetActiveView(
282 [out] TsViewCookie *pvcView);
284 HRESULT GetACPFromPoint(
285 [in] TsViewCookie vcView,
286 [in] const POINT *ptScreen,
287 [in] DWORD dwFlags,
288 [out] LONG *pacp);
290 HRESULT GetTextExt(
291 [in] TsViewCookie vcView,
292 [in] LONG acpStart,
293 [in] LONG acpEnd,
294 [out] RECT *prc,
295 [out] BOOL *pfClipped);
297 HRESULT GetScreenExt(
298 [in] TsViewCookie vcView,
299 [out] RECT *prc);
301 HRESULT GetWnd(
302 [in] TsViewCookie vcView,
303 [out] HWND *phwnd);