]>
Commit | Line | Data |
---|---|---|
ff7c6d11 XL |
1 | // Copyright © 2017 winapi-rs developers |
2 | // Licensed under the Apache License, Version 2.0 | |
3 | // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
4 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. | |
5 | // All files in the project carrying such notice may not be copied, modified, or distributed | |
6 | // except according to those terms. | |
7 | //! Mappings for the content of dwrite_3.h | |
0bf4aa26 | 8 | use ctypes::c_void; |
ff7c6d11 XL |
9 | use shared::basetsd::{UINT16, UINT32, UINT64}; |
10 | use shared::minwindef::{BOOL, FILETIME, FLOAT}; | |
0bf4aa26 | 11 | use um::dcommon::{DWRITE_GLYPH_IMAGE_DATA, DWRITE_GLYPH_IMAGE_FORMATS, DWRITE_MEASURING_MODE}; |
ff7c6d11 XL |
12 | use um::dwrite::{ |
13 | DWRITE_FONT_SIMULATIONS, DWRITE_FONT_STRETCH, DWRITE_FONT_STYLE, DWRITE_FONT_WEIGHT, | |
14 | DWRITE_GLYPH_RUN, DWRITE_INFORMATIONAL_STRING_ID, DWRITE_LINE_SPACING_METHOD, DWRITE_MATRIX, | |
15 | DWRITE_PIXEL_GEOMETRY, DWRITE_RENDERING_MODE_ALIASED, DWRITE_RENDERING_MODE_DEFAULT, | |
16 | DWRITE_RENDERING_MODE_GDI_CLASSIC, DWRITE_RENDERING_MODE_GDI_NATURAL, | |
17 | DWRITE_RENDERING_MODE_NATURAL, DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, | |
18 | DWRITE_RENDERING_MODE_OUTLINE, IDWriteFont, IDWriteFontCollection, IDWriteFontCollectionVtbl, | |
19 | IDWriteFontFace, IDWriteFontFamily, IDWriteFontFamilyVtbl, IDWriteFontFile, IDWriteFontList, | |
20 | IDWriteFontListVtbl, IDWriteGdiInterop, IDWriteGdiInteropVtbl, IDWriteGlyphRunAnalysis, | |
21 | IDWriteLocalizedStrings, IDWriteRenderingParams, | |
22 | }; | |
23 | use um::dwrite_1::{DWRITE_OUTLINE_THRESHOLD, DWRITE_PANOSE, DWRITE_TEXT_ANTIALIAS_MODE}; | |
24 | use um::dwrite_2::{ | |
25 | DWRITE_GRID_FIT_MODE, IDWriteFactory2, IDWriteFactory2Vtbl, IDWriteFont2, IDWriteFont2Vtbl, | |
26 | IDWriteFontFace2, IDWriteFontFace2Vtbl, IDWriteRenderingParams2, IDWriteRenderingParams2Vtbl, | |
27 | IDWriteTextFormat1, IDWriteTextFormat1Vtbl, IDWriteTextLayout2, IDWriteTextLayout2Vtbl, | |
28 | }; | |
29 | use um::unknwnbase::{IUnknown, IUnknownVtbl}; | |
30 | use um::wingdi::{FONTSIGNATURE, LOGFONTW}; | |
31 | use um::winnt::{HRESULT, WCHAR}; | |
32 | pub const DWRITE_E_REMOTEFONT: HRESULT = 0x8898500D; | |
33 | pub const DWRITE_E_DOWNLOADCANCELLED: HRESULT = 0x8898500E; | |
34 | pub const DWRITE_E_DOWNLOADFAILED: HRESULT = 0x8898500F; | |
35 | pub const DWRITE_E_TOOMANYDOWNLOADS: HRESULT = 0x88985010; | |
36 | ENUM!{enum DWRITE_FONT_PROPERTY_ID { | |
37 | DWRITE_FONT_PROPERTY_ID_NONE, | |
38 | DWRITE_FONT_PROPERTY_ID_FAMILY_NAME, | |
39 | DWRITE_FONT_PROPERTY_ID_PREFERRED_FAMILY_NAME, | |
40 | DWRITE_FONT_PROPERTY_ID_FACE_NAME, | |
41 | DWRITE_FONT_PROPERTY_ID_FULL_NAME, | |
42 | DWRITE_FONT_PROPERTY_ID_WIN32_FAMILY_NAME, | |
43 | DWRITE_FONT_PROPERTY_ID_POSTSCRIPT_NAME, | |
44 | DWRITE_FONT_PROPERTY_ID_DESIGN_SCRIPT_LANGUAGE_TAG, | |
45 | DWRITE_FONT_PROPERTY_ID_SUPPORTED_SCRIPT_LANGUAGE_TAG, | |
46 | DWRITE_FONT_PROPERTY_ID_SEMANTIC_TAG, | |
47 | DWRITE_FONT_PROPERTY_ID_WEIGHT , | |
48 | DWRITE_FONT_PROPERTY_ID_STRETCH, | |
49 | DWRITE_FONT_PROPERTY_ID_STYLE, | |
50 | DWRITE_FONT_PROPERTY_ID_TOTAL, | |
51 | }} | |
52 | STRUCT!{struct DWRITE_FONT_PROPERTY { | |
53 | propertyId: DWRITE_FONT_PROPERTY_ID, | |
54 | propertyValue: *const WCHAR, | |
55 | localeName: *const WCHAR, | |
56 | }} | |
57 | ENUM!{enum DWRITE_LOCALITY { | |
58 | DWRITE_LOCALITY_REMOTE, | |
59 | DWRITE_LOCALITY_PARTIAL, | |
60 | DWRITE_LOCALITY_LOCAL, | |
61 | }} | |
62 | ENUM!{enum DWRITE_RENDERING_MODE1 { | |
63 | DWRITE_RENDERING_MODE1_DEFAULT = DWRITE_RENDERING_MODE_DEFAULT, | |
64 | DWRITE_RENDERING_MODE1_ALIASED = DWRITE_RENDERING_MODE_ALIASED, | |
65 | DWRITE_RENDERING_MODE1_GDI_CLASSIC = DWRITE_RENDERING_MODE_GDI_CLASSIC, | |
66 | DWRITE_RENDERING_MODE1_GDI_NATURAL = DWRITE_RENDERING_MODE_GDI_NATURAL, | |
67 | DWRITE_RENDERING_MODE1_NATURAL = DWRITE_RENDERING_MODE_NATURAL, | |
68 | DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC = DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, | |
69 | DWRITE_RENDERING_MODE1_OUTLINE = DWRITE_RENDERING_MODE_OUTLINE, | |
70 | DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED, | |
71 | }} | |
72 | RIDL!{#[uuid(0xb7924baa, 0x391b, 0x412a, 0x8c, 0x5c, 0xe4, 0x4c, 0xc2, 0xd8, 0x67, 0xdc)] | |
73 | interface IDWriteRenderingParams3(IDWriteRenderingParams3Vtbl): | |
74 | IDWriteRenderingParams2(IDWriteRenderingParams2Vtbl) { | |
75 | fn GetRenderingMode1() -> DWRITE_RENDERING_MODE1, | |
76 | }} | |
77 | RIDL!{#[uuid(0x9a1b41c3, 0xd3bb, 0x466a, 0x87, 0xfc, 0xfe, 0x67, 0x55, 0x6a, 0x3b, 0x65)] | |
78 | interface IDWriteFactory3(IDWriteFactory3Vtbl): IDWriteFactory2(IDWriteFactory2Vtbl) { | |
79 | fn CreateGlyphRunAnalysis( | |
80 | glyphRun: *const DWRITE_GLYPH_RUN, | |
81 | transform: *const DWRITE_MATRIX, | |
82 | renderingMode: DWRITE_RENDERING_MODE1, | |
83 | measuringMode: DWRITE_MEASURING_MODE, | |
84 | gridFitMode: DWRITE_GRID_FIT_MODE, | |
85 | antialiasMode: DWRITE_TEXT_ANTIALIAS_MODE, | |
86 | baselineOriginX: FLOAT, | |
87 | baselineOriginY: FLOAT, | |
88 | glyphRunAnalysis: *mut *mut IDWriteGlyphRunAnalysis, | |
89 | ) -> HRESULT, | |
90 | fn CreateCustomRenderingParams( | |
91 | gamma: FLOAT, | |
92 | enhancedContrast: FLOAT, | |
93 | grayscaleEnhancedContrast: FLOAT, | |
94 | clearTypeLevel: FLOAT, | |
95 | pixelGeometry: DWRITE_PIXEL_GEOMETRY, | |
96 | renderingMode: DWRITE_RENDERING_MODE1, | |
97 | gridFitMode: DWRITE_GRID_FIT_MODE, | |
98 | renderingParams: *mut *mut IDWriteRenderingParams3, | |
99 | ) -> HRESULT, | |
100 | fn CreateFontFaceReference_2( | |
101 | fontFile: *mut IDWriteFontFile, | |
102 | faceIndex: UINT32, | |
103 | fontSimulations: DWRITE_FONT_SIMULATIONS, | |
104 | fontFaceReference: *mut *mut IDWriteFontFaceReference, | |
105 | ) -> HRESULT, | |
106 | fn CreateFontFaceReference_1( | |
107 | filePath: *const WCHAR, | |
108 | lastWriteTime: *const FILETIME, | |
109 | faceIndex: UINT32, | |
110 | fontSimulations: DWRITE_FONT_SIMULATIONS, | |
111 | fontFaceReference: *mut *mut IDWriteFontFaceReference, | |
112 | ) -> HRESULT, | |
113 | fn GetSystemFontSet( | |
114 | fontSet: *mut *mut IDWriteFontSet, | |
115 | ) -> HRESULT, | |
116 | fn CreateFontSetBuilder( | |
117 | fontSetBuilder: *mut *mut IDWriteFontSetBuilder, | |
118 | ) -> HRESULT, | |
119 | fn CreateFontCollectionFromFontSet( | |
120 | fontSet: *mut IDWriteFontSet, | |
121 | fontCollection: *mut *mut IDWriteFontCollection1, | |
122 | ) -> HRESULT, | |
123 | fn GetSystemFontCollection( | |
124 | includeDownloadableFonts: BOOL, | |
125 | fontCollection: *mut *mut IDWriteFontCollection1, | |
126 | checkForUpdates: BOOL, | |
127 | ) -> HRESULT, | |
128 | fn GetFontDownloadQueue( | |
129 | fontDownloadQueue: *mut *mut IDWriteFontDownloadQueue, | |
130 | ) -> HRESULT, | |
131 | }} | |
132 | RIDL!{#[uuid(0x53585141, 0xd9f8, 0x4095, 0x83, 0x21, 0xd7, 0x3c, 0xf6, 0xbd, 0x11, 0x6b)] | |
133 | interface IDWriteFontSet(IDWriteFontSetVtbl): IUnknown(IUnknownVtbl) { | |
134 | fn GetFontCount() -> UINT32, | |
135 | fn GetFontFaceReference( | |
136 | listIndex: UINT32, | |
137 | fontFaceReference: *mut *mut IDWriteFontFaceReference, | |
138 | ) -> HRESULT, | |
139 | fn FindFontFaceReference( | |
140 | fontFaceReference: *mut IDWriteFontFaceReference, | |
141 | listIndex: *mut UINT32, | |
142 | exists: *mut BOOL, | |
143 | ) -> HRESULT, | |
144 | fn FindFontFace( | |
145 | fontFace: *mut IDWriteFontFace, | |
146 | listIndex: *mut UINT32, | |
147 | exists: *mut BOOL, | |
148 | ) -> HRESULT, | |
149 | fn GetPropertyValues_3( | |
150 | propertyID: DWRITE_FONT_PROPERTY_ID, | |
151 | values: *mut *mut IDWriteStringList, | |
152 | ) -> HRESULT, | |
153 | fn GetPropertyValues_2( | |
154 | propertyID: DWRITE_FONT_PROPERTY_ID, | |
155 | preferredLocaleNames: *const WCHAR, | |
156 | values: *mut *mut IDWriteStringList, | |
157 | ) -> HRESULT, | |
158 | fn GetPropertyValues_1( | |
159 | listIndex: UINT32, | |
160 | propertyId: DWRITE_FONT_PROPERTY_ID, | |
161 | exists: *mut BOOL, | |
162 | values: *mut *mut IDWriteLocalizedStrings, | |
163 | ) -> HRESULT, | |
164 | fn GetPropertyOccurrenceCount( | |
165 | property: *const DWRITE_FONT_PROPERTY, | |
166 | propertyOccurrenceCount: *mut UINT32, | |
167 | ) -> HRESULT, | |
168 | fn GetMatchingFonts_2( | |
169 | familyName: *const WCHAR, | |
170 | fontWeight: DWRITE_FONT_WEIGHT, | |
171 | fontStretch: DWRITE_FONT_STRETCH, | |
172 | fontStyle: DWRITE_FONT_STYLE, | |
173 | filteredSet: *mut *mut IDWriteFontSet, | |
174 | ) -> HRESULT, | |
175 | fn GetMatchingFonts_1( | |
176 | properties: *const DWRITE_FONT_PROPERTY, | |
177 | propertyCount: UINT32, | |
178 | filteredSet: *mut *mut IDWriteFontSet, | |
179 | ) -> HRESULT, | |
180 | }} | |
181 | RIDL!{#[uuid(0x2f642afe, 0x9c68, 0x4f40, 0xb8, 0xbe, 0x45, 0x74, 0x01, 0xaf, 0xcb, 0x3d)] | |
182 | interface IDWriteFontSetBuilder(IDWriteFontSetBuilderVtbl): IUnknown(IUnknownVtbl) { | |
183 | fn AddFontFaceReference_2( | |
184 | fontFaceReference: *mut IDWriteFontFaceReference, | |
185 | properties: *const DWRITE_FONT_PROPERTY, | |
186 | propertyCount: UINT32, | |
187 | ) -> HRESULT, | |
188 | fn AddFontFaceReference_1( | |
189 | fontFaceReference: *mut IDWriteFontFaceReference, | |
190 | ) -> HRESULT, | |
191 | fn AddFontSet( | |
192 | fontSet: *mut IDWriteFontSet, | |
193 | ) -> HRESULT, | |
194 | fn CreateFontSet( | |
195 | fontSet: *mut *mut IDWriteFontSet, | |
196 | ) -> HRESULT, | |
197 | }} | |
198 | RIDL!{#[uuid(0x53585141, 0xd9f8, 0x4095, 0x83, 0x21, 0xd7, 0x3c, 0xf6, 0xbd, 0x11, 0x6c)] | |
199 | interface IDWriteFontCollection1(IDWriteFontCollection1Vtbl): | |
200 | IDWriteFontCollection(IDWriteFontCollectionVtbl) { | |
201 | fn GetFontSet( | |
202 | fontSet: *mut *mut IDWriteFontSet, | |
203 | ) -> HRESULT, | |
204 | fn GetFontFamily( | |
205 | index: UINT32, | |
206 | fontFamily: *mut *mut IDWriteFontFamily1, | |
207 | ) -> HRESULT, | |
208 | }} | |
209 | RIDL!{#[uuid(0xda20d8ef, 0x812a, 0x4c43, 0x98, 0x02, 0x62, 0xec, 0x4a, 0xbd, 0x7a, 0xdf)] | |
210 | interface IDWriteFontFamily1(IDWriteFontFamily1Vtbl): | |
211 | IDWriteFontFamily(IDWriteFontFamilyVtbl) { | |
212 | fn GetFontLocality( | |
213 | listIndex: UINT32, | |
214 | ) -> DWRITE_LOCALITY, | |
215 | fn GetFont( | |
216 | listIndex: UINT32, | |
217 | font: *mut *mut IDWriteFont3, | |
218 | ) -> HRESULT, | |
219 | fn GetFontFaceReference( | |
220 | listIndex: UINT32, | |
221 | fontFaceReference: *mut *mut IDWriteFontFaceReference, | |
222 | ) -> HRESULT, | |
223 | }} | |
224 | RIDL!{#[uuid(0xda20d8ef, 0x812a, 0x4c43, 0x98, 0x02, 0x62, 0xec, 0x4a, 0xbd, 0x7a, 0xde)] | |
225 | interface IDWriteFontList1(IDWriteFontList1Vtbl): IDWriteFontList(IDWriteFontListVtbl) { | |
226 | fn GetFontLocality( | |
227 | listIndex: UINT32, | |
228 | ) -> DWRITE_LOCALITY, | |
229 | fn GetFont( | |
230 | listIndex: UINT32, | |
231 | font: *mut *mut IDWriteFont3, | |
232 | ) -> HRESULT, | |
233 | fn GetFontFaceReference( | |
234 | listIndex: UINT32, | |
235 | fontFaceReference: *mut *mut IDWriteFontFaceReference, | |
236 | ) -> HRESULT, | |
237 | }} | |
238 | RIDL!{#[uuid(0x5e7fa7ca, 0xdde3, 0x424c, 0x89, 0xf0, 0x9f, 0xcd, 0x6f, 0xed, 0x58, 0xcd)] | |
239 | interface IDWriteFontFaceReference(IDWriteFontFaceReferenceVtbl): | |
240 | IUnknown(IUnknownVtbl) { | |
241 | fn CreateFontFace( | |
242 | fontFace: *mut *mut IDWriteFontFace3, | |
243 | ) -> HRESULT, | |
244 | fn CreateFontFaceWithSimulations( | |
245 | fontFaceSimulationFlags: DWRITE_FONT_SIMULATIONS, | |
246 | fontFace: *mut *mut IDWriteFontFace3, | |
247 | ) -> HRESULT, | |
248 | fn Equals( | |
249 | fontFaceReference: *mut IDWriteFontFaceReference, | |
250 | ) -> BOOL, | |
251 | fn GetFontFaceIndex() -> UINT32, | |
252 | fn GetSimulations() -> DWRITE_FONT_SIMULATIONS, | |
253 | fn GetFontFile( | |
254 | fontFile: *mut *mut IDWriteFontFile, | |
255 | ) -> HRESULT, | |
256 | fn GetLocalFileSize() -> UINT64, | |
257 | fn GetFileSize() -> UINT64, | |
258 | fn GetFileTime( | |
259 | lastWriteTime: *mut FILETIME, | |
260 | ) -> HRESULT, | |
261 | fn GetLocality() -> DWRITE_LOCALITY, | |
262 | fn EnqueueFontDownloadRequest() -> HRESULT, | |
263 | fn EnqueueCharacterDownloadRequest( | |
264 | characters: *const WCHAR, | |
265 | characterCount: UINT32, | |
266 | ) -> HRESULT, | |
267 | fn EnqueueGlyphDownloadRequest( | |
268 | glyphIndices: *const UINT16, | |
269 | glyphCount: UINT32, | |
270 | ) -> HRESULT, | |
271 | fn EnqueueFileFragmentDownloadRequest( | |
272 | fileOffset: UINT64, | |
273 | fragmentSize: UINT64, | |
274 | ) -> HRESULT, | |
275 | }} | |
276 | RIDL!{#[uuid(0x29748ed6, 0x8c9c, 0x4a6a, 0xbe, 0x0b, 0xd9, 0x12, 0xe8, 0x53, 0x89, 0x44)] | |
277 | interface IDWriteFont3(IDWriteFont3Vtbl): IDWriteFont2(IDWriteFont2Vtbl) { | |
278 | fn CreateFontFace( | |
279 | fontFace: *mut *mut IDWriteFontFace3, | |
280 | ) -> HRESULT, | |
281 | fn Equals( | |
282 | font: *mut IDWriteFont, | |
283 | ) -> BOOL, | |
284 | fn GetFontFaceReference( | |
285 | fontFaceReference: *mut *mut IDWriteFontFaceReference, | |
286 | ) -> HRESULT, | |
287 | fn HasCharacter( | |
288 | unicodeValue: UINT32, | |
289 | ) -> BOOL, | |
290 | fn GetLocality() -> DWRITE_LOCALITY, | |
291 | }} | |
292 | RIDL!{#[uuid(0xd37d7598, 0x09be, 0x4222, 0xa2, 0x36, 0x20, 0x81, 0x34, 0x1c, 0xc1, 0xf2)] | |
293 | interface IDWriteFontFace3(IDWriteFontFace3Vtbl): | |
294 | IDWriteFontFace2(IDWriteFontFace2Vtbl) { | |
295 | fn GetFontFaceReference( | |
296 | fontFaceReference: *mut *mut IDWriteFontFaceReference, | |
297 | ) -> HRESULT, | |
298 | fn GetPanose( | |
299 | panose: *mut DWRITE_PANOSE, | |
300 | ) -> (), | |
301 | fn GetWeight() -> DWRITE_FONT_WEIGHT, | |
302 | fn GetStretch() -> DWRITE_FONT_STRETCH, | |
303 | fn GetStyle() -> DWRITE_FONT_STYLE, | |
304 | fn GetFamilyNames( | |
305 | names: *mut *mut IDWriteLocalizedStrings, | |
306 | ) -> HRESULT, | |
307 | fn GetFaceNames( | |
308 | names: *mut *mut IDWriteLocalizedStrings, | |
309 | ) -> HRESULT, | |
310 | fn GetInformationalStrings( | |
311 | informationalStringID: DWRITE_INFORMATIONAL_STRING_ID, | |
312 | informationalStrings: *mut *mut IDWriteLocalizedStrings, | |
313 | exists: *mut BOOL, | |
314 | ) -> HRESULT, | |
315 | fn HasCharacter( | |
316 | unicodeValue: UINT32, | |
317 | ) -> BOOL, | |
318 | fn GetRecommendedRenderingMode( | |
319 | fontEmSize: FLOAT, | |
320 | dpiX: FLOAT, | |
321 | dpiY: FLOAT, | |
322 | transform: *const DWRITE_MATRIX, | |
323 | isSideways: BOOL, | |
324 | outlineThreshold: DWRITE_OUTLINE_THRESHOLD, | |
325 | measuringMode: DWRITE_MEASURING_MODE, | |
326 | renderingParams: *mut IDWriteRenderingParams, | |
327 | renderingMode: *mut DWRITE_RENDERING_MODE1, | |
328 | gridFitMode: *mut DWRITE_GRID_FIT_MODE, | |
329 | ) -> HRESULT, | |
330 | fn IsCharacterLocal( | |
331 | unicodeValue: UINT32, | |
332 | ) -> BOOL, | |
333 | fn IsGlyphLocal( | |
334 | glyphId: UINT16, | |
335 | ) -> BOOL, | |
336 | fn AreCharactersLocal( | |
337 | characters: *const WCHAR, | |
338 | characterCount: UINT32, | |
339 | enqueueIfNotLocal: BOOL, | |
340 | isLocal: *mut BOOL, | |
341 | ) -> HRESULT, | |
342 | fn AreGlyphsLocal( | |
343 | glyphIndices: *const UINT16, | |
344 | glyphCount: UINT32, | |
345 | enqueueIfNotLocal: BOOL, | |
346 | isLocal: *mut BOOL, | |
347 | ) -> HRESULT, | |
348 | }} | |
349 | RIDL!{#[uuid(0xcfee3140, 0x1157, 0x47ca, 0x8b, 0x85, 0x31, 0xbf, 0xcf, 0x3f, 0x2d, 0x0e)] | |
350 | interface IDWriteStringList(IDWriteStringListVtbl): IUnknown(IUnknownVtbl) { | |
351 | fn GetCount() -> UINT32, | |
352 | fn GetLocaleNameLength( | |
353 | listIndex: UINT32, | |
354 | length: *mut UINT32, | |
355 | ) -> HRESULT, | |
356 | fn GetLocaleName( | |
357 | listIndex: UINT32, | |
358 | localeName: *mut WCHAR, | |
359 | size: UINT32, | |
360 | ) -> HRESULT, | |
361 | fn GetStringLength( | |
362 | listIndex: UINT32, | |
363 | length: *mut UINT32, | |
364 | ) -> HRESULT, | |
365 | fn GetString( | |
366 | listIndex: UINT32, | |
367 | stringBuffer: *mut WCHAR, | |
368 | stringBufferSize: UINT32, | |
369 | ) -> HRESULT, | |
370 | }} | |
371 | RIDL!{#[uuid(0xb06fe5b9, 0x43ec, 0x4393, 0x88, 0x1b, 0xdb, 0xe4, 0xdc, 0x72, 0xfd, 0xa7)] | |
372 | interface IDWriteFontDownloadListener(IDWriteFontDownloadListenerVtbl): | |
373 | IUnknown(IUnknownVtbl) { | |
374 | fn DownloadCompleted( | |
375 | downloadQueue: *mut IDWriteFontDownloadQueue, | |
376 | context: *mut IUnknown, | |
377 | downloadResult: HRESULT, | |
378 | ) -> (), | |
379 | }} | |
380 | RIDL!{#[uuid(0xb71e6052, 0x5aea, 0x4fa3, 0x83, 0x2e, 0xf6, 0x0d, 0x43, 0x1f, 0x7e, 0x91)] | |
381 | interface IDWriteFontDownloadQueue(IDWriteFontDownloadQueueVtbl): | |
382 | IUnknown(IUnknownVtbl) { | |
383 | fn AddListener( | |
384 | listener: *mut IDWriteFontDownloadListener, | |
385 | token: *mut UINT32, | |
386 | ) -> HRESULT, | |
387 | fn RemoveListener( | |
388 | token: UINT32, | |
389 | ) -> HRESULT, | |
390 | fn IsEmpty() -> BOOL, | |
391 | fn BeginDownload( | |
392 | context: *mut IUnknown, | |
393 | ) -> HRESULT, | |
394 | fn CancelDownload() -> HRESULT, | |
395 | fn GetGenerationCount() -> UINT64, | |
396 | }} | |
397 | RIDL!{#[uuid(0x4556be70, 0x3abd, 0x4f70, 0x90, 0xbe, 0x42, 0x17, 0x80, 0xa6, 0xf5, 0x15)] | |
398 | interface IDWriteGdiInterop1(IDWriteGdiInterop1Vtbl): | |
399 | IDWriteGdiInterop(IDWriteGdiInteropVtbl) { | |
400 | fn CreateFontFromLOGFONT( | |
401 | logFont: *const LOGFONTW, | |
402 | fontCollection: *mut IDWriteFontCollection, | |
403 | font: *mut *mut IDWriteFont, | |
404 | ) -> HRESULT, | |
405 | fn GetFontSignature_2( | |
406 | fontFace: *mut IDWriteFontFace, | |
407 | fontSignature: *mut FONTSIGNATURE, | |
408 | ) -> HRESULT, | |
409 | fn GetFontSignature_1( | |
410 | font: *mut IDWriteFont, | |
411 | fontSignature: *mut FONTSIGNATURE, | |
412 | ) -> HRESULT, | |
413 | fn GetMatchingFontsByLOGFONT( | |
414 | logFont: *const LOGFONTW, | |
415 | fontSet: *mut IDWriteFontSet, | |
416 | filteredSet: *mut *mut IDWriteFontSet, | |
417 | ) -> HRESULT, | |
418 | }} | |
419 | STRUCT!{struct DWRITE_LINE_METRICS1 { | |
420 | length: UINT32, | |
421 | trailingWhitespaceLength: UINT32, | |
422 | newlineLength: UINT32, | |
423 | height: FLOAT, | |
424 | baseline: FLOAT, | |
425 | isTrimmed: BOOL, | |
426 | leadingBefore: FLOAT, | |
427 | leadingAfter: FLOAT, | |
428 | }} | |
429 | ENUM!{enum DWRITE_FONT_LINE_GAP_USAGE { | |
430 | DWRITE_FONT_LINE_GAP_USAGE_DEFAULT, | |
431 | DWRITE_FONT_LINE_GAP_USAGE_DISABLED, | |
432 | DWRITE_FONT_LINE_GAP_USAGE_ENABLED, | |
433 | }} | |
434 | STRUCT!{struct DWRITE_LINE_SPACING { | |
435 | method: DWRITE_LINE_SPACING_METHOD, | |
436 | height: FLOAT, | |
437 | baseline: FLOAT, | |
438 | leadingBefore: FLOAT, | |
439 | fontLineGapUsage: DWRITE_FONT_LINE_GAP_USAGE, | |
440 | }} | |
441 | RIDL!{#[uuid(0xf67e0edd, 0x9e3d, 0x4ecc, 0x8c, 0x32, 0x41, 0x83, 0x25, 0x3d, 0xfe, 0x70)] | |
442 | interface IDWriteTextFormat2(IDWriteTextFormat2Vtbl): | |
443 | IDWriteTextFormat1(IDWriteTextFormat1Vtbl) { | |
444 | fn SetLineSpacing( | |
445 | lineSpacingOptions: *const DWRITE_LINE_SPACING, | |
446 | ) -> HRESULT, | |
447 | fn GetLineSpacing( | |
448 | lineSpacingOptions: *mut DWRITE_LINE_SPACING, | |
449 | ) -> HRESULT, | |
450 | }} | |
451 | RIDL!{#[uuid(0x07ddcd52, 0x020e, 0x4de8, 0xac, 0x33, 0x6c, 0x95, 0x3d, 0x83, 0xf9, 0x2d)] | |
452 | interface IDWriteTextLayout3(IDWriteTextLayout3Vtbl): | |
453 | IDWriteTextLayout2(IDWriteTextLayout2Vtbl) { | |
454 | fn InvalidateLayout() -> HRESULT, | |
455 | fn SetLineSpacing( | |
456 | lineSpacingOptions: *const DWRITE_LINE_SPACING, | |
457 | ) -> HRESULT, | |
458 | fn GetLineSpacing( | |
459 | lineSpacingOptions: *mut DWRITE_LINE_SPACING, | |
460 | ) -> HRESULT, | |
461 | fn GetLineMetrics( | |
462 | lineMetrics: *mut DWRITE_LINE_METRICS1, | |
463 | maxLineCount: UINT32, | |
464 | actualLineCount: *mut UINT32, | |
465 | ) -> HRESULT, | |
466 | }} | |
0bf4aa26 XL |
467 | RIDL!{#[uuid(0x27f2a904, 0x4eb8, 0x441d, 0x96, 0x78, 0x05, 0x63, 0xf5, 0x3e, 0x3e, 0x2f)] |
468 | interface IDWriteFontFace4(IDWriteFontFace4Vtbl): IDWriteFontFace3(IDWriteFontFace3Vtbl) { | |
469 | fn GetGlyphImageFormats_2( | |
470 | glyph: UINT16, | |
471 | ppemFirst: UINT32, | |
472 | ppemLast: UINT32, | |
473 | formats: *mut DWRITE_GLYPH_IMAGE_FORMATS, | |
474 | ) -> HRESULT, | |
475 | fn GetGlyphImageFormats_1() -> DWRITE_GLYPH_IMAGE_FORMATS, | |
476 | fn GetGlyphImageData( | |
477 | glyph: UINT16, | |
478 | ppem: UINT32, | |
479 | format: DWRITE_GLYPH_IMAGE_FORMATS, | |
480 | data: *mut DWRITE_GLYPH_IMAGE_DATA, | |
481 | context: *mut *mut c_void, | |
482 | ) -> HRESULT, | |
483 | fn ReleaseGlyphImageData( | |
484 | context: *mut c_void, | |
485 | ) -> (), | |
486 | }} | |
487 | ENUM!{enum DWRITE_FONT_AXIS_TAG { | |
488 | DWRITE_FONT_AXIS_TAG_WEIGHT = 0x74686777, | |
489 | DWRITE_FONT_AXIS_TAG_WIDTH = 0x68746477, | |
490 | DWRITE_FONT_AXIS_TAG_SLANT = 0x746e6c73, | |
491 | DWRITE_FONT_AXIS_TAG_OPTICAL_SIZE = 0x7a73706f, | |
492 | DWRITE_FONT_AXIS_TAG_ITALIC = 0x6c617469, | |
493 | }} | |
494 | STRUCT!{struct DWRITE_FONT_AXIS_VALUE { | |
495 | axisTag: DWRITE_FONT_AXIS_TAG, | |
496 | value: FLOAT, | |
497 | }} | |
498 | STRUCT!{struct DWRITE_FONT_AXIS_RANGE { | |
499 | axisTag: DWRITE_FONT_AXIS_TAG, | |
500 | minValue: FLOAT, | |
501 | maxValue: FLOAT, | |
502 | }} | |
503 | ENUM!{enum DWRITE_FONT_AXIS_ATTRIBUTES { | |
504 | DWRITE_FONT_AXIS_ATTRIBUTES_NONE, | |
505 | DWRITE_FONT_AXIS_ATTRIBUTES_VARIABLE, | |
506 | DWRITE_FONT_AXIS_ATTRIBUTES_HIDDEN, | |
507 | }} | |
508 | RIDL!{#[uuid(0x98eff3a5, 0xb667, 0x479a, 0xb1, 0x45, 0xe2, 0xfa, 0x5b, 0x9f, 0xdc, 0x29)] | |
509 | interface IDWriteFontFace5(IDWriteFontFace5Vtbl): IDWriteFontFace4(IDWriteFontFace4Vtbl) { | |
510 | fn GetFontAxisValueCount() -> UINT32, | |
511 | fn GetFontAxisValues( | |
512 | values: *mut DWRITE_FONT_AXIS_VALUE, | |
513 | valueCount: UINT32, | |
514 | ) -> HRESULT, | |
515 | fn HasVariations() -> BOOL, | |
516 | fn GetFontResource( | |
517 | resource: *mut *mut IDWriteFontResource, | |
518 | ) -> HRESULT, | |
519 | fn Equals( | |
520 | fontFace: *mut IDWriteFontFace, | |
521 | ) -> BOOL, | |
522 | }} | |
523 | RIDL!{#[uuid(0xc081fe77, 0x2fd1, 0x41ac, 0xa5, 0xa3, 0x34, 0x98, 0x3c, 0x4b, 0xa6, 0x1a)] | |
524 | interface IDWriteFontFaceReference1(IDWriteFontFaceReference1Vtbl): | |
525 | IDWriteFontFaceReference(IDWriteFontFaceReferenceVtbl) { | |
526 | fn CreateFontFace( | |
527 | fontFace: *mut *mut IDWriteFontFace5, | |
528 | ) -> HRESULT, | |
529 | fn GetFontAxisValueCount() -> UINT32, | |
530 | fn GetFontAxisValues( | |
531 | values: *mut DWRITE_FONT_AXIS_VALUE, | |
532 | numValues: UINT32, | |
533 | ) -> HRESULT, | |
534 | }} | |
535 | RIDL!{#[uuid(0x1f803a76, 0x6871, 0x48e8, 0x98, 0x7f, 0xb9, 0x75, 0x55, 0x1c, 0x50, 0xf2)] | |
536 | interface IDWriteFontResource(IDWriteFontResourceVtbl): IUnknown(IUnknownVtbl) { | |
537 | fn GetFontFile( | |
538 | fontFile: *mut *mut IDWriteFontFile, | |
539 | ) -> HRESULT, | |
540 | fn GetFontFaceIndex() -> UINT32, | |
541 | fn GetFontAxisCount() -> UINT32, | |
542 | fn GetDefaultFontAxisValues( | |
543 | values: *const DWRITE_FONT_AXIS_VALUE, | |
544 | numValues: UINT32, | |
545 | ) -> HRESULT, | |
546 | fn GetFontAxisRanges( | |
547 | ranges: *const DWRITE_FONT_AXIS_RANGE, | |
548 | numRanges: UINT32, | |
549 | ) -> HRESULT, | |
550 | fn GetFontAxisAttributes( | |
551 | axis: UINT32, | |
552 | ) -> DWRITE_FONT_AXIS_ATTRIBUTES, | |
553 | fn GetAxisNames( | |
554 | axis: UINT32, | |
555 | names: *mut *mut IDWriteLocalizedStrings, | |
556 | ) -> HRESULT, | |
557 | fn GetAxisValueNameCount( | |
558 | axis: UINT32, | |
559 | ) -> UINT32, | |
560 | fn GetAxisValueNames( | |
561 | axis: UINT32, | |
562 | axisValue: UINT32, | |
563 | axisRange: *mut DWRITE_FONT_AXIS_RANGE, | |
564 | names: *mut *mut IDWriteLocalizedStrings, | |
565 | ) -> HRESULT, | |
566 | fn HasVariations() -> BOOL, | |
567 | fn CreateFontFace( | |
568 | simulations: DWRITE_FONT_SIMULATIONS, | |
569 | axisValues: *const DWRITE_FONT_AXIS_VALUE, | |
570 | numValues: UINT32, | |
571 | fontFace: *mut *mut IDWriteFontFace5, | |
572 | ) -> HRESULT, | |
573 | fn CreateFontFaceReference( | |
574 | simulations: DWRITE_FONT_SIMULATIONS, | |
575 | axisValues: *const DWRITE_FONT_AXIS_VALUE, | |
576 | numValues: UINT32, | |
577 | reference: *mut *mut IDWriteFontFaceReference1, | |
578 | ) -> HRESULT, | |
579 | }} |