kernel32: Added support for TIME_NOSECONDS, restructured EnumTimeFormats implementation.
[wine.git] / include / dwrite_2.idl
blobd2960eb2bcadb946d939d9f28b5c78392f968b64
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 cpp_quote("#ifndef D3DCOLORVALUE_DEFINED")
51 typedef struct _D3DCOLORVALUE
53 union {
54 FLOAT r;
55 FLOAT dvR;
57 union {
58 FLOAT g;
59 FLOAT dvG;
61 union {
62 FLOAT b;
63 FLOAT dvB;
65 union {
66 FLOAT a;
67 FLOAT dvA;
69 } D3DCOLORVALUE;
70 cpp_quote("#define D3DCOLORVALUE_DEFINED")
71 cpp_quote("#endif")
73 typedef D3DCOLORVALUE DWRITE_COLOR_F;
75 typedef struct DWRITE_COLOR_GLYPH_RUN
77 DWRITE_GLYPH_RUN glyphRun;
78 DWRITE_GLYPH_RUN_DESCRIPTION* glyphRunDescription;
79 FLOAT baselineOriginX;
80 FLOAT baselineOriginY;
81 DWRITE_COLOR_F runColor;
82 UINT16 paletteIndex;
83 } DWRITE_COLOR_GLYPH_RUN;
86 local,
87 object,
88 uuid(d3e0e934-22a0-427e-aae4-7d9574b59db1)
90 interface IDWriteTextRenderer1 : IDWriteTextRenderer
92 HRESULT DrawGlyphRun(void *context,
93 FLOAT originX,
94 FLOAT originY,
95 DWRITE_GLYPH_ORIENTATION_ANGLE angle,
96 DWRITE_MEASURING_MODE mode,
97 DWRITE_GLYPH_RUN const *run,
98 DWRITE_GLYPH_RUN_DESCRIPTION const *rundescr,
99 IUnknown *effect);
101 HRESULT DrawUnderline(void *context,
102 FLOAT originX,
103 FLOAT originY,
104 DWRITE_GLYPH_ORIENTATION_ANGLE angle,
105 DWRITE_UNDERLINE const *underline,
106 IUnknown *effect);
108 HRESULT DrawStrikethrough(void *context,
109 FLOAT originX,
110 FLOAT originY,
111 DWRITE_GLYPH_ORIENTATION_ANGLE angle,
112 DWRITE_STRIKETHROUGH const *strikethrough,
113 IUnknown *effect
116 HRESULT DrawInlineObject(void *context,
117 FLOAT originX,
118 FLOAT originY,
119 DWRITE_GLYPH_ORIENTATION_ANGLE angle,
120 IDWriteInlineObject *inlineObject,
121 BOOL is_sideways,
122 BOOL is_rtl,
123 IUnknown *effect
128 local,
129 object,
130 uuid(efa008f9-f7a1-48bf-b05c-f224713cc0ff)
132 interface IDWriteFontFallback : IUnknown
134 HRESULT MapCharacters(IDWriteTextAnalysisSource *source,
135 UINT32 position,
136 UINT32 length,
137 IDWriteFontCollection *basecollection,
138 const WCHAR *baseFamilyName,
139 DWRITE_FONT_WEIGHT baseWeight,
140 DWRITE_FONT_STYLE baseStyle,
141 DWRITE_FONT_STRETCH baseStretch,
142 UINT32 *mappedLength,
143 IDWriteFont **mappedFont,
144 FLOAT *scale
149 local,
150 object,
151 uuid(5f174b49-0d8b-4cfb-8bca-f1cce9d06c67)
153 interface IDWriteTextFormat1 : IDWriteTextFormat
155 HRESULT SetVerticalGlyphOrientation(DWRITE_VERTICAL_GLYPH_ORIENTATION orientation);
156 DWRITE_VERTICAL_GLYPH_ORIENTATION GetVerticalGlyphOrientation();
157 HRESULT SetLastLineWrapping(BOOL lastline_wrapping_enabled);
158 BOOL GetLastLineWrapping();
159 HRESULT SetOpticalAlignment(DWRITE_OPTICAL_ALIGNMENT alignment);
160 DWRITE_OPTICAL_ALIGNMENT GetOpticalAlignment();
161 HRESULT SetFontFallback(IDWriteFontFallback *fallback);
162 HRESULT GetFontFallback(IDWriteFontFallback **fallback);
166 local,
167 object,
168 uuid(1093c18f-8d5e-43f0-b064-0917311b525e)
170 interface IDWriteTextLayout2 : IDWriteTextLayout1
172 HRESULT GetMetrics(DWRITE_TEXT_METRICS1 *metrics);
173 HRESULT SetVerticalGlyphOrientation(DWRITE_VERTICAL_GLYPH_ORIENTATION orientation);
174 DWRITE_VERTICAL_GLYPH_ORIENTATION GetVerticalGlyphOrientation();
175 HRESULT SetLastLineWrapping(BOOL lastline_wrapping_enabled);
176 BOOL GetLastLineWrapping();
177 HRESULT SetOpticalAlignment(DWRITE_OPTICAL_ALIGNMENT alignment);
178 DWRITE_OPTICAL_ALIGNMENT GetOpticalAlignment();
179 HRESULT SetFontFallback(IDWriteFontFallback *fallback);
180 HRESULT GetFontFallback(IDWriteFontFallback **fallback);
184 local,
185 object,
186 uuid(553a9ff3-5693-4df7-b52b-74806f7f2eb9)
188 interface IDWriteTextAnalyzer2 : IDWriteTextAnalyzer1
190 HRESULT GetGlyphOrientationTransform(DWRITE_GLYPH_ORIENTATION_ANGLE angle,
191 BOOL is_sideways,
192 FLOAT originX,
193 FLOAT originY,
194 DWRITE_MATRIX *transform
196 HRESULT GetTypographicFeatures(IDWriteFontFace *fontface,
197 DWRITE_SCRIPT_ANALYSIS analysis,
198 const WCHAR *localeName,
199 UINT32 max_tagcount,
200 UINT32 *actual_tagcount,
201 DWRITE_FONT_FEATURE_TAG *tags
204 HRESULT CheckTypographicFeature(IDWriteFontFace *fontface,
205 DWRITE_SCRIPT_ANALYSIS analysis,
206 const WCHAR *localeName,
207 DWRITE_FONT_FEATURE_TAG feature,
208 UINT32 glyph_count,
209 const UINT16 *indices,
210 UINT8 *feature_applies
215 local,
216 object,
217 uuid(fd882d06-8aba-4fb8-b849-8be8b73e14de)
219 interface IDWriteFontFallbackBuilder : IUnknown
221 HRESULT AddMapping(const DWRITE_UNICODE_RANGE *ranges,
222 UINT32 rangesCount,
223 WCHAR const **targetFamilyNames,
224 UINT32 targetFamilyNamesCount,
225 [defaultvalue(NULL)] IDWriteFontCollection *collection,
226 [defaultvalue(NULL)] WCHAR const *localeName,
227 [defaultvalue(NULL)] WCHAR const *baseFamilyName,
228 [defaultvalue(1)] FLOAT scale
230 HRESULT AddMappings(IDWriteFontFallback *fallback);
231 HRESULT CreateFontFallback(IDWriteFontFallback **fallback);
235 local,
236 object,
237 uuid(29748ed6-8c9c-4a6a-be0b-d912e8538944)
239 interface IDWriteFont2 : IDWriteFont1
241 BOOL IsColorFont();
245 local,
246 object,
247 uuid(d8b768ff-64bc-4e66-982b-ec8e87f693f7)
249 interface IDWriteFontFace2 : IDWriteFontFace1
251 BOOL IsColorFont();
252 UINT32 GetColorPaletteCount();
253 UINT32 GetPaletteEntryCount();
254 HRESULT GetPaletteEntries(UINT32 palette_index,
255 UINT32 first_entry_index,
256 UINT32 entry_count,
257 DWRITE_COLOR_F *entries
259 HRESULT GetRecommendedRenderingMode(FLOAT fontEmSize,
260 FLOAT dpiX,
261 FLOAT dpiY,
262 DWRITE_MATRIX const *transform,
263 BOOL is_sideways,
264 DWRITE_OUTLINE_THRESHOLD threshold,
265 DWRITE_MEASURING_MODE measuringmode,
266 IDWriteRenderingParams *params,
267 DWRITE_RENDERING_MODE *renderingmode,
268 DWRITE_GRID_FIT_MODE *gridfitmode
273 local,
274 object,
275 uuid(d31fbe17-f157-41a2-8d24-cb779e0560e8)
277 interface IDWriteColorGlyphRunEnumerator : IUnknown
279 HRESULT MoveNext(BOOL *hasRun);
280 HRESULT GetCurrentRun(DWRITE_COLOR_GLYPH_RUN const **run);
284 local,
285 object,
286 uuid(f9d711c3-9777-40ae-87e8-3e5aF9bf0948)
288 interface IDWriteRenderingParams2 : IDWriteRenderingParams1
290 DWRITE_GRID_FIT_MODE GetGridFitMode();
294 local,
295 object,
296 uuid(0439fc60-ca44-4994-8dee-3a9af7b732ec)
298 interface IDWriteFactory2 : IDWriteFactory1
300 HRESULT GetSystemFontFallback(IDWriteFontFallback **fallback);
301 HRESULT CreateFontFallbackBuilder(IDWriteFontFallbackBuilder **fallbackbuilder);
302 HRESULT TranslateColorGlyphRun(FLOAT originX,
303 FLOAT originY,
304 const DWRITE_GLYPH_RUN *run,
305 const DWRITE_GLYPH_RUN_DESCRIPTION *rundescr,
306 DWRITE_MEASURING_MODE mode,
307 const DWRITE_MATRIX *transform,
308 UINT32 palette_index,
309 IDWriteColorGlyphRunEnumerator **colorlayers
312 HRESULT CreateCustomRenderingParams(FLOAT gamma,
313 FLOAT contrast,
314 FLOAT grayscalecontrast,
315 FLOAT cleartypeLevel,
316 DWRITE_PIXEL_GEOMETRY pixelGeometry,
317 DWRITE_RENDERING_MODE renderingMode,
318 DWRITE_GRID_FIT_MODE gridFitMode,
319 IDWriteRenderingParams2 **params
322 HRESULT CreateGlyphRunAnalysis(const DWRITE_GLYPH_RUN *run,
323 const DWRITE_MATRIX *transform,
324 DWRITE_RENDERING_MODE renderingMode,
325 DWRITE_MEASURING_MODE measuringMode,
326 DWRITE_GRID_FIT_MODE gridFitMode,
327 DWRITE_TEXT_ANTIALIAS_MODE antialiasMode,
328 FLOAT originX,
329 FLOAT originY,
330 IDWriteGlyphRunAnalysis **analysis