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