gdi32: Remove double parentheses, not a misplaced pair (PVS-Studio).
[wine.git] / include / dwrite.idl
blob2ae5164135e1329f14cfedf4e814776d3d993d86
1 /*
2 * Copyright 2012 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 "unknwn.idl";
20 import "dcommon.h";
22 interface IDWriteFactory;
23 interface IDWriteFontCollection;
24 interface IDWriteFontFamily;
25 interface IDWriteFontFace;
26 interface IDWriteInlineObject;
28 interface ID2D1SimplifiedGeometrySink;
29 typedef ID2D1SimplifiedGeometrySink IDWriteGeometrySink;
31 cpp_quote("#ifndef _WINDEF_")
32 /* already defined in windef.h but needed for WIDL */
33 typedef void *HMONITOR;
34 cpp_quote("#endif /* _WINDEF_ */")
36 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
37 cpp_quote("#undef GetGlyphIndices")
38 cpp_quote("#endif")
40 typedef enum DWRITE_FACTORY_TYPE
42 DWRITE_FACTORY_TYPE_SHARED,
43 DWRITE_FACTORY_TYPE_ISOLATED
44 } DWRITE_FACTORY_TYPE;
46 typedef enum DWRITE_FONT_FILE_TYPE
48 DWRITE_FONT_FILE_TYPE_UNKNOWN,
49 DWRITE_FONT_FILE_TYPE_CFF,
50 DWRITE_FONT_FILE_TYPE_TRUETYPE,
51 DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION,
52 DWRITE_FONT_FILE_TYPE_TYPE1_PFM,
53 DWRITE_FONT_FILE_TYPE_TYPE1_PFB,
54 DWRITE_FONT_FILE_TYPE_VECTOR,
55 DWRITE_FONT_FILE_TYPE_BITMAP
56 } DWRITE_FONT_FILE_TYPE;
58 typedef enum DWRITE_FONT_FACE_TYPE
60 DWRITE_FONT_FACE_TYPE_CFF,
61 DWRITE_FONT_FACE_TYPE_TRUETYPE,
62 DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION,
63 DWRITE_FONT_FACE_TYPE_TYPE1,
64 DWRITE_FONT_FACE_TYPE_VECTOR,
65 DWRITE_FONT_FACE_TYPE_BITMAP,
66 DWRITE_FONT_FACE_TYPE_UNKNOWN,
67 DWRITE_FONT_FACE_TYPE_RAW_CFF
68 } DWRITE_FONT_FACE_TYPE;
70 typedef enum DWRITE_FONT_WEIGHT
72 DWRITE_FONT_WEIGHT_THIN = 100,
73 DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200,
74 DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200,
75 DWRITE_FONT_WEIGHT_LIGHT = 300,
76 DWRITE_FONT_WEIGHT_NORMAL = 400,
77 DWRITE_FONT_WEIGHT_REGULAR = 400,
78 DWRITE_FONT_WEIGHT_MEDIUM = 500,
79 DWRITE_FONT_WEIGHT_DEMI_BOLD = 600,
80 DWRITE_FONT_WEIGHT_SEMI_BOLD = 600,
81 DWRITE_FONT_WEIGHT_BOLD = 700,
82 DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800,
83 DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800,
84 DWRITE_FONT_WEIGHT_BLACK = 900,
85 DWRITE_FONT_WEIGHT_HEAVY = 900,
86 DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950,
87 DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950
88 } DWRITE_FONT_WEIGHT;
90 typedef enum DWRITE_FONT_STRETCH
92 DWRITE_FONT_STRETCH_UNDEFINED = 0,
93 DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1,
94 DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2,
95 DWRITE_FONT_STRETCH_CONDENSED = 3,
96 DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4,
97 DWRITE_FONT_STRETCH_NORMAL = 5,
98 DWRITE_FONT_STRETCH_MEDIUM = 5,
99 DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6,
100 DWRITE_FONT_STRETCH_EXPANDED = 7,
101 DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8,
102 DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9
103 } DWRITE_FONT_STRETCH;
105 typedef enum DWRITE_FONT_STYLE
107 DWRITE_FONT_STYLE_NORMAL,
108 DWRITE_FONT_STYLE_OBLIQUE,
109 DWRITE_FONT_STYLE_ITALIC
110 } DWRITE_FONT_STYLE;
112 typedef enum DWRITE_INFORMATIONAL_STRING_ID
114 DWRITE_INFORMATIONAL_STRING_NONE,
115 DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE,
116 DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS,
117 DWRITE_INFORMATIONAL_STRING_TRADEMARK,
118 DWRITE_INFORMATIONAL_STRING_MANUFACTURER,
119 DWRITE_INFORMATIONAL_STRING_DESIGNER,
120 DWRITE_INFORMATIONAL_STRING_DESIGNER_URL,
121 DWRITE_INFORMATIONAL_STRING_DESCRIPTION,
122 DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL,
123 DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION,
124 DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL,
125 DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES,
126 DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES,
127 DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES,
128 DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES,
129 DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT,
130 DWRITE_INFORMATIONAL_STRING_FULL_NAME,
131 DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME,
132 DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME
133 } DWRITE_INFORMATIONAL_STRING_ID;
135 typedef enum DWRITE_FONT_SIMULATIONS
137 DWRITE_FONT_SIMULATIONS_NONE,
138 DWRITE_FONT_SIMULATIONS_BOLD,
139 DWRITE_FONT_SIMULATIONS_OBLIQUE
140 } DWRITE_FONT_SIMULATIONS;
142 typedef enum DWRITE_PIXEL_GEOMETRY
144 DWRITE_PIXEL_GEOMETRY_FLAT,
145 DWRITE_PIXEL_GEOMETRY_RGB,
146 DWRITE_PIXEL_GEOMETRY_BGR
147 } DWRITE_PIXEL_GEOMETRY;
149 typedef enum DWRITE_RENDERING_MODE
151 DWRITE_RENDERING_MODE_DEFAULT,
152 DWRITE_RENDERING_MODE_ALIASED,
153 DWRITE_RENDERING_MODE_GDI_CLASSIC,
154 DWRITE_RENDERING_MODE_GDI_NATURAL,
155 DWRITE_RENDERING_MODE_NATURAL,
156 DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC,
157 DWRITE_RENDERING_MODE_OUTLINE,
158 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC,
159 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL,
160 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL = DWRITE_RENDERING_MODE_NATURAL,
161 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
162 } DWRITE_RENDERING_MODE;
164 typedef enum DWRITE_TEXT_ALIGNMENT
166 DWRITE_TEXT_ALIGNMENT_LEADING,
167 DWRITE_TEXT_ALIGNMENT_TRAILING,
168 DWRITE_TEXT_ALIGNMENT_CENTER,
169 DWRITE_TEXT_ALIGNMENT_JUSTIFIED
170 } DWRITE_TEXT_ALIGNMENT;
172 typedef enum DWRITE_PARAGRAPH_ALIGNMENT
174 DWRITE_PARAGRAPH_ALIGNMENT_NEAR,
175 DWRITE_PARAGRAPH_ALIGNMENT_FAR,
176 DWRITE_PARAGRAPH_ALIGNMENT_CENTER
177 } DWRITE_PARAGRAPH_ALIGNMENT;
179 typedef enum DWRITE_WORD_WRAPPING
181 DWRITE_WORD_WRAPPING_WRAP,
182 DWRITE_WORD_WRAPPING_NO_WRAP,
183 DWRITE_WORD_WRAPPING_EMERGENCY_BREAK,
184 DWRITE_WORD_WRAPPING_WHOLE_WORD,
185 DWRITE_WORD_WRAPPING_CHARACTER
186 } DWRITE_WORD_WRAPPING;
188 typedef enum DWRITE_READING_DIRECTION
190 DWRITE_READING_DIRECTION_LEFT_TO_RIGHT,
191 DWRITE_READING_DIRECTION_RIGHT_TO_LEFT,
192 DWRITE_READING_DIRECTION_TOP_TO_BOTTOM,
193 DWRITE_READING_DIRECTION_BOTTOM_TO_TOP
194 } DWRITE_READING_DIRECTION;
196 typedef enum DWRITE_FLOW_DIRECTION
198 DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM,
199 DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP,
200 DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT,
201 DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT
202 } DWRITE_FLOW_DIRECTION;
204 typedef enum DWRITE_TRIMMING_GRANULARITY
206 DWRITE_TRIMMING_GRANULARITY_NONE,
207 DWRITE_TRIMMING_GRANULARITY_CHARACTER,
208 DWRITE_TRIMMING_GRANULARITY_WORD
209 } DWRITE_TRIMMING_GRANULARITY;
211 typedef enum DWRITE_BREAK_CONDITION
213 DWRITE_BREAK_CONDITION_NEUTRAL,
214 DWRITE_BREAK_CONDITION_CAN_BREAK,
215 DWRITE_BREAK_CONDITION_MAY_NOT_BREAK,
216 DWRITE_BREAK_CONDITION_MUST_BREAK
217 } DWRITE_BREAK_CONDITION;
219 typedef enum DWRITE_LINE_SPACING_METHOD
221 DWRITE_LINE_SPACING_METHOD_DEFAULT,
222 DWRITE_LINE_SPACING_METHOD_UNIFORM
223 } DWRITE_LINE_SPACING_METHOD;
225 cpp_quote("#define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \\")
226 cpp_quote(" ((UINT32)(UINT8)(d) << 24) | \\")
227 cpp_quote(" ((UINT32)(UINT8)(c) << 16) | \\")
228 cpp_quote(" ((UINT32)(UINT8)(b) << 8) | \\")
229 cpp_quote(" (UINT32)(UINT8)(a))")
231 typedef enum DWRITE_FONT_FEATURE_TAG
233 DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661, /* 'afrc' */
234 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = 0x63703263, /* 'c2pc' */
235 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = 0x63733263, /* 'c2sc' */
236 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = 0x746c6163, /* 'calt' */
237 DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = 0x65736163, /* 'case' */
238 DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = 0x706d6363, /* 'ccmp' */
239 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = 0x67696c63, /* 'clig' */
240 DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = 0x70737063, /* 'cpsp' */
241 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = 0x68777363, /* 'cswh' */
242 DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = 0x73727563, /* 'curs' */
243 DWRITE_FONT_FEATURE_TAG_DEFAULT = 0x746c6664, /* 'dflt' */
244 DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = 0x67696c64, /* 'dlig' */
245 DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = 0x74707865, /* 'expt' */
246 DWRITE_FONT_FEATURE_TAG_FRACTIONS = 0x63617266, /* 'frac' */
247 DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = 0x64697766, /* 'fwid' */
248 DWRITE_FONT_FEATURE_TAG_HALF_FORMS = 0x666c6168, /* 'half' */
249 DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = 0x6e6c6168, /* 'haln' */
250 DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = 0x746c6168, /* 'halt' */
251 DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = 0x74736968, /* 'hist' */
252 DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = 0x616e6b68, /* 'hkna' */
253 DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = 0x67696c68, /* 'hlig' */
254 DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = 0x64697768, /* 'hwid' */
255 DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = 0x6f6a6f68, /* 'hojo' */
256 DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = 0x3430706a, /* 'jp04' */
257 DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = 0x3837706a, /* 'jp78' */
258 DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = 0x3338706a, /* 'jp83' */
259 DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = 0x3039706a, /* 'jp90' */
260 DWRITE_FONT_FEATURE_TAG_KERNING = 0x6e72656b, /* 'kern' */
261 DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = 0x6167696c, /* 'liga' */
262 DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = 0x6d756e6c, /* 'lnum' */
263 DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = 0x6c636f6c, /* 'locl' */
264 DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = 0x6b72616d, /* 'mark' */
265 DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = 0x6b72676d, /* 'mgrk' */
266 DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = 0x6b6d6b6d, /* 'mkmk' */
267 DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = 0x746c616e, /* 'nalt' */
268 DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = 0x6b636c6e, /* 'nlck' */
269 DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = 0x6d756e6f, /* 'onum' */
270 DWRITE_FONT_FEATURE_TAG_ORDINALS = 0x6e64726f, /* 'ordn' */
271 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = 0x746c6170, /* 'palt' */
272 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = 0x70616370, /* 'pcap' */
273 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = 0x6d756e70, /* 'pnum' */
274 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = 0x64697770, /* 'pwid' */
275 DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = 0x64697771, /* 'qwid' */
276 DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = 0x67696c72, /* 'rlig' */
277 DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = 0x79627572, /* 'ruby' */
278 DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = 0x746c6173, /* 'salt' */
279 DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = 0x666e6973, /* 'sinf' */
280 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = 0x70636d73, /* 'smcp' */
281 DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = 0x6c706d73, /* 'smpl' */
282 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = 0x31307373, /* 'ss01' */
283 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = 0x32307373, /* 'ss02' */
284 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = 0x33307373, /* 'ss03' */
285 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = 0x34307373, /* 'ss04' */
286 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = 0x35307373, /* 'ss05' */
287 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = 0x36307373, /* 'ss06' */
288 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = 0x37307373, /* 'ss07' */
289 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = 0x38307373, /* 'ss08' */
290 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = 0x39307373, /* 'ss09' */
291 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = 0x30317373, /* 'ss10' */
292 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = 0x31317373, /* 'ss11' */
293 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = 0x32317373, /* 'ss12' */
294 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = 0x33317373, /* 'ss13' */
295 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = 0x34317373, /* 'ss14' */
296 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = 0x35317373, /* 'ss15' */
297 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = 0x36317373, /* 'ss16' */
298 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = 0x37317373, /* 'ss17' */
299 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = 0x38317373, /* 'ss18' */
300 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = 0x39317373, /* 'ss19' */
301 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = 0x30327373, /* 'ss20' */
302 DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = 0x73627573, /* 'subs' */
303 DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = 0x73707573, /* 'sups' */
304 DWRITE_FONT_FEATURE_TAG_SWASH = 0x68737773, /* 'swsh' */
305 DWRITE_FONT_FEATURE_TAG_TITLING = 0x6c746974, /* 'titl' */
306 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = 0x6d616e74, /* 'tnam' */
307 DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = 0x6d756e74, /* 'tnum' */
308 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = 0x64617274, /* 'trad' */
309 DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = 0x64697774, /* 'twid' */
310 DWRITE_FONT_FEATURE_TAG_UNICASE = 0x63696e75, /* 'unic' */
311 DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING = 0x74726576, /* 'vert' */
312 DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION= 0x32747276, /* 'vrt2' */
313 DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = 0x6f72657a, /* 'zero' */
314 } DWRITE_FONT_FEATURE_TAG;
316 typedef enum DWRITE_SCRIPT_SHAPES
318 DWRITE_SCRIPT_SHAPES_DEFAULT = 0,
319 DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1
320 } DWRITE_SCRIPT_SHAPES;
322 typedef enum DWRITE_NUMBER_SUBSTITUTION_METHOD
324 DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE,
325 DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL,
326 DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE,
327 DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL,
328 DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL
329 } DWRITE_NUMBER_SUBSTITUTION_METHOD;
331 typedef enum DWRITE_TEXTURE_TYPE
333 DWRITE_TEXTURE_ALIASED_1x1,
334 DWRITE_TEXTURE_CLEARTYPE_3x1
335 } DWRITE_TEXTURE_TYPE;
337 typedef struct DWRITE_FONT_METRICS
339 UINT16 designUnitsPerEm;
340 UINT16 ascent;
341 UINT16 descent;
342 INT16 lineGap;
343 UINT16 capHeight;
344 UINT16 xHeight;
345 INT16 underlinePosition;
346 UINT16 underlineThickness;
347 INT16 strikethroughPosition;
348 UINT16 strikethroughThickness;
349 } DWRITE_FONT_METRICS;
351 typedef struct DWRITE_GLYPH_METRICS
353 INT32 leftSideBearing;
354 UINT32 advanceWidth;
355 INT32 rightSideBearing;
356 INT32 topSideBearing;
357 UINT32 advanceHeight;
358 INT32 bottomSideBearing;
359 INT32 verticalOriginY;
360 } DWRITE_GLYPH_METRICS;
362 typedef struct DWRITE_GLYPH_OFFSET
364 FLOAT advanceOffset;
365 FLOAT ascenderOffset;
366 } DWRITE_GLYPH_OFFSET;
368 typedef struct DWRITE_MATRIX
370 FLOAT m11;
371 FLOAT m12;
372 FLOAT m21;
373 FLOAT m22;
374 FLOAT dx;
375 FLOAT dy;
376 } DWRITE_MATRIX;
378 typedef struct DWRITE_TRIMMING
380 DWRITE_TRIMMING_GRANULARITY granularity;
381 UINT32 delimiter;
382 UINT32 delimiterCount;
383 } DWRITE_TRIMMING;
385 cpp_quote("#ifndef __d2d1_h__")
386 typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
387 cpp_quote("#endif /* __d2d1_h__ */")
389 struct DWRITE_GLYPH_RUN
391 IDWriteFontFace* fontFace;
392 FLOAT fontEmSize;
393 UINT32 glyphCount;
394 UINT16 const* glyphIndices;
395 FLOAT const* glyphAdvances;
396 DWRITE_GLYPH_OFFSET const* glyphOffsets;
397 BOOL isSideways;
398 UINT32 bidiLevel;
401 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION
403 WCHAR const* localeName;
404 WCHAR const* string;
405 UINT32 stringLength;
406 UINT16 const* clusterMap;
407 UINT32 textPosition;
408 } DWRITE_GLYPH_RUN_DESCRIPTION;
410 typedef struct DWRITE_UNDERLINE
412 FLOAT width;
413 FLOAT thickness;
414 FLOAT offset;
415 FLOAT runHeight;
416 DWRITE_READING_DIRECTION readingDirection;
417 DWRITE_FLOW_DIRECTION flowDirection;
418 WCHAR const* localeName;
419 DWRITE_MEASURING_MODE measuringMode;
420 } DWRITE_UNDERLINE;
422 typedef struct DWRITE_STRIKETHROUGH
424 FLOAT width;
425 FLOAT thickness;
426 FLOAT offset;
427 DWRITE_READING_DIRECTION readingDirection;
428 DWRITE_FLOW_DIRECTION flowDirection;
429 WCHAR const* localeName;
430 DWRITE_MEASURING_MODE measuringMode;
431 } DWRITE_STRIKETHROUGH;
433 typedef struct DWRITE_INLINE_OBJECT_METRICS
435 FLOAT width;
436 FLOAT height;
437 FLOAT baseline;
438 BOOL supportsSideways;
439 } DWRITE_INLINE_OBJECT_METRICS;
441 typedef struct DWRITE_OVERHANG_METRICS
443 FLOAT left;
444 FLOAT top;
445 FLOAT right;
446 FLOAT bottom;
447 } DWRITE_OVERHANG_METRICS;
449 typedef struct DWRITE_FONT_FEATURE
451 DWRITE_FONT_FEATURE_TAG nameTag;
452 UINT32 parameter;
453 } DWRITE_FONT_FEATURE;
455 typedef struct DWRITE_TEXT_RANGE
457 UINT32 startPosition;
458 UINT32 length;
459 } DWRITE_TEXT_RANGE;
461 typedef struct DWRITE_LINE_METRICS
463 UINT32 length;
464 UINT32 trailingWhitespaceLength;
465 UINT32 newlineLength;
466 FLOAT height;
467 FLOAT baseline;
468 BOOL isTrimmed;
469 } DWRITE_LINE_METRICS;
471 typedef struct DWRITE_TEXT_METRICS
473 FLOAT left;
474 FLOAT top;
475 FLOAT width;
476 FLOAT widthIncludingTrailingWhitespace;
477 FLOAT height;
478 FLOAT layoutWidth;
479 FLOAT layoutHeight;
480 UINT32 maxBidiReorderingDepth;
481 UINT32 lineCount;
482 } DWRITE_TEXT_METRICS;
484 typedef struct DWRITE_CLUSTER_METRICS
486 FLOAT width;
487 UINT16 length;
488 UINT16 canWrapLineAfter : 1;
489 UINT16 isWhitespace : 1;
490 UINT16 isNewline : 1;
491 UINT16 isSoftHyphen : 1;
492 UINT16 isRightToLeft : 1;
493 UINT16 padding : 11;
494 } DWRITE_CLUSTER_METRICS;
496 typedef struct DWRITE_HIT_TEST_METRICS
498 UINT32 textPosition;
499 UINT32 length;
500 FLOAT left;
501 FLOAT top;
502 FLOAT width;
503 FLOAT height;
504 UINT32 bidiLevel;
505 BOOL isText;
506 BOOL isTrimmed;
507 } DWRITE_HIT_TEST_METRICS;
509 typedef struct DWRITE_SCRIPT_ANALYSIS
511 UINT16 script;
512 DWRITE_SCRIPT_SHAPES shapes;
513 } DWRITE_SCRIPT_ANALYSIS;
515 typedef struct DWRITE_LINE_BREAKPOINT
517 UINT8 breakConditionBefore : 2;
518 UINT8 breakConditionAfter : 2;
519 UINT8 isWhitespace : 1;
520 UINT8 isSoftHyphen : 1;
521 UINT8 padding : 2;
522 } DWRITE_LINE_BREAKPOINT;
524 typedef struct DWRITE_TYPOGRAPHIC_FEATURES
526 DWRITE_FONT_FEATURE* features;
527 UINT32 featureCount;
528 } DWRITE_TYPOGRAPHIC_FEATURES;
530 typedef struct DWRITE_SHAPING_TEXT_PROPERTIES
532 UINT16 isShapedAlone : 1;
533 UINT16 reserved : 15;
534 } DWRITE_SHAPING_TEXT_PROPERTIES;
536 typedef struct DWRITE_SHAPING_GLYPH_PROPERTIES
538 UINT16 justification : 4;
539 UINT16 isClusterStart : 1;
540 UINT16 isDiacritic : 1;
541 UINT16 isZeroWidthSpace : 1;
542 UINT16 reserved : 9;
543 } DWRITE_SHAPING_GLYPH_PROPERTIES;
546 local,
547 object,
548 uuid(6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0)
550 interface IDWriteFontFileStream : IUnknown
552 HRESULT ReadFileFragment(
553 void const **fragment_start,
554 UINT64 offset,
555 UINT64 fragment_size,
556 void **fragment_context);
558 void ReleaseFileFragment(void *fragment_context);
559 HRESULT GetFileSize(UINT64 *size);
560 HRESULT GetLastWriteTime(UINT64 *last_writetime);
564 local,
565 object,
566 uuid(727cad4e-d6af-4c9e-8a08-d695b11caa49)
568 interface IDWriteFontFileLoader : IUnknown
570 HRESULT CreateStreamFromKey(
571 void const *key,
572 UINT32 key_size,
573 IDWriteFontFileStream **stream);
577 local,
578 object,
579 uuid(b2d9f3ec-c9fe-4a11-a2ec-d86208f7c0a2)
581 interface IDWriteLocalFontFileLoader : IDWriteFontFileLoader
583 HRESULT GetFilePathLengthFromKey(void const *key, UINT32 key_size, UINT32 *length);
584 HRESULT GetFilePathFromKey(void const *key, UINT32 key_size, WCHAR *path, UINT32 length);
585 HRESULT GetLastWriteTimeFromKey(void const *key, UINT32 key_size, FILETIME *writetime);
589 local,
590 object,
591 uuid(739d886a-cef5-47dc-8769-1a8b41bebbb0)
593 interface IDWriteFontFile : IUnknown
595 HRESULT GetReferenceKey(
596 void const **key,
597 UINT32 *key_size);
599 HRESULT GetLoader(IDWriteFontFileLoader **loader);
601 HRESULT Analyze(
602 BOOL *is_supported_fonttype,
603 DWRITE_FONT_FILE_TYPE *file_type,
604 DWRITE_FONT_FACE_TYPE *face_type,
605 UINT32 *faces_num);
609 local,
610 object,
611 uuid(72755049-5ff7-435d-8348-4be97cfa6c7c)
613 interface IDWriteFontFileEnumerator : IUnknown
615 HRESULT MoveNext(BOOL *has_current_file);
616 HRESULT GetCurrentFontFile(IDWriteFontFile **font_file);
620 local,
621 object,
622 uuid(cca920e4-52f0-492b-bfa8-29c72ee0a468)
624 interface IDWriteFontCollectionLoader : IUnknown
626 HRESULT CreateEnumeratorFromKey(
627 IDWriteFactory* factory,
628 void const* key,
629 UINT32 key_size,
630 IDWriteFontFileEnumerator **enumerator);
634 local,
635 object,
636 uuid(08256209-099a-4b34-b86d-c22b110e7771)
638 interface IDWriteLocalizedStrings : IUnknown
640 UINT32 GetCount();
642 HRESULT FindLocaleName(
643 WCHAR const *locale_name,
644 UINT32 *index,
645 BOOL *exists);
647 HRESULT GetLocaleNameLength(UINT32 index, UINT32 *length);
648 HRESULT GetLocaleName(UINT32 index, WCHAR *locale_name, UINT32 size);
649 HRESULT GetStringLength(UINT32 index, UINT32 *length);
650 HRESULT GetString(UINT32 index, WCHAR *buffer, UINT32 size);
654 local,
655 object,
656 uuid(2f0da53a-2add-47cd-82ee-d9ec34688e75)
658 interface IDWriteRenderingParams : IUnknown
660 FLOAT GetGamma();
661 FLOAT GetEnhancedContrast();
662 FLOAT GetClearTypeLevel();
663 DWRITE_PIXEL_GEOMETRY GetPixelGeometry();
664 DWRITE_RENDERING_MODE GetRenderingMode();
668 local,
669 object,
670 uuid(5f49804d-7024-4d43-bfa9-d25984f53849)
672 interface IDWriteFontFace : IUnknown
674 DWRITE_FONT_FACE_TYPE GetType();
675 HRESULT GetFiles(UINT32 *number_of_files, IDWriteFontFile **fontfiles);
676 UINT32 GetIndex();
677 DWRITE_FONT_SIMULATIONS GetSimulations();
678 BOOL IsSymbolFont();
679 void GetMetrics(DWRITE_FONT_METRICS *metrics);
680 UINT16 GetGlyphCount();
682 HRESULT GetDesignGlyphMetrics(
683 UINT16 const *glyph_indices,
684 UINT32 glyph_count,
685 DWRITE_GLYPH_METRICS *metrics,
686 [defaultvalue(FALSE)] BOOL is_sideways);
688 HRESULT GetGlyphIndices(
689 UINT32 const *codepoints,
690 UINT32 count,
691 UINT16 *glyph_indices);
693 HRESULT TryGetFontTable(
694 UINT32 table_tag,
695 const void **table_data,
696 UINT32 *table_size,
697 void **context,
698 BOOL *exists);
700 void ReleaseFontTable(void *table_context);
702 HRESULT GetGlyphRunOutline(
703 FLOAT emSize,
704 UINT16 const *glyph_indices,
705 FLOAT const* glyph_advances,
706 DWRITE_GLYPH_OFFSET const *glyph_offsets,
707 UINT32 glyph_count,
708 BOOL is_sideways,
709 BOOL is_rtl,
710 IDWriteGeometrySink *geometrysink);
712 HRESULT GetRecommendedRenderingMode(
713 FLOAT emSize,
714 FLOAT pixels_per_dip,
715 DWRITE_MEASURING_MODE mode,
716 IDWriteRenderingParams* params,
717 DWRITE_RENDERING_MODE* rendering_mode);
719 HRESULT GetGdiCompatibleMetrics(
720 FLOAT emSize,
721 FLOAT pixels_per_dip,
722 DWRITE_MATRIX const *transform,
723 DWRITE_FONT_METRICS *metrics);
725 HRESULT GetGdiCompatibleGlyphMetrics(
726 FLOAT emSize,
727 FLOAT pixels_per_dip,
728 DWRITE_MATRIX const *transform,
729 BOOL use_gdi_natural,
730 UINT16 const *glyph_indices,
731 UINT32 glyph_count,
732 DWRITE_GLYPH_METRICS *metrics,
733 [defaultvalue(FALSE)] BOOL is_sideways);
737 local,
738 object,
739 uuid(acd16696-8c14-4f5d-877e-fe3fc1d32737)
741 interface IDWriteFont : IUnknown
743 HRESULT GetFontFamily(IDWriteFontFamily **family);
744 DWRITE_FONT_WEIGHT GetWeight();
745 DWRITE_FONT_STRETCH GetStretch();
746 DWRITE_FONT_STYLE GetStyle();
747 BOOL IsSymbolFont();
749 HRESULT GetFaceNames(IDWriteLocalizedStrings **names);
750 HRESULT GetInformationalStrings(
751 DWRITE_INFORMATIONAL_STRING_ID stringid,
752 IDWriteLocalizedStrings **strings,
753 BOOL *exists);
755 DWRITE_FONT_SIMULATIONS GetSimulations();
756 void GetMetrics(DWRITE_FONT_METRICS *metrics);
757 HRESULT HasCharacter(UINT32 value, BOOL *exists);
758 HRESULT CreateFontFace(IDWriteFontFace **face);
762 local,
763 object,
764 uuid(1a0d8438-1d97-4ec1-aef9-a2fb86ed6acb)
766 interface IDWriteFontList : IUnknown
768 HRESULT GetFontCollection(IDWriteFontCollection **collection);
769 UINT32 GetFontCount();
770 HRESULT GetFont(UINT32 index, IDWriteFont **font);
774 local,
775 object,
776 uuid(da20d8ef-812a-4c43-9802-62ec4abd7add)
778 interface IDWriteFontFamily : IDWriteFontList
780 HRESULT GetFamilyNames(IDWriteLocalizedStrings **names);
782 HRESULT GetFirstMatchingFont(
783 DWRITE_FONT_WEIGHT weight,
784 DWRITE_FONT_STRETCH stretch,
785 DWRITE_FONT_STYLE style,
786 IDWriteFont **font);
788 HRESULT GetMatchingFonts(
789 DWRITE_FONT_WEIGHT weight,
790 DWRITE_FONT_STRETCH stretch,
791 DWRITE_FONT_STYLE style,
792 IDWriteFontList **fonts);
796 local,
797 object,
798 uuid(a84cee02-3eea-4eee-a827-87c1a02a0fcc)
800 interface IDWriteFontCollection : IUnknown
802 UINT32 GetFontFamilyCount();
803 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily **family);
804 HRESULT FindFamilyName(WCHAR const *name, UINT32 *index, BOOL *exists);
805 HRESULT GetFontFromFontFace(IDWriteFontFace *face, IDWriteFont **font);
809 local,
810 object,
811 uuid(eaf3a2da-ecf4-4d24-b644-b34f6842024b)
813 interface IDWritePixelSnapping : IUnknown
815 HRESULT IsPixelSnappingDisabled(
816 void *client_drawingcontext,
817 BOOL *disabled);
819 HRESULT GetCurrentTransform(
820 void *client_drawingcontext,
821 DWRITE_MATRIX *transform);
823 HRESULT GetPixelsPerDip(
824 void *client_drawingcontext,
825 FLOAT *pixels_per_dip);
829 local,
830 object,
831 uuid(ef8a8135-5cc6-45fe-8825-c5a0724eb819)
833 interface IDWriteTextRenderer : IDWritePixelSnapping
835 HRESULT DrawGlyphRun(
836 void* client_drawingcontext,
837 FLOAT baselineOriginX,
838 FLOAT baselineOriginY,
839 DWRITE_MEASURING_MODE mode,
840 DWRITE_GLYPH_RUN const *glyph_run,
841 DWRITE_GLYPH_RUN_DESCRIPTION const *run_descr,
842 IUnknown *drawing_effect);
844 HRESULT DrawUnderline(
845 void *client_drawingcontext,
846 FLOAT baselineOriginX,
847 FLOAT baselineOriginY,
848 DWRITE_UNDERLINE const* underline,
849 IUnknown *drawing_effect);
851 HRESULT DrawStrikethrough(
852 void *client_drawingcontext,
853 FLOAT baselineOriginX,
854 FLOAT baselineOriginY,
855 DWRITE_STRIKETHROUGH const* strikethrough,
856 IUnknown *drawing_effect);
858 HRESULT DrawInlineObject(
859 void *client_drawingcontext,
860 FLOAT originX,
861 FLOAT originY,
862 IDWriteInlineObject *object,
863 BOOL is_sideways,
864 BOOL is_rtl,
865 IUnknown *drawing_effect);
869 local,
870 object,
871 uuid(8339fde3-106f-47ab-8373-1c6295eb10b3)
873 interface IDWriteInlineObject : IUnknown
875 HRESULT Draw(
876 void* client_drawingontext,
877 IDWriteTextRenderer* renderer,
878 FLOAT originX,
879 FLOAT originY,
880 BOOL is_sideways,
881 BOOL is_rtl,
882 IUnknown *drawing_effect);
884 HRESULT GetMetrics(DWRITE_INLINE_OBJECT_METRICS *metrics);
885 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
886 HRESULT GetBreakConditions(
887 DWRITE_BREAK_CONDITION* condition_before,
888 DWRITE_BREAK_CONDITION* condition_after);
892 local,
893 object,
894 uuid(9c906818-31d7-4fd3-a151-7c5e225db55a)
896 interface IDWriteTextFormat : IUnknown
898 HRESULT SetTextAlignment(DWRITE_TEXT_ALIGNMENT alignment);
899 HRESULT SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT alignment);
900 HRESULT SetWordWrapping(DWRITE_WORD_WRAPPING wrapping);
901 HRESULT SetReadingDirection(DWRITE_READING_DIRECTION direction);
902 HRESULT SetFlowDirection(DWRITE_FLOW_DIRECTION direction);
903 HRESULT SetIncrementalTabStop(FLOAT tabstop);
904 HRESULT SetTrimming(DWRITE_TRIMMING const *trimming, IDWriteInlineObject *trimming_sign);
905 HRESULT SetLineSpacing(DWRITE_LINE_SPACING_METHOD spacing, FLOAT line_spacing, FLOAT baseline);
906 DWRITE_TEXT_ALIGNMENT GetTextAlignment();
907 DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment();
908 DWRITE_WORD_WRAPPING GetWordWrapping();
909 DWRITE_READING_DIRECTION GetReadingDirection();
910 DWRITE_FLOW_DIRECTION GetFlowDirection();
911 FLOAT GetIncrementalTabStop();
912 HRESULT GetTrimming(DWRITE_TRIMMING *options, IDWriteInlineObject **trimming_sign);
914 HRESULT GetLineSpacing(
915 DWRITE_LINE_SPACING_METHOD *method,
916 FLOAT *spacing,
917 FLOAT *baseline);
919 HRESULT GetFontCollection(IDWriteFontCollection **collection);
920 UINT32 GetFontFamilyNameLength();
921 HRESULT GetFontFamilyName(WCHAR *name, UINT32 size);
922 DWRITE_FONT_WEIGHT GetFontWeight();
923 DWRITE_FONT_STYLE GetFontStyle();
924 DWRITE_FONT_STRETCH GetFontStretch();
925 FLOAT GetFontSize();
926 UINT32 GetLocaleNameLength();
927 HRESULT GetLocaleName(WCHAR *name, UINT32 size);
931 local,
932 object,
933 uuid(55f1112b-1dc2-4b3c-9541-f46894ed85b6)
935 interface IDWriteTypography : IUnknown
937 HRESULT AddFontFeature(DWRITE_FONT_FEATURE feature);
938 UINT32 GetFontFeatureCount();
939 HRESULT GetFontFeature(UINT32 index, DWRITE_FONT_FEATURE *feature);
943 local,
944 object,
945 uuid(5e5a32a3-8dff-4773-9ff6-0696eab77267)
947 interface IDWriteBitmapRenderTarget : IUnknown
949 HRESULT DrawGlyphRun(
950 FLOAT baselineOriginX,
951 FLOAT baselineOriginY,
952 DWRITE_MEASURING_MODE measuring_mode,
953 DWRITE_GLYPH_RUN const* glyph_run,
954 IDWriteRenderingParams* params,
955 COLORREF textColor,
956 [defaultvalue(NULL)] RECT *blackbox_rect);
958 HDC GetMemoryDC();
959 FLOAT GetPixelsPerDip();
960 HRESULT SetPixelsPerDip(FLOAT pixels_per_dip);
961 HRESULT GetCurrentTransform(DWRITE_MATRIX *transform);
962 HRESULT SetCurrentTransform(DWRITE_MATRIX const *transform);
963 HRESULT GetSize(SIZE *size);
964 HRESULT Resize(UINT32 width, UINT32 height);
967 cpp_quote("#ifndef _WINGDI_")
968 /* already defined in wingdi.h but needed for WIDL */
969 #define LF_FACESIZE 32
971 typedef struct tagLOGFONTW
973 LONG lfHeight;
974 LONG lfWidth;
975 LONG lfEscapement;
976 LONG lfOrientation;
977 LONG lfWeight;
978 BYTE lfItalic;
979 BYTE lfUnderline;
980 BYTE lfStrikeOut;
981 BYTE lfCharSet;
982 BYTE lfOutPrecision;
983 BYTE lfClipPrecision;
984 BYTE lfQuality;
985 BYTE lfPitchAndFamily;
986 WCHAR lfFaceName[LF_FACESIZE];
987 } LOGFONTW, *PLOGFONTW, *LPLOGFONTW;
988 cpp_quote("#endif /* _WINGDI_ */")
991 local,
992 object,
993 uuid(1edd9491-9853-4299-898f-6432983b6f3a)
995 interface IDWriteGdiInterop : IUnknown
997 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont, IDWriteFont **font);
998 HRESULT ConvertFontToLOGFONT(
999 IDWriteFont* font,
1000 LOGFONTW* logfont,
1001 BOOL *is_systemfont);
1003 HRESULT ConvertFontFaceToLOGFONT(IDWriteFontFace* font, LOGFONTW* logfont);
1004 HRESULT CreateFontFaceFromHdc(HDC hdc, IDWriteFontFace **fontface);
1005 HRESULT CreateBitmapRenderTarget(HDC hdc, UINT32 width, UINT32 height, IDWriteBitmapRenderTarget **target);
1009 local,
1010 object,
1011 uuid(53737037-6d14-410b-9bfe-0b182bb70961)
1013 interface IDWriteTextLayout : IDWriteTextFormat
1015 HRESULT SetMaxWidth(FLOAT maxWidth);
1016 HRESULT SetMaxHeight(FLOAT maxHeight);
1017 HRESULT SetFontCollection(IDWriteFontCollection* collection, DWRITE_TEXT_RANGE range);
1018 HRESULT SetFontFamilyName(WCHAR const *name, DWRITE_TEXT_RANGE range);
1019 HRESULT SetFontWeight(DWRITE_FONT_WEIGHT weight, DWRITE_TEXT_RANGE range);
1020 HRESULT SetFontStyle(DWRITE_FONT_STYLE style, DWRITE_TEXT_RANGE range);
1021 HRESULT SetFontStretch(DWRITE_FONT_STRETCH stretch, DWRITE_TEXT_RANGE range);
1022 HRESULT SetFontSize(FLOAT size, DWRITE_TEXT_RANGE range);
1023 HRESULT SetUnderline(BOOL underline, DWRITE_TEXT_RANGE range);
1024 HRESULT SetStrikethrough(BOOL strikethrough, DWRITE_TEXT_RANGE range);
1025 HRESULT SetDrawingEffect(IUnknown* effect, DWRITE_TEXT_RANGE range);
1026 HRESULT SetInlineObject(IDWriteInlineObject *object, DWRITE_TEXT_RANGE range);
1027 HRESULT SetTypography(IDWriteTypography* typography, DWRITE_TEXT_RANGE range);
1028 HRESULT SetLocaleName(WCHAR const* locale, DWRITE_TEXT_RANGE range);
1030 FLOAT GetMaxWidth();
1031 FLOAT GetMaxHeight();
1032 HRESULT GetFontCollection(
1033 UINT32 pos,
1034 IDWriteFontCollection** collection,
1035 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1037 HRESULT GetFontFamilyNameLength(
1038 UINT32 pos,
1039 UINT32* len,
1040 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1042 HRESULT GetFontFamilyName(
1043 UINT32 position,
1044 WCHAR* name,
1045 UINT32 name_size,
1046 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1048 HRESULT GetFontWeight(
1049 UINT32 position,
1050 DWRITE_FONT_WEIGHT *weight,
1051 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1053 HRESULT GetFontStyle(
1054 UINT32 currentPosition,
1055 DWRITE_FONT_STYLE *style,
1056 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1058 HRESULT GetFontStretch(
1059 UINT32 position,
1060 DWRITE_FONT_STRETCH *stretch,
1061 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1063 HRESULT GetFontSize(
1064 UINT32 position,
1065 FLOAT *size,
1066 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1068 HRESULT GetUnderline(
1069 UINT32 position,
1070 BOOL *has_underline,
1071 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1073 HRESULT GetStrikethrough(
1074 UINT32 position,
1075 BOOL *has_strikethrough,
1076 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1078 HRESULT GetDrawingEffect(
1079 UINT32 position,
1080 IUnknown **effect,
1081 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1083 HRESULT GetInlineObject(
1084 UINT32 position,
1085 IDWriteInlineObject **object,
1086 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1088 HRESULT GetTypography(
1089 UINT32 position,
1090 IDWriteTypography** typography,
1091 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1093 HRESULT GetLocaleNameLength(
1094 UINT32 position,
1095 UINT32* length,
1096 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1098 HRESULT GetLocaleName(
1099 UINT32 position,
1100 WCHAR* name,
1101 UINT32 name_size,
1102 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1104 HRESULT Draw(
1105 void *context,
1106 IDWriteTextRenderer* renderer,
1107 FLOAT originX,
1108 FLOAT originY);
1110 HRESULT GetLineMetrics(
1111 DWRITE_LINE_METRICS *metrics,
1112 UINT32 max_count,
1113 UINT32 *actual_count);
1115 HRESULT GetMetrics(DWRITE_TEXT_METRICS *metrics);
1116 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
1117 HRESULT GetClusterMetrics(
1118 DWRITE_CLUSTER_METRICS *metrics,
1119 UINT32 max_count,
1120 UINT32* act_count);
1122 HRESULT DetermineMinWidth(FLOAT* min_width);
1123 HRESULT HitTestPoint(
1124 FLOAT pointX,
1125 FLOAT pointY,
1126 BOOL* is_trailinghit,
1127 BOOL* is_inside,
1128 DWRITE_HIT_TEST_METRICS *metrics);
1130 HRESULT HitTestTextPosition(
1131 UINT32 textPosition,
1132 BOOL is_trailinghit,
1133 FLOAT* pointX,
1134 FLOAT* pointY,
1135 DWRITE_HIT_TEST_METRICS *metrics);
1137 HRESULT HitTestTextRange(
1138 UINT32 textPosition,
1139 UINT32 textLength,
1140 FLOAT originX,
1141 FLOAT originY,
1142 DWRITE_HIT_TEST_METRICS *metrics,
1143 UINT32 max_metricscount,
1144 UINT32* actual_metricscount);
1148 local,
1149 object,
1150 uuid(14885cc9-bab0-4f90-b6ed-5c366a2cd03d)
1152 interface IDWriteNumberSubstitution : IUnknown
1157 local,
1158 object,
1159 uuid(688e1a58-5094-47c8-adc8-fbcea60ae92b)
1161 interface IDWriteTextAnalysisSource : IUnknown
1163 HRESULT GetTextAtPosition(
1164 UINT32 position,
1165 WCHAR const** text,
1166 UINT32* text_len);
1168 HRESULT GetTextBeforePosition(
1169 UINT32 position,
1170 WCHAR const** text,
1171 UINT32* text_len);
1173 DWRITE_READING_DIRECTION GetParagraphReadingDirection();
1174 HRESULT GetLocaleName(
1175 UINT32 position,
1176 UINT32* text_len,
1177 WCHAR const** locale);
1179 HRESULT GetNumberSubstitution(
1180 UINT32 position,
1181 UINT32* text_len,
1182 IDWriteNumberSubstitution **substitution);
1186 local,
1187 object,
1188 uuid(5810cd44-0ca0-4701-b3fa-bec5182ae4f6)
1190 interface IDWriteTextAnalysisSink : IUnknown
1192 HRESULT SetScriptAnalysis(
1193 UINT32 position,
1194 UINT32 length,
1195 DWRITE_SCRIPT_ANALYSIS const* scriptanalysis);
1197 HRESULT SetLineBreakpoints(
1198 UINT32 position,
1199 UINT32 length,
1200 DWRITE_LINE_BREAKPOINT const* breakpoints);
1202 HRESULT SetBidiLevel(
1203 UINT32 position,
1204 UINT32 length,
1205 UINT8 explicitLevel,
1206 UINT8 resolvedLevel);
1208 HRESULT SetNumberSubstitution(
1209 UINT32 position,
1210 UINT32 length,
1211 IDWriteNumberSubstitution* substitution);
1215 local,
1216 object,
1217 uuid(b7e6163e-7f46-43b4-84b3-e4e6249c365d)
1219 interface IDWriteTextAnalyzer : IUnknown
1221 HRESULT AnalyzeScript(
1222 IDWriteTextAnalysisSource* source,
1223 UINT32 position,
1224 UINT32 length,
1225 IDWriteTextAnalysisSink* sink);
1227 HRESULT AnalyzeBidi(
1228 IDWriteTextAnalysisSource* source,
1229 UINT32 position,
1230 UINT32 length,
1231 IDWriteTextAnalysisSink* sink);
1233 HRESULT AnalyzeNumberSubstitution(
1234 IDWriteTextAnalysisSource* source,
1235 UINT32 position,
1236 UINT32 length,
1237 IDWriteTextAnalysisSink* sink);
1239 HRESULT AnalyzeLineBreakpoints(
1240 IDWriteTextAnalysisSource* source,
1241 UINT32 position,
1242 UINT32 length,
1243 IDWriteTextAnalysisSink* sink);
1245 HRESULT GetGlyphs(
1246 WCHAR const* text,
1247 UINT32 length,
1248 IDWriteFontFace* font_face,
1249 BOOL is_sideways,
1250 BOOL is_rtl,
1251 DWRITE_SCRIPT_ANALYSIS const* analysis,
1252 WCHAR const* locale,
1253 IDWriteNumberSubstitution* substitution,
1254 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1255 UINT32 const* feature_range_len,
1256 UINT32 feature_ranges,
1257 UINT32 max_glyph_count,
1258 UINT16* clustermap,
1259 DWRITE_SHAPING_TEXT_PROPERTIES* text_props,
1260 UINT16* glyph_indices,
1261 DWRITE_SHAPING_GLYPH_PROPERTIES* glyph_props,
1262 UINT32* actual_glyph_count);
1264 HRESULT GetGlyphPlacements(
1265 WCHAR const* text,
1266 UINT16 const* clustermap,
1267 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1268 UINT32 text_len,
1269 UINT16 const* glyph_indices,
1270 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1271 UINT32 glyph_count,
1272 IDWriteFontFace * font_face,
1273 FLOAT fontEmSize,
1274 BOOL is_sideways,
1275 BOOL is_rtl,
1276 DWRITE_SCRIPT_ANALYSIS const* analysis,
1277 WCHAR const* locale,
1278 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1279 UINT32 const* feature_range_len,
1280 UINT32 feature_ranges,
1281 FLOAT* glyph_advances,
1282 DWRITE_GLYPH_OFFSET* glyph_offsets);
1284 HRESULT GetGdiCompatibleGlyphPlacements(
1285 WCHAR const* text,
1286 UINT16 const* clustermap,
1287 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1288 UINT32 text_len,
1289 UINT16 const* glyph_indices,
1290 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1291 UINT32 glyph_count,
1292 IDWriteFontFace * font_face,
1293 FLOAT fontEmSize,
1294 FLOAT pixels_per_dip,
1295 DWRITE_MATRIX const* transform,
1296 BOOL use_gdi_natural,
1297 BOOL is_sideways,
1298 BOOL is_rtl,
1299 DWRITE_SCRIPT_ANALYSIS const* analysis,
1300 WCHAR const* locale,
1301 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1302 UINT32 const* feature_range_lengths,
1303 UINT32 feature_ranges,
1304 FLOAT* glyph_advances,
1305 DWRITE_GLYPH_OFFSET* glyph_offsets);
1309 local,
1310 object,
1311 uuid(7d97dbf7-e085-42d4-81e3-6a883bded118)
1313 interface IDWriteGlyphRunAnalysis : IUnknown
1315 HRESULT GetAlphaTextureBounds(DWRITE_TEXTURE_TYPE type, RECT* bounds);
1316 HRESULT CreateAlphaTexture(DWRITE_TEXTURE_TYPE type, RECT const* bounds, BYTE* alphaValues, UINT32 bufferSize);
1317 HRESULT GetAlphaBlendParams(
1318 IDWriteRenderingParams* renderingParams,
1319 FLOAT* blendGamma,
1320 FLOAT* blendEnhancedContrast,
1321 FLOAT* blendClearTypeLevel);
1325 local,
1326 object,
1327 uuid(b859ee5a-d838-4b5b-a2e8-1adc7d93db48)
1329 interface IDWriteFactory : IUnknown
1331 HRESULT GetSystemFontCollection(IDWriteFontCollection **collection,
1332 [defaultvalue(FALSE)] BOOL check_for_updates);
1334 HRESULT CreateCustomFontCollection(
1335 IDWriteFontCollectionLoader *loader,
1336 void const *key,
1337 UINT32 key_size,
1338 IDWriteFontCollection **collection);
1340 HRESULT RegisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1342 HRESULT UnregisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1344 HRESULT CreateFontFileReference(
1345 WCHAR const *path,
1346 FILETIME const *writetime,
1347 IDWriteFontFile **font_file);
1349 HRESULT CreateCustomFontFileReference(
1350 void const *reference_key,
1351 UINT32 key_size,
1352 IDWriteFontFileLoader *loader,
1353 IDWriteFontFile **font_file);
1355 HRESULT CreateFontFace(
1356 DWRITE_FONT_FACE_TYPE facetype,
1357 UINT32 files_number,
1358 IDWriteFontFile* const* font_files,
1359 UINT32 index,
1360 DWRITE_FONT_SIMULATIONS sim_flags,
1361 IDWriteFontFace **font_face);
1363 HRESULT CreateRenderingParams(IDWriteRenderingParams **params);
1365 HRESULT CreateMonitorRenderingParams(
1366 HMONITOR monitor,
1367 IDWriteRenderingParams **params);
1369 HRESULT CreateCustomRenderingParams(
1370 FLOAT gamma,
1371 FLOAT enhancedContrast,
1372 FLOAT cleartype_level,
1373 DWRITE_PIXEL_GEOMETRY geometry,
1374 DWRITE_RENDERING_MODE mode,
1375 IDWriteRenderingParams **params);
1377 HRESULT RegisterFontFileLoader(IDWriteFontFileLoader *loader);
1379 HRESULT UnregisterFontFileLoader(IDWriteFontFileLoader *loader);
1381 HRESULT CreateTextFormat(
1382 WCHAR const* family_name,
1383 IDWriteFontCollection *collection,
1384 DWRITE_FONT_WEIGHT weight,
1385 DWRITE_FONT_STYLE style,
1386 DWRITE_FONT_STRETCH stretch,
1387 FLOAT size,
1388 WCHAR const *locale,
1389 IDWriteTextFormat **format);
1391 HRESULT CreateTypography(IDWriteTypography **typography);
1393 HRESULT GetGdiInterop(IDWriteGdiInterop **gdi_interop);
1395 HRESULT CreateTextLayout(
1396 WCHAR const* string,
1397 UINT32 len,
1398 IDWriteTextFormat *format,
1399 FLOAT max_width,
1400 FLOAT max_height,
1401 IDWriteTextLayout **layout);
1403 HRESULT CreateGdiCompatibleTextLayout(
1404 WCHAR const* string,
1405 UINT32 len,
1406 IDWriteTextFormat *format,
1407 FLOAT layout_width,
1408 FLOAT layout_height,
1409 FLOAT pixels_per_dip,
1410 DWRITE_MATRIX const* transform,
1411 BOOL use_gdi_natural,
1412 IDWriteTextLayout **layout);
1414 HRESULT CreateEllipsisTrimmingSign(
1415 IDWriteTextFormat *format,
1416 IDWriteInlineObject **trimming_sign);
1418 HRESULT CreateTextAnalyzer(IDWriteTextAnalyzer **analyzer);
1420 HRESULT CreateNumberSubstitution(
1421 DWRITE_NUMBER_SUBSTITUTION_METHOD method,
1422 WCHAR const* locale,
1423 BOOL ignore_user_override,
1424 IDWriteNumberSubstitution **substitution);
1426 HRESULT CreateGlyphRunAnalysis(
1427 DWRITE_GLYPH_RUN const *glyph_run,
1428 FLOAT pixels_per_dip,
1429 DWRITE_MATRIX const* transform,
1430 DWRITE_RENDERING_MODE rendering_mode,
1431 DWRITE_MEASURING_MODE measuring_mode,
1432 FLOAT baseline_x,
1433 FLOAT baseline_y,
1434 IDWriteGlyphRunAnalysis **analysis);
1437 cpp_quote("HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE,REFIID,IUnknown**);")
1439 /* error codes */
1440 cpp_quote("#define FACILITY_DWRITE 0x898")
1441 cpp_quote("#define DWRITE_ERR_BASE 0x5000")
1442 cpp_quote("#define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code))")
1443 cpp_quote("#define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code)")