summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/Graphics/shaderlib/wine/include/textstor.idl
blob: dc203cbd052f731f8e0b3bf814a20add73f42e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
/*
 * Copyright 2009 Aric Stewart, CodeWeavers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

/*
 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
 * a choice of LGPL license versions is made available with the language indicating
 * that LGPLv2 or any later version may be used, or where a choice of which version
 * of the LGPL is applied is otherwise unspecified.
 */

#ifndef DO_NO_IMPORTS
import "oaidl.idl";
#endif

cpp_quote("#define TS_E_INVALIDPOS      MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0200)")
cpp_quote("#define TS_E_NOLOCK          MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)")
cpp_quote("#define TS_E_NOOBJECT        MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0202)")
cpp_quote("#define TS_E_NOSERVICE       MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0203)")
cpp_quote("#define TS_E_NOINTERFACE     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0204)")
cpp_quote("#define TS_E_NOSELECTION     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0205)")
cpp_quote("#define TS_E_NOLAYOUT        MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0206)")
cpp_quote("#define TS_E_INVALIDPOINT    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0207)")
cpp_quote("#define TS_E_SYNCHRONOUS     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0208)")
cpp_quote("#define TS_E_READONLY        MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0209)")
cpp_quote("#define TS_E_FORMAT          MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020a)")

cpp_quote("#define TS_S_ASYNC           MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x0300)")


const ULONG TS_DEFAULT_SELECTION = ~0u;

const DWORD TS_SD_READONLY     = 0x001;
const DWORD TS_SD_LOADING      = 0x002;

const DWORD TS_SS_DISJOINTSEL  = 0x001;
const DWORD TS_SS_REGIONS      = 0x002;
const DWORD TS_SS_TRANSITORY   = 0x004;
const DWORD TS_SS_NOHIDDENTEXT = 0x008;

const DWORD TS_AS_TEXT_CHANGE      = 0x01;
const DWORD TS_AS_SEL_CHANGE       = 0x02;
const DWORD TS_AS_LAYOUT_CHANGE    = 0x04;
const DWORD TS_AS_ATTR_CHANGE      = 0x08;
const DWORD TS_AS_STATUS_CHANGE    = 0x10;

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);

const DWORD TS_LF_SYNC            = 0x1;
const DWORD TS_LF_READ            = 0x2;
const DWORD TS_LF_READWRITE       = 0x6;

const WCHAR TS_CHAR_EMBEDDED     = 0xfffc;
const WCHAR TS_CHAR_REGION       = 0x0000;
const WCHAR TS_CHAR_REPLACEMENT  = 0xfffd;

const DWORD TS_IAS_NOQUERY    = 0x1;
const DWORD TS_IAS_QUERYONLY  = 0x2;

const DWORD TS_ST_CORRECTION = 0x1;

typedef [uuid(05fcf85b-5e9c-4c3e-ab71-29471d4f38e7)]  enum { TS_AE_NONE, TS_AE_START, TS_AE_END } TsActiveSelEnd;
typedef [uuid(033b0df0-f193-4170-b47b-141afc247878)]  enum { TS_RT_PLAIN, TS_RT_HIDDEN, TS_RT_OPAQUE } TsRunType;
typedef [uuid(ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9)]  GUID TS_ATTRID;

typedef [uuid(fec4f516-c503-45b1-a5fd-7a3d8ab07049)] struct TS_STATUS
{
    DWORD dwDynamicFlags;
    DWORD dwStaticFlags;
} TS_STATUS;

typedef [uuid(f3181bd6-bcf0-41d3-a81c-474b17ec38fb)]  struct TS_TEXTCHANGE
{
    LONG acpStart;
    LONG acpOldEnd;
    LONG acpNewEnd;
} TS_TEXTCHANGE;

typedef [uuid(7ecc3ffa-8f73-4d91-98ed-76f8ac5b1600)]  struct TS_SELECTIONSTYLE
{
    TsActiveSelEnd ase;
    BOOL fInterimChar;
} TS_SELECTIONSTYLE;

typedef [uuid(c4b9c33b-8a0d-4426-bebe-d444a4701fe9)]  struct TS_SELECTION_ACP
{
    LONG acpStart;
    LONG acpEnd;
    TS_SELECTIONSTYLE style;
} TS_SELECTION_ACP;

typedef [uuid(a6231949-37c5-4b74-a24e-2a26c327201d)]  struct TS_RUNINFO
{
    ULONG uCount;
    TsRunType type;
} TS_RUNINFO;

typedef [uuid(2cc2b33f-1174-4507-b8d9-5bc0eb37c197)]  struct TS_ATTRVAL
{
    TS_ATTRID idAttr;
    DWORD dwOverlapId;
    VARIANT varValue;
} TS_ATTRVAL;

const DWORD TS_ATTR_FIND_BACKWARDS    = 0x0001;
const DWORD TS_ATTR_FIND_WANT_OFFSET  = 0x0002;
const DWORD TS_ATTR_FIND_UPDATESTART  = 0x0004;
const DWORD TS_ATTR_FIND_WANT_VALUE   = 0x0008;
const DWORD TS_ATTR_FIND_WANT_END     = 0x0010;
const DWORD TS_ATTR_FIND_HIDDEN       = 0x0020;

typedef [uuid(7899d7c4-5f07-493c-a89a-fac8e777f476)]  enum { TS_LC_CREATE, TS_LC_CHANGE, TS_LC_DESTROY } TsLayoutCode;
typedef [uuid(1faf509e-44c1-458e-950a-38a96705a62b)]  DWORD TsViewCookie;

[
  object,
  uuid(22d44c94-a419-4542-a272-ae26093ececf),
  pointer_default(unique)
]
interface ITextStoreACPSink : IUnknown
{
    HRESULT OnTextChange(
        [in] DWORD dwFlags,
        [in] const TS_TEXTCHANGE *pChange);

    HRESULT OnSelectionChange();

    HRESULT OnLayoutChange(
        [in] TsLayoutCode lcode,
        [in] TsViewCookie vcView);

    HRESULT OnStatusChange(
        [in] DWORD dwFlags);

    HRESULT OnAttrsChange(
        [in] LONG acpStart,
        [in] LONG acpEnd,
        [in] ULONG cAttrs,
        [in, size_is(cAttrs)] const TS_ATTRID *paAttrs);

    HRESULT OnLockGranted(
        [in] DWORD dwLockFlags);

    HRESULT OnStartEditTransaction();

    HRESULT OnEndEditTransaction();
};

[
  object,
  uuid(28888fe3-c2a0-483a-a3ea-8cb1ce51ff3d),
  pointer_default(unique)
]
interface ITextStoreACP : IUnknown
{
    HRESULT AdviseSink(
        [in] REFIID riid,
        [in, iid_is(riid)] IUnknown *punk,
        [in] DWORD dwMask);

    HRESULT UnadviseSink(
        [in] IUnknown *punk);

    HRESULT RequestLock(
        [in] DWORD dwLockFlags,
        [out] HRESULT *phrSession);

    HRESULT GetStatus(
        [out] TS_STATUS *pdcs);

    HRESULT QueryInsert(
        [in] LONG acpTestStart,
        [in] LONG acpTestEnd,
        [in] ULONG cch,
        [out] LONG *pacpResultStart,
        [out] LONG *pacpResultEnd);

    HRESULT GetSelection(
        [in] ULONG ulIndex,
        [in] ULONG ulCount,
        [out, size_is(ulCount), length_is(*pcFetched)] TS_SELECTION_ACP *pSelection,
        [out] ULONG *pcFetched);

    HRESULT SetSelection(
        [in] ULONG ulCount,
        [in, size_is(ulCount)] const TS_SELECTION_ACP *pSelection);

    HRESULT GetText(
        [in] LONG acpStart,
        [in] LONG acpEnd,
        [out, size_is(cchPlainReq), length_is(*pcchPlainRet)] WCHAR *pchPlain,
        [in] ULONG cchPlainReq,
        [out] ULONG *pcchPlainRet,
        [out, size_is(cRunInfoReq), length_is(*pcRunInfoRet)] TS_RUNINFO *prgRunInfo,
        [in] ULONG cRunInfoReq,
        [out] ULONG *pcRunInfoRet,
        [out] LONG *pacpNext);

    HRESULT SetText(
        [in] DWORD dwFlags,
        [in] LONG acpStart,
        [in] LONG acpEnd,
        [in, size_is(cch)] const WCHAR *pchText,
        [in] ULONG cch,
        [out] TS_TEXTCHANGE *pChange);

    HRESULT GetFormattedText(
        [in] LONG acpStart,
        [in] LONG acpEnd,
        [out] IDataObject **ppDataObject);

    HRESULT GetEmbedded(
        [in] LONG acpPos,
        [in] REFGUID rguidService,
        [in] REFIID riid,
        [out, iid_is(riid)] IUnknown **ppunk);

    HRESULT QueryInsertEmbedded(
        [in] const GUID *pguidService,
        [in] const FORMATETC *pFormatEtc,
        [out] BOOL *pfInsertable);

    HRESULT InsertEmbedded(
        [in] DWORD dwFlags,
        [in] LONG acpStart,
        [in] LONG acpEnd,
        [in] IDataObject *pDataObject,
        [out] TS_TEXTCHANGE *pChange);


    HRESULT InsertTextAtSelection(
        [in] DWORD dwFlags,
        [in, size_is(cch)] const WCHAR *pchText,
        [in] ULONG cch,
        [out] LONG *pacpStart,
        [out] LONG *pacpEnd,
        [out] TS_TEXTCHANGE *pChange);

    HRESULT InsertEmbeddedAtSelection(
        [in] DWORD dwFlags,
        [in] IDataObject *pDataObject,
        [out] LONG *pacpStart,
        [out] LONG *pacpEnd,
        [out] TS_TEXTCHANGE *pChange);

    HRESULT RequestSupportedAttrs(
        [in] DWORD dwFlags,
        [in] ULONG cFilterAttrs,
        [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs);

    HRESULT RequestAttrsAtPosition(
        [in] LONG acpPos,
        [in] ULONG cFilterAttrs,
        [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
        [in] DWORD dwFlags);

    HRESULT RequestAttrsTransitioningAtPosition(
        [in] LONG acpPos,
        [in] ULONG cFilterAttrs,
        [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
        [in] DWORD dwFlags);

    HRESULT FindNextAttrTransition(
        [in] LONG acpStart,
        [in] LONG acpHalt,
        [in] ULONG cFilterAttrs,
        [in, size_is(cFilterAttrs), unique] const TS_ATTRID *paFilterAttrs,
        [in] DWORD dwFlags,
        [out] LONG *pacpNext,
        [out] BOOL *pfFound,
        [out] LONG *plFoundOffset);

    HRESULT RetrieveRequestedAttrs(
        [in] ULONG ulCount,
        [out, size_is(ulCount), length_is(*pcFetched)] TS_ATTRVAL *paAttrVals,
        [out] ULONG *pcFetched);

    HRESULT GetEndACP(
        [out] LONG *pacp);

    HRESULT GetActiveView(
        [out] TsViewCookie *pvcView);

    HRESULT GetACPFromPoint(
        [in] TsViewCookie vcView,
        [in] const POINT *ptScreen,
        [in] DWORD dwFlags,
        [out] LONG *pacp);

    HRESULT GetTextExt(
        [in] TsViewCookie vcView,
        [in] LONG acpStart,
        [in] LONG acpEnd,
        [out] RECT *prc,
        [out] BOOL *pfClipped);

    HRESULT GetScreenExt(
        [in] TsViewCookie vcView,
        [out] RECT *prc);

    HRESULT GetWnd(
        [in] TsViewCookie vcView,
        [out] HWND *phwnd);
};