winhlp32: Fix some images not shown in certain 16-bit help files.
[wine.git] / include / dwrite_3.idl
blobb69f29a162cbe3a0d8cff7a1b4944dcc6b449854
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 IDWriteFontSetBuilder;
25 interface IDWriteFontDownloadQueue;
27 typedef enum DWRITE_LOCALITY
29 DWRITE_LOCALITY_REMOTE,
30 DWRITE_LOCALITY_PARTIAL,
31 DWRITE_LOCALITY_LOCAL
32 } DWRITE_LOCALITY;
34 typedef enum DWRITE_RENDERING_MODE1
36 DWRITE_RENDERING_MODE1_DEFAULT,
37 DWRITE_RENDERING_MODE1_ALIASED,
38 DWRITE_RENDERING_MODE1_GDI_CLASSIC,
39 DWRITE_RENDERING_MODE1_GDI_NATURAL,
40 DWRITE_RENDERING_MODE1_NATURAL,
41 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC,
42 DWRITE_RENDERING_MODE1_OUTLINE,
43 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED
44 } DWRITE_RENDERING_MODE1;
47 local,
48 object,
49 uuid(b06fe5b9-43ec-4393-881b-dbe4dc72fda7)
51 interface IDWriteFontDownloadListener : IUnknown
53 void DownloadCompleted(IDWriteFontDownloadQueue *queue, IUnknown *context, HRESULT result);
57 local,
58 object,
59 uuid(b71e6052-5aea-4fa3-832e-f60d431f7e91)
61 interface IDWriteFontDownloadQueue : IUnknown
63 HRESULT AddListener(IDWriteFontDownloadListener *listener, UINT32 *token);
64 HRESULT RemoveListener(UINT32 token);
65 BOOL IsEmpty();
66 HRESULT BeginDownload(IUnknown *context);
67 HRESULT CancelDownload();
68 UINT64 GetGenerationCount();
72 local,
73 object,
74 uuid(b7924baa-391b-412a-8c5c-e44cc2d867dc)
76 interface IDWriteRenderingParams3 : IDWriteRenderingParams2
78 DWRITE_RENDERING_MODE1 GetRenderingMode1();
82 local,
83 object,
84 uuid(29748ed6-8c9c-4a6a-be0b-d912e8538944)
86 interface IDWriteFont3 : IDWriteFont2
88 HRESULT CreateFontFace(IDWriteFontFace3 **fontface);
89 BOOL Equals(IDWriteFont *font);
90 HRESULT GetFontFaceReference(IDWriteFontFaceReference **reference);
91 BOOL HasCharacter(UINT32 character);
92 DWRITE_LOCALITY GetLocality();
96 local,
97 object,
98 uuid(da20d8ef-812a-4c43-9802-62ec4abd7adf)
100 interface IDWriteFontFamily1 : IDWriteFontFamily
102 DWRITE_LOCALITY GetFontLocality(UINT32 index);
103 HRESULT GetFont(UINT32 index, IDWriteFont3 **font);
104 HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
108 local,
109 object,
110 uuid(53585141-d9f8-4095-8321-d73cf6bd116c)
112 interface IDWriteFontCollection1 : IDWriteFontCollection
114 HRESULT GetFontSet(IDWriteFontSet **fontset);
115 HRESULT GetFontFamily(UINT32 index, IDWriteFontFamily1 **family);
119 local,
120 object,
121 uuid(5e7fa7ca-dde3-424c-89f0-9fcd6fed58cd)
123 interface IDWriteFontFaceReference : IUnknown
125 HRESULT CreateFontFace(IDWriteFontFace3 **fontface);
126 HRESULT CreateFontFaceWithSimulations(DWRITE_FONT_SIMULATIONS simulations,
127 IDWriteFontFace3 **fontface);
128 BOOL Equals(IDWriteFontFaceReference *reference);
129 UINT32 GetFontFaceIndex();
130 DWRITE_FONT_SIMULATIONS GetSimulations();
131 HRESULT GetFontFile(IDWriteFontFile **fontfile);
132 UINT64 GetLocalFileSize();
133 UINT64 GetFileSize();
134 HRESULT GetFileTime(FILETIME *writetime);
135 DWRITE_LOCALITY GetLocality();
136 HRESULT EnqueueFontDownloadRequest();
137 HRESULT EnqueueCharacterDownloadRequest(WCHAR const *chars, UINT32 count);
138 HRESULT EnqueueGlyphDownloadRequest(UINT16 const *glyphs, UINT32 count);
139 HRESULT EnqueueFileFragmentDownloadRequest(UINT64 offset, UINT64 size);
143 local,
144 object,
145 uuid(da20d8ef-812a-4c43-9802-62ec4abd7ade)
147 interface IDWriteFontList1 : IDWriteFontList
149 DWRITE_LOCALITY GetFontLocality(UINT32 index);
150 HRESULT GetFont(UINT32 index, IDWriteFont3 **font);
151 HRESULT GetFontFaceReference(UINT32 index, IDWriteFontFaceReference **reference);
155 local,
156 object,
157 uuid(d37d7598-09be-4222-a236-2081341cc1f2)
159 interface IDWriteFontFace3 : IDWriteFontFace2
161 HRESULT GetFontFaceReference(IDWriteFontFaceReference **reference);
162 void GetPanose(DWRITE_PANOSE *panose);
163 DWRITE_FONT_WEIGHT GetWeight();
164 DWRITE_FONT_STRETCH GetStretch();
165 DWRITE_FONT_STYLE GetStyle();
166 HRESULT GetFamilyNames(IDWriteLocalizedStrings **names);
167 HRESULT GetFaceNames(IDWriteLocalizedStrings **names);
168 HRESULT GetInformationalStrings(DWRITE_INFORMATIONAL_STRING_ID stringid,
169 IDWriteLocalizedStrings **strings,
170 BOOL *exists);
171 BOOL HasCharacter(UINT32 character);
172 HRESULT GetRecommendedRenderingMode(
173 FLOAT emsize,
174 FLOAT dpi_x,
175 FLOAT dpi_y,
176 DWRITE_MATRIX const *transform,
177 BOOL is_sideways,
178 DWRITE_OUTLINE_THRESHOLD threshold,
179 DWRITE_MEASURING_MODE measuring_mode,
180 IDWriteRenderingParams *params,
181 DWRITE_RENDERING_MODE1 *rendering_mode,
182 DWRITE_GRID_FIT_MODE *gridfit_mode);
183 BOOL IsCharacterLocal(UINT32 character);
184 BOOL IsGlyphLocal(UINT16 glyph);
185 HRESULT AreCharactersLocal(WCHAR const *characters,
186 UINT32 count, BOOL enqueue_if_not, BOOL *are_local);
187 HRESULT AreGlyphsLocal(UINT16 const *glyphs, UINT32 count,
188 BOOL enqueue_if_not, BOOL *are_local);
192 local,
193 object,
194 uuid(cfee3140-1257-47ca-8b85-31bfcf3f2d0e)
196 interface IDWriteStringList : IUnknown
198 UINT32 GetCount();
199 HRESULT GetLocaleNameLength(UINT32 index, UINT32 *length);
200 HRESULT GetLocaleName(UINT32 index, WCHAR *name, UINT32 size);
201 HRESULT GetStringLength(UINT32 index, UINT32 *length);
202 HRESULT GetString(UINT32 index, WCHAR *string, UINT32 size);
205 typedef struct DWRITE_LINE_METRICS1
207 UINT32 length;
208 UINT32 trailingWhitespaceLength;
209 UINT32 newlineLength;
210 FLOAT height;
211 FLOAT baseline;
212 BOOL isTrimmed;
213 FLOAT leadingBefore;
214 FLOAT leadingAfter;
215 } DWRITE_LINE_METRICS1;
217 typedef enum DWRITE_FONT_LINE_GAP_USAGE
219 DWRITE_FONT_LINE_GAP_USAGE_DEFAULT,
220 DWRITE_FONT_LINE_GAP_USAGE_DISABLED,
221 DWRITE_FONT_LINE_GAP_USAGE_ENABLED
222 } DWRITE_FONT_LINE_GAP_USAGE;
224 typedef struct DWRITE_LINE_SPACING
226 DWRITE_LINE_SPACING_METHOD method;
227 FLOAT height;
228 FLOAT baseline;
229 FLOAT leadingBefore;
230 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage;
231 } DWRITE_LINE_SPACING;
234 local,
235 object,
236 uuid(f67e0edd-9e3d-4ecc-8c32-4183253dfe70)
238 interface IDWriteTextFormat2 : IDWriteTextFormat1
240 HRESULT SetLineSpacing(DWRITE_LINE_SPACING const *spacing);
241 HRESULT GetLineSpacing(DWRITE_LINE_SPACING *spacing);
245 local,
246 object,
247 uuid(07ddcd52-020e-4de8-ac33-6c953d83f92d)
249 interface IDWriteTextLayout3 : IDWriteTextLayout2
251 HRESULT InvalidateLayout();
252 HRESULT SetLineSpacing(DWRITE_LINE_SPACING const *spacing);
253 HRESULT GetLineSpacing(DWRITE_LINE_SPACING *spacing);
254 HRESULT GetLineMetrics(DWRITE_LINE_METRICS1 *metrics, UINT32 max_count, UINT32 *count);
258 local,
259 object,
260 uuid(9a1b41c3-d3bb-466a-87fc-fe67556a3b65)
262 interface IDWriteFactory3 : IDWriteFactory2
264 HRESULT CreateGlyphRunAnalysis(
265 DWRITE_GLYPH_RUN const *run,
266 DWRITE_MATRIX const *transform,
267 DWRITE_RENDERING_MODE1 rendering_mode,
268 DWRITE_MEASURING_MODE measuring_mode,
269 DWRITE_GRID_FIT_MODE gridfit_mode,
270 DWRITE_TEXT_ANTIALIAS_MODE antialias_mode,
271 FLOAT origin_x,
272 FLOAT origin_y,
273 IDWriteGlyphRunAnalysis **analysis);
275 HRESULT CreateCustomRenderingParams(
276 FLOAT gamma,
277 FLOAT enhanced_contrast,
278 FLOAT grayscale_enhanced_contrast,
279 FLOAT cleartype_level,
280 DWRITE_PIXEL_GEOMETRY pixel_geometry,
281 DWRITE_RENDERING_MODE1 rendering_mode,
282 DWRITE_GRID_FIT_MODE gridfit_mode,
283 IDWriteRenderingParams3 **params);
285 HRESULT CreateFontFaceReference(
286 WCHAR const *path,
287 FILETIME const *writetime,
288 UINT32 index,
289 DWRITE_FONT_SIMULATIONS simulations,
290 IDWriteFontFaceReference **reference);
292 HRESULT CreateFontFaceReference_(
293 IDWriteFontFile *file,
294 UINT32 index,
295 DWRITE_FONT_SIMULATIONS simulations,
296 IDWriteFontFaceReference **reference);
298 HRESULT GetSystemFontSet(IDWriteFontSet **fontset);
299 HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder **builder);
300 HRESULT CreateFontCollectionFromFontSet(
301 IDWriteFontSet *fontset,
302 IDWriteFontCollection1 **collection);
304 HRESULT GetSystemFontCollection(
305 BOOL include_downloadable,
306 IDWriteFontCollection1 **collection,
307 BOOL check_for_updates);
309 HRESULT GetFontDownloadQueue(IDWriteFontDownloadQueue **queue);