user32/tests: Add mouse SendInput tests when mouse events are captured.
[wine.git] / include / dwrite_2.idl
blob26523dacd673c71ff43b2bf4fbaa2b771a6c2fc9
1 /*
2 * Copyright 2014 Nikolay Sivov for 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 import "dwrite_1.idl";
21 typedef enum DWRITE_OPTICAL_ALIGNMENT
23 DWRITE_OPTICAL_ALIGNMENT_NONE,
24 DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS
25 } DWRITE_OPTICAL_ALIGNMENT;
27 typedef enum DWRITE_GRID_FIT_MODE
29 DWRITE_GRID_FIT_MODE_DEFAULT,
30 DWRITE_GRID_FIT_MODE_DISABLED,
31 DWRITE_GRID_FIT_MODE_ENABLED
32 } DWRITE_GRID_FIT_MODE;
34 typedef struct DWRITE_TEXT_METRICS1
36 /* DWRITE_TEXT_METRICS fields */
37 FLOAT left;
38 FLOAT top;
39 FLOAT width;
40 FLOAT widthIncludingTrailingWhitespace;
41 FLOAT height;
42 FLOAT layoutWidth;
43 FLOAT layoutHeight;
44 UINT32 maxBidiReorderingDepth;
45 UINT32 lineCount;
46 /* DWRITE_TEXT_METRICS1 fields */
47 FLOAT heightIncludingTrailingWhitespace;
48 } DWRITE_TEXT_METRICS1;
50 typedef struct _D3DCOLORVALUE
52 union {
53 FLOAT r;
54 FLOAT dvR;
56 union {
57 FLOAT g;
58 FLOAT dvG;
60 union {
61 FLOAT b;
62 FLOAT dvB;
64 union {
65 FLOAT a;
66 FLOAT dvA;
68 } D3DCOLORVALUE;
70 typedef D3DCOLORVALUE DWRITE_COLOR_F;
72 typedef struct DWRITE_COLOR_GLYPH_RUN
74 DWRITE_GLYPH_RUN glyphRun;
75 DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription;
76 FLOAT baselineOriginX;
77 FLOAT baselineOriginY;
78 DWRITE_COLOR_F runColor;
79 UINT16 paletteIndex;
80 } DWRITE_COLOR_GLYPH_RUN;
83 local,
84 object,
85 uuid(d3e0e934-22a0-427e-aae4-7d9574b59db1)
87 interface IDWriteTextRenderer1 : IDWriteTextRenderer
89 HRESULT DrawGlyphRun(void *context,
90 FLOAT originX,
91 FLOAT originY,
92 DWRITE_GLYPH_ORIENTATION_ANGLE angle,
93 DWRITE_MEASURING_MODE mode,
94 DWRITE_GLYPH_RUN const *run,
95 DWRITE_GLYPH_RUN_DESCRIPTION const *rundescr,
96 IUnknown *effect);
98 HRESULT DrawUnderline(void *context,
99 FLOAT originX,
100 FLOAT originY,
101 DWRITE_GLYPH_ORIENTATION_ANGLE angle,
102 DWRITE_UNDERLINE const *underline,
103 IUnknown *effect);
105 HRESULT DrawStrikethrough(void *context,
106 FLOAT originX,
107 FLOAT originY,
108 DWRITE_GLYPH_ORIENTATION_ANGLE angle,
109 DWRITE_STRIKETHROUGH const *strikethrough,
110 IUnknown *effect
113 HRESULT DrawInlineObject(void *context,
114 FLOAT originX,
115 FLOAT originY,
116 DWRITE_GLYPH_ORIENTATION_ANGLE angle,
117 IDWriteInlineObject *inlineObject,
118 BOOL is_sideways,
119 BOOL is_rtl,
120 IUnknown *effect
125 local,
126 object,
127 uuid(efa008f9-f7a1-48bf-b05c-f224713cc0ff)
129 interface IDWriteFontFallback : IUnknown
131 HRESULT MapCharacters(IDWriteTextAnalysisSource *source,
132 UINT32 position,
133 UINT32 length,
134 IDWriteFontCollection *basecollection,
135 const WCHAR *baseFamilyName,
136 DWRITE_FONT_WEIGHT baseWeight,
137 DWRITE_FONT_STYLE baseStyle,
138 DWRITE_FONT_STRETCH baseStretch,
139 UINT32 *mappedLength,
140 IDWriteFont **mappedFont,
141 FLOAT *scale
146 local,
147 object,
148 uuid(5f174b49-0d8b-4cfb-8bca-f1cce9d06c67)
150 interface IDWriteTextFormat1 : IDWriteTextFormat
152 HRESULT SetVerticalGlyphOrientation(DWRITE_VERTICAL_GLYPH_ORIENTATION orientation);
153 DWRITE_VERTICAL_GLYPH_ORIENTATION GetVerticalGlyphOrientation();
154 HRESULT SetLastLineWrapping(BOOL lastline_wrapping_enabled);
155 BOOL GetLastLineWrapping();
156 HRESULT SetOpticalAlignment(DWRITE_OPTICAL_ALIGNMENT alignment);
157 DWRITE_OPTICAL_ALIGNMENT GetOpticalAlignment();
158 HRESULT SetFontFallback(IDWriteFontFallback *fallback);
159 HRESULT GetFontFallback(IDWriteFontFallback **fallback);
163 local,
164 object,
165 uuid(1093c18f-8d5e-43f0-b064-0917311b525e)
167 interface IDWriteTextLayout2 : IDWriteTextLayout1
169 HRESULT GetMetrics(DWRITE_TEXT_METRICS1 *metrics);
170 HRESULT SetVerticalGlyphOrientation(DWRITE_VERTICAL_GLYPH_ORIENTATION orientation);
171 DWRITE_VERTICAL_GLYPH_ORIENTATION GetVerticalGlyphOrientation();
172 HRESULT SetLastLineWrapping(BOOL lastline_wrapping_enabled);
173 BOOL GetLastLineWrapping();
174 HRESULT SetOpticalAlignment(DWRITE_OPTICAL_ALIGNMENT alignment);
175 DWRITE_OPTICAL_ALIGNMENT GetOpticalAlignment();
176 HRESULT SetFontFallback(IDWriteFontFallback *fallback);
177 HRESULT GetFontFallback(IDWriteFontFallback **fallback);
181 local,
182 object,
183 uuid(553a9ff3-5693-4df7-b52b-74806f7f2eb9)
185 interface IDWriteTextAnalyzer2 : IDWriteTextAnalyzer1
187 HRESULT GetGlyphOrientationTransform(DWRITE_GLYPH_ORIENTATION_ANGLE angle,
188 BOOL is_sideways,
189 FLOAT originX,
190 FLOAT originY,
191 DWRITE_MATRIX *transform
193 HRESULT GetTypographicFeatures(IDWriteFontFace *fontface,
194 DWRITE_SCRIPT_ANALYSIS analysis,
195 const WCHAR *localeName,
196 UINT32 max_tagcount,
197 UINT32 *actual_tagcount,
198 DWRITE_FONT_FEATURE_TAG *tags
201 HRESULT CheckTypographicFeature(IDWriteFontFace *fontface,
202 DWRITE_SCRIPT_ANALYSIS analysis,
203 const WCHAR *localeName,
204 DWRITE_FONT_FEATURE_TAG feature,
205 UINT32 glyph_count,
206 const UINT16 *indices,
207 UINT8 *feature_applies
212 local,
213 object,
214 uuid(fd882d06-8aba-4fb8-b849-8be8b73e14de)
216 interface IDWriteFontFallbackBuilder : IUnknown
218 HRESULT AddMapping(const DWRITE_UNICODE_RANGE *ranges,
219 UINT32 rangesCount,
220 WCHAR const **targetFamilyNames,
221 UINT32 targetFamilyNamesCount,
222 [defaultvalue(NULL)] IDWriteFontCollection *collection,
223 [defaultvalue(NULL)] WCHAR const *localeName,
224 [defaultvalue(NULL)] WCHAR const *baseFamilyName,
225 [defaultvalue(1)] FLOAT scale
227 HRESULT AddMappings(IDWriteFontFallback *fallback);
228 HRESULT CreateFontFallback(IDWriteFontFallback **fallback);
232 local,
233 object,
234 uuid(29748ed6-8c9c-4a6a-be0b-d912e8538944)
236 interface IDWriteFont2 : IDWriteFont1
238 BOOL IsColorFont();
242 local,
243 object,
244 uuid(d8b768ff-64bc-4e66-982b-ec8e87f693f7)
246 interface IDWriteFontFace2 : IDWriteFontFace1
248 BOOL IsColorFont();
249 UINT32 GetColorPaletteCount();
250 UINT32 GetPaletteEntryCount();
251 HRESULT GetPaletteEntries(UINT32 palette_index,
252 UINT32 first_entry_index,
253 UINT32 entry_count,
254 DWRITE_COLOR_F *entries
256 HRESULT GetRecommendedRenderingMode(FLOAT fontEmSize,
257 FLOAT dpiX,
258 FLOAT dpiY,
259 DWRITE_MATRIX const *transform,
260 BOOL is_sideways,
261 DWRITE_OUTLINE_THRESHOLD threshold,
262 DWRITE_MEASURING_MODE measuringmode,
263 IDWriteRenderingParams *params,
264 DWRITE_RENDERING_MODE *renderingmode,
265 DWRITE_GRID_FIT_MODE *gridfitmode
270 local,
271 object,
272 uuid(d31fbe17-f157-41a2-8d24-cb779e0560e8)
274 interface IDWriteColorGlyphRunEnumerator : IUnknown
276 HRESULT MoveNext(BOOL *hasRun);
277 HRESULT GetCurrentRun(DWRITE_COLOR_GLYPH_RUN const **run);
281 local,
282 object,
283 uuid(f9d711c3-9777-40ae-87e8-3e5aF9bf0948)
285 interface IDWriteRenderingParams2 : IDWriteRenderingParams1
287 DWRITE_GRID_FIT_MODE GetGridFitMode();
291 local,
292 object,
293 uuid(0439fc60-ca44-4994-8dee-3a9af7b732ec)
295 interface IDWriteFactory2 : IDWriteFactory1
297 HRESULT GetSystemFontFallback(IDWriteFontFallback **fallback);
298 HRESULT CreateFontFallbackBuilder(IDWriteFontFallbackBuilder **fallbackbuilder);
299 HRESULT TranslateColorGlyphRun(FLOAT originX,
300 FLOAT originY,
301 const DWRITE_GLYPH_RUN *run,
302 const DWRITE_GLYPH_RUN_DESCRIPTION *rundescr,
303 DWRITE_MEASURING_MODE mode,
304 const DWRITE_MATRIX *transform,
305 UINT32 palette_index,
306 IDWriteColorGlyphRunEnumerator **colorlayers
309 HRESULT CreateCustomRenderingParams(FLOAT gamma,
310 FLOAT contrast,
311 FLOAT grayscalecontrast,
312 FLOAT cleartypeLevel,
313 DWRITE_PIXEL_GEOMETRY pixelGeometry,
314 DWRITE_RENDERING_MODE renderingMode,
315 DWRITE_GRID_FIT_MODE gridFitMode,
316 IDWriteRenderingParams2 **params
319 HRESULT CreateGlyphRunAnalysis(const DWRITE_GLYPH_RUN *run,
320 const DWRITE_MATRIX *transform,
321 DWRITE_RENDERING_MODE renderingMode,
322 DWRITE_MEASURING_MODE measuringMode,
323 DWRITE_GRID_FIT_MODE gridFitMode,
324 DWRITE_TEXT_ANTIALIAS_MODE antialiasMode,
325 FLOAT originX,
326 FLOAT originY,
327 IDWriteGlyphRunAnalysis **analysis