shell32: Delay common controls initialization until needed.
[wine.git] / include / dwrite.idl
bloba8bac59d393ea7a0887789b04965462357c6e772
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;
69 typedef enum DWRITE_FONT_WEIGHT
71 DWRITE_FONT_WEIGHT_THIN = 100,
72 DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200,
73 DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200,
74 DWRITE_FONT_WEIGHT_LIGHT = 300,
75 DWRITE_FONT_WEIGHT_NORMAL = 400,
76 DWRITE_FONT_WEIGHT_REGULAR = 400,
77 DWRITE_FONT_WEIGHT_MEDIUM = 500,
78 DWRITE_FONT_WEIGHT_DEMI_BOLD = 600,
79 DWRITE_FONT_WEIGHT_SEMI_BOLD = 600,
80 DWRITE_FONT_WEIGHT_BOLD = 700,
81 DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800,
82 DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800,
83 DWRITE_FONT_WEIGHT_BLACK = 900,
84 DWRITE_FONT_WEIGHT_HEAVY = 900,
85 DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950,
86 DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950
87 } DWRITE_FONT_WEIGHT;
89 typedef enum DWRITE_FONT_STRETCH
91 DWRITE_FONT_STRETCH_UNDEFINED = 0,
92 DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1,
93 DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2,
94 DWRITE_FONT_STRETCH_CONDENSED = 3,
95 DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4,
96 DWRITE_FONT_STRETCH_NORMAL = 5,
97 DWRITE_FONT_STRETCH_MEDIUM = 5,
98 DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6,
99 DWRITE_FONT_STRETCH_EXPANDED = 7,
100 DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8,
101 DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9
102 } DWRITE_FONT_STRETCH;
104 typedef enum DWRITE_FONT_STYLE
106 DWRITE_FONT_STYLE_NORMAL,
107 DWRITE_FONT_STYLE_OBLIQUE,
108 DWRITE_FONT_STYLE_ITALIC
109 } DWRITE_FONT_STYLE;
111 typedef enum DWRITE_INFORMATIONAL_STRING_ID
113 DWRITE_INFORMATIONAL_STRING_NONE,
114 DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE,
115 DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS,
116 DWRITE_INFORMATIONAL_STRING_TRADEMARK,
117 DWRITE_INFORMATIONAL_STRING_MANUFACTURER,
118 DWRITE_INFORMATIONAL_STRING_DESIGNER,
119 DWRITE_INFORMATIONAL_STRING_DESIGNER_URL,
120 DWRITE_INFORMATIONAL_STRING_DESCRIPTION,
121 DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL,
122 DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION,
123 DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL,
124 DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES,
125 DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES,
126 DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES,
127 DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES,
128 DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT
129 } DWRITE_INFORMATIONAL_STRING_ID;
131 typedef enum DWRITE_FONT_SIMULATIONS
133 DWRITE_FONT_SIMULATIONS_NONE = 0x0000,
134 DWRITE_FONT_SIMULATIONS_BOLD = 0x0001,
135 DWRITE_FONT_SIMULATIONS_OBLIQUE = 0x0002
136 } DWRITE_FONT_SIMULATIONS;
138 typedef enum DWRITE_PIXEL_GEOMETRY
140 DWRITE_PIXEL_GEOMETRY_FLAT,
141 DWRITE_PIXEL_GEOMETRY_RGB,
142 DWRITE_PIXEL_GEOMETRY_BGR
143 } DWRITE_PIXEL_GEOMETRY;
145 typedef enum DWRITE_RENDERING_MODE
147 DWRITE_RENDERING_MODE_DEFAULT,
148 DWRITE_RENDERING_MODE_ALIASED,
149 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC,
150 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL,
151 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL,
152 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC,
153 DWRITE_RENDERING_MODE_OUTLINE
154 } DWRITE_RENDERING_MODE;
156 typedef enum DWRITE_TEXT_ALIGNMENT
158 DWRITE_TEXT_ALIGNMENT_LEADING,
159 DWRITE_TEXT_ALIGNMENT_TRAILING,
160 DWRITE_TEXT_ALIGNMENT_CENTER,
161 DWRITE_TEXT_ALIGNMENT_JUSTIFIED
162 } DWRITE_TEXT_ALIGNMENT;
164 typedef enum DWRITE_PARAGRAPH_ALIGNMENT
166 DWRITE_PARAGRAPH_ALIGNMENT_NEAR,
167 DWRITE_PARAGRAPH_ALIGNMENT_FAR,
168 DWRITE_PARAGRAPH_ALIGNMENT_CENTER
169 } DWRITE_PARAGRAPH_ALIGNMENT;
171 typedef enum DWRITE_WORD_WRAPPING
173 DWRITE_WORD_WRAPPING_WRAP,
174 DWRITE_WORD_WRAPPING_NO_WRAP
175 } DWRITE_WORD_WRAPPING;
177 typedef enum DWRITE_READING_DIRECTION
179 DWRITE_READING_DIRECTION_LEFT_TO_RIGHT,
180 DWRITE_READING_DIRECTION_RIGHT_TO_LEFT
181 } DWRITE_READING_DIRECTION;
183 typedef enum DWRITE_FLOW_DIRECTION
185 DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM
186 } DWRITE_FLOW_DIRECTION;
188 typedef enum DWRITE_TRIMMING_GRANULARITY
190 DWRITE_TRIMMING_GRANULARITY_NONE,
191 DWRITE_TRIMMING_GRANULARITY_CHARACTER,
192 DWRITE_TRIMMING_GRANULARITY_WORD
193 } DWRITE_TRIMMING_GRANULARITY;
195 typedef enum DWRITE_BREAK_CONDITION
197 DWRITE_BREAK_CONDITION_NEUTRAL,
198 DWRITE_BREAK_CONDITION_CAN_BREAK,
199 DWRITE_BREAK_CONDITION_MAY_NOT_BREAK,
200 DWRITE_BREAK_CONDITION_MUST_BREAK
201 } DWRITE_BREAK_CONDITION;
203 typedef enum DWRITE_LINE_SPACING_METHOD
205 DWRITE_LINE_SPACING_METHOD_DEFAULT,
206 DWRITE_LINE_SPACING_METHOD_UNIFORM
207 } DWRITE_LINE_SPACING_METHOD;
209 typedef enum DWRITE_FONT_FEATURE_TAG
211 DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661, /* 'afrc' */
212 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = 0x63703263, /* 'c2pc' */
213 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = 0x63733263, /* 'c2sc' */
214 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = 0x746c6163, /* 'calt' */
215 DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = 0x65736163, /* 'case' */
216 DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = 0x706d6363, /* 'ccmp' */
217 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = 0x67696c63, /* 'clig' */
218 DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = 0x70737063, /* 'cpsp' */
219 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = 0x68777363, /* 'cswh' */
220 DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = 0x73727563, /* 'curs' */
221 DWRITE_FONT_FEATURE_TAG_DEFAULT = 0x746c6664, /* 'dflt' */
222 DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = 0x67696c64, /* 'dlig' */
223 DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = 0x74707865, /* 'expt' */
224 DWRITE_FONT_FEATURE_TAG_FRACTIONS = 0x63617266, /* 'frac' */
225 DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = 0x64697766, /* 'fwid' */
226 DWRITE_FONT_FEATURE_TAG_HALF_FORMS = 0x666c6168, /* 'half' */
227 DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = 0x6e6c6168, /* 'haln' */
228 DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = 0x746c6168, /* 'halt' */
229 DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = 0x74736968, /* 'hist' */
230 DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = 0x616e6b68, /* 'hkna' */
231 DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = 0x67696c68, /* 'hlig' */
232 DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = 0x64697768, /* 'hwid' */
233 DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = 0x6f6a6f68, /* 'hojo' */
234 DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = 0x3430706a, /* 'jp04' */
235 DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = 0x3837706a, /* 'jp78' */
236 DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = 0x3338706a, /* 'jp83' */
237 DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = 0x3039706a, /* 'jp90' */
238 DWRITE_FONT_FEATURE_TAG_KERNING = 0x6e72656b, /* 'kern' */
239 DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = 0x6167696c, /* 'liga' */
240 DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = 0x6d756e6c, /* 'lnum' */
241 DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = 0x6c636f6c, /* 'locl' */
242 DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = 0x6b72616d, /* 'mark' */
243 DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = 0x6b72676d, /* 'mgrk' */
244 DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = 0x6b6d6b6d, /* 'mkmk' */
245 DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = 0x746c616e, /* 'nalt' */
246 DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = 0x6b636c6e, /* 'nlck' */
247 DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = 0x6d756e6f, /* 'onum' */
248 DWRITE_FONT_FEATURE_TAG_ORDINALS = 0x6e64726f, /* 'ordn' */
249 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = 0x746c6170, /* 'palt' */
250 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = 0x70616370, /* 'pcap' */
251 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = 0x6d756e70, /* 'pnum' */
252 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = 0x64697770, /* 'pwid' */
253 DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = 0x64697771, /* 'qwid' */
254 DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = 0x67696c72, /* 'rlig' */
255 DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = 0x79627572, /* 'ruby' */
256 DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = 0x746c6173, /* 'salt' */
257 DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = 0x666e6973, /* 'sinf' */
258 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = 0x70636d73, /* 'smcp' */
259 DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = 0x6c706d73, /* 'smpl' */
260 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = 0x31307373, /* 'ss01' */
261 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = 0x32307373, /* 'ss02' */
262 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = 0x33307373, /* 'ss03' */
263 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = 0x34307373, /* 'ss04' */
264 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = 0x35307373, /* 'ss05' */
265 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = 0x36307373, /* 'ss06' */
266 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = 0x37307373, /* 'ss07' */
267 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = 0x38307373, /* 'ss08' */
268 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = 0x39307373, /* 'ss09' */
269 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = 0x30317373, /* 'ss10' */
270 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = 0x31317373, /* 'ss11' */
271 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = 0x32317373, /* 'ss12' */
272 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = 0x33317373, /* 'ss13' */
273 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = 0x34317373, /* 'ss14' */
274 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = 0x35317373, /* 'ss15' */
275 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = 0x36317373, /* 'ss16' */
276 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = 0x37317373, /* 'ss17' */
277 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = 0x38317373, /* 'ss18' */
278 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = 0x39317373, /* 'ss19' */
279 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = 0x30327373, /* 'ss20' */
280 DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = 0x73627573, /* 'subs' */
281 DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = 0x73707573, /* 'sups' */
282 DWRITE_FONT_FEATURE_TAG_SWASH = 0x68737773, /* 'swsh' */
283 DWRITE_FONT_FEATURE_TAG_TITLING = 0x6c746974, /* 'titl' */
284 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = 0x6d616e74, /* 'tnam' */
285 DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = 0x6d756e74, /* 'tnum' */
286 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = 0x64617274, /* 'trad' */
287 DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = 0x64697774, /* 'twid' */
288 DWRITE_FONT_FEATURE_TAG_UNICASE = 0x63696e75, /* 'unic' */
289 DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = 0x6f72657a, /* 'zero' */
290 } DWRITE_FONT_FEATURE_TAG;
292 typedef enum DWRITE_SCRIPT_SHAPES
294 DWRITE_SCRIPT_SHAPES_DEFAULT = 0,
295 DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1
296 } DWRITE_SCRIPT_SHAPES;
298 typedef enum DWRITE_NUMBER_SUBSTITUTION_METHOD
300 DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE,
301 DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL,
302 DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE,
303 DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL,
304 DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL
305 } DWRITE_NUMBER_SUBSTITUTION_METHOD;
307 typedef enum DWRITE_TEXTURE_TYPE
309 DWRITE_TEXTURE_ALIASED_1x1,
310 DWRITE_TEXTURE_CLEARTYPE_3x1
311 } DWRITE_TEXTURE_TYPE;
313 typedef struct DWRITE_FONT_METRICS
315 UINT16 designUnitsPerEm;
316 UINT16 ascent;
317 UINT16 descent;
318 INT16 lineGap;
319 UINT16 capHeight;
320 UINT16 xHeight;
321 INT16 underlinePosition;
322 UINT16 underlineThickness;
323 INT16 strikethroughPosition;
324 UINT16 strikethroughThickness;
325 } DWRITE_FONT_METRICS;
327 typedef struct DWRITE_GLYPH_METRICS
329 INT32 leftSideBearing;
330 UINT32 advanceWidth;
331 INT32 rightSideBearing;
332 INT32 topSideBearing;
333 UINT32 advanceHeight;
334 INT32 bottomSideBearing;
335 INT32 verticalOriginY;
336 } DWRITE_GLYPH_METRICS;
338 typedef struct DWRITE_GLYPH_OFFSET
340 FLOAT advanceOffset;
341 FLOAT ascenderOffset;
342 } DWRITE_GLYPH_OFFSET;
344 typedef struct DWRITE_MATRIX
346 FLOAT m11;
347 FLOAT m12;
348 FLOAT m21;
349 FLOAT m22;
350 FLOAT dx;
351 FLOAT dy;
352 } DWRITE_MATRIX;
354 typedef struct DWRITE_TRIMMING
356 DWRITE_TRIMMING_GRANULARITY granularity;
357 UINT32 delimiter;
358 UINT32 delimiterCount;
359 } DWRITE_TRIMMING;
361 typedef struct DWRITE_GLYPH_RUN
363 IDWriteFontFace* fontFace;
364 FLOAT fontEmSize;
365 UINT32 glyphCount;
366 UINT16 const* glyphIndices;
367 FLOAT const* glyphAdvances;
368 DWRITE_GLYPH_OFFSET const* glyphOffsets;
369 BOOL isSideways;
370 UINT32 bidiLevel;
371 } DWRITE_GLYPH_RUN;
373 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION
375 WCHAR const* localeName;
376 WCHAR const* string;
377 UINT32 stringLength;
378 UINT16 const* clusterMap;
379 UINT32 textPosition;
380 } DWRITE_GLYPH_RUN_DESCRIPTION;
382 typedef struct DWRITE_UNDERLINE
384 FLOAT width;
385 FLOAT thickness;
386 FLOAT offset;
387 FLOAT runHeight;
388 DWRITE_READING_DIRECTION readingDirection;
389 DWRITE_FLOW_DIRECTION flowDirection;
390 WCHAR const* localeName;
391 DWRITE_MEASURING_MODE measuringMode;
392 } DWRITE_UNDERLINE;
394 typedef struct DWRITE_STRIKETHROUGH
396 FLOAT width;
397 FLOAT thickness;
398 FLOAT offset;
399 DWRITE_READING_DIRECTION readingDirection;
400 DWRITE_FLOW_DIRECTION flowDirection;
401 WCHAR const* localeName;
402 DWRITE_MEASURING_MODE measuringMode;
403 } DWRITE_STRIKETHROUGH;
405 typedef struct DWRITE_INLINE_OBJECT_METRICS
407 FLOAT width;
408 FLOAT height;
409 FLOAT baseline;
410 BOOL supportsSideways;
411 } DWRITE_INLINE_OBJECT_METRICS;
413 typedef struct DWRITE_OVERHANG_METRICS
415 FLOAT left;
416 FLOAT top;
417 FLOAT right;
418 FLOAT bottom;
419 } DWRITE_OVERHANG_METRICS;
421 typedef struct DWRITE_FONT_FEATURE
423 DWRITE_FONT_FEATURE_TAG nameTag;
424 UINT32 parameter;
425 } DWRITE_FONT_FEATURE;
427 typedef struct DWRITE_TEXT_RANGE
429 UINT32 startPosition;
430 UINT32 length;
431 } DWRITE_TEXT_RANGE;
433 typedef struct DWRITE_LINE_METRICS
435 UINT32 length;
436 UINT32 trailingWhitespaceLength;
437 UINT32 newlineLength;
438 FLOAT height;
439 FLOAT baseline;
440 BOOL isTrimmed;
441 } DWRITE_LINE_METRICS;
443 typedef struct DWRITE_TEXT_METRICS
445 FLOAT left;
446 FLOAT top;
447 FLOAT width;
448 FLOAT widthIncludingTrailingWhitespace;
449 FLOAT height;
450 FLOAT layoutWidth;
451 FLOAT layoutHeight;
452 UINT32 maxBidiReorderingDepth;
453 UINT32 lineCount;
454 } DWRITE_TEXT_METRICS;
456 typedef struct DWRITE_CLUSTER_METRICS
458 FLOAT width;
459 UINT16 length;
460 UINT16 canWrapLineAfter : 1;
461 UINT16 isWhitespace : 1;
462 UINT16 isNewline : 1;
463 UINT16 isSoftHyphen : 1;
464 UINT16 isRightToLeft : 1;
465 UINT16 padding : 11;
466 } DWRITE_CLUSTER_METRICS;
468 typedef struct DWRITE_HIT_TEST_METRICS
470 UINT32 textPosition;
471 UINT32 length;
472 FLOAT left;
473 FLOAT top;
474 FLOAT width;
475 FLOAT height;
476 UINT32 bidiLevel;
477 BOOL isText;
478 BOOL isTrimmed;
479 } DWRITE_HIT_TEST_METRICS;
481 typedef struct DWRITE_SCRIPT_ANALYSIS
483 UINT16 script;
484 DWRITE_SCRIPT_SHAPES shapes;
485 } DWRITE_SCRIPT_ANALYSIS;
487 typedef struct DWRITE_LINE_BREAKPOINT
489 UINT8 breakConditionBefore : 2;
490 UINT8 breakConditionAfter : 2;
491 UINT8 isWhitespace : 1;
492 UINT8 isSoftHyphen : 1;
493 UINT8 padding : 2;
494 } DWRITE_LINE_BREAKPOINT;
496 typedef struct DWRITE_TYPOGRAPHIC_FEATURES
498 DWRITE_FONT_FEATURE* features;
499 UINT32 featureCount;
500 } DWRITE_TYPOGRAPHIC_FEATURES;
502 typedef struct DWRITE_SHAPING_TEXT_PROPERTIES
504 UINT16 isShapedAlone : 1;
505 UINT16 reserved : 15;
506 } DWRITE_SHAPING_TEXT_PROPERTIES;
508 typedef struct DWRITE_SHAPING_GLYPH_PROPERTIES
510 UINT16 justification : 4;
511 UINT16 isClusterStart : 1;
512 UINT16 isDiacritic : 1;
513 UINT16 isZeroWidthSpace : 1;
514 UINT16 reserved : 9;
515 } DWRITE_SHAPING_GLYPH_PROPERTIES;
518 local,
519 object,
520 uuid(6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0)
522 interface IDWriteFontFileStream : IUnknown
524 HRESULT ReadFileFragment(
525 void const **fragment_start,
526 UINT64 offset,
527 UINT64 fragment_size,
528 void **fragment_context);
530 void ReleaseFileFragment(void *fragment_context);
531 HRESULT GetFileSize(UINT64 *size);
532 HRESULT GetLastWriteTime(UINT64 *last_writetime);
536 local,
537 object,
538 uuid(727cad4e-d6af-4c9e-8a08-d695b11caa49)
540 interface IDWriteFontFileLoader : IUnknown
542 HRESULT CreateStreamFromKey(
543 void const *key,
544 UINT32 key_size,
545 IDWriteFontFileStream **stream);
549 local,
550 object,
551 uuid(739d886a-cef5-47dc-8769-1a8b41bebbb0)
553 interface IDWriteFontFile : IUnknown
555 HRESULT GetReferenceKey(
556 void const **key,
557 UINT32 *key_size);
559 HRESULT GetLoader(IDWriteFontFileLoader **loader);
561 HRESULT Analyze(
562 BOOL *is_supported_fonttype,
563 DWRITE_FONT_FILE_TYPE *file_type,
564 DWRITE_FONT_FACE_TYPE *face_type,
565 UINT32 *faces_num);
569 local,
570 object,
571 uuid(72755049-5ff7-435d-8348-4be97cfa6c7c)
573 interface IDWriteFontFileEnumerator : IUnknown
575 HRESULT MoveNext(BOOL *has_current_file);
576 HRESULT GetCurrentFontFile(IDWriteFontFile **font_file);
580 local,
581 object,
582 uuid(cca920e4-52f0-492b-bfa8-29c72ee0a468)
584 interface IDWriteFontCollectionLoader : IUnknown
586 HRESULT CreateEnumeratorFromKey(
587 IDWriteFactory* factory,
588 void const* key,
589 UINT32 key_size,
590 IDWriteFontFileEnumerator **enumerator);
594 local,
595 object,
596 uuid(08256209-099a-4b34-b86d-c22b110e7771)
598 interface IDWriteLocalizedStrings : IUnknown
600 UINT32 GetCount();
602 HRESULT FindLocaleName(
603 WCHAR const *locale_name,
604 UINT32 *index,
605 BOOL *exists);
607 HRESULT GetLocaleNameLength(UINT32 index, UINT32 *length);
608 HRESULT GetLocaleName(UINT32 index, WCHAR *locale_name, UINT32 size);
609 HRESULT GetStringLength(UINT32 index, UINT32 *length);
610 HRESULT GetString(UINT32 index, WCHAR *buffer, UINT32 size);
614 local,
615 object,
616 uuid(2f0da53a-2add-47cd-82ee-d9ec34688e75)
618 interface IDWriteRenderingParams : IUnknown
620 FLOAT GetGamma();
621 FLOAT GetEnhancedContrast();
622 FLOAT GetClearTypeLevel();
623 DWRITE_PIXEL_GEOMETRY GetPixelGeometry();
624 DWRITE_RENDERING_MODE GetRenderingMode();
628 local,
629 object,
630 uuid(5f49804d-7024-4d43-bfa9-d25984f53849)
632 interface IDWriteFontFace : IUnknown
634 DWRITE_FONT_FACE_TYPE GetType();
635 HRESULT GetFiles(UINT32 *number_of_files, IDWriteFontFile **fontfiles);
636 UINT32 GetIndex();
637 DWRITE_FONT_SIMULATIONS GetSimulations();
638 BOOL IsSymbolFont();
639 void GetMetrics(DWRITE_FONT_METRICS *metrics);
640 UINT16 GetGlyphCount();
642 HRESULT GetDesignGlyphMetrics(
643 UINT16 const *glyph_indices,
644 UINT32 glyph_count,
645 DWRITE_GLYPH_METRICS *metrics,
646 [defaultvalue(FALSE)] BOOL is_sideways);
648 HRESULT GetGlyphIndices(
649 UINT32 const *codepoints,
650 UINT32 count,
651 UINT16 *glyph_indices);
653 HRESULT TryGetFontTable(
654 UINT32 table_tag,
655 const void **table_data,
656 UINT32 *table_size,
657 void **context,
658 BOOL *exists);
660 void ReleaseFontTable(void *table_context);
662 HRESULT GetGlyphRunOutline(
663 FLOAT emSize,
664 UINT16 const *glyph_indices,
665 FLOAT const* glyph_advances,
666 DWRITE_GLYPH_OFFSET const *glyph_offsets,
667 UINT32 glyph_count,
668 BOOL is_sideways,
669 BOOL is_rtl,
670 IDWriteGeometrySink *geometrysink);
672 HRESULT GetRecommendedRenderingMode(
673 FLOAT emSize,
674 FLOAT pixels_per_dip,
675 DWRITE_MEASURING_MODE mode,
676 IDWriteRenderingParams* params,
677 DWRITE_RENDERING_MODE* rendering_mode);
679 HRESULT GetGdiCompatibleMetrics(
680 FLOAT emSize,
681 FLOAT pixels_per_dip,
682 DWRITE_MATRIX const *transform,
683 DWRITE_FONT_METRICS *metrics);
685 HRESULT GetGdiCompatibleGlyphMetrics(
686 FLOAT emSize,
687 FLOAT pixels_per_dip,
688 DWRITE_MATRIX const *transform,
689 BOOL use_gdi_natural,
690 UINT16 const *glyph_indices,
691 UINT32 glyph_count,
692 DWRITE_GLYPH_METRICS *metrics,
693 [defaultvalue(FALSE)] BOOL is_sideways);
697 local,
698 object,
699 uuid(acd16696-8c14-4f5d-877e-fe3fc1d32737)
701 interface IDWriteFont : IUnknown
703 HRESULT GetFontFamily(IDWriteFontFamily **family);
704 DWRITE_FONT_WEIGHT GetWeight();
705 DWRITE_FONT_STRETCH GetStretch();
706 DWRITE_FONT_STYLE GetStyle();
707 BOOL IsSymbolFont();
709 HRESULT GetFaceNames(IDWriteLocalizedStrings **names);
710 HRESULT GetInformationalStrings(
711 DWRITE_INFORMATIONAL_STRING_ID stringid,
712 IDWriteLocalizedStrings **strings,
713 BOOL *exists);
715 DWRITE_FONT_SIMULATIONS GetSimulations();
716 void GetMetrics(DWRITE_FONT_METRICS *metrics);
717 HRESULT HasCharacter(UINT32 value, BOOL *exists);
718 HRESULT CreateFontFace(IDWriteFontFace **face);
722 local,
723 object,
724 uuid(1a0d8438-1d97-4ec1-aef9-a2fb86ed6acb)
726 interface IDWriteFontList : IUnknown
728 HRESULT GetFontCollection(IDWriteFontCollection **collection);
729 UINT32 GetFontCount();
730 HRESULT GetFont(UINT32 index, IDWriteFont **font);
734 local,
735 object,
736 uuid(da20d8ef-812a-4c43-9802-62ec4abd7add)
738 interface IDWriteFontFamily : IDWriteFontList
740 HRESULT GetFamilyNames(IDWriteLocalizedStrings **names);
742 HRESULT GetFirstMatchingFont(
743 DWRITE_FONT_WEIGHT weight,
744 DWRITE_FONT_STRETCH stretch,
745 DWRITE_FONT_STYLE style,
746 IDWriteFont **font);
748 HRESULT GetMatchingFonts(
749 DWRITE_FONT_WEIGHT weight,
750 DWRITE_FONT_STRETCH stretch,
751 DWRITE_FONT_STYLE style,
752 IDWriteFontList **fonts);
756 local,
757 object,
758 uuid(a84cee02-3eea-4eee-a827-87c1a02a0fcc)
760 interface IDWriteFontCollection : IUnknown
762 UINT32 GetFontFamilyCount();
763 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily **family);
764 HRESULT FindFamilyName(WCHAR const *name, UINT32 *index, BOOL *exists);
765 HRESULT GetFontFromFontFace(IDWriteFontFace *face, IDWriteFont **font);
769 local,
770 object,
771 uuid(eaf3a2da-ecf4-4d24-b644-b34f6842024b)
773 interface IDWritePixelSnapping : IUnknown
775 HRESULT IsPixelSnappingDisabled(
776 void *client_drawingcontext,
777 BOOL *disabled);
779 HRESULT GetCurrentTransform(
780 void *client_drawingcontext,
781 DWRITE_MATRIX *transform);
783 HRESULT GetPixelsPerDip(
784 void *client_drawingcontext,
785 FLOAT *pixels_per_dip);
789 local,
790 object,
791 uuid(ef8a8135-5cc6-45fe-8825-c5a0724eb819)
793 interface IDWriteTextRenderer : IDWritePixelSnapping
795 HRESULT DrawGlyphRun(
796 void* client_drawingcontext,
797 FLOAT baselineOriginX,
798 FLOAT baselineOriginY,
799 DWRITE_MEASURING_MODE mode,
800 DWRITE_GLYPH_RUN const *glyph_run,
801 DWRITE_GLYPH_RUN_DESCRIPTION const *run_descr,
802 IUnknown *drawing_effect);
804 HRESULT DrawUnderline(
805 void *client_drawingcontext,
806 FLOAT baselineOriginX,
807 FLOAT baselineOriginY,
808 DWRITE_UNDERLINE const* underline,
809 IUnknown *drawing_effect);
811 HRESULT DrawStrikethrough(
812 void *client_drawingcontext,
813 FLOAT baselineOriginX,
814 FLOAT baselineOriginY,
815 DWRITE_STRIKETHROUGH const* strikethrough,
816 IUnknown *drawing_effect);
818 HRESULT DrawInlineObject(
819 void *client_drawingcontext,
820 FLOAT originX,
821 FLOAT originY,
822 IDWriteInlineObject *object,
823 BOOL is_sideways,
824 BOOL is_rtl,
825 IUnknown *drawing_effect);
829 local,
830 object,
831 uuid(8339fde3-106f-47ab-8373-1c6295eb10b3)
833 interface IDWriteInlineObject : IUnknown
835 HRESULT Draw(
836 void* client_drawingontext,
837 IDWriteTextRenderer* renderer,
838 FLOAT originX,
839 FLOAT originY,
840 BOOL is_sideways,
841 BOOL is_rtl,
842 IUnknown *drawing_effect);
844 HRESULT GetMetrics(DWRITE_INLINE_OBJECT_METRICS *metrics);
845 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
846 HRESULT GetBreakConditions(
847 DWRITE_BREAK_CONDITION* condition_before,
848 DWRITE_BREAK_CONDITION* condition_after);
852 local,
853 object,
854 uuid(9c906818-31d7-4fd3-a151-7c5e225db55a)
856 interface IDWriteTextFormat : IUnknown
858 HRESULT SetTextAlignment(DWRITE_TEXT_ALIGNMENT alignment);
859 HRESULT SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT alignment);
860 HRESULT SetWordWrapping(DWRITE_WORD_WRAPPING wrapping);
861 HRESULT SetReadingDirection(DWRITE_READING_DIRECTION direction);
862 HRESULT SetFlowDirection(DWRITE_FLOW_DIRECTION direction);
863 HRESULT SetIncrementalTabStop(FLOAT tabstop);
864 HRESULT SetTrimming(DWRITE_TRIMMING const *trimming, IDWriteInlineObject *trimming_sign);
865 HRESULT SetLineSpacing(DWRITE_LINE_SPACING_METHOD spacing, FLOAT line_spacing, FLOAT baseline);
866 DWRITE_TEXT_ALIGNMENT GetTextAlignment();
867 DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment();
868 DWRITE_WORD_WRAPPING GetWordWrapping();
869 DWRITE_READING_DIRECTION GetReadingDirection();
870 DWRITE_FLOW_DIRECTION GetFlowDirection();
871 FLOAT GetIncrementalTabStop();
872 HRESULT GetTrimming(DWRITE_TRIMMING *options, IDWriteInlineObject **trimming_sign);
874 HRESULT GetLineSpacing(
875 DWRITE_LINE_SPACING_METHOD *method,
876 FLOAT *spacing,
877 FLOAT *baseline);
879 HRESULT GetFontCollection(IDWriteFontCollection **collection);
880 UINT32 GetFontFamilyNameLength();
881 HRESULT GetFontFamilyName(WCHAR *name, UINT32 size);
882 DWRITE_FONT_WEIGHT GetFontWeight();
883 DWRITE_FONT_STYLE GetFontStyle();
884 DWRITE_FONT_STRETCH GetFontStretch();
885 FLOAT GetFontSize();
886 UINT32 GetLocaleNameLength();
887 HRESULT GetLocaleName(WCHAR *name, UINT32 size);
891 local,
892 object,
893 uuid(55f1112b-1dc2-4b3c-9541-f46894ed85b6)
895 interface IDWriteTypography : IUnknown
897 HRESULT AddFontFeature(DWRITE_FONT_FEATURE feature);
898 UINT32 GetFontFeatureCount();
899 HRESULT GetFontFeature(UINT32 index, DWRITE_FONT_FEATURE *feature);
903 local,
904 object,
905 uuid(5e5a32a3-8dff-4773-9ff6-0696eab77267)
907 interface IDWriteBitmapRenderTarget : IUnknown
909 HRESULT DrawGlyphRun(
910 FLOAT baselineOriginX,
911 FLOAT baselineOriginY,
912 DWRITE_MEASURING_MODE measuring_mode,
913 DWRITE_GLYPH_RUN const* glyph_run,
914 IDWriteRenderingParams* params,
915 COLORREF textColor,
916 [defaultvalue(NULL)] RECT *blackbox_rect);
918 HDC GetMemoryDC();
919 FLOAT GetPixelsPerDip();
920 HRESULT SetPixelsPerDip(FLOAT pixels_per_dip);
921 HRESULT GetCurrentTransform(DWRITE_MATRIX *transform);
922 HRESULT SetCurrentTransform(DWRITE_MATRIX const *transform);
923 HRESULT GetSize(SIZE *size);
924 HRESULT Resize(UINT32 width, UINT32 height);
927 cpp_quote("#ifndef _WINGDI_")
928 /* already defined in wingdi.h but needed for WIDL */
929 #define LF_FACESIZE 32
931 typedef struct tagLOGFONTW
933 LONG lfHeight;
934 LONG lfWidth;
935 LONG lfEscapement;
936 LONG lfOrientation;
937 LONG lfWeight;
938 BYTE lfItalic;
939 BYTE lfUnderline;
940 BYTE lfStrikeOut;
941 BYTE lfCharSet;
942 BYTE lfOutPrecision;
943 BYTE lfClipPrecision;
944 BYTE lfQuality;
945 BYTE lfPitchAndFamily;
946 WCHAR lfFaceName[LF_FACESIZE];
947 } LOGFONTW, *PLOGFONTW, *LPLOGFONTW;
948 cpp_quote("#endif /* _WINGDI_ */")
951 local,
952 object,
953 uuid(1edd9491-9853-4299-898f-6432983b6f3a)
955 interface IDWriteGdiInterop : IUnknown
957 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont, IDWriteFont **font);
958 HRESULT ConvertFontToLOGFONT(
959 IDWriteFont* font,
960 LOGFONTW* logfont,
961 BOOL *is_systemfont);
963 HRESULT ConvertFontFaceToLOGFONT(IDWriteFontFace* font, LOGFONTW* logfont);
964 HRESULT CreateFontFaceFromHdc(HDC hdc, IDWriteFontFace **fontface);
965 HRESULT CreateBitmapRenderTarget(HDC hdc, UINT32 width, UINT32 height, IDWriteBitmapRenderTarget **target);
969 local,
970 object,
971 uuid(53737037-6d14-410b-9bfe-0b182bb70961)
973 interface IDWriteTextLayout : IDWriteTextFormat
975 HRESULT SetMaxWidth(FLOAT maxWidth);
976 HRESULT SetMaxHeight(FLOAT maxHeight);
977 HRESULT SetFontCollection(IDWriteFontCollection* collection, DWRITE_TEXT_RANGE range);
978 HRESULT SetFontFamilyName(WCHAR const *name, DWRITE_TEXT_RANGE range);
979 HRESULT SetFontWeight(DWRITE_FONT_WEIGHT weight, DWRITE_TEXT_RANGE range);
980 HRESULT SetFontStyle(DWRITE_FONT_STYLE style, DWRITE_TEXT_RANGE range);
981 HRESULT SetFontStretch(DWRITE_FONT_STRETCH stretch, DWRITE_TEXT_RANGE range);
982 HRESULT SetFontSize(FLOAT size, DWRITE_TEXT_RANGE range);
983 HRESULT SetUnderline(BOOL underline, DWRITE_TEXT_RANGE range);
984 HRESULT SetStrikethrough(BOOL strikethrough, DWRITE_TEXT_RANGE range);
985 HRESULT SetDrawingEffect(IUnknown* effect, DWRITE_TEXT_RANGE range);
986 HRESULT SetInlineObject(IDWriteInlineObject *object, DWRITE_TEXT_RANGE range);
987 HRESULT SetTypography(IDWriteTypography* typography, DWRITE_TEXT_RANGE range);
988 HRESULT SetLocaleName(WCHAR const* locale, DWRITE_TEXT_RANGE range);
990 FLOAT GetMaxWidth();
991 FLOAT GetMaxHeight();
992 HRESULT GetFontCollection(
993 UINT32 pos,
994 IDWriteFontCollection** collection,
995 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
997 HRESULT GetFontFamilyNameLength(
998 UINT32 pos,
999 UINT32* len,
1000 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1002 HRESULT GetFontFamilyName(
1003 UINT32 position,
1004 WCHAR* name,
1005 UINT32 name_size,
1006 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1008 HRESULT GetFontWeight(
1009 UINT32 position,
1010 DWRITE_FONT_WEIGHT *weight,
1011 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1013 HRESULT GetFontStyle(
1014 UINT32 currentPosition,
1015 DWRITE_FONT_STYLE *style,
1016 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1018 HRESULT GetFontStretch(
1019 UINT32 position,
1020 DWRITE_FONT_STRETCH *stretch,
1021 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1023 HRESULT GetFontSize(
1024 UINT32 position,
1025 FLOAT *size,
1026 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1028 HRESULT GetUnderline(
1029 UINT32 position,
1030 BOOL *has_underline,
1031 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1033 HRESULT GetStrikethrough(
1034 UINT32 position,
1035 BOOL *has_strikethrough,
1036 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1038 HRESULT GetDrawingEffect(
1039 UINT32 position,
1040 IUnknown **effect,
1041 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1043 HRESULT GetInlineObject(
1044 UINT32 position,
1045 IDWriteInlineObject **object,
1046 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1048 HRESULT GetTypography(
1049 UINT32 position,
1050 IDWriteTypography** typography,
1051 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1053 HRESULT GetLocaleNameLength(
1054 UINT32 position,
1055 UINT32* length,
1056 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1058 HRESULT GetLocaleName(
1059 UINT32 position,
1060 WCHAR* name,
1061 UINT32 name_size,
1062 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1064 HRESULT Draw(
1065 void *context,
1066 IDWriteTextRenderer* renderer,
1067 FLOAT originX,
1068 FLOAT originY);
1070 HRESULT GetLineMetrics(
1071 DWRITE_LINE_METRICS *metrics,
1072 UINT32 max_count,
1073 UINT32 *actual_count);
1075 HRESULT GetMetrics(DWRITE_TEXT_METRICS *metrics);
1076 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
1077 HRESULT GetClusterMetrics(
1078 DWRITE_CLUSTER_METRICS *metrics,
1079 UINT32 max_count,
1080 UINT32* act_count);
1082 HRESULT DetermineMinWidth(FLOAT* min_width);
1083 HRESULT HitTestPoint(
1084 FLOAT pointX,
1085 FLOAT pointY,
1086 BOOL* is_trailinghit,
1087 BOOL* is_inside,
1088 DWRITE_HIT_TEST_METRICS *metrics);
1090 HRESULT HitTestTextPosition(
1091 UINT32 textPosition,
1092 BOOL is_trailinghit,
1093 FLOAT* pointX,
1094 FLOAT* pointY,
1095 DWRITE_HIT_TEST_METRICS *metrics);
1097 HRESULT HitTestTextRange(
1098 UINT32 textPosition,
1099 UINT32 textLength,
1100 FLOAT originX,
1101 FLOAT originY,
1102 DWRITE_HIT_TEST_METRICS *metrics,
1103 UINT32 max_metricscount,
1104 UINT32* actual_metricscount);
1108 local,
1109 object,
1110 uuid(14885cc9-bab0-4f90-b6ed-5c366a2cd03d)
1112 interface IDWriteNumberSubstitution : IUnknown
1117 local,
1118 object,
1119 uuid(688e1a58-5094-47c8-adc8-fbcea60ae92b)
1121 interface IDWriteTextAnalysisSource : IUnknown
1123 HRESULT GetTextAtPosition(
1124 UINT32 position,
1125 WCHAR const** text,
1126 UINT32* text_len);
1128 HRESULT GetTextBeforePosition(
1129 UINT32 position,
1130 WCHAR const** text,
1131 UINT32* text_len);
1133 DWRITE_READING_DIRECTION GetParagraphReadingDirection();
1134 HRESULT GetLocaleName(
1135 UINT32 position,
1136 UINT32* text_len,
1137 WCHAR const** locale);
1139 HRESULT GetNumberSubstitution(
1140 UINT32 position,
1141 UINT32* text_len,
1142 IDWriteNumberSubstitution **substitution);
1146 local,
1147 object,
1148 uuid(5810cd44-0ca0-4701-b3fa-bec5182ae4f6)
1150 interface IDWriteTextAnalysisSink : IUnknown
1152 HRESULT SetScriptAnalysis(
1153 UINT32 position,
1154 UINT32 length,
1155 DWRITE_SCRIPT_ANALYSIS const* scriptanalysis);
1157 HRESULT SetLineBreakpoints(
1158 UINT32 position,
1159 UINT32 length,
1160 DWRITE_LINE_BREAKPOINT const* breakpoints);
1162 HRESULT SetBidiLevel(
1163 UINT32 position,
1164 UINT32 length,
1165 UINT8 explicitLevel,
1166 UINT8 resolvedLevel);
1168 HRESULT SetNumberSubstitution(
1169 UINT32 position,
1170 UINT32 length,
1171 IDWriteNumberSubstitution* substitution);
1175 local,
1176 object,
1177 uuid(b7e6163e-7f46-43b4-84b3-e4e6249c365d)
1179 interface IDWriteTextAnalyzer : IUnknown
1181 HRESULT AnalyzeScript(
1182 IDWriteTextAnalysisSource* source,
1183 UINT32 position,
1184 UINT32 length,
1185 IDWriteTextAnalysisSink* sink);
1187 HRESULT AnalyzeBidi(
1188 IDWriteTextAnalysisSource* source,
1189 UINT32 position,
1190 UINT32 length,
1191 IDWriteTextAnalysisSink* sink);
1193 HRESULT AnalyzeNumberSubstitution(
1194 IDWriteTextAnalysisSource* source,
1195 UINT32 position,
1196 UINT32 length,
1197 IDWriteTextAnalysisSink* sink);
1199 HRESULT AnalyzeLineBreakpoints(
1200 IDWriteTextAnalysisSource* source,
1201 UINT32 position,
1202 UINT32 length,
1203 IDWriteTextAnalysisSink* sink);
1205 HRESULT GetGlyphs(
1206 WCHAR const* text,
1207 UINT32 length,
1208 IDWriteFontFace* font_face,
1209 BOOL is_sideways,
1210 BOOL is_rtl,
1211 DWRITE_SCRIPT_ANALYSIS const* analysis,
1212 WCHAR const* locale,
1213 IDWriteNumberSubstitution* substitution,
1214 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1215 UINT32 const* feature_range_len,
1216 UINT32 feature_ranges,
1217 UINT32 max_glyph_count,
1218 UINT16* clustermap,
1219 DWRITE_SHAPING_TEXT_PROPERTIES* text_props,
1220 UINT16* glyph_indices,
1221 DWRITE_SHAPING_GLYPH_PROPERTIES* glyph_props,
1222 UINT32* actual_glyph_count);
1224 HRESULT GetGlyphPlacements(
1225 WCHAR const* text,
1226 UINT16 const* clustermap,
1227 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1228 UINT32 text_len,
1229 UINT16 const* glyph_indices,
1230 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1231 UINT32 glyph_count,
1232 IDWriteFontFace * font_face,
1233 FLOAT fontEmSize,
1234 BOOL is_sideways,
1235 BOOL is_rtl,
1236 DWRITE_SCRIPT_ANALYSIS const* analysis,
1237 WCHAR const* locale,
1238 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1239 UINT32 const* feature_range_len,
1240 UINT32 feature_ranges,
1241 FLOAT* glyph_advances,
1242 DWRITE_GLYPH_OFFSET* glyph_offsets);
1244 HRESULT GetGdiCompatibleGlyphPlacements(
1245 WCHAR const* text,
1246 UINT16 const* clustermap,
1247 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1248 UINT32 text_len,
1249 UINT16 const* glyph_indices,
1250 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1251 UINT32 glyph_count,
1252 IDWriteFontFace * font_face,
1253 FLOAT fontEmSize,
1254 FLOAT pixels_per_dip,
1255 DWRITE_MATRIX const* transform,
1256 BOOL use_gdi_natural,
1257 BOOL is_sideways,
1258 BOOL is_rtl,
1259 DWRITE_SCRIPT_ANALYSIS const* analysis,
1260 WCHAR const* locale,
1261 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1262 UINT32 const* feature_range_lengths,
1263 UINT32 feature_ranges,
1264 FLOAT* glyph_advances,
1265 DWRITE_GLYPH_OFFSET* glyph_offsets);
1269 local,
1270 object,
1271 uuid(7d97dbf7-e085-42d4-81e3-6a883bded118)
1273 interface IDWriteGlyphRunAnalysis : IUnknown
1275 HRESULT GetAlphaTextureBounds(DWRITE_TEXTURE_TYPE type, RECT* bounds);
1276 HRESULT CreateAlphaTexture(DWRITE_TEXTURE_TYPE type, RECT const* bounds, BYTE* alphaValues, UINT32 bufferSize);
1277 HRESULT GetAlphaBlendParams(
1278 IDWriteRenderingParams* renderingParams,
1279 FLOAT* blendGamma,
1280 FLOAT* blendEnhancedContrast,
1281 FLOAT* blendClearTypeLevel);
1285 local,
1286 object,
1287 uuid(b859ee5a-d838-4b5b-a2e8-1adc7d93db48)
1289 interface IDWriteFactory : IUnknown
1291 HRESULT GetSystemFontCollection(IDWriteFontCollection **collection,
1292 [defaultvalue(FALSE)] BOOL check_for_updates);
1294 HRESULT CreateCustomFontCollection(
1295 IDWriteFontCollectionLoader *loader,
1296 void const *key,
1297 UINT32 key_size,
1298 IDWriteFontCollection **collection);
1300 HRESULT RegisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1302 HRESULT UnregisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1304 HRESULT CreateFontFileReference(
1305 WCHAR const *path,
1306 FILETIME const *writetime,
1307 IDWriteFontFile **font_file);
1309 HRESULT CreateCustomFontFileReference(
1310 void const *reference_key,
1311 UINT32 key_size,
1312 IDWriteFontFileLoader *loader,
1313 IDWriteFontFile **font_file);
1315 HRESULT CreateFontFace(
1316 DWRITE_FONT_FACE_TYPE facetype,
1317 UINT32 files_number,
1318 IDWriteFontFile* const* font_files,
1319 UINT32 index,
1320 DWRITE_FONT_SIMULATIONS sim_flags,
1321 IDWriteFontFace **font_face);
1323 HRESULT CreateRenderingParams(IDWriteRenderingParams **params);
1325 HRESULT CreateMonitorRenderingParams(
1326 HMONITOR monitor,
1327 IDWriteRenderingParams **params);
1329 HRESULT CreateCustomRenderingParams(
1330 FLOAT gamma,
1331 FLOAT enhancedContrast,
1332 FLOAT cleartype_level,
1333 DWRITE_PIXEL_GEOMETRY geometry,
1334 DWRITE_RENDERING_MODE mode,
1335 IDWriteRenderingParams **params);
1337 HRESULT RegisterFontFileLoader(IDWriteFontFileLoader *loader);
1339 HRESULT UnregisterFontFileLoader(IDWriteFontFileLoader *loader);
1341 HRESULT CreateTextFormat(
1342 WCHAR const* family_name,
1343 IDWriteFontCollection *collection,
1344 DWRITE_FONT_WEIGHT weight,
1345 DWRITE_FONT_STYLE style,
1346 DWRITE_FONT_STRETCH stretch,
1347 FLOAT size,
1348 WCHAR const *locale,
1349 IDWriteTextFormat **format);
1351 HRESULT CreateTypography(IDWriteTypography **typography);
1353 HRESULT GetGdiInterop(IDWriteGdiInterop **gdi_interop);
1355 HRESULT CreateTextLayout(
1356 WCHAR const* string,
1357 UINT32 len,
1358 IDWriteTextFormat *format,
1359 FLOAT max_width,
1360 FLOAT max_height,
1361 IDWriteTextLayout **layout);
1363 HRESULT CreateGdiCompatibleTextLayout(
1364 WCHAR const* string,
1365 UINT32 len,
1366 IDWriteTextFormat *format,
1367 FLOAT layout_width,
1368 FLOAT layout_height,
1369 FLOAT pixels_per_dip,
1370 DWRITE_MATRIX const* transform,
1371 BOOL use_gdi_natural,
1372 IDWriteTextLayout **layout);
1374 HRESULT CreateEllipsisTrimmingSign(
1375 IDWriteTextFormat *format,
1376 IDWriteInlineObject **trimming_sign);
1378 HRESULT CreateTextAnalyzer(IDWriteTextAnalyzer **analyzer);
1380 HRESULT CreateNumberSubstitution(
1381 DWRITE_NUMBER_SUBSTITUTION_METHOD method,
1382 WCHAR const* locale,
1383 BOOL ignore_user_override,
1384 IDWriteNumberSubstitution **substitution);
1386 HRESULT CreateGlyphRunAnalysis(
1387 DWRITE_GLYPH_RUN const *glyph_run,
1388 FLOAT pixels_per_dip,
1389 DWRITE_MATRIX const* transform,
1390 DWRITE_RENDERING_MODE rendering_mode,
1391 DWRITE_MEASURING_MODE measuring_mode,
1392 FLOAT baseline_x,
1393 FLOAT baseline_y,
1394 IDWriteGlyphRunAnalysis **analysis);
1397 cpp_quote("HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE,REFIID,IUnknown**);")
1399 /* error codes */
1400 cpp_quote("#define FACILITY_DWRITE 0x898")
1401 cpp_quote("#define DWRITE_ERR_BASE 0x5000")
1402 cpp_quote("#define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code))")
1403 cpp_quote("#define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code)")
1405 cpp_quote("#define DWRITE_E_FILEFORMAT MAKE_DWRITE_HR_ERR(0x0)")
1406 cpp_quote("#define DWRITE_E_UNEXPECTED MAKE_DWRITE_HR_ERR(0x1)")
1407 cpp_quote("#define DWRITE_E_NOFONT MAKE_DWRITE_HR_ERR(0x2)")
1408 cpp_quote("#define DWRITE_E_FILENOTFOUND MAKE_DWRITE_HR_ERR(0x3)")
1409 cpp_quote("#define DWRITE_E_FILEACCESS MAKE_DWRITE_HR_ERR(0x4)")
1410 cpp_quote("#define DWRITE_E_FONTCOLLECTIONOBSOLETE MAKE_DWRITE_HR_ERR(0x5)")
1411 cpp_quote("#define DWRITE_E_ALREADYREGISTERED MAKE_DWRITE_HR_ERR(0x6)")