vcomp100: Prefer builtin version.
[wine.git] / include / dwrite_3.idl
blob9e7a4c6b4d44d3df8117e2150e0cc6ababff8af2
1 /*
2 * Copyright 2016 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 "dwrite_2.idl";
21 interface IDWriteFontFaceReference;
22 interface IDWriteFontFace3;
23 interface IDWriteFontSet;
24 interface IDWriteFontDownloadQueue;
26 cpp_quote("#ifndef _WINGDI_")
27 /* already defined in wingdi.h but needed for WIDL */
28 typedef struct FONTSIGNATURE FONTSIGNATURE;
29 cpp_quote("#endif /* _WINGDI_ */")
31 typedef enum DWRITE_LOCALITY
33 DWRITE_LOCALITY_REMOTE,
34 DWRITE_LOCALITY_PARTIAL,
35 DWRITE_LOCALITY_LOCAL
36 } DWRITE_LOCALITY;
38 typedef enum DWRITE_RENDERING_MODE1
40 DWRITE_RENDERING_MODE1_DEFAULT,
41 DWRITE_RENDERING_MODE1_ALIASED,
42 DWRITE_RENDERING_MODE1_GDI_CLASSIC,
43 DWRITE_RENDERING_MODE1_GDI_NATURAL,
44 DWRITE_RENDERING_MODE1_NATURAL,
45 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC,
46 DWRITE_RENDERING_MODE1_OUTLINE,
47 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED
48 } DWRITE_RENDERING_MODE1;
50 typedef enum DWRITE_FONT_PROPERTY_ID
52 DWRITE_FONT_PROPERTY_ID_NONE,
53 DWRITE_FONT_PROPERTY_ID_FAMILY_NAME,
54 DWRITE_FONT_PROPERTY_ID_PREFERRED_FAMILY_NAME,
55 DWRITE_FONT_PROPERTY_ID_FACE_NAME,
56 DWRITE_FONT_PROPERTY_ID_FULL_NAME,
57 DWRITE_FONT_PROPERTY_ID_WIN32_FAMILY_NAME,
58 DWRITE_FONT_PROPERTY_ID_POSTSCRIPT_NAME,
59 DWRITE_FONT_PROPERTY_ID_DESIGN_SCRIPT_LANGUAGE_TAG,
60 DWRITE_FONT_PROPERTY_ID_SEMANTIC_TAG,
61 DWRITE_FONT_PROPERTY_ID_WEIGHT,
62 DWRITE_FONT_PROPERTY_ID_STRETCH,
63 DWRITE_FONT_PROPERTY_ID_STYLE,
64 DWRITE_FONT_PROPERTY_ID_TOTAL
65 } DWRITE_FONT_PROPERTY_ID;
67 typedef struct DWRITE_FONT_PROPERTY
69 DWRITE_FONT_PROPERTY_ID propertyId;
70 WCHAR const *propertyValue;
71 WCHAR const *localeName;
72 } DWRITE_FONT_PROPERTY;
75 local,
76 object,
77 uuid(b06fe5b9-43ec-4393-881b-dbe4dc72fda7)
79 interface IDWriteFontDownloadListener : IUnknown
81 void DownloadCompleted(IDWriteFontDownloadQueue *queue, IUnknown *context, HRESULT result);
85 local,
86 object,
87 uuid(b71e6052-5aea-4fa3-832e-f60d431f7e91)
89 interface IDWriteFontDownloadQueue : IUnknown
91 HRESULT AddListener(IDWriteFontDownloadListener *listener, UINT32 *token);
92 HRESULT RemoveListener(UINT32 token);
93 BOOL IsEmpty();
94 HRESULT BeginDownload(IUnknown *context);
95 HRESULT CancelDownload();
96 UINT64 GetGenerationCount();
100 local,
101 object,
102 uuid(b7924baa-391b-412a-8c5c-e44cc2d867dc)
104 interface IDWriteRenderingParams3 : IDWriteRenderingParams2
106 DWRITE_RENDERING_MODE1 GetRenderingMode1();
110 local,
111 object,
112 uuid(cfee3140-1257-47ca-8b85-31bfcf3f2d0e)
114 interface IDWriteStringList : IUnknown
116 UINT32 GetCount();
117 HRESULT GetLocaleNameLength(UINT32 index, UINT32 *length);
118 HRESULT GetLocaleName(UINT32 index, WCHAR *name, UINT32 size);
119 HRESULT GetStringLength(UINT32 index, UINT32 *length);
120 HRESULT GetString(UINT32 index, WCHAR *string, UINT32 size);
124 local,
125 object,
126 uuid(53585141-d9f8-4095-8321-d73cf6bd116b)
128 interface IDWriteFontSet : IUnknown
130 UINT32 GetFontCount();
131 HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
132 HRESULT FindFontFaceReference(IDWriteFontFaceReference *reference,
133 UINT32 *index, BOOL *exists);
134 HRESULT FindFontFace(IDWriteFontFace *fontface, UINT32 *index, BOOL *exists);
135 HRESULT GetPropertyValues__(DWRITE_FONT_PROPERTY_ID id, IDWriteStringList **values);
136 HRESULT GetPropertyValues_(DWRITE_FONT_PROPERTY_ID id,
137 WCHAR const *preferred_locales, IDWriteStringList **values);
138 HRESULT GetPropertyValues(UINT32 index, DWRITE_FONT_PROPERTY_ID id, BOOL *exists,
139 IDWriteLocalizedStrings **values);
140 HRESULT GetPropertyOccurrenceCount(DWRITE_FONT_PROPERTY const *property, UINT32 *count);
141 HRESULT GetMatchingFonts_(WCHAR const *family, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STRETCH stretch,
142 DWRITE_FONT_STYLE style, IDWriteFontSet **fontset);
143 HRESULT GetMatchingFonts(DWRITE_FONT_PROPERTY const *props, UINT32 count, IDWriteFontSet **fontset);
147 local,
148 object,
149 uuid(29748ed6-8c9c-4a6a-be0b-d912e8538944)
151 interface IDWriteFont3 : IDWriteFont2
153 HRESULT CreateFontFace(IDWriteFontFace3 **fontface);
154 BOOL Equals(IDWriteFont *font);
155 HRESULT GetFontFaceReference(IDWriteFontFaceReference **reference);
156 BOOL HasCharacter(UINT32 character);
157 DWRITE_LOCALITY GetLocality();
161 local,
162 object,
163 uuid(da20d8ef-812a-4c43-9802-62ec4abd7adf)
165 interface IDWriteFontFamily1 : IDWriteFontFamily
167 DWRITE_LOCALITY GetFontLocality(UINT32 index);
168 HRESULT GetFont(UINT32 index, IDWriteFont3 **font);
169 HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
173 local,
174 object,
175 uuid(53585141-d9f8-4095-8321-d73cf6bd116c)
177 interface IDWriteFontCollection1 : IDWriteFontCollection
179 HRESULT GetFontSet(IDWriteFontSet **fontset);
180 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily1 **family);
184 local,
185 object,
186 uuid(5e7fa7ca-dde3-424c-89f0-9fcd6fed58cd)
188 interface IDWriteFontFaceReference : IUnknown
190 HRESULT CreateFontFace(IDWriteFontFace3 **fontface);
191 HRESULT CreateFontFaceWithSimulations(DWRITE_FONT_SIMULATIONS simulations,
192 IDWriteFontFace3 **fontface);
193 BOOL Equals(IDWriteFontFaceReference *reference);
194 UINT32 GetFontFaceIndex();
195 DWRITE_FONT_SIMULATIONS GetSimulations();
196 HRESULT GetFontFile(IDWriteFontFile **fontfile);
197 UINT64 GetLocalFileSize();
198 UINT64 GetFileSize();
199 HRESULT GetFileTime(FILETIME *writetime);
200 DWRITE_LOCALITY GetLocality();
201 HRESULT EnqueueFontDownloadRequest();
202 HRESULT EnqueueCharacterDownloadRequest(WCHAR const *chars, UINT32 count);
203 HRESULT EnqueueGlyphDownloadRequest(UINT16 const *glyphs, UINT32 count);
204 HRESULT EnqueueFileFragmentDownloadRequest(UINT64 offset, UINT64 size);
208 local,
209 object,
210 uuid(da20d8ef-812a-4c43-9802-62ec4abd7ade)
212 interface IDWriteFontList1 : IDWriteFontList
214 DWRITE_LOCALITY GetFontLocality(UINT32 index);
215 HRESULT GetFont(UINT32 index, IDWriteFont3 **font);
216 HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
220 local,
221 object,
222 uuid(d37d7598-09be-4222-a236-2081341cc1f2)
224 interface IDWriteFontFace3 : IDWriteFontFace2
226 HRESULT GetFontFaceReference(IDWriteFontFaceReference **reference);
227 void GetPanose(DWRITE_PANOSE *panose);
228 DWRITE_FONT_WEIGHT GetWeight();
229 DWRITE_FONT_STRETCH GetStretch();
230 DWRITE_FONT_STYLE GetStyle();
231 HRESULT GetFamilyNames(IDWriteLocalizedStrings **names);
232 HRESULT GetFaceNames(IDWriteLocalizedStrings **names);
233 HRESULT GetInformationalStrings(DWRITE_INFORMATIONAL_STRING_ID stringid,
234 IDWriteLocalizedStrings **strings,
235 BOOL *exists);
236 BOOL HasCharacter(UINT32 character);
237 HRESULT GetRecommendedRenderingMode(
238 FLOAT emsize,
239 FLOAT dpi_x,
240 FLOAT dpi_y,
241 DWRITE_MATRIX const *transform,
242 BOOL is_sideways,
243 DWRITE_OUTLINE_THRESHOLD threshold,
244 DWRITE_MEASURING_MODE measuring_mode,
245 IDWriteRenderingParams *params,
246 DWRITE_RENDERING_MODE1 *rendering_mode,
247 DWRITE_GRID_FIT_MODE *gridfit_mode);
248 BOOL IsCharacterLocal(UINT32 character);
249 BOOL IsGlyphLocal(UINT16 glyph);
250 HRESULT AreCharactersLocal(WCHAR const *characters,
251 UINT32 count, BOOL enqueue_if_not, BOOL *are_local);
252 HRESULT AreGlyphsLocal(UINT16 const *glyphs, UINT32 count,
253 BOOL enqueue_if_not, BOOL *are_local);
257 typedef struct DWRITE_LINE_METRICS1
259 UINT32 length;
260 UINT32 trailingWhitespaceLength;
261 UINT32 newlineLength;
262 FLOAT height;
263 FLOAT baseline;
264 BOOL isTrimmed;
265 FLOAT leadingBefore;
266 FLOAT leadingAfter;
267 } DWRITE_LINE_METRICS1;
269 typedef enum DWRITE_FONT_LINE_GAP_USAGE
271 DWRITE_FONT_LINE_GAP_USAGE_DEFAULT,
272 DWRITE_FONT_LINE_GAP_USAGE_DISABLED,
273 DWRITE_FONT_LINE_GAP_USAGE_ENABLED
274 } DWRITE_FONT_LINE_GAP_USAGE;
276 typedef struct DWRITE_LINE_SPACING
278 DWRITE_LINE_SPACING_METHOD method;
279 FLOAT height;
280 FLOAT baseline;
281 FLOAT leadingBefore;
282 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage;
283 } DWRITE_LINE_SPACING;
286 local,
287 object,
288 uuid(f67e0edd-9e3d-4ecc-8c32-4183253dfe70)
290 interface IDWriteTextFormat2 : IDWriteTextFormat1
292 HRESULT SetLineSpacing(DWRITE_LINE_SPACING const *spacing);
293 HRESULT GetLineSpacing(DWRITE_LINE_SPACING *spacing);
297 local,
298 object,
299 uuid(07ddcd52-020e-4de8-ac33-6c953d83f92d)
301 interface IDWriteTextLayout3 : IDWriteTextLayout2
303 HRESULT InvalidateLayout();
304 HRESULT SetLineSpacing(DWRITE_LINE_SPACING const *spacing);
305 HRESULT GetLineSpacing(DWRITE_LINE_SPACING *spacing);
306 HRESULT GetLineMetrics(DWRITE_LINE_METRICS1 *metrics, UINT32 max_count, UINT32 *count);
310 local,
311 object,
312 uuid(4556be70-3abd-4f70-90be-421780a6f515)
314 interface IDWriteGdiInterop1 : IDWriteGdiInterop
316 HRESULT CreateFontFromLOGFONT(LOGFONTW const *logfont,
317 IDWriteFontCollection *collection,
318 IDWriteFont **font);
320 /* GetFontSignature() methods are listed in reversed order to make
321 resulting vtable order compatible. */
322 HRESULT GetFontSignature_(IDWriteFontFace *fontface, FONTSIGNATURE *fontsig);
323 HRESULT GetFontSignature(IDWriteFont *font, FONTSIGNATURE *fontsig);
324 HRESULT GetMatchingFontsByLOGFONT(LOGFONTW const *logfont,
325 IDWriteFontSet *fontset,
326 IDWriteFontSet **subset);
330 local,
331 object,
332 uuid(2f642afe-9c68-4f40-b8be-457401afcb3d)
334 interface IDWriteFontSetBuilder : IUnknown
336 HRESULT AddFontFaceReference_(IDWriteFontFaceReference *ref,
337 DWRITE_FONT_PROPERTY const *props,
338 UINT32 prop_count);
339 HRESULT AddFontFaceReference(IDWriteFontFaceReference *ref);
340 HRESULT AddFontSet(IDWriteFontSet *fontset);
341 HRESULT CreateFontSet(IDWriteFontSet **fontset);
345 local,
346 object,
347 uuid(9a1b41c3-d3bb-466a-87fc-fe67556a3b65)
349 interface IDWriteFactory3 : IDWriteFactory2
351 HRESULT CreateGlyphRunAnalysis(
352 DWRITE_GLYPH_RUN const *run,
353 DWRITE_MATRIX const *transform,
354 DWRITE_RENDERING_MODE1 rendering_mode,
355 DWRITE_MEASURING_MODE measuring_mode,
356 DWRITE_GRID_FIT_MODE gridfit_mode,
357 DWRITE_TEXT_ANTIALIAS_MODE antialias_mode,
358 FLOAT origin_x,
359 FLOAT origin_y,
360 IDWriteGlyphRunAnalysis **analysis);
362 HRESULT CreateCustomRenderingParams(
363 FLOAT gamma,
364 FLOAT enhanced_contrast,
365 FLOAT grayscale_enhanced_contrast,
366 FLOAT cleartype_level,
367 DWRITE_PIXEL_GEOMETRY pixel_geometry,
368 DWRITE_RENDERING_MODE1 rendering_mode,
369 DWRITE_GRID_FIT_MODE gridfit_mode,
370 IDWriteRenderingParams3 **params);
372 /* CreateFontFaceReference methods are listed in reversed order to make
373 resulting vtable order compatible. */
374 HRESULT CreateFontFaceReference_(
375 IDWriteFontFile *file,
376 UINT32 index,
377 DWRITE_FONT_SIMULATIONS simulations,
378 IDWriteFontFaceReference **reference);
380 HRESULT CreateFontFaceReference(
381 WCHAR const *path,
382 FILETIME const *writetime,
383 UINT32 index,
384 DWRITE_FONT_SIMULATIONS simulations,
385 IDWriteFontFaceReference **reference);
387 HRESULT GetSystemFontSet(IDWriteFontSet **fontset);
388 HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder **builder);
389 HRESULT CreateFontCollectionFromFontSet(
390 IDWriteFontSet *fontset,
391 IDWriteFontCollection1 **collection);
393 HRESULT GetSystemFontCollection(
394 BOOL include_downloadable,
395 IDWriteFontCollection1 **collection,
396 BOOL check_for_updates);
398 HRESULT GetFontDownloadQueue(IDWriteFontDownloadQueue **queue);