d3d8: Use wined3d_texture_get_sub_resource_parent() in d3d8_device_GetBackBuffer().
[wine.git] / include / dwrite.idl
blob9452e11091c6168ba3854c2c5d67e575653a5455
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_SEMI_LIGHT = 350,
77 DWRITE_FONT_WEIGHT_NORMAL = 400,
78 DWRITE_FONT_WEIGHT_REGULAR = 400,
79 DWRITE_FONT_WEIGHT_MEDIUM = 500,
80 DWRITE_FONT_WEIGHT_DEMI_BOLD = 600,
81 DWRITE_FONT_WEIGHT_SEMI_BOLD = 600,
82 DWRITE_FONT_WEIGHT_BOLD = 700,
83 DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800,
84 DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800,
85 DWRITE_FONT_WEIGHT_BLACK = 900,
86 DWRITE_FONT_WEIGHT_HEAVY = 900,
87 DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950,
88 DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950
89 } DWRITE_FONT_WEIGHT;
91 typedef enum DWRITE_FONT_STRETCH
93 DWRITE_FONT_STRETCH_UNDEFINED = 0,
94 DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1,
95 DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2,
96 DWRITE_FONT_STRETCH_CONDENSED = 3,
97 DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4,
98 DWRITE_FONT_STRETCH_NORMAL = 5,
99 DWRITE_FONT_STRETCH_MEDIUM = 5,
100 DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6,
101 DWRITE_FONT_STRETCH_EXPANDED = 7,
102 DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8,
103 DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9
104 } DWRITE_FONT_STRETCH;
106 typedef enum DWRITE_FONT_STYLE
108 DWRITE_FONT_STYLE_NORMAL,
109 DWRITE_FONT_STYLE_OBLIQUE,
110 DWRITE_FONT_STYLE_ITALIC
111 } DWRITE_FONT_STYLE;
113 typedef enum DWRITE_INFORMATIONAL_STRING_ID
115 DWRITE_INFORMATIONAL_STRING_NONE,
116 DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE,
117 DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS,
118 DWRITE_INFORMATIONAL_STRING_TRADEMARK,
119 DWRITE_INFORMATIONAL_STRING_MANUFACTURER,
120 DWRITE_INFORMATIONAL_STRING_DESIGNER,
121 DWRITE_INFORMATIONAL_STRING_DESIGNER_URL,
122 DWRITE_INFORMATIONAL_STRING_DESCRIPTION,
123 DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL,
124 DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION,
125 DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL,
126 DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES,
127 DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES,
128 DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES,
129 DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES,
130 DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT,
131 DWRITE_INFORMATIONAL_STRING_FULL_NAME,
132 DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_NAME,
133 DWRITE_INFORMATIONAL_STRING_POSTSCRIPT_CID_NAME
134 } DWRITE_INFORMATIONAL_STRING_ID;
136 typedef enum DWRITE_FONT_SIMULATIONS
138 DWRITE_FONT_SIMULATIONS_NONE,
139 DWRITE_FONT_SIMULATIONS_BOLD,
140 DWRITE_FONT_SIMULATIONS_OBLIQUE
141 } DWRITE_FONT_SIMULATIONS;
143 typedef enum DWRITE_PIXEL_GEOMETRY
145 DWRITE_PIXEL_GEOMETRY_FLAT,
146 DWRITE_PIXEL_GEOMETRY_RGB,
147 DWRITE_PIXEL_GEOMETRY_BGR
148 } DWRITE_PIXEL_GEOMETRY;
150 typedef enum DWRITE_RENDERING_MODE
152 DWRITE_RENDERING_MODE_DEFAULT,
153 DWRITE_RENDERING_MODE_ALIASED,
154 DWRITE_RENDERING_MODE_GDI_CLASSIC,
155 DWRITE_RENDERING_MODE_GDI_NATURAL,
156 DWRITE_RENDERING_MODE_NATURAL,
157 DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC,
158 DWRITE_RENDERING_MODE_OUTLINE,
159 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC,
160 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL,
161 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL = DWRITE_RENDERING_MODE_NATURAL,
162 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
163 } DWRITE_RENDERING_MODE;
165 typedef enum DWRITE_TEXT_ALIGNMENT
167 DWRITE_TEXT_ALIGNMENT_LEADING,
168 DWRITE_TEXT_ALIGNMENT_TRAILING,
169 DWRITE_TEXT_ALIGNMENT_CENTER,
170 DWRITE_TEXT_ALIGNMENT_JUSTIFIED
171 } DWRITE_TEXT_ALIGNMENT;
173 typedef enum DWRITE_PARAGRAPH_ALIGNMENT
175 DWRITE_PARAGRAPH_ALIGNMENT_NEAR,
176 DWRITE_PARAGRAPH_ALIGNMENT_FAR,
177 DWRITE_PARAGRAPH_ALIGNMENT_CENTER
178 } DWRITE_PARAGRAPH_ALIGNMENT;
180 typedef enum DWRITE_WORD_WRAPPING
182 DWRITE_WORD_WRAPPING_WRAP,
183 DWRITE_WORD_WRAPPING_NO_WRAP,
184 DWRITE_WORD_WRAPPING_EMERGENCY_BREAK,
185 DWRITE_WORD_WRAPPING_WHOLE_WORD,
186 DWRITE_WORD_WRAPPING_CHARACTER
187 } DWRITE_WORD_WRAPPING;
189 typedef enum DWRITE_READING_DIRECTION
191 DWRITE_READING_DIRECTION_LEFT_TO_RIGHT,
192 DWRITE_READING_DIRECTION_RIGHT_TO_LEFT,
193 DWRITE_READING_DIRECTION_TOP_TO_BOTTOM,
194 DWRITE_READING_DIRECTION_BOTTOM_TO_TOP
195 } DWRITE_READING_DIRECTION;
197 typedef enum DWRITE_FLOW_DIRECTION
199 DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM,
200 DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP,
201 DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT,
202 DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT
203 } DWRITE_FLOW_DIRECTION;
205 typedef enum DWRITE_TRIMMING_GRANULARITY
207 DWRITE_TRIMMING_GRANULARITY_NONE,
208 DWRITE_TRIMMING_GRANULARITY_CHARACTER,
209 DWRITE_TRIMMING_GRANULARITY_WORD
210 } DWRITE_TRIMMING_GRANULARITY;
212 typedef enum DWRITE_BREAK_CONDITION
214 DWRITE_BREAK_CONDITION_NEUTRAL,
215 DWRITE_BREAK_CONDITION_CAN_BREAK,
216 DWRITE_BREAK_CONDITION_MAY_NOT_BREAK,
217 DWRITE_BREAK_CONDITION_MUST_BREAK
218 } DWRITE_BREAK_CONDITION;
220 typedef enum DWRITE_LINE_SPACING_METHOD
222 DWRITE_LINE_SPACING_METHOD_DEFAULT,
223 DWRITE_LINE_SPACING_METHOD_UNIFORM,
224 DWRITE_LINE_SPACING_METHOD_PROPORTIONAL
225 } DWRITE_LINE_SPACING_METHOD;
227 cpp_quote("#define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \\")
228 cpp_quote(" ((UINT32)(UINT8)(d) << 24) | \\")
229 cpp_quote(" ((UINT32)(UINT8)(c) << 16) | \\")
230 cpp_quote(" ((UINT32)(UINT8)(b) << 8) | \\")
231 cpp_quote(" (UINT32)(UINT8)(a))")
233 typedef enum DWRITE_FONT_FEATURE_TAG
235 DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661, /* 'afrc' */
236 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = 0x63703263, /* 'c2pc' */
237 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = 0x63733263, /* 'c2sc' */
238 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = 0x746c6163, /* 'calt' */
239 DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = 0x65736163, /* 'case' */
240 DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = 0x706d6363, /* 'ccmp' */
241 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = 0x67696c63, /* 'clig' */
242 DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = 0x70737063, /* 'cpsp' */
243 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = 0x68777363, /* 'cswh' */
244 DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = 0x73727563, /* 'curs' */
245 DWRITE_FONT_FEATURE_TAG_DEFAULT = 0x746c6664, /* 'dflt' */
246 DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = 0x67696c64, /* 'dlig' */
247 DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = 0x74707865, /* 'expt' */
248 DWRITE_FONT_FEATURE_TAG_FRACTIONS = 0x63617266, /* 'frac' */
249 DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = 0x64697766, /* 'fwid' */
250 DWRITE_FONT_FEATURE_TAG_HALF_FORMS = 0x666c6168, /* 'half' */
251 DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = 0x6e6c6168, /* 'haln' */
252 DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = 0x746c6168, /* 'halt' */
253 DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = 0x74736968, /* 'hist' */
254 DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = 0x616e6b68, /* 'hkna' */
255 DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = 0x67696c68, /* 'hlig' */
256 DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = 0x64697768, /* 'hwid' */
257 DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = 0x6f6a6f68, /* 'hojo' */
258 DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = 0x3430706a, /* 'jp04' */
259 DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = 0x3837706a, /* 'jp78' */
260 DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = 0x3338706a, /* 'jp83' */
261 DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = 0x3039706a, /* 'jp90' */
262 DWRITE_FONT_FEATURE_TAG_KERNING = 0x6e72656b, /* 'kern' */
263 DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = 0x6167696c, /* 'liga' */
264 DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = 0x6d756e6c, /* 'lnum' */
265 DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = 0x6c636f6c, /* 'locl' */
266 DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = 0x6b72616d, /* 'mark' */
267 DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = 0x6b72676d, /* 'mgrk' */
268 DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = 0x6b6d6b6d, /* 'mkmk' */
269 DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = 0x746c616e, /* 'nalt' */
270 DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = 0x6b636c6e, /* 'nlck' */
271 DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = 0x6d756e6f, /* 'onum' */
272 DWRITE_FONT_FEATURE_TAG_ORDINALS = 0x6e64726f, /* 'ordn' */
273 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = 0x746c6170, /* 'palt' */
274 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = 0x70616370, /* 'pcap' */
275 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = 0x6d756e70, /* 'pnum' */
276 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = 0x64697770, /* 'pwid' */
277 DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = 0x64697771, /* 'qwid' */
278 DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = 0x67696c72, /* 'rlig' */
279 DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = 0x79627572, /* 'ruby' */
280 DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = 0x746c6173, /* 'salt' */
281 DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = 0x666e6973, /* 'sinf' */
282 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = 0x70636d73, /* 'smcp' */
283 DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = 0x6c706d73, /* 'smpl' */
284 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = 0x31307373, /* 'ss01' */
285 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = 0x32307373, /* 'ss02' */
286 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = 0x33307373, /* 'ss03' */
287 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = 0x34307373, /* 'ss04' */
288 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = 0x35307373, /* 'ss05' */
289 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = 0x36307373, /* 'ss06' */
290 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = 0x37307373, /* 'ss07' */
291 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = 0x38307373, /* 'ss08' */
292 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = 0x39307373, /* 'ss09' */
293 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = 0x30317373, /* 'ss10' */
294 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = 0x31317373, /* 'ss11' */
295 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = 0x32317373, /* 'ss12' */
296 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = 0x33317373, /* 'ss13' */
297 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = 0x34317373, /* 'ss14' */
298 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = 0x35317373, /* 'ss15' */
299 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = 0x36317373, /* 'ss16' */
300 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = 0x37317373, /* 'ss17' */
301 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = 0x38317373, /* 'ss18' */
302 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = 0x39317373, /* 'ss19' */
303 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = 0x30327373, /* 'ss20' */
304 DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = 0x73627573, /* 'subs' */
305 DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = 0x73707573, /* 'sups' */
306 DWRITE_FONT_FEATURE_TAG_SWASH = 0x68737773, /* 'swsh' */
307 DWRITE_FONT_FEATURE_TAG_TITLING = 0x6c746974, /* 'titl' */
308 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = 0x6d616e74, /* 'tnam' */
309 DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = 0x6d756e74, /* 'tnum' */
310 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = 0x64617274, /* 'trad' */
311 DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = 0x64697774, /* 'twid' */
312 DWRITE_FONT_FEATURE_TAG_UNICASE = 0x63696e75, /* 'unic' */
313 DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING = 0x74726576, /* 'vert' */
314 DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION= 0x32747276, /* 'vrt2' */
315 DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = 0x6f72657a, /* 'zero' */
316 } DWRITE_FONT_FEATURE_TAG;
318 typedef enum DWRITE_SCRIPT_SHAPES
320 DWRITE_SCRIPT_SHAPES_DEFAULT = 0,
321 DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1
322 } DWRITE_SCRIPT_SHAPES;
324 typedef enum DWRITE_NUMBER_SUBSTITUTION_METHOD
326 DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE,
327 DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL,
328 DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE,
329 DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL,
330 DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL
331 } DWRITE_NUMBER_SUBSTITUTION_METHOD;
333 cpp_quote("#define DWRITE_ALPHA_MAX 255")
335 typedef enum DWRITE_TEXTURE_TYPE
337 DWRITE_TEXTURE_ALIASED_1x1,
338 DWRITE_TEXTURE_CLEARTYPE_3x1
339 } DWRITE_TEXTURE_TYPE;
341 typedef struct DWRITE_FONT_METRICS
343 UINT16 designUnitsPerEm;
344 UINT16 ascent;
345 UINT16 descent;
346 INT16 lineGap;
347 UINT16 capHeight;
348 UINT16 xHeight;
349 INT16 underlinePosition;
350 UINT16 underlineThickness;
351 INT16 strikethroughPosition;
352 UINT16 strikethroughThickness;
353 } DWRITE_FONT_METRICS;
355 typedef struct DWRITE_GLYPH_METRICS
357 INT32 leftSideBearing;
358 UINT32 advanceWidth;
359 INT32 rightSideBearing;
360 INT32 topSideBearing;
361 UINT32 advanceHeight;
362 INT32 bottomSideBearing;
363 INT32 verticalOriginY;
364 } DWRITE_GLYPH_METRICS;
366 typedef struct DWRITE_GLYPH_OFFSET
368 FLOAT advanceOffset;
369 FLOAT ascenderOffset;
370 } DWRITE_GLYPH_OFFSET;
372 typedef struct DWRITE_MATRIX
374 FLOAT m11;
375 FLOAT m12;
376 FLOAT m21;
377 FLOAT m22;
378 FLOAT dx;
379 FLOAT dy;
380 } DWRITE_MATRIX;
382 typedef struct DWRITE_TRIMMING
384 DWRITE_TRIMMING_GRANULARITY granularity;
385 UINT32 delimiter;
386 UINT32 delimiterCount;
387 } DWRITE_TRIMMING;
389 cpp_quote("#ifndef __d2d1_h__")
390 typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
391 cpp_quote("#endif /* __d2d1_h__ */")
393 struct DWRITE_GLYPH_RUN
395 IDWriteFontFace* fontFace;
396 FLOAT fontEmSize;
397 UINT32 glyphCount;
398 UINT16 const* glyphIndices;
399 FLOAT const* glyphAdvances;
400 DWRITE_GLYPH_OFFSET const* glyphOffsets;
401 BOOL isSideways;
402 UINT32 bidiLevel;
405 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION
407 WCHAR const* localeName;
408 WCHAR const* string;
409 UINT32 stringLength;
410 UINT16 const* clusterMap;
411 UINT32 textPosition;
412 } DWRITE_GLYPH_RUN_DESCRIPTION;
414 typedef struct DWRITE_UNDERLINE
416 FLOAT width;
417 FLOAT thickness;
418 FLOAT offset;
419 FLOAT runHeight;
420 DWRITE_READING_DIRECTION readingDirection;
421 DWRITE_FLOW_DIRECTION flowDirection;
422 WCHAR const* localeName;
423 DWRITE_MEASURING_MODE measuringMode;
424 } DWRITE_UNDERLINE;
426 typedef struct DWRITE_STRIKETHROUGH
428 FLOAT width;
429 FLOAT thickness;
430 FLOAT offset;
431 DWRITE_READING_DIRECTION readingDirection;
432 DWRITE_FLOW_DIRECTION flowDirection;
433 WCHAR const* localeName;
434 DWRITE_MEASURING_MODE measuringMode;
435 } DWRITE_STRIKETHROUGH;
437 typedef struct DWRITE_INLINE_OBJECT_METRICS
439 FLOAT width;
440 FLOAT height;
441 FLOAT baseline;
442 BOOL supportsSideways;
443 } DWRITE_INLINE_OBJECT_METRICS;
445 typedef struct DWRITE_OVERHANG_METRICS
447 FLOAT left;
448 FLOAT top;
449 FLOAT right;
450 FLOAT bottom;
451 } DWRITE_OVERHANG_METRICS;
453 typedef struct DWRITE_FONT_FEATURE
455 DWRITE_FONT_FEATURE_TAG nameTag;
456 UINT32 parameter;
457 } DWRITE_FONT_FEATURE;
459 typedef struct DWRITE_TEXT_RANGE
461 UINT32 startPosition;
462 UINT32 length;
463 } DWRITE_TEXT_RANGE;
465 typedef struct DWRITE_LINE_METRICS
467 UINT32 length;
468 UINT32 trailingWhitespaceLength;
469 UINT32 newlineLength;
470 FLOAT height;
471 FLOAT baseline;
472 BOOL isTrimmed;
473 } DWRITE_LINE_METRICS;
475 typedef struct DWRITE_TEXT_METRICS
477 FLOAT left;
478 FLOAT top;
479 FLOAT width;
480 FLOAT widthIncludingTrailingWhitespace;
481 FLOAT height;
482 FLOAT layoutWidth;
483 FLOAT layoutHeight;
484 UINT32 maxBidiReorderingDepth;
485 UINT32 lineCount;
486 } DWRITE_TEXT_METRICS;
488 typedef struct DWRITE_CLUSTER_METRICS
490 FLOAT width;
491 UINT16 length;
492 UINT16 canWrapLineAfter : 1;
493 UINT16 isWhitespace : 1;
494 UINT16 isNewline : 1;
495 UINT16 isSoftHyphen : 1;
496 UINT16 isRightToLeft : 1;
497 UINT16 padding : 11;
498 } DWRITE_CLUSTER_METRICS;
500 typedef struct DWRITE_HIT_TEST_METRICS
502 UINT32 textPosition;
503 UINT32 length;
504 FLOAT left;
505 FLOAT top;
506 FLOAT width;
507 FLOAT height;
508 UINT32 bidiLevel;
509 BOOL isText;
510 BOOL isTrimmed;
511 } DWRITE_HIT_TEST_METRICS;
513 typedef struct DWRITE_SCRIPT_ANALYSIS
515 UINT16 script;
516 DWRITE_SCRIPT_SHAPES shapes;
517 } DWRITE_SCRIPT_ANALYSIS;
519 typedef struct DWRITE_LINE_BREAKPOINT
521 UINT8 breakConditionBefore : 2;
522 UINT8 breakConditionAfter : 2;
523 UINT8 isWhitespace : 1;
524 UINT8 isSoftHyphen : 1;
525 UINT8 padding : 2;
526 } DWRITE_LINE_BREAKPOINT;
528 typedef struct DWRITE_TYPOGRAPHIC_FEATURES
530 DWRITE_FONT_FEATURE* features;
531 UINT32 featureCount;
532 } DWRITE_TYPOGRAPHIC_FEATURES;
534 typedef struct DWRITE_SHAPING_TEXT_PROPERTIES
536 UINT16 isShapedAlone : 1;
537 UINT16 reserved : 15;
538 } DWRITE_SHAPING_TEXT_PROPERTIES;
540 typedef struct DWRITE_SHAPING_GLYPH_PROPERTIES
542 UINT16 justification : 4;
543 UINT16 isClusterStart : 1;
544 UINT16 isDiacritic : 1;
545 UINT16 isZeroWidthSpace : 1;
546 UINT16 reserved : 9;
547 } DWRITE_SHAPING_GLYPH_PROPERTIES;
550 local,
551 object,
552 uuid(6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0)
554 interface IDWriteFontFileStream : IUnknown
556 HRESULT ReadFileFragment(
557 void const **fragment_start,
558 UINT64 offset,
559 UINT64 fragment_size,
560 void **fragment_context);
562 void ReleaseFileFragment(void *fragment_context);
563 HRESULT GetFileSize(UINT64 *size);
564 HRESULT GetLastWriteTime(UINT64 *last_writetime);
568 local,
569 object,
570 uuid(727cad4e-d6af-4c9e-8a08-d695b11caa49)
572 interface IDWriteFontFileLoader : IUnknown
574 HRESULT CreateStreamFromKey(
575 void const *key,
576 UINT32 key_size,
577 IDWriteFontFileStream **stream);
581 local,
582 object,
583 uuid(b2d9f3ec-c9fe-4a11-a2ec-d86208f7c0a2)
585 interface IDWriteLocalFontFileLoader : IDWriteFontFileLoader
587 HRESULT GetFilePathLengthFromKey(void const *key, UINT32 key_size, UINT32 *length);
588 HRESULT GetFilePathFromKey(void const *key, UINT32 key_size, WCHAR *path, UINT32 length);
589 HRESULT GetLastWriteTimeFromKey(void const *key, UINT32 key_size, FILETIME *writetime);
593 local,
594 object,
595 uuid(739d886a-cef5-47dc-8769-1a8b41bebbb0)
597 interface IDWriteFontFile : IUnknown
599 HRESULT GetReferenceKey(
600 void const **key,
601 UINT32 *key_size);
603 HRESULT GetLoader(IDWriteFontFileLoader **loader);
605 HRESULT Analyze(
606 BOOL *is_supported_fonttype,
607 DWRITE_FONT_FILE_TYPE *file_type,
608 DWRITE_FONT_FACE_TYPE *face_type,
609 UINT32 *faces_num);
613 local,
614 object,
615 uuid(72755049-5ff7-435d-8348-4be97cfa6c7c)
617 interface IDWriteFontFileEnumerator : IUnknown
619 HRESULT MoveNext(BOOL *has_current_file);
620 HRESULT GetCurrentFontFile(IDWriteFontFile **font_file);
624 local,
625 object,
626 uuid(cca920e4-52f0-492b-bfa8-29c72ee0a468)
628 interface IDWriteFontCollectionLoader : IUnknown
630 HRESULT CreateEnumeratorFromKey(
631 IDWriteFactory* factory,
632 void const* key,
633 UINT32 key_size,
634 IDWriteFontFileEnumerator **enumerator);
638 local,
639 object,
640 uuid(08256209-099a-4b34-b86d-c22b110e7771)
642 interface IDWriteLocalizedStrings : IUnknown
644 UINT32 GetCount();
646 HRESULT FindLocaleName(
647 WCHAR const *locale_name,
648 UINT32 *index,
649 BOOL *exists);
651 HRESULT GetLocaleNameLength(UINT32 index, UINT32 *length);
652 HRESULT GetLocaleName(UINT32 index, WCHAR *locale_name, UINT32 size);
653 HRESULT GetStringLength(UINT32 index, UINT32 *length);
654 HRESULT GetString(UINT32 index, WCHAR *buffer, UINT32 size);
658 local,
659 object,
660 uuid(2f0da53a-2add-47cd-82ee-d9ec34688e75)
662 interface IDWriteRenderingParams : IUnknown
664 FLOAT GetGamma();
665 FLOAT GetEnhancedContrast();
666 FLOAT GetClearTypeLevel();
667 DWRITE_PIXEL_GEOMETRY GetPixelGeometry();
668 DWRITE_RENDERING_MODE GetRenderingMode();
672 local,
673 object,
674 uuid(5f49804d-7024-4d43-bfa9-d25984f53849)
676 interface IDWriteFontFace : IUnknown
678 DWRITE_FONT_FACE_TYPE GetType();
679 HRESULT GetFiles(UINT32 *number_of_files, IDWriteFontFile **fontfiles);
680 UINT32 GetIndex();
681 DWRITE_FONT_SIMULATIONS GetSimulations();
682 BOOL IsSymbolFont();
683 void GetMetrics(DWRITE_FONT_METRICS *metrics);
684 UINT16 GetGlyphCount();
686 HRESULT GetDesignGlyphMetrics(
687 UINT16 const *glyph_indices,
688 UINT32 glyph_count,
689 DWRITE_GLYPH_METRICS *metrics,
690 [defaultvalue(FALSE)] BOOL is_sideways);
692 HRESULT GetGlyphIndices(
693 UINT32 const *codepoints,
694 UINT32 count,
695 UINT16 *glyph_indices);
697 HRESULT TryGetFontTable(
698 UINT32 table_tag,
699 const void **table_data,
700 UINT32 *table_size,
701 void **context,
702 BOOL *exists);
704 void ReleaseFontTable(void *table_context);
706 HRESULT GetGlyphRunOutline(
707 FLOAT emSize,
708 UINT16 const *glyph_indices,
709 FLOAT const* glyph_advances,
710 DWRITE_GLYPH_OFFSET const *glyph_offsets,
711 UINT32 glyph_count,
712 BOOL is_sideways,
713 BOOL is_rtl,
714 IDWriteGeometrySink *geometrysink);
716 HRESULT GetRecommendedRenderingMode(
717 FLOAT emSize,
718 FLOAT pixels_per_dip,
719 DWRITE_MEASURING_MODE mode,
720 IDWriteRenderingParams* params,
721 DWRITE_RENDERING_MODE* rendering_mode);
723 HRESULT GetGdiCompatibleMetrics(
724 FLOAT emSize,
725 FLOAT pixels_per_dip,
726 DWRITE_MATRIX const *transform,
727 DWRITE_FONT_METRICS *metrics);
729 HRESULT GetGdiCompatibleGlyphMetrics(
730 FLOAT emSize,
731 FLOAT pixels_per_dip,
732 DWRITE_MATRIX const *transform,
733 BOOL use_gdi_natural,
734 UINT16 const *glyph_indices,
735 UINT32 glyph_count,
736 DWRITE_GLYPH_METRICS *metrics,
737 [defaultvalue(FALSE)] BOOL is_sideways);
741 local,
742 object,
743 uuid(acd16696-8c14-4f5d-877e-fe3fc1d32737)
745 interface IDWriteFont : IUnknown
747 HRESULT GetFontFamily(IDWriteFontFamily **family);
748 DWRITE_FONT_WEIGHT GetWeight();
749 DWRITE_FONT_STRETCH GetStretch();
750 DWRITE_FONT_STYLE GetStyle();
751 BOOL IsSymbolFont();
753 HRESULT GetFaceNames(IDWriteLocalizedStrings **names);
754 HRESULT GetInformationalStrings(
755 DWRITE_INFORMATIONAL_STRING_ID stringid,
756 IDWriteLocalizedStrings **strings,
757 BOOL *exists);
759 DWRITE_FONT_SIMULATIONS GetSimulations();
760 void GetMetrics(DWRITE_FONT_METRICS *metrics);
761 HRESULT HasCharacter(UINT32 value, BOOL *exists);
762 HRESULT CreateFontFace(IDWriteFontFace **face);
766 local,
767 object,
768 uuid(1a0d8438-1d97-4ec1-aef9-a2fb86ed6acb)
770 interface IDWriteFontList : IUnknown
772 HRESULT GetFontCollection(IDWriteFontCollection **collection);
773 UINT32 GetFontCount();
774 HRESULT GetFont(UINT32 index, IDWriteFont **font);
778 local,
779 object,
780 uuid(da20d8ef-812a-4c43-9802-62ec4abd7add)
782 interface IDWriteFontFamily : IDWriteFontList
784 HRESULT GetFamilyNames(IDWriteLocalizedStrings **names);
786 HRESULT GetFirstMatchingFont(
787 DWRITE_FONT_WEIGHT weight,
788 DWRITE_FONT_STRETCH stretch,
789 DWRITE_FONT_STYLE style,
790 IDWriteFont **font);
792 HRESULT GetMatchingFonts(
793 DWRITE_FONT_WEIGHT weight,
794 DWRITE_FONT_STRETCH stretch,
795 DWRITE_FONT_STYLE style,
796 IDWriteFontList **fonts);
800 local,
801 object,
802 uuid(a84cee02-3eea-4eee-a827-87c1a02a0fcc)
804 interface IDWriteFontCollection : IUnknown
806 UINT32 GetFontFamilyCount();
807 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily **family);
808 HRESULT FindFamilyName(WCHAR const *name, UINT32 *index, BOOL *exists);
809 HRESULT GetFontFromFontFace(IDWriteFontFace *face, IDWriteFont **font);
813 local,
814 object,
815 uuid(eaf3a2da-ecf4-4d24-b644-b34f6842024b)
817 interface IDWritePixelSnapping : IUnknown
819 HRESULT IsPixelSnappingDisabled(
820 void *client_drawingcontext,
821 BOOL *disabled);
823 HRESULT GetCurrentTransform(
824 void *client_drawingcontext,
825 DWRITE_MATRIX *transform);
827 HRESULT GetPixelsPerDip(
828 void *client_drawingcontext,
829 FLOAT *pixels_per_dip);
833 local,
834 object,
835 uuid(ef8a8135-5cc6-45fe-8825-c5a0724eb819)
837 interface IDWriteTextRenderer : IDWritePixelSnapping
839 HRESULT DrawGlyphRun(
840 void* client_drawingcontext,
841 FLOAT baselineOriginX,
842 FLOAT baselineOriginY,
843 DWRITE_MEASURING_MODE mode,
844 DWRITE_GLYPH_RUN const *glyph_run,
845 DWRITE_GLYPH_RUN_DESCRIPTION const *run_descr,
846 IUnknown *drawing_effect);
848 HRESULT DrawUnderline(
849 void *client_drawingcontext,
850 FLOAT baselineOriginX,
851 FLOAT baselineOriginY,
852 DWRITE_UNDERLINE const* underline,
853 IUnknown *drawing_effect);
855 HRESULT DrawStrikethrough(
856 void *client_drawingcontext,
857 FLOAT baselineOriginX,
858 FLOAT baselineOriginY,
859 DWRITE_STRIKETHROUGH const* strikethrough,
860 IUnknown *drawing_effect);
862 HRESULT DrawInlineObject(
863 void *client_drawingcontext,
864 FLOAT originX,
865 FLOAT originY,
866 IDWriteInlineObject *object,
867 BOOL is_sideways,
868 BOOL is_rtl,
869 IUnknown *drawing_effect);
873 local,
874 object,
875 uuid(8339fde3-106f-47ab-8373-1c6295eb10b3)
877 interface IDWriteInlineObject : IUnknown
879 HRESULT Draw(
880 void* client_drawingontext,
881 IDWriteTextRenderer* renderer,
882 FLOAT originX,
883 FLOAT originY,
884 BOOL is_sideways,
885 BOOL is_rtl,
886 IUnknown *drawing_effect);
888 HRESULT GetMetrics(DWRITE_INLINE_OBJECT_METRICS *metrics);
889 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
890 HRESULT GetBreakConditions(
891 DWRITE_BREAK_CONDITION* condition_before,
892 DWRITE_BREAK_CONDITION* condition_after);
896 local,
897 object,
898 uuid(9c906818-31d7-4fd3-a151-7c5e225db55a)
900 interface IDWriteTextFormat : IUnknown
902 HRESULT SetTextAlignment(DWRITE_TEXT_ALIGNMENT alignment);
903 HRESULT SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT alignment);
904 HRESULT SetWordWrapping(DWRITE_WORD_WRAPPING wrapping);
905 HRESULT SetReadingDirection(DWRITE_READING_DIRECTION direction);
906 HRESULT SetFlowDirection(DWRITE_FLOW_DIRECTION direction);
907 HRESULT SetIncrementalTabStop(FLOAT tabstop);
908 HRESULT SetTrimming(DWRITE_TRIMMING const *trimming, IDWriteInlineObject *trimming_sign);
909 HRESULT SetLineSpacing(DWRITE_LINE_SPACING_METHOD spacing, FLOAT line_spacing, FLOAT baseline);
910 DWRITE_TEXT_ALIGNMENT GetTextAlignment();
911 DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment();
912 DWRITE_WORD_WRAPPING GetWordWrapping();
913 DWRITE_READING_DIRECTION GetReadingDirection();
914 DWRITE_FLOW_DIRECTION GetFlowDirection();
915 FLOAT GetIncrementalTabStop();
916 HRESULT GetTrimming(DWRITE_TRIMMING *options, IDWriteInlineObject **trimming_sign);
918 HRESULT GetLineSpacing(
919 DWRITE_LINE_SPACING_METHOD *method,
920 FLOAT *spacing,
921 FLOAT *baseline);
923 HRESULT GetFontCollection(IDWriteFontCollection **collection);
924 UINT32 GetFontFamilyNameLength();
925 HRESULT GetFontFamilyName(WCHAR *name, UINT32 size);
926 DWRITE_FONT_WEIGHT GetFontWeight();
927 DWRITE_FONT_STYLE GetFontStyle();
928 DWRITE_FONT_STRETCH GetFontStretch();
929 FLOAT GetFontSize();
930 UINT32 GetLocaleNameLength();
931 HRESULT GetLocaleName(WCHAR *name, UINT32 size);
935 local,
936 object,
937 uuid(55f1112b-1dc2-4b3c-9541-f46894ed85b6)
939 interface IDWriteTypography : IUnknown
941 HRESULT AddFontFeature(DWRITE_FONT_FEATURE feature);
942 UINT32 GetFontFeatureCount();
943 HRESULT GetFontFeature(UINT32 index, DWRITE_FONT_FEATURE *feature);
947 local,
948 object,
949 uuid(5e5a32a3-8dff-4773-9ff6-0696eab77267)
951 interface IDWriteBitmapRenderTarget : IUnknown
953 HRESULT DrawGlyphRun(
954 FLOAT baselineOriginX,
955 FLOAT baselineOriginY,
956 DWRITE_MEASURING_MODE measuring_mode,
957 DWRITE_GLYPH_RUN const* glyph_run,
958 IDWriteRenderingParams* params,
959 COLORREF textColor,
960 [defaultvalue(NULL)] RECT *blackbox_rect);
962 HDC GetMemoryDC();
963 FLOAT GetPixelsPerDip();
964 HRESULT SetPixelsPerDip(FLOAT pixels_per_dip);
965 HRESULT GetCurrentTransform(DWRITE_MATRIX *transform);
966 HRESULT SetCurrentTransform(DWRITE_MATRIX const *transform);
967 HRESULT GetSize(SIZE *size);
968 HRESULT Resize(UINT32 width, UINT32 height);
971 cpp_quote("#ifndef _WINGDI_")
972 /* already defined in wingdi.h but needed for WIDL */
973 #define LF_FACESIZE 32
975 typedef struct tagLOGFONTW
977 LONG lfHeight;
978 LONG lfWidth;
979 LONG lfEscapement;
980 LONG lfOrientation;
981 LONG lfWeight;
982 BYTE lfItalic;
983 BYTE lfUnderline;
984 BYTE lfStrikeOut;
985 BYTE lfCharSet;
986 BYTE lfOutPrecision;
987 BYTE lfClipPrecision;
988 BYTE lfQuality;
989 BYTE lfPitchAndFamily;
990 WCHAR lfFaceName[LF_FACESIZE];
991 } LOGFONTW, *PLOGFONTW, *LPLOGFONTW;
992 cpp_quote("#endif /* _WINGDI_ */")
995 local,
996 object,
997 uuid(1edd9491-9853-4299-898f-6432983b6f3a)
999 interface IDWriteGdiInterop : IUnknown
1001 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont, IDWriteFont **font);
1002 HRESULT ConvertFontToLOGFONT(
1003 IDWriteFont* font,
1004 LOGFONTW* logfont,
1005 BOOL *is_systemfont);
1007 HRESULT ConvertFontFaceToLOGFONT(IDWriteFontFace* font, LOGFONTW* logfont);
1008 HRESULT CreateFontFaceFromHdc(HDC hdc, IDWriteFontFace **fontface);
1009 HRESULT CreateBitmapRenderTarget(HDC hdc, UINT32 width, UINT32 height, IDWriteBitmapRenderTarget **target);
1013 local,
1014 object,
1015 uuid(53737037-6d14-410b-9bfe-0b182bb70961)
1017 interface IDWriteTextLayout : IDWriteTextFormat
1019 HRESULT SetMaxWidth(FLOAT maxWidth);
1020 HRESULT SetMaxHeight(FLOAT maxHeight);
1021 HRESULT SetFontCollection(IDWriteFontCollection* collection, DWRITE_TEXT_RANGE range);
1022 HRESULT SetFontFamilyName(WCHAR const *name, DWRITE_TEXT_RANGE range);
1023 HRESULT SetFontWeight(DWRITE_FONT_WEIGHT weight, DWRITE_TEXT_RANGE range);
1024 HRESULT SetFontStyle(DWRITE_FONT_STYLE style, DWRITE_TEXT_RANGE range);
1025 HRESULT SetFontStretch(DWRITE_FONT_STRETCH stretch, DWRITE_TEXT_RANGE range);
1026 HRESULT SetFontSize(FLOAT size, DWRITE_TEXT_RANGE range);
1027 HRESULT SetUnderline(BOOL underline, DWRITE_TEXT_RANGE range);
1028 HRESULT SetStrikethrough(BOOL strikethrough, DWRITE_TEXT_RANGE range);
1029 HRESULT SetDrawingEffect(IUnknown* effect, DWRITE_TEXT_RANGE range);
1030 HRESULT SetInlineObject(IDWriteInlineObject *object, DWRITE_TEXT_RANGE range);
1031 HRESULT SetTypography(IDWriteTypography* typography, DWRITE_TEXT_RANGE range);
1032 HRESULT SetLocaleName(WCHAR const* locale, DWRITE_TEXT_RANGE range);
1034 FLOAT GetMaxWidth();
1035 FLOAT GetMaxHeight();
1036 HRESULT GetFontCollection(
1037 UINT32 pos,
1038 IDWriteFontCollection** collection,
1039 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1041 HRESULT GetFontFamilyNameLength(
1042 UINT32 pos,
1043 UINT32* len,
1044 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1046 HRESULT GetFontFamilyName(
1047 UINT32 position,
1048 WCHAR* name,
1049 UINT32 name_size,
1050 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1052 HRESULT GetFontWeight(
1053 UINT32 position,
1054 DWRITE_FONT_WEIGHT *weight,
1055 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1057 HRESULT GetFontStyle(
1058 UINT32 currentPosition,
1059 DWRITE_FONT_STYLE *style,
1060 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1062 HRESULT GetFontStretch(
1063 UINT32 position,
1064 DWRITE_FONT_STRETCH *stretch,
1065 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1067 HRESULT GetFontSize(
1068 UINT32 position,
1069 FLOAT *size,
1070 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1072 HRESULT GetUnderline(
1073 UINT32 position,
1074 BOOL *has_underline,
1075 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1077 HRESULT GetStrikethrough(
1078 UINT32 position,
1079 BOOL *has_strikethrough,
1080 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1082 HRESULT GetDrawingEffect(
1083 UINT32 position,
1084 IUnknown **effect,
1085 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1087 HRESULT GetInlineObject(
1088 UINT32 position,
1089 IDWriteInlineObject **object,
1090 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1092 HRESULT GetTypography(
1093 UINT32 position,
1094 IDWriteTypography** typography,
1095 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1097 HRESULT GetLocaleNameLength(
1098 UINT32 position,
1099 UINT32* length,
1100 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1102 HRESULT GetLocaleName(
1103 UINT32 position,
1104 WCHAR* name,
1105 UINT32 name_size,
1106 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1108 HRESULT Draw(
1109 void *context,
1110 IDWriteTextRenderer* renderer,
1111 FLOAT originX,
1112 FLOAT originY);
1114 HRESULT GetLineMetrics(
1115 DWRITE_LINE_METRICS *metrics,
1116 UINT32 max_count,
1117 UINT32 *actual_count);
1119 HRESULT GetMetrics(DWRITE_TEXT_METRICS *metrics);
1120 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
1121 HRESULT GetClusterMetrics(
1122 DWRITE_CLUSTER_METRICS *metrics,
1123 UINT32 max_count,
1124 UINT32* act_count);
1126 HRESULT DetermineMinWidth(FLOAT* min_width);
1127 HRESULT HitTestPoint(
1128 FLOAT pointX,
1129 FLOAT pointY,
1130 BOOL* is_trailinghit,
1131 BOOL* is_inside,
1132 DWRITE_HIT_TEST_METRICS *metrics);
1134 HRESULT HitTestTextPosition(
1135 UINT32 textPosition,
1136 BOOL is_trailinghit,
1137 FLOAT* pointX,
1138 FLOAT* pointY,
1139 DWRITE_HIT_TEST_METRICS *metrics);
1141 HRESULT HitTestTextRange(
1142 UINT32 textPosition,
1143 UINT32 textLength,
1144 FLOAT originX,
1145 FLOAT originY,
1146 DWRITE_HIT_TEST_METRICS *metrics,
1147 UINT32 max_metricscount,
1148 UINT32* actual_metricscount);
1152 local,
1153 object,
1154 uuid(14885cc9-bab0-4f90-b6ed-5c366a2cd03d)
1156 interface IDWriteNumberSubstitution : IUnknown
1161 local,
1162 object,
1163 uuid(688e1a58-5094-47c8-adc8-fbcea60ae92b)
1165 interface IDWriteTextAnalysisSource : IUnknown
1167 HRESULT GetTextAtPosition(
1168 UINT32 position,
1169 WCHAR const** text,
1170 UINT32* text_len);
1172 HRESULT GetTextBeforePosition(
1173 UINT32 position,
1174 WCHAR const** text,
1175 UINT32* text_len);
1177 DWRITE_READING_DIRECTION GetParagraphReadingDirection();
1178 HRESULT GetLocaleName(
1179 UINT32 position,
1180 UINT32* text_len,
1181 WCHAR const** locale);
1183 HRESULT GetNumberSubstitution(
1184 UINT32 position,
1185 UINT32* text_len,
1186 IDWriteNumberSubstitution **substitution);
1190 local,
1191 object,
1192 uuid(5810cd44-0ca0-4701-b3fa-bec5182ae4f6)
1194 interface IDWriteTextAnalysisSink : IUnknown
1196 HRESULT SetScriptAnalysis(
1197 UINT32 position,
1198 UINT32 length,
1199 DWRITE_SCRIPT_ANALYSIS const* scriptanalysis);
1201 HRESULT SetLineBreakpoints(
1202 UINT32 position,
1203 UINT32 length,
1204 DWRITE_LINE_BREAKPOINT const* breakpoints);
1206 HRESULT SetBidiLevel(
1207 UINT32 position,
1208 UINT32 length,
1209 UINT8 explicitLevel,
1210 UINT8 resolvedLevel);
1212 HRESULT SetNumberSubstitution(
1213 UINT32 position,
1214 UINT32 length,
1215 IDWriteNumberSubstitution* substitution);
1219 local,
1220 object,
1221 uuid(b7e6163e-7f46-43b4-84b3-e4e6249c365d)
1223 interface IDWriteTextAnalyzer : IUnknown
1225 HRESULT AnalyzeScript(
1226 IDWriteTextAnalysisSource* source,
1227 UINT32 position,
1228 UINT32 length,
1229 IDWriteTextAnalysisSink* sink);
1231 HRESULT AnalyzeBidi(
1232 IDWriteTextAnalysisSource* source,
1233 UINT32 position,
1234 UINT32 length,
1235 IDWriteTextAnalysisSink* sink);
1237 HRESULT AnalyzeNumberSubstitution(
1238 IDWriteTextAnalysisSource* source,
1239 UINT32 position,
1240 UINT32 length,
1241 IDWriteTextAnalysisSink* sink);
1243 HRESULT AnalyzeLineBreakpoints(
1244 IDWriteTextAnalysisSource* source,
1245 UINT32 position,
1246 UINT32 length,
1247 IDWriteTextAnalysisSink* sink);
1249 HRESULT GetGlyphs(
1250 WCHAR const* text,
1251 UINT32 length,
1252 IDWriteFontFace* font_face,
1253 BOOL is_sideways,
1254 BOOL is_rtl,
1255 DWRITE_SCRIPT_ANALYSIS const* analysis,
1256 WCHAR const* locale,
1257 IDWriteNumberSubstitution* substitution,
1258 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1259 UINT32 const* feature_range_len,
1260 UINT32 feature_ranges,
1261 UINT32 max_glyph_count,
1262 UINT16* clustermap,
1263 DWRITE_SHAPING_TEXT_PROPERTIES* text_props,
1264 UINT16* glyph_indices,
1265 DWRITE_SHAPING_GLYPH_PROPERTIES* glyph_props,
1266 UINT32* actual_glyph_count);
1268 HRESULT GetGlyphPlacements(
1269 WCHAR const* text,
1270 UINT16 const* clustermap,
1271 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1272 UINT32 text_len,
1273 UINT16 const* glyph_indices,
1274 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1275 UINT32 glyph_count,
1276 IDWriteFontFace * font_face,
1277 FLOAT fontEmSize,
1278 BOOL is_sideways,
1279 BOOL is_rtl,
1280 DWRITE_SCRIPT_ANALYSIS const* analysis,
1281 WCHAR const* locale,
1282 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1283 UINT32 const* feature_range_len,
1284 UINT32 feature_ranges,
1285 FLOAT* glyph_advances,
1286 DWRITE_GLYPH_OFFSET* glyph_offsets);
1288 HRESULT GetGdiCompatibleGlyphPlacements(
1289 WCHAR const* text,
1290 UINT16 const* clustermap,
1291 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1292 UINT32 text_len,
1293 UINT16 const* glyph_indices,
1294 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1295 UINT32 glyph_count,
1296 IDWriteFontFace * font_face,
1297 FLOAT fontEmSize,
1298 FLOAT pixels_per_dip,
1299 DWRITE_MATRIX const* transform,
1300 BOOL use_gdi_natural,
1301 BOOL is_sideways,
1302 BOOL is_rtl,
1303 DWRITE_SCRIPT_ANALYSIS const* analysis,
1304 WCHAR const* locale,
1305 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1306 UINT32 const* feature_range_lengths,
1307 UINT32 feature_ranges,
1308 FLOAT* glyph_advances,
1309 DWRITE_GLYPH_OFFSET* glyph_offsets);
1313 local,
1314 object,
1315 uuid(7d97dbf7-e085-42d4-81e3-6a883bded118)
1317 interface IDWriteGlyphRunAnalysis : IUnknown
1319 HRESULT GetAlphaTextureBounds(DWRITE_TEXTURE_TYPE type, RECT* bounds);
1320 HRESULT CreateAlphaTexture(DWRITE_TEXTURE_TYPE type, RECT const* bounds, BYTE* alphaValues, UINT32 bufferSize);
1321 HRESULT GetAlphaBlendParams(
1322 IDWriteRenderingParams* renderingParams,
1323 FLOAT* blendGamma,
1324 FLOAT* blendEnhancedContrast,
1325 FLOAT* blendClearTypeLevel);
1329 local,
1330 object,
1331 uuid(b859ee5a-d838-4b5b-a2e8-1adc7d93db48)
1333 interface IDWriteFactory : IUnknown
1335 HRESULT GetSystemFontCollection(IDWriteFontCollection **collection,
1336 [defaultvalue(FALSE)] BOOL check_for_updates);
1338 HRESULT CreateCustomFontCollection(
1339 IDWriteFontCollectionLoader *loader,
1340 void const *key,
1341 UINT32 key_size,
1342 IDWriteFontCollection **collection);
1344 HRESULT RegisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1346 HRESULT UnregisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1348 HRESULT CreateFontFileReference(
1349 WCHAR const *path,
1350 FILETIME const *writetime,
1351 IDWriteFontFile **font_file);
1353 HRESULT CreateCustomFontFileReference(
1354 void const *reference_key,
1355 UINT32 key_size,
1356 IDWriteFontFileLoader *loader,
1357 IDWriteFontFile **font_file);
1359 HRESULT CreateFontFace(
1360 DWRITE_FONT_FACE_TYPE facetype,
1361 UINT32 files_number,
1362 IDWriteFontFile* const* font_files,
1363 UINT32 index,
1364 DWRITE_FONT_SIMULATIONS sim_flags,
1365 IDWriteFontFace **font_face);
1367 HRESULT CreateRenderingParams(IDWriteRenderingParams **params);
1369 HRESULT CreateMonitorRenderingParams(
1370 HMONITOR monitor,
1371 IDWriteRenderingParams **params);
1373 HRESULT CreateCustomRenderingParams(
1374 FLOAT gamma,
1375 FLOAT enhancedContrast,
1376 FLOAT cleartype_level,
1377 DWRITE_PIXEL_GEOMETRY geometry,
1378 DWRITE_RENDERING_MODE mode,
1379 IDWriteRenderingParams **params);
1381 HRESULT RegisterFontFileLoader(IDWriteFontFileLoader *loader);
1383 HRESULT UnregisterFontFileLoader(IDWriteFontFileLoader *loader);
1385 HRESULT CreateTextFormat(
1386 WCHAR const* family_name,
1387 IDWriteFontCollection *collection,
1388 DWRITE_FONT_WEIGHT weight,
1389 DWRITE_FONT_STYLE style,
1390 DWRITE_FONT_STRETCH stretch,
1391 FLOAT size,
1392 WCHAR const *locale,
1393 IDWriteTextFormat **format);
1395 HRESULT CreateTypography(IDWriteTypography **typography);
1397 HRESULT GetGdiInterop(IDWriteGdiInterop **gdi_interop);
1399 HRESULT CreateTextLayout(
1400 WCHAR const* string,
1401 UINT32 len,
1402 IDWriteTextFormat *format,
1403 FLOAT max_width,
1404 FLOAT max_height,
1405 IDWriteTextLayout **layout);
1407 HRESULT CreateGdiCompatibleTextLayout(
1408 WCHAR const* string,
1409 UINT32 len,
1410 IDWriteTextFormat *format,
1411 FLOAT layout_width,
1412 FLOAT layout_height,
1413 FLOAT pixels_per_dip,
1414 DWRITE_MATRIX const* transform,
1415 BOOL use_gdi_natural,
1416 IDWriteTextLayout **layout);
1418 HRESULT CreateEllipsisTrimmingSign(
1419 IDWriteTextFormat *format,
1420 IDWriteInlineObject **trimming_sign);
1422 HRESULT CreateTextAnalyzer(IDWriteTextAnalyzer **analyzer);
1424 HRESULT CreateNumberSubstitution(
1425 DWRITE_NUMBER_SUBSTITUTION_METHOD method,
1426 WCHAR const* locale,
1427 BOOL ignore_user_override,
1428 IDWriteNumberSubstitution **substitution);
1430 HRESULT CreateGlyphRunAnalysis(
1431 DWRITE_GLYPH_RUN const *glyph_run,
1432 FLOAT pixels_per_dip,
1433 DWRITE_MATRIX const* transform,
1434 DWRITE_RENDERING_MODE rendering_mode,
1435 DWRITE_MEASURING_MODE measuring_mode,
1436 FLOAT baseline_x,
1437 FLOAT baseline_y,
1438 IDWriteGlyphRunAnalysis **analysis);
1441 cpp_quote("HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE,REFIID,IUnknown**);")
1443 /* error codes */
1444 cpp_quote("#define FACILITY_DWRITE 0x898")
1445 cpp_quote("#define DWRITE_ERR_BASE 0x5000")
1446 cpp_quote("#define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code))")
1447 cpp_quote("#define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code)")