adsldp: Map 1.3.6.1.4.1.1466.115.121.1.26 to ADSTYPE_CASE_EXACT_STRING.
[wine.git] / include / dwrite.idl
blobb92b1544e0950b3bab2c96a29cba67378b9012c4
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_TYPOGRAPHIC_FAMILY_NAMES,
131 DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_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_WEIGHT_STRETCH_STYLE_FAMILY_NAME,
137 DWRITE_INFORMATIONAL_STRING_DESIGN_SCRIPT_LANGUAGE_TAG,
138 DWRITE_INFORMATIONAL_STRING_SUPPORTED_SCRIPT_LANGUAGE_TAG,
139 DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES = DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_FAMILY_NAMES,
140 DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES = DWRITE_INFORMATIONAL_STRING_TYPOGRAPHIC_SUBFAMILY_NAMES,
141 DWRITE_INFORMATIONAL_STRING_WWS_FAMILY_NAMES = DWRITE_INFORMATIONAL_STRING_WEIGHT_STRETCH_STYLE_FAMILY_NAME,
142 } DWRITE_INFORMATIONAL_STRING_ID;
144 typedef enum DWRITE_FONT_SIMULATIONS
146 DWRITE_FONT_SIMULATIONS_NONE,
147 DWRITE_FONT_SIMULATIONS_BOLD,
148 DWRITE_FONT_SIMULATIONS_OBLIQUE
149 } DWRITE_FONT_SIMULATIONS;
151 typedef enum DWRITE_PIXEL_GEOMETRY
153 DWRITE_PIXEL_GEOMETRY_FLAT,
154 DWRITE_PIXEL_GEOMETRY_RGB,
155 DWRITE_PIXEL_GEOMETRY_BGR
156 } DWRITE_PIXEL_GEOMETRY;
158 typedef enum DWRITE_RENDERING_MODE
160 DWRITE_RENDERING_MODE_DEFAULT,
161 DWRITE_RENDERING_MODE_ALIASED,
162 DWRITE_RENDERING_MODE_GDI_CLASSIC,
163 DWRITE_RENDERING_MODE_GDI_NATURAL,
164 DWRITE_RENDERING_MODE_NATURAL,
165 DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC,
166 DWRITE_RENDERING_MODE_OUTLINE,
167 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC,
168 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL,
169 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL = DWRITE_RENDERING_MODE_NATURAL,
170 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
171 } DWRITE_RENDERING_MODE;
173 typedef enum DWRITE_TEXT_ALIGNMENT
175 DWRITE_TEXT_ALIGNMENT_LEADING,
176 DWRITE_TEXT_ALIGNMENT_TRAILING,
177 DWRITE_TEXT_ALIGNMENT_CENTER,
178 DWRITE_TEXT_ALIGNMENT_JUSTIFIED
179 } DWRITE_TEXT_ALIGNMENT;
181 typedef enum DWRITE_PARAGRAPH_ALIGNMENT
183 DWRITE_PARAGRAPH_ALIGNMENT_NEAR,
184 DWRITE_PARAGRAPH_ALIGNMENT_FAR,
185 DWRITE_PARAGRAPH_ALIGNMENT_CENTER
186 } DWRITE_PARAGRAPH_ALIGNMENT;
188 typedef enum DWRITE_WORD_WRAPPING
190 DWRITE_WORD_WRAPPING_WRAP,
191 DWRITE_WORD_WRAPPING_NO_WRAP,
192 DWRITE_WORD_WRAPPING_EMERGENCY_BREAK,
193 DWRITE_WORD_WRAPPING_WHOLE_WORD,
194 DWRITE_WORD_WRAPPING_CHARACTER
195 } DWRITE_WORD_WRAPPING;
197 typedef enum DWRITE_READING_DIRECTION
199 DWRITE_READING_DIRECTION_LEFT_TO_RIGHT,
200 DWRITE_READING_DIRECTION_RIGHT_TO_LEFT,
201 DWRITE_READING_DIRECTION_TOP_TO_BOTTOM,
202 DWRITE_READING_DIRECTION_BOTTOM_TO_TOP
203 } DWRITE_READING_DIRECTION;
205 typedef enum DWRITE_FLOW_DIRECTION
207 DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM,
208 DWRITE_FLOW_DIRECTION_BOTTOM_TO_TOP,
209 DWRITE_FLOW_DIRECTION_LEFT_TO_RIGHT,
210 DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT
211 } DWRITE_FLOW_DIRECTION;
213 typedef enum DWRITE_TRIMMING_GRANULARITY
215 DWRITE_TRIMMING_GRANULARITY_NONE,
216 DWRITE_TRIMMING_GRANULARITY_CHARACTER,
217 DWRITE_TRIMMING_GRANULARITY_WORD
218 } DWRITE_TRIMMING_GRANULARITY;
220 typedef enum DWRITE_BREAK_CONDITION
222 DWRITE_BREAK_CONDITION_NEUTRAL,
223 DWRITE_BREAK_CONDITION_CAN_BREAK,
224 DWRITE_BREAK_CONDITION_MAY_NOT_BREAK,
225 DWRITE_BREAK_CONDITION_MUST_BREAK
226 } DWRITE_BREAK_CONDITION;
228 typedef enum DWRITE_LINE_SPACING_METHOD
230 DWRITE_LINE_SPACING_METHOD_DEFAULT,
231 DWRITE_LINE_SPACING_METHOD_UNIFORM,
232 DWRITE_LINE_SPACING_METHOD_PROPORTIONAL
233 } DWRITE_LINE_SPACING_METHOD;
235 cpp_quote("#define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \\")
236 cpp_quote(" ((UINT32)(UINT8)(d) << 24) | \\")
237 cpp_quote(" ((UINT32)(UINT8)(c) << 16) | \\")
238 cpp_quote(" ((UINT32)(UINT8)(b) << 8) | \\")
239 cpp_quote(" (UINT32)(UINT8)(a))")
241 typedef enum DWRITE_FONT_FEATURE_TAG
243 DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661, /* 'afrc' */
244 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = 0x63703263, /* 'c2pc' */
245 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = 0x63733263, /* 'c2sc' */
246 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = 0x746c6163, /* 'calt' */
247 DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = 0x65736163, /* 'case' */
248 DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = 0x706d6363, /* 'ccmp' */
249 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = 0x67696c63, /* 'clig' */
250 DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = 0x70737063, /* 'cpsp' */
251 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = 0x68777363, /* 'cswh' */
252 DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = 0x73727563, /* 'curs' */
253 DWRITE_FONT_FEATURE_TAG_DEFAULT = 0x746c6664, /* 'dflt' */
254 DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = 0x67696c64, /* 'dlig' */
255 DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = 0x74707865, /* 'expt' */
256 DWRITE_FONT_FEATURE_TAG_FRACTIONS = 0x63617266, /* 'frac' */
257 DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = 0x64697766, /* 'fwid' */
258 DWRITE_FONT_FEATURE_TAG_HALF_FORMS = 0x666c6168, /* 'half' */
259 DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = 0x6e6c6168, /* 'haln' */
260 DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = 0x746c6168, /* 'halt' */
261 DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = 0x74736968, /* 'hist' */
262 DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = 0x616e6b68, /* 'hkna' */
263 DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = 0x67696c68, /* 'hlig' */
264 DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = 0x64697768, /* 'hwid' */
265 DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = 0x6f6a6f68, /* 'hojo' */
266 DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = 0x3430706a, /* 'jp04' */
267 DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = 0x3837706a, /* 'jp78' */
268 DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = 0x3338706a, /* 'jp83' */
269 DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = 0x3039706a, /* 'jp90' */
270 DWRITE_FONT_FEATURE_TAG_KERNING = 0x6e72656b, /* 'kern' */
271 DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = 0x6167696c, /* 'liga' */
272 DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = 0x6d756e6c, /* 'lnum' */
273 DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = 0x6c636f6c, /* 'locl' */
274 DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = 0x6b72616d, /* 'mark' */
275 DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = 0x6b72676d, /* 'mgrk' */
276 DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = 0x6b6d6b6d, /* 'mkmk' */
277 DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = 0x746c616e, /* 'nalt' */
278 DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = 0x6b636c6e, /* 'nlck' */
279 DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = 0x6d756e6f, /* 'onum' */
280 DWRITE_FONT_FEATURE_TAG_ORDINALS = 0x6e64726f, /* 'ordn' */
281 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = 0x746c6170, /* 'palt' */
282 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = 0x70616370, /* 'pcap' */
283 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = 0x6d756e70, /* 'pnum' */
284 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = 0x64697770, /* 'pwid' */
285 DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = 0x64697771, /* 'qwid' */
286 DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = 0x67696c72, /* 'rlig' */
287 DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = 0x79627572, /* 'ruby' */
288 DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = 0x746c6173, /* 'salt' */
289 DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = 0x666e6973, /* 'sinf' */
290 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = 0x70636d73, /* 'smcp' */
291 DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = 0x6c706d73, /* 'smpl' */
292 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = 0x31307373, /* 'ss01' */
293 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = 0x32307373, /* 'ss02' */
294 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = 0x33307373, /* 'ss03' */
295 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = 0x34307373, /* 'ss04' */
296 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = 0x35307373, /* 'ss05' */
297 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = 0x36307373, /* 'ss06' */
298 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = 0x37307373, /* 'ss07' */
299 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = 0x38307373, /* 'ss08' */
300 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = 0x39307373, /* 'ss09' */
301 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = 0x30317373, /* 'ss10' */
302 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = 0x31317373, /* 'ss11' */
303 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = 0x32317373, /* 'ss12' */
304 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = 0x33317373, /* 'ss13' */
305 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = 0x34317373, /* 'ss14' */
306 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = 0x35317373, /* 'ss15' */
307 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = 0x36317373, /* 'ss16' */
308 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = 0x37317373, /* 'ss17' */
309 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = 0x38317373, /* 'ss18' */
310 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = 0x39317373, /* 'ss19' */
311 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = 0x30327373, /* 'ss20' */
312 DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = 0x73627573, /* 'subs' */
313 DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = 0x73707573, /* 'sups' */
314 DWRITE_FONT_FEATURE_TAG_SWASH = 0x68737773, /* 'swsh' */
315 DWRITE_FONT_FEATURE_TAG_TITLING = 0x6c746974, /* 'titl' */
316 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = 0x6d616e74, /* 'tnam' */
317 DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = 0x6d756e74, /* 'tnum' */
318 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = 0x64617274, /* 'trad' */
319 DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = 0x64697774, /* 'twid' */
320 DWRITE_FONT_FEATURE_TAG_UNICASE = 0x63696e75, /* 'unic' */
321 DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING = 0x74726576, /* 'vert' */
322 DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION= 0x32747276, /* 'vrt2' */
323 DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = 0x6f72657a, /* 'zero' */
324 } DWRITE_FONT_FEATURE_TAG;
326 typedef enum DWRITE_SCRIPT_SHAPES
328 DWRITE_SCRIPT_SHAPES_DEFAULT = 0,
329 DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1
330 } DWRITE_SCRIPT_SHAPES;
332 typedef enum DWRITE_NUMBER_SUBSTITUTION_METHOD
334 DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE,
335 DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL,
336 DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE,
337 DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL,
338 DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL
339 } DWRITE_NUMBER_SUBSTITUTION_METHOD;
341 cpp_quote("#define DWRITE_ALPHA_MAX 255")
343 typedef enum DWRITE_TEXTURE_TYPE
345 DWRITE_TEXTURE_ALIASED_1x1,
346 DWRITE_TEXTURE_CLEARTYPE_3x1
347 } DWRITE_TEXTURE_TYPE;
349 typedef struct DWRITE_FONT_METRICS
351 UINT16 designUnitsPerEm;
352 UINT16 ascent;
353 UINT16 descent;
354 INT16 lineGap;
355 UINT16 capHeight;
356 UINT16 xHeight;
357 INT16 underlinePosition;
358 UINT16 underlineThickness;
359 INT16 strikethroughPosition;
360 UINT16 strikethroughThickness;
361 } DWRITE_FONT_METRICS;
363 typedef struct DWRITE_GLYPH_METRICS
365 INT32 leftSideBearing;
366 UINT32 advanceWidth;
367 INT32 rightSideBearing;
368 INT32 topSideBearing;
369 UINT32 advanceHeight;
370 INT32 bottomSideBearing;
371 INT32 verticalOriginY;
372 } DWRITE_GLYPH_METRICS;
374 typedef struct DWRITE_GLYPH_OFFSET
376 FLOAT advanceOffset;
377 FLOAT ascenderOffset;
378 } DWRITE_GLYPH_OFFSET;
380 typedef struct DWRITE_MATRIX
382 FLOAT m11;
383 FLOAT m12;
384 FLOAT m21;
385 FLOAT m22;
386 FLOAT dx;
387 FLOAT dy;
388 } DWRITE_MATRIX;
390 typedef struct DWRITE_TRIMMING
392 DWRITE_TRIMMING_GRANULARITY granularity;
393 UINT32 delimiter;
394 UINT32 delimiterCount;
395 } DWRITE_TRIMMING;
397 cpp_quote("#ifndef __d2d1_h__")
398 typedef struct DWRITE_GLYPH_RUN DWRITE_GLYPH_RUN;
399 cpp_quote("#endif /* __d2d1_h__ */")
401 struct DWRITE_GLYPH_RUN
403 IDWriteFontFace* fontFace;
404 FLOAT fontEmSize;
405 UINT32 glyphCount;
406 UINT16 const* glyphIndices;
407 FLOAT const* glyphAdvances;
408 DWRITE_GLYPH_OFFSET const* glyphOffsets;
409 BOOL isSideways;
410 UINT32 bidiLevel;
413 cpp_quote("#ifndef __d2d1_1_h__")
414 typedef struct DWRITE_GLYPH_RUN_DESCRIPTION DWRITE_GLYPH_RUN_DESCRIPTION;
415 cpp_quote("#endif /* __d2d1_1_h__ */")
417 struct DWRITE_GLYPH_RUN_DESCRIPTION
419 WCHAR const* localeName;
420 WCHAR const* string;
421 UINT32 stringLength;
422 UINT16 const* clusterMap;
423 UINT32 textPosition;
426 typedef struct DWRITE_UNDERLINE
428 FLOAT width;
429 FLOAT thickness;
430 FLOAT offset;
431 FLOAT runHeight;
432 DWRITE_READING_DIRECTION readingDirection;
433 DWRITE_FLOW_DIRECTION flowDirection;
434 WCHAR const* localeName;
435 DWRITE_MEASURING_MODE measuringMode;
436 } DWRITE_UNDERLINE;
438 typedef struct DWRITE_STRIKETHROUGH
440 FLOAT width;
441 FLOAT thickness;
442 FLOAT offset;
443 DWRITE_READING_DIRECTION readingDirection;
444 DWRITE_FLOW_DIRECTION flowDirection;
445 WCHAR const* localeName;
446 DWRITE_MEASURING_MODE measuringMode;
447 } DWRITE_STRIKETHROUGH;
449 typedef struct DWRITE_INLINE_OBJECT_METRICS
451 FLOAT width;
452 FLOAT height;
453 FLOAT baseline;
454 BOOL supportsSideways;
455 } DWRITE_INLINE_OBJECT_METRICS;
457 typedef struct DWRITE_OVERHANG_METRICS
459 FLOAT left;
460 FLOAT top;
461 FLOAT right;
462 FLOAT bottom;
463 } DWRITE_OVERHANG_METRICS;
465 typedef struct DWRITE_FONT_FEATURE
467 DWRITE_FONT_FEATURE_TAG nameTag;
468 UINT32 parameter;
469 } DWRITE_FONT_FEATURE;
471 typedef struct DWRITE_TEXT_RANGE
473 UINT32 startPosition;
474 UINT32 length;
475 } DWRITE_TEXT_RANGE;
477 typedef struct DWRITE_LINE_METRICS
479 UINT32 length;
480 UINT32 trailingWhitespaceLength;
481 UINT32 newlineLength;
482 FLOAT height;
483 FLOAT baseline;
484 BOOL isTrimmed;
485 } DWRITE_LINE_METRICS;
487 typedef struct DWRITE_TEXT_METRICS
489 FLOAT left;
490 FLOAT top;
491 FLOAT width;
492 FLOAT widthIncludingTrailingWhitespace;
493 FLOAT height;
494 FLOAT layoutWidth;
495 FLOAT layoutHeight;
496 UINT32 maxBidiReorderingDepth;
497 UINT32 lineCount;
498 } DWRITE_TEXT_METRICS;
500 typedef struct DWRITE_CLUSTER_METRICS
502 FLOAT width;
503 UINT16 length;
504 UINT16 canWrapLineAfter : 1;
505 UINT16 isWhitespace : 1;
506 UINT16 isNewline : 1;
507 UINT16 isSoftHyphen : 1;
508 UINT16 isRightToLeft : 1;
509 UINT16 padding : 11;
510 } DWRITE_CLUSTER_METRICS;
512 typedef struct DWRITE_HIT_TEST_METRICS
514 UINT32 textPosition;
515 UINT32 length;
516 FLOAT left;
517 FLOAT top;
518 FLOAT width;
519 FLOAT height;
520 UINT32 bidiLevel;
521 BOOL isText;
522 BOOL isTrimmed;
523 } DWRITE_HIT_TEST_METRICS;
525 typedef struct DWRITE_SCRIPT_ANALYSIS
527 UINT16 script;
528 DWRITE_SCRIPT_SHAPES shapes;
529 } DWRITE_SCRIPT_ANALYSIS;
531 typedef struct DWRITE_LINE_BREAKPOINT
533 UINT8 breakConditionBefore : 2;
534 UINT8 breakConditionAfter : 2;
535 UINT8 isWhitespace : 1;
536 UINT8 isSoftHyphen : 1;
537 UINT8 padding : 2;
538 } DWRITE_LINE_BREAKPOINT;
540 typedef struct DWRITE_TYPOGRAPHIC_FEATURES
542 DWRITE_FONT_FEATURE* features;
543 UINT32 featureCount;
544 } DWRITE_TYPOGRAPHIC_FEATURES;
546 typedef struct DWRITE_SHAPING_TEXT_PROPERTIES
548 UINT16 isShapedAlone : 1;
549 UINT16 reserved : 15;
550 } DWRITE_SHAPING_TEXT_PROPERTIES;
552 typedef struct DWRITE_SHAPING_GLYPH_PROPERTIES
554 UINT16 justification : 4;
555 UINT16 isClusterStart : 1;
556 UINT16 isDiacritic : 1;
557 UINT16 isZeroWidthSpace : 1;
558 UINT16 reserved : 9;
559 } DWRITE_SHAPING_GLYPH_PROPERTIES;
562 local,
563 object,
564 uuid(6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0)
566 interface IDWriteFontFileStream : IUnknown
568 HRESULT ReadFileFragment(
569 void const **fragment_start,
570 UINT64 offset,
571 UINT64 fragment_size,
572 void **fragment_context);
574 void ReleaseFileFragment(void *fragment_context);
575 HRESULT GetFileSize(UINT64 *size);
576 HRESULT GetLastWriteTime(UINT64 *last_writetime);
580 local,
581 object,
582 uuid(727cad4e-d6af-4c9e-8a08-d695b11caa49)
584 interface IDWriteFontFileLoader : IUnknown
586 HRESULT CreateStreamFromKey(
587 void const *key,
588 UINT32 key_size,
589 IDWriteFontFileStream **stream);
593 local,
594 object,
595 uuid(b2d9f3ec-c9fe-4a11-a2ec-d86208f7c0a2)
597 interface IDWriteLocalFontFileLoader : IDWriteFontFileLoader
599 HRESULT GetFilePathLengthFromKey(void const *key, UINT32 key_size, UINT32 *length);
600 HRESULT GetFilePathFromKey(void const *key, UINT32 key_size, WCHAR *path, UINT32 length);
601 HRESULT GetLastWriteTimeFromKey(void const *key, UINT32 key_size, FILETIME *writetime);
605 local,
606 object,
607 uuid(739d886a-cef5-47dc-8769-1a8b41bebbb0)
609 interface IDWriteFontFile : IUnknown
611 HRESULT GetReferenceKey(
612 void const **key,
613 UINT32 *key_size);
615 HRESULT GetLoader(IDWriteFontFileLoader **loader);
617 HRESULT Analyze(
618 BOOL *is_supported_fonttype,
619 DWRITE_FONT_FILE_TYPE *file_type,
620 DWRITE_FONT_FACE_TYPE *face_type,
621 UINT32 *faces_num);
625 local,
626 object,
627 uuid(72755049-5ff7-435d-8348-4be97cfa6c7c)
629 interface IDWriteFontFileEnumerator : IUnknown
631 HRESULT MoveNext(BOOL *has_current_file);
632 HRESULT GetCurrentFontFile(IDWriteFontFile **font_file);
636 local,
637 object,
638 uuid(cca920e4-52f0-492b-bfa8-29c72ee0a468)
640 interface IDWriteFontCollectionLoader : IUnknown
642 HRESULT CreateEnumeratorFromKey(
643 IDWriteFactory* factory,
644 void const* key,
645 UINT32 key_size,
646 IDWriteFontFileEnumerator **enumerator);
650 local,
651 object,
652 uuid(08256209-099a-4b34-b86d-c22b110e7771)
654 interface IDWriteLocalizedStrings : IUnknown
656 UINT32 GetCount();
658 HRESULT FindLocaleName(
659 WCHAR const *locale_name,
660 UINT32 *index,
661 BOOL *exists);
663 HRESULT GetLocaleNameLength(UINT32 index, UINT32 *length);
664 HRESULT GetLocaleName(UINT32 index, WCHAR *locale_name, UINT32 size);
665 HRESULT GetStringLength(UINT32 index, UINT32 *length);
666 HRESULT GetString(UINT32 index, WCHAR *buffer, UINT32 size);
670 local,
671 object,
672 uuid(2f0da53a-2add-47cd-82ee-d9ec34688e75)
674 interface IDWriteRenderingParams : IUnknown
676 FLOAT GetGamma();
677 FLOAT GetEnhancedContrast();
678 FLOAT GetClearTypeLevel();
679 DWRITE_PIXEL_GEOMETRY GetPixelGeometry();
680 DWRITE_RENDERING_MODE GetRenderingMode();
684 local,
685 object,
686 uuid(5f49804d-7024-4d43-bfa9-d25984f53849)
688 interface IDWriteFontFace : IUnknown
690 DWRITE_FONT_FACE_TYPE GetType();
691 HRESULT GetFiles(UINT32 *number_of_files, IDWriteFontFile **fontfiles);
692 UINT32 GetIndex();
693 DWRITE_FONT_SIMULATIONS GetSimulations();
694 BOOL IsSymbolFont();
695 void GetMetrics(DWRITE_FONT_METRICS *metrics);
696 UINT16 GetGlyphCount();
698 HRESULT GetDesignGlyphMetrics(
699 UINT16 const *glyph_indices,
700 UINT32 glyph_count,
701 DWRITE_GLYPH_METRICS *metrics,
702 [defaultvalue(FALSE)] BOOL is_sideways);
704 HRESULT GetGlyphIndices(
705 UINT32 const *codepoints,
706 UINT32 count,
707 UINT16 *glyph_indices);
709 HRESULT TryGetFontTable(
710 UINT32 table_tag,
711 const void **table_data,
712 UINT32 *table_size,
713 void **context,
714 BOOL *exists);
716 void ReleaseFontTable(void *table_context);
718 HRESULT GetGlyphRunOutline(
719 FLOAT emSize,
720 UINT16 const *glyph_indices,
721 FLOAT const* glyph_advances,
722 DWRITE_GLYPH_OFFSET const *glyph_offsets,
723 UINT32 glyph_count,
724 BOOL is_sideways,
725 BOOL is_rtl,
726 IDWriteGeometrySink *geometrysink);
728 HRESULT GetRecommendedRenderingMode(
729 FLOAT emSize,
730 FLOAT pixels_per_dip,
731 DWRITE_MEASURING_MODE mode,
732 IDWriteRenderingParams* params,
733 DWRITE_RENDERING_MODE* rendering_mode);
735 HRESULT GetGdiCompatibleMetrics(
736 FLOAT emSize,
737 FLOAT pixels_per_dip,
738 DWRITE_MATRIX const *transform,
739 DWRITE_FONT_METRICS *metrics);
741 HRESULT GetGdiCompatibleGlyphMetrics(
742 FLOAT emSize,
743 FLOAT pixels_per_dip,
744 DWRITE_MATRIX const *transform,
745 BOOL use_gdi_natural,
746 UINT16 const *glyph_indices,
747 UINT32 glyph_count,
748 DWRITE_GLYPH_METRICS *metrics,
749 [defaultvalue(FALSE)] BOOL is_sideways);
753 local,
754 object,
755 uuid(acd16696-8c14-4f5d-877e-fe3fc1d32737)
757 interface IDWriteFont : IUnknown
759 HRESULT GetFontFamily(IDWriteFontFamily **family);
760 DWRITE_FONT_WEIGHT GetWeight();
761 DWRITE_FONT_STRETCH GetStretch();
762 DWRITE_FONT_STYLE GetStyle();
763 BOOL IsSymbolFont();
765 HRESULT GetFaceNames(IDWriteLocalizedStrings **names);
766 HRESULT GetInformationalStrings(
767 DWRITE_INFORMATIONAL_STRING_ID stringid,
768 IDWriteLocalizedStrings **strings,
769 BOOL *exists);
771 DWRITE_FONT_SIMULATIONS GetSimulations();
772 void GetMetrics(DWRITE_FONT_METRICS *metrics);
773 HRESULT HasCharacter(UINT32 value, BOOL *exists);
774 HRESULT CreateFontFace(IDWriteFontFace **face);
778 local,
779 object,
780 uuid(1a0d8438-1d97-4ec1-aef9-a2fb86ed6acb)
782 interface IDWriteFontList : IUnknown
784 HRESULT GetFontCollection(IDWriteFontCollection **collection);
785 UINT32 GetFontCount();
786 HRESULT GetFont(UINT32 index, IDWriteFont **font);
790 local,
791 object,
792 uuid(da20d8ef-812a-4c43-9802-62ec4abd7add)
794 interface IDWriteFontFamily : IDWriteFontList
796 HRESULT GetFamilyNames(IDWriteLocalizedStrings **names);
798 HRESULT GetFirstMatchingFont(
799 DWRITE_FONT_WEIGHT weight,
800 DWRITE_FONT_STRETCH stretch,
801 DWRITE_FONT_STYLE style,
802 IDWriteFont **font);
804 HRESULT GetMatchingFonts(
805 DWRITE_FONT_WEIGHT weight,
806 DWRITE_FONT_STRETCH stretch,
807 DWRITE_FONT_STYLE style,
808 IDWriteFontList **fonts);
812 local,
813 object,
814 uuid(a84cee02-3eea-4eee-a827-87c1a02a0fcc)
816 interface IDWriteFontCollection : IUnknown
818 UINT32 GetFontFamilyCount();
819 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily **family);
820 HRESULT FindFamilyName(WCHAR const *name, UINT32 *index, BOOL *exists);
821 HRESULT GetFontFromFontFace(IDWriteFontFace *face, IDWriteFont **font);
825 local,
826 object,
827 uuid(eaf3a2da-ecf4-4d24-b644-b34f6842024b)
829 interface IDWritePixelSnapping : IUnknown
831 HRESULT IsPixelSnappingDisabled(
832 void *client_drawingcontext,
833 BOOL *disabled);
835 HRESULT GetCurrentTransform(
836 void *client_drawingcontext,
837 DWRITE_MATRIX *transform);
839 HRESULT GetPixelsPerDip(
840 void *client_drawingcontext,
841 FLOAT *pixels_per_dip);
845 local,
846 object,
847 uuid(ef8a8135-5cc6-45fe-8825-c5a0724eb819)
849 interface IDWriteTextRenderer : IDWritePixelSnapping
851 HRESULT DrawGlyphRun(
852 void* client_drawingcontext,
853 FLOAT baselineOriginX,
854 FLOAT baselineOriginY,
855 DWRITE_MEASURING_MODE mode,
856 DWRITE_GLYPH_RUN const *glyph_run,
857 DWRITE_GLYPH_RUN_DESCRIPTION const *run_descr,
858 IUnknown *drawing_effect);
860 HRESULT DrawUnderline(
861 void *client_drawingcontext,
862 FLOAT baselineOriginX,
863 FLOAT baselineOriginY,
864 DWRITE_UNDERLINE const* underline,
865 IUnknown *drawing_effect);
867 HRESULT DrawStrikethrough(
868 void *client_drawingcontext,
869 FLOAT baselineOriginX,
870 FLOAT baselineOriginY,
871 DWRITE_STRIKETHROUGH const* strikethrough,
872 IUnknown *drawing_effect);
874 HRESULT DrawInlineObject(
875 void *client_drawingcontext,
876 FLOAT originX,
877 FLOAT originY,
878 IDWriteInlineObject *object,
879 BOOL is_sideways,
880 BOOL is_rtl,
881 IUnknown *drawing_effect);
885 local,
886 object,
887 uuid(8339fde3-106f-47ab-8373-1c6295eb10b3)
889 interface IDWriteInlineObject : IUnknown
891 HRESULT Draw(
892 void* client_drawingontext,
893 IDWriteTextRenderer* renderer,
894 FLOAT originX,
895 FLOAT originY,
896 BOOL is_sideways,
897 BOOL is_rtl,
898 IUnknown *drawing_effect);
900 HRESULT GetMetrics(DWRITE_INLINE_OBJECT_METRICS *metrics);
901 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
902 HRESULT GetBreakConditions(
903 DWRITE_BREAK_CONDITION* condition_before,
904 DWRITE_BREAK_CONDITION* condition_after);
908 local,
909 object,
910 uuid(9c906818-31d7-4fd3-a151-7c5e225db55a)
912 interface IDWriteTextFormat : IUnknown
914 HRESULT SetTextAlignment(DWRITE_TEXT_ALIGNMENT alignment);
915 HRESULT SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT alignment);
916 HRESULT SetWordWrapping(DWRITE_WORD_WRAPPING wrapping);
917 HRESULT SetReadingDirection(DWRITE_READING_DIRECTION direction);
918 HRESULT SetFlowDirection(DWRITE_FLOW_DIRECTION direction);
919 HRESULT SetIncrementalTabStop(FLOAT tabstop);
920 HRESULT SetTrimming(DWRITE_TRIMMING const *trimming, IDWriteInlineObject *trimming_sign);
921 HRESULT SetLineSpacing(DWRITE_LINE_SPACING_METHOD spacing, FLOAT line_spacing, FLOAT baseline);
922 DWRITE_TEXT_ALIGNMENT GetTextAlignment();
923 DWRITE_PARAGRAPH_ALIGNMENT GetParagraphAlignment();
924 DWRITE_WORD_WRAPPING GetWordWrapping();
925 DWRITE_READING_DIRECTION GetReadingDirection();
926 DWRITE_FLOW_DIRECTION GetFlowDirection();
927 FLOAT GetIncrementalTabStop();
928 HRESULT GetTrimming(DWRITE_TRIMMING *options, IDWriteInlineObject **trimming_sign);
930 HRESULT GetLineSpacing(
931 DWRITE_LINE_SPACING_METHOD *method,
932 FLOAT *spacing,
933 FLOAT *baseline);
935 HRESULT GetFontCollection(IDWriteFontCollection **collection);
936 UINT32 GetFontFamilyNameLength();
937 HRESULT GetFontFamilyName(WCHAR *name, UINT32 size);
938 DWRITE_FONT_WEIGHT GetFontWeight();
939 DWRITE_FONT_STYLE GetFontStyle();
940 DWRITE_FONT_STRETCH GetFontStretch();
941 FLOAT GetFontSize();
942 UINT32 GetLocaleNameLength();
943 HRESULT GetLocaleName(WCHAR *name, UINT32 size);
947 local,
948 object,
949 uuid(55f1112b-1dc2-4b3c-9541-f46894ed85b6)
951 interface IDWriteTypography : IUnknown
953 HRESULT AddFontFeature(DWRITE_FONT_FEATURE feature);
954 UINT32 GetFontFeatureCount();
955 HRESULT GetFontFeature(UINT32 index, DWRITE_FONT_FEATURE *feature);
959 local,
960 object,
961 uuid(5e5a32a3-8dff-4773-9ff6-0696eab77267)
963 interface IDWriteBitmapRenderTarget : IUnknown
965 HRESULT DrawGlyphRun(
966 FLOAT baselineOriginX,
967 FLOAT baselineOriginY,
968 DWRITE_MEASURING_MODE measuring_mode,
969 DWRITE_GLYPH_RUN const* glyph_run,
970 IDWriteRenderingParams* params,
971 COLORREF textColor,
972 [defaultvalue(NULL)] RECT *blackbox_rect);
974 HDC GetMemoryDC();
975 FLOAT GetPixelsPerDip();
976 HRESULT SetPixelsPerDip(FLOAT pixels_per_dip);
977 HRESULT GetCurrentTransform(DWRITE_MATRIX *transform);
978 HRESULT SetCurrentTransform(DWRITE_MATRIX const *transform);
979 HRESULT GetSize(SIZE *size);
980 HRESULT Resize(UINT32 width, UINT32 height);
983 cpp_quote("#ifndef _WINGDI_")
984 /* already defined in wingdi.h but needed for WIDL */
985 #define LF_FACESIZE 32
987 typedef struct tagLOGFONTW
989 LONG lfHeight;
990 LONG lfWidth;
991 LONG lfEscapement;
992 LONG lfOrientation;
993 LONG lfWeight;
994 BYTE lfItalic;
995 BYTE lfUnderline;
996 BYTE lfStrikeOut;
997 BYTE lfCharSet;
998 BYTE lfOutPrecision;
999 BYTE lfClipPrecision;
1000 BYTE lfQuality;
1001 BYTE lfPitchAndFamily;
1002 WCHAR lfFaceName[LF_FACESIZE];
1003 } LOGFONTW, *PLOGFONTW, *LPLOGFONTW;
1004 cpp_quote("#endif /* _WINGDI_ */")
1007 local,
1008 object,
1009 uuid(1edd9491-9853-4299-898f-6432983b6f3a)
1011 interface IDWriteGdiInterop : IUnknown
1013 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont, IDWriteFont **font);
1014 HRESULT ConvertFontToLOGFONT(
1015 IDWriteFont* font,
1016 LOGFONTW* logfont,
1017 BOOL *is_systemfont);
1019 HRESULT ConvertFontFaceToLOGFONT(IDWriteFontFace* font, LOGFONTW* logfont);
1020 HRESULT CreateFontFaceFromHdc(HDC hdc, IDWriteFontFace **fontface);
1021 HRESULT CreateBitmapRenderTarget(HDC hdc, UINT32 width, UINT32 height, IDWriteBitmapRenderTarget **target);
1025 local,
1026 object,
1027 uuid(53737037-6d14-410b-9bfe-0b182bb70961)
1029 interface IDWriteTextLayout : IDWriteTextFormat
1031 HRESULT SetMaxWidth(FLOAT maxWidth);
1032 HRESULT SetMaxHeight(FLOAT maxHeight);
1033 HRESULT SetFontCollection(IDWriteFontCollection* collection, DWRITE_TEXT_RANGE range);
1034 HRESULT SetFontFamilyName(WCHAR const *name, DWRITE_TEXT_RANGE range);
1035 HRESULT SetFontWeight(DWRITE_FONT_WEIGHT weight, DWRITE_TEXT_RANGE range);
1036 HRESULT SetFontStyle(DWRITE_FONT_STYLE style, DWRITE_TEXT_RANGE range);
1037 HRESULT SetFontStretch(DWRITE_FONT_STRETCH stretch, DWRITE_TEXT_RANGE range);
1038 HRESULT SetFontSize(FLOAT size, DWRITE_TEXT_RANGE range);
1039 HRESULT SetUnderline(BOOL underline, DWRITE_TEXT_RANGE range);
1040 HRESULT SetStrikethrough(BOOL strikethrough, DWRITE_TEXT_RANGE range);
1041 HRESULT SetDrawingEffect(IUnknown* effect, DWRITE_TEXT_RANGE range);
1042 HRESULT SetInlineObject(IDWriteInlineObject *object, DWRITE_TEXT_RANGE range);
1043 HRESULT SetTypography(IDWriteTypography* typography, DWRITE_TEXT_RANGE range);
1044 HRESULT SetLocaleName(WCHAR const* locale, DWRITE_TEXT_RANGE range);
1046 FLOAT GetMaxWidth();
1047 FLOAT GetMaxHeight();
1048 HRESULT GetFontCollection(
1049 UINT32 pos,
1050 IDWriteFontCollection** collection,
1051 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1053 HRESULT GetFontFamilyNameLength(
1054 UINT32 pos,
1055 UINT32* len,
1056 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1058 HRESULT GetFontFamilyName(
1059 UINT32 position,
1060 WCHAR* name,
1061 UINT32 name_size,
1062 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1064 HRESULT GetFontWeight(
1065 UINT32 position,
1066 DWRITE_FONT_WEIGHT *weight,
1067 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1069 HRESULT GetFontStyle(
1070 UINT32 currentPosition,
1071 DWRITE_FONT_STYLE *style,
1072 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1074 HRESULT GetFontStretch(
1075 UINT32 position,
1076 DWRITE_FONT_STRETCH *stretch,
1077 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1079 HRESULT GetFontSize(
1080 UINT32 position,
1081 FLOAT *size,
1082 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1084 HRESULT GetUnderline(
1085 UINT32 position,
1086 BOOL *has_underline,
1087 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1089 HRESULT GetStrikethrough(
1090 UINT32 position,
1091 BOOL *has_strikethrough,
1092 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1094 HRESULT GetDrawingEffect(
1095 UINT32 position,
1096 IUnknown **effect,
1097 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1099 HRESULT GetInlineObject(
1100 UINT32 position,
1101 IDWriteInlineObject **object,
1102 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1104 HRESULT GetTypography(
1105 UINT32 position,
1106 IDWriteTypography** typography,
1107 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1109 HRESULT GetLocaleNameLength(
1110 UINT32 position,
1111 UINT32* length,
1112 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1114 HRESULT GetLocaleName(
1115 UINT32 position,
1116 WCHAR* name,
1117 UINT32 name_size,
1118 [defaultvalue(NULL)] DWRITE_TEXT_RANGE *range);
1120 HRESULT Draw(
1121 void *context,
1122 IDWriteTextRenderer* renderer,
1123 FLOAT originX,
1124 FLOAT originY);
1126 HRESULT GetLineMetrics(
1127 DWRITE_LINE_METRICS *metrics,
1128 UINT32 max_count,
1129 UINT32 *actual_count);
1131 HRESULT GetMetrics(DWRITE_TEXT_METRICS *metrics);
1132 HRESULT GetOverhangMetrics(DWRITE_OVERHANG_METRICS *overhangs);
1133 HRESULT GetClusterMetrics(
1134 DWRITE_CLUSTER_METRICS *metrics,
1135 UINT32 max_count,
1136 UINT32* act_count);
1138 HRESULT DetermineMinWidth(FLOAT* min_width);
1139 HRESULT HitTestPoint(
1140 FLOAT pointX,
1141 FLOAT pointY,
1142 BOOL* is_trailinghit,
1143 BOOL* is_inside,
1144 DWRITE_HIT_TEST_METRICS *metrics);
1146 HRESULT HitTestTextPosition(
1147 UINT32 textPosition,
1148 BOOL is_trailinghit,
1149 FLOAT* pointX,
1150 FLOAT* pointY,
1151 DWRITE_HIT_TEST_METRICS *metrics);
1153 HRESULT HitTestTextRange(
1154 UINT32 textPosition,
1155 UINT32 textLength,
1156 FLOAT originX,
1157 FLOAT originY,
1158 DWRITE_HIT_TEST_METRICS *metrics,
1159 UINT32 max_metricscount,
1160 UINT32* actual_metricscount);
1164 local,
1165 object,
1166 uuid(14885cc9-bab0-4f90-b6ed-5c366a2cd03d)
1168 interface IDWriteNumberSubstitution : IUnknown
1173 local,
1174 object,
1175 uuid(688e1a58-5094-47c8-adc8-fbcea60ae92b)
1177 interface IDWriteTextAnalysisSource : IUnknown
1179 HRESULT GetTextAtPosition(
1180 UINT32 position,
1181 WCHAR const** text,
1182 UINT32* text_len);
1184 HRESULT GetTextBeforePosition(
1185 UINT32 position,
1186 WCHAR const** text,
1187 UINT32* text_len);
1189 DWRITE_READING_DIRECTION GetParagraphReadingDirection();
1190 HRESULT GetLocaleName(
1191 UINT32 position,
1192 UINT32* text_len,
1193 WCHAR const** locale);
1195 HRESULT GetNumberSubstitution(
1196 UINT32 position,
1197 UINT32* text_len,
1198 IDWriteNumberSubstitution **substitution);
1202 local,
1203 object,
1204 uuid(5810cd44-0ca0-4701-b3fa-bec5182ae4f6)
1206 interface IDWriteTextAnalysisSink : IUnknown
1208 HRESULT SetScriptAnalysis(
1209 UINT32 position,
1210 UINT32 length,
1211 DWRITE_SCRIPT_ANALYSIS const* scriptanalysis);
1213 HRESULT SetLineBreakpoints(
1214 UINT32 position,
1215 UINT32 length,
1216 DWRITE_LINE_BREAKPOINT const* breakpoints);
1218 HRESULT SetBidiLevel(
1219 UINT32 position,
1220 UINT32 length,
1221 UINT8 explicitLevel,
1222 UINT8 resolvedLevel);
1224 HRESULT SetNumberSubstitution(
1225 UINT32 position,
1226 UINT32 length,
1227 IDWriteNumberSubstitution* substitution);
1231 local,
1232 object,
1233 uuid(b7e6163e-7f46-43b4-84b3-e4e6249c365d)
1235 interface IDWriteTextAnalyzer : IUnknown
1237 HRESULT AnalyzeScript(
1238 IDWriteTextAnalysisSource* source,
1239 UINT32 position,
1240 UINT32 length,
1241 IDWriteTextAnalysisSink* sink);
1243 HRESULT AnalyzeBidi(
1244 IDWriteTextAnalysisSource* source,
1245 UINT32 position,
1246 UINT32 length,
1247 IDWriteTextAnalysisSink* sink);
1249 HRESULT AnalyzeNumberSubstitution(
1250 IDWriteTextAnalysisSource* source,
1251 UINT32 position,
1252 UINT32 length,
1253 IDWriteTextAnalysisSink* sink);
1255 HRESULT AnalyzeLineBreakpoints(
1256 IDWriteTextAnalysisSource* source,
1257 UINT32 position,
1258 UINT32 length,
1259 IDWriteTextAnalysisSink* sink);
1261 HRESULT GetGlyphs(
1262 WCHAR const* text,
1263 UINT32 length,
1264 IDWriteFontFace* font_face,
1265 BOOL is_sideways,
1266 BOOL is_rtl,
1267 DWRITE_SCRIPT_ANALYSIS const* analysis,
1268 WCHAR const* locale,
1269 IDWriteNumberSubstitution* substitution,
1270 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1271 UINT32 const* feature_range_len,
1272 UINT32 feature_ranges,
1273 UINT32 max_glyph_count,
1274 UINT16* clustermap,
1275 DWRITE_SHAPING_TEXT_PROPERTIES* text_props,
1276 UINT16* glyph_indices,
1277 DWRITE_SHAPING_GLYPH_PROPERTIES* glyph_props,
1278 UINT32* actual_glyph_count);
1280 HRESULT GetGlyphPlacements(
1281 WCHAR const* text,
1282 UINT16 const* clustermap,
1283 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1284 UINT32 text_len,
1285 UINT16 const* glyph_indices,
1286 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1287 UINT32 glyph_count,
1288 IDWriteFontFace * font_face,
1289 FLOAT fontEmSize,
1290 BOOL is_sideways,
1291 BOOL is_rtl,
1292 DWRITE_SCRIPT_ANALYSIS const* analysis,
1293 WCHAR const* locale,
1294 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1295 UINT32 const* feature_range_len,
1296 UINT32 feature_ranges,
1297 FLOAT* glyph_advances,
1298 DWRITE_GLYPH_OFFSET* glyph_offsets);
1300 HRESULT GetGdiCompatibleGlyphPlacements(
1301 WCHAR const* text,
1302 UINT16 const* clustermap,
1303 DWRITE_SHAPING_TEXT_PROPERTIES* props,
1304 UINT32 text_len,
1305 UINT16 const* glyph_indices,
1306 DWRITE_SHAPING_GLYPH_PROPERTIES const* glyph_props,
1307 UINT32 glyph_count,
1308 IDWriteFontFace * font_face,
1309 FLOAT fontEmSize,
1310 FLOAT pixels_per_dip,
1311 DWRITE_MATRIX const* transform,
1312 BOOL use_gdi_natural,
1313 BOOL is_sideways,
1314 BOOL is_rtl,
1315 DWRITE_SCRIPT_ANALYSIS const* analysis,
1316 WCHAR const* locale,
1317 DWRITE_TYPOGRAPHIC_FEATURES const** features,
1318 UINT32 const* feature_range_lengths,
1319 UINT32 feature_ranges,
1320 FLOAT* glyph_advances,
1321 DWRITE_GLYPH_OFFSET* glyph_offsets);
1325 local,
1326 object,
1327 uuid(7d97dbf7-e085-42d4-81e3-6a883bded118)
1329 interface IDWriteGlyphRunAnalysis : IUnknown
1331 HRESULT GetAlphaTextureBounds(DWRITE_TEXTURE_TYPE type, RECT* bounds);
1332 HRESULT CreateAlphaTexture(DWRITE_TEXTURE_TYPE type, RECT const* bounds, BYTE* alphaValues, UINT32 bufferSize);
1333 HRESULT GetAlphaBlendParams(
1334 IDWriteRenderingParams* renderingParams,
1335 FLOAT* blendGamma,
1336 FLOAT* blendEnhancedContrast,
1337 FLOAT* blendClearTypeLevel);
1341 local,
1342 object,
1343 uuid(b859ee5a-d838-4b5b-a2e8-1adc7d93db48)
1345 interface IDWriteFactory : IUnknown
1347 HRESULT GetSystemFontCollection(IDWriteFontCollection **collection,
1348 [defaultvalue(FALSE)] BOOL check_for_updates);
1350 HRESULT CreateCustomFontCollection(
1351 IDWriteFontCollectionLoader *loader,
1352 void const *key,
1353 UINT32 key_size,
1354 IDWriteFontCollection **collection);
1356 HRESULT RegisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1358 HRESULT UnregisterFontCollectionLoader(IDWriteFontCollectionLoader *loader);
1360 HRESULT CreateFontFileReference(
1361 WCHAR const *path,
1362 FILETIME const *writetime,
1363 IDWriteFontFile **font_file);
1365 HRESULT CreateCustomFontFileReference(
1366 void const *reference_key,
1367 UINT32 key_size,
1368 IDWriteFontFileLoader *loader,
1369 IDWriteFontFile **font_file);
1371 HRESULT CreateFontFace(
1372 DWRITE_FONT_FACE_TYPE facetype,
1373 UINT32 files_number,
1374 IDWriteFontFile* const* font_files,
1375 UINT32 index,
1376 DWRITE_FONT_SIMULATIONS sim_flags,
1377 IDWriteFontFace **font_face);
1379 HRESULT CreateRenderingParams(IDWriteRenderingParams **params);
1381 HRESULT CreateMonitorRenderingParams(
1382 HMONITOR monitor,
1383 IDWriteRenderingParams **params);
1385 HRESULT CreateCustomRenderingParams(
1386 FLOAT gamma,
1387 FLOAT enhancedContrast,
1388 FLOAT cleartype_level,
1389 DWRITE_PIXEL_GEOMETRY geometry,
1390 DWRITE_RENDERING_MODE mode,
1391 IDWriteRenderingParams **params);
1393 HRESULT RegisterFontFileLoader(IDWriteFontFileLoader *loader);
1395 HRESULT UnregisterFontFileLoader(IDWriteFontFileLoader *loader);
1397 HRESULT CreateTextFormat(
1398 WCHAR const* family_name,
1399 IDWriteFontCollection *collection,
1400 DWRITE_FONT_WEIGHT weight,
1401 DWRITE_FONT_STYLE style,
1402 DWRITE_FONT_STRETCH stretch,
1403 FLOAT size,
1404 WCHAR const *locale,
1405 IDWriteTextFormat **format);
1407 HRESULT CreateTypography(IDWriteTypography **typography);
1409 HRESULT GetGdiInterop(IDWriteGdiInterop **gdi_interop);
1411 HRESULT CreateTextLayout(
1412 WCHAR const* string,
1413 UINT32 len,
1414 IDWriteTextFormat *format,
1415 FLOAT max_width,
1416 FLOAT max_height,
1417 IDWriteTextLayout **layout);
1419 HRESULT CreateGdiCompatibleTextLayout(
1420 WCHAR const* string,
1421 UINT32 len,
1422 IDWriteTextFormat *format,
1423 FLOAT layout_width,
1424 FLOAT layout_height,
1425 FLOAT pixels_per_dip,
1426 DWRITE_MATRIX const* transform,
1427 BOOL use_gdi_natural,
1428 IDWriteTextLayout **layout);
1430 HRESULT CreateEllipsisTrimmingSign(
1431 IDWriteTextFormat *format,
1432 IDWriteInlineObject **trimming_sign);
1434 HRESULT CreateTextAnalyzer(IDWriteTextAnalyzer **analyzer);
1436 HRESULT CreateNumberSubstitution(
1437 DWRITE_NUMBER_SUBSTITUTION_METHOD method,
1438 WCHAR const* locale,
1439 BOOL ignore_user_override,
1440 IDWriteNumberSubstitution **substitution);
1442 HRESULT CreateGlyphRunAnalysis(
1443 DWRITE_GLYPH_RUN const *glyph_run,
1444 FLOAT pixels_per_dip,
1445 DWRITE_MATRIX const* transform,
1446 DWRITE_RENDERING_MODE rendering_mode,
1447 DWRITE_MEASURING_MODE measuring_mode,
1448 FLOAT baseline_x,
1449 FLOAT baseline_y,
1450 IDWriteGlyphRunAnalysis **analysis);
1453 cpp_quote("HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE,REFIID,IUnknown**);")
1455 /* error codes */
1456 cpp_quote("#define FACILITY_DWRITE 0x898")
1457 cpp_quote("#define DWRITE_ERR_BASE 0x5000")
1458 cpp_quote("#define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code))")
1459 cpp_quote("#define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code)")