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