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 cpp_quote
("#ifndef _WINGDI_")
28 /* already defined in wingdi.h but needed for WIDL */
29 typedef struct FONTSIGNATURE FONTSIGNATURE
;
30 cpp_quote
("#endif /* _WINGDI_ */")
32 typedef enum DWRITE_LOCALITY
34 DWRITE_LOCALITY_REMOTE
,
35 DWRITE_LOCALITY_PARTIAL
,
39 typedef enum DWRITE_RENDERING_MODE1
41 DWRITE_RENDERING_MODE1_DEFAULT
,
42 DWRITE_RENDERING_MODE1_ALIASED
,
43 DWRITE_RENDERING_MODE1_GDI_CLASSIC
,
44 DWRITE_RENDERING_MODE1_GDI_NATURAL
,
45 DWRITE_RENDERING_MODE1_NATURAL
,
46 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC
,
47 DWRITE_RENDERING_MODE1_OUTLINE
,
48 DWRITE_RENDERING_MODE1_NATURAL_SYMMETRIC_DOWNSAMPLED
49 } DWRITE_RENDERING_MODE1
;
54 uuid(b06fe5b9
-43ec
-4393-881b
-dbe4dc72fda7
)
56 interface IDWriteFontDownloadListener
: IUnknown
58 void DownloadCompleted
(IDWriteFontDownloadQueue
*queue
, IUnknown
*context
, HRESULT result
);
64 uuid(b71e6052
-5aea
-4fa3
-832e
-f60d431f7e91
)
66 interface IDWriteFontDownloadQueue
: IUnknown
68 HRESULT AddListener
(IDWriteFontDownloadListener
*listener
, UINT32
*token
);
69 HRESULT RemoveListener
(UINT32 token
);
71 HRESULT BeginDownload
(IUnknown
*context
);
72 HRESULT CancelDownload
();
73 UINT64 GetGenerationCount
();
79 uuid(b7924baa
-391b
-412a
-8c5c
-e44cc2d867dc
)
81 interface IDWriteRenderingParams3
: IDWriteRenderingParams2
83 DWRITE_RENDERING_MODE1 GetRenderingMode1
();
89 uuid(29748ed6
-8c9c
-4a6a
-be0b
-d912e8538944
)
91 interface IDWriteFont3
: IDWriteFont2
93 HRESULT CreateFontFace
(IDWriteFontFace3
**fontface
);
94 BOOL Equals
(IDWriteFont
*font
);
95 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
96 BOOL HasCharacter
(UINT32 character
);
97 DWRITE_LOCALITY GetLocality
();
103 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7adf
)
105 interface IDWriteFontFamily1
: IDWriteFontFamily
107 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
108 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
109 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
115 uuid(53585141-d9f8
-4095-8321-d73cf6bd116c
)
117 interface IDWriteFontCollection1
: IDWriteFontCollection
119 HRESULT GetFontSet
(IDWriteFontSet
**fontset
);
120 HRESULT GetFontFamily
(UINT32 index
, IDWriteFontFamily1
**family
);
126 uuid(5e7fa7ca
-dde3
-424c
-89f0
-9fcd6fed58cd
)
128 interface IDWriteFontFaceReference
: IUnknown
130 HRESULT CreateFontFace
(IDWriteFontFace3
**fontface
);
131 HRESULT CreateFontFaceWithSimulations
(DWRITE_FONT_SIMULATIONS simulations
,
132 IDWriteFontFace3
**fontface
);
133 BOOL Equals
(IDWriteFontFaceReference
*reference
);
134 UINT32 GetFontFaceIndex
();
135 DWRITE_FONT_SIMULATIONS GetSimulations
();
136 HRESULT GetFontFile
(IDWriteFontFile
**fontfile
);
137 UINT64 GetLocalFileSize
();
138 UINT64 GetFileSize
();
139 HRESULT GetFileTime
(FILETIME
*writetime
);
140 DWRITE_LOCALITY GetLocality
();
141 HRESULT EnqueueFontDownloadRequest
();
142 HRESULT EnqueueCharacterDownloadRequest
(WCHAR
const *chars
, UINT32 count
);
143 HRESULT EnqueueGlyphDownloadRequest
(UINT16
const *glyphs
, UINT32 count
);
144 HRESULT EnqueueFileFragmentDownloadRequest
(UINT64 offset
, UINT64 size
);
150 uuid(da20d8ef
-812a
-4c43
-9802-62ec4abd7ade
)
152 interface IDWriteFontList1
: IDWriteFontList
154 DWRITE_LOCALITY GetFontLocality
(UINT32 index
);
155 HRESULT GetFont
(UINT32 index
, IDWriteFont3
**font
);
156 HRESULT GetFontFaceReference
(UINT32 index
, IDWriteFontFaceReference
**reference
);
162 uuid(d37d7598
-09be
-4222-a236
-2081341cc1f2
)
164 interface IDWriteFontFace3
: IDWriteFontFace2
166 HRESULT GetFontFaceReference
(IDWriteFontFaceReference
**reference
);
167 void GetPanose
(DWRITE_PANOSE
*panose
);
168 DWRITE_FONT_WEIGHT GetWeight
();
169 DWRITE_FONT_STRETCH GetStretch
();
170 DWRITE_FONT_STYLE GetStyle
();
171 HRESULT GetFamilyNames
(IDWriteLocalizedStrings
**names
);
172 HRESULT GetFaceNames
(IDWriteLocalizedStrings
**names
);
173 HRESULT GetInformationalStrings
(DWRITE_INFORMATIONAL_STRING_ID stringid
,
174 IDWriteLocalizedStrings
**strings
,
176 BOOL HasCharacter
(UINT32 character
);
177 HRESULT GetRecommendedRenderingMode
(
181 DWRITE_MATRIX
const *transform
,
183 DWRITE_OUTLINE_THRESHOLD threshold
,
184 DWRITE_MEASURING_MODE measuring_mode
,
185 IDWriteRenderingParams
*params
,
186 DWRITE_RENDERING_MODE1
*rendering_mode
,
187 DWRITE_GRID_FIT_MODE
*gridfit_mode
);
188 BOOL IsCharacterLocal
(UINT32 character
);
189 BOOL IsGlyphLocal
(UINT16 glyph
);
190 HRESULT AreCharactersLocal
(WCHAR
const *characters
,
191 UINT32 count
, BOOL enqueue_if_not
, BOOL
*are_local
);
192 HRESULT AreGlyphsLocal
(UINT16
const *glyphs
, UINT32 count
,
193 BOOL enqueue_if_not
, BOOL
*are_local
);
199 uuid(cfee3140
-1257-47ca
-8b85
-31bfcf3f2d0e
)
201 interface IDWriteStringList
: IUnknown
204 HRESULT GetLocaleNameLength
(UINT32 index
, UINT32
*length
);
205 HRESULT GetLocaleName
(UINT32 index
, WCHAR
*name
, UINT32 size
);
206 HRESULT GetStringLength
(UINT32 index
, UINT32
*length
);
207 HRESULT GetString
(UINT32 index
, WCHAR
*string, UINT32 size
);
210 typedef struct DWRITE_LINE_METRICS1
213 UINT32 trailingWhitespaceLength
;
214 UINT32 newlineLength
;
220 } DWRITE_LINE_METRICS1
;
222 typedef enum DWRITE_FONT_LINE_GAP_USAGE
224 DWRITE_FONT_LINE_GAP_USAGE_DEFAULT
,
225 DWRITE_FONT_LINE_GAP_USAGE_DISABLED
,
226 DWRITE_FONT_LINE_GAP_USAGE_ENABLED
227 } DWRITE_FONT_LINE_GAP_USAGE
;
229 typedef struct DWRITE_LINE_SPACING
231 DWRITE_LINE_SPACING_METHOD method
;
235 DWRITE_FONT_LINE_GAP_USAGE fontLineGapUsage
;
236 } DWRITE_LINE_SPACING
;
241 uuid(f67e0edd
-9e3d
-4ecc
-8c32
-4183253dfe70
)
243 interface IDWriteTextFormat2
: IDWriteTextFormat1
245 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
246 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
252 uuid(07ddcd52
-020e-4de8
-ac33
-6c953d83f92d
)
254 interface IDWriteTextLayout3
: IDWriteTextLayout2
256 HRESULT InvalidateLayout
();
257 HRESULT SetLineSpacing
(DWRITE_LINE_SPACING
const *spacing
);
258 HRESULT GetLineSpacing
(DWRITE_LINE_SPACING
*spacing
);
259 HRESULT GetLineMetrics
(DWRITE_LINE_METRICS1
*metrics
, UINT32 max_count
, UINT32
*count
);
265 uuid(4556be70
-3abd
-4f70
-90be
-421780a6f515
)
267 interface IDWriteGdiInterop1
: IDWriteGdiInterop
269 HRESULT CreateFontFromLOGFONT
(LOGFONTW
const *logfont
,
270 IDWriteFontCollection
*collection
,
273 /* GetFontSignature() methods are listed in reversed order to make
274 resulting vtable order compatible. */
275 HRESULT GetFontSignature_
(IDWriteFontFace
*fontface
, FONTSIGNATURE
*fontsig
);
276 HRESULT GetFontSignature
(IDWriteFont
*font
, FONTSIGNATURE
*fontsig
);
277 HRESULT GetMatchingFontsByLOGFONT
(LOGFONTW
const *logfont
,
278 IDWriteFontSet
*fontset
,
279 IDWriteFontSet
**subset
);
285 uuid(9a1b41c3
-d3bb
-466a
-87fc
-fe67556a3b65
)
287 interface IDWriteFactory3
: IDWriteFactory2
289 HRESULT CreateGlyphRunAnalysis
(
290 DWRITE_GLYPH_RUN
const *run
,
291 DWRITE_MATRIX
const *transform
,
292 DWRITE_RENDERING_MODE1 rendering_mode
,
293 DWRITE_MEASURING_MODE measuring_mode
,
294 DWRITE_GRID_FIT_MODE gridfit_mode
,
295 DWRITE_TEXT_ANTIALIAS_MODE antialias_mode
,
298 IDWriteGlyphRunAnalysis
**analysis
);
300 HRESULT CreateCustomRenderingParams
(
302 FLOAT enhanced_contrast
,
303 FLOAT grayscale_enhanced_contrast
,
304 FLOAT cleartype_level
,
305 DWRITE_PIXEL_GEOMETRY pixel_geometry
,
306 DWRITE_RENDERING_MODE1 rendering_mode
,
307 DWRITE_GRID_FIT_MODE gridfit_mode
,
308 IDWriteRenderingParams3
**params
);
310 /* CreateFontFaceReference methods are listed in reversed order to make
311 resulting vtable order compatible. */
312 HRESULT CreateFontFaceReference_
(
313 IDWriteFontFile
*file
,
315 DWRITE_FONT_SIMULATIONS simulations
,
316 IDWriteFontFaceReference
**reference
);
318 HRESULT CreateFontFaceReference
(
320 FILETIME
const *writetime
,
322 DWRITE_FONT_SIMULATIONS simulations
,
323 IDWriteFontFaceReference
**reference
);
325 HRESULT GetSystemFontSet
(IDWriteFontSet
**fontset
);
326 HRESULT CreateFontSetBuilder
(IDWriteFontSetBuilder
**builder
);
327 HRESULT CreateFontCollectionFromFontSet
(
328 IDWriteFontSet
*fontset
,
329 IDWriteFontCollection1
**collection
);
331 HRESULT GetSystemFontCollection
(
332 BOOL include_downloadable
,
333 IDWriteFontCollection1
**collection
,
334 BOOL check_for_updates
);
336 HRESULT GetFontDownloadQueue
(IDWriteFontDownloadQueue
**queue
);