From 61a1a266faa9fa7c959136b0ab0b5d7e01326878 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 7 Apr 2017 18:37:19 +0300 Subject: [PATCH] include: Update with recently added DirectWrite API. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- include/dwrite_3.idl | 104 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/include/dwrite_3.idl b/include/dwrite_3.idl index afe7e84f1f7..b80d0338d31 100644 --- a/include/dwrite_3.idl +++ b/include/dwrite_3.idl @@ -341,6 +341,16 @@ interface IDWriteFontSetBuilder : IUnknown HRESULT CreateFontSet(IDWriteFontSet **fontset); } +[ + local, + object, + uuid(3ff7715f-3cdc-4dc6-9b72-ec5621dccafd) +] +interface IDWriteFontSetBuilder1 : IDWriteFontSetBuilder +{ + HRESULT AddFontFile(IDWriteFontFile *file); +} + [ local, object, @@ -498,3 +508,97 @@ interface IDWriteFactory4 : IDWriteFactory3 DWRITE_MATRIX const *transform, D2D1_POINT_2F *origins); } + +[ + local, + object, + uuid(ce25f8fd-863b-4d13-9651-c1f88dc73fe2) +] +interface IDWriteAsyncResult : IUnknown +{ + HANDLE GetWaitHandle(); + HRESULT GetResult(); +} + +typedef struct DWRITE_FILE_FRAGMENT +{ + UINT64 fileOffset; + UINT64 fragmentSize; +} DWRITE_FILE_FRAGMENT; + +[ + local, + object, + uuid(4db3757a-2c72-4ed9-b2b6-1ababe1aff9c) +] +interface IDWriteRemoteFontFileStream : IDWriteFontFileStream +{ + HRESULT GetLocalFileSize(UINT64 *size); + HRESULT GetFileFragmentLocality(UINT64 offset, UINT64 size, BOOL *is_local, UINT64 *partial_size); + DWRITE_LOCALITY GetLocality(); + HRESULT BeginDownload( + GUID const *operation_id, + DWRITE_FILE_FRAGMENT const *fragments, + UINT32 fragment_count, + IDWriteAsyncResult **async_result); +} + +typedef enum DWRITE_CONTAINER_TYPE +{ + DWRITE_CONTAINER_TYPE_UNKNOWN, + DWRITE_CONTAINER_TYPE_WOFF, + DWRITE_CONTAINER_TYPE_WOFF2, +} DWRITE_CONTAINER_TYPE; + +[ + local, + object, + uuid(68648c83-6ede-46c0-ab46-20083a887fde) +] +interface IDWriteRemoteFontFileLoader : IDWriteFontFileLoader +{ + HRESULT CreateRemoteStreamFromKey(void const *key, UINT32 key_size, IDWriteRemoteFontFileStream **stream); + HRESULT GetLocalityFromKey(void const *key, UINT32 key_size, DWRITE_LOCALITY *locality); + HRESULT CreateFontFileReferenceFromUrl( + IDWriteFactory *factory, + WCHAR const *base_url, + WCHAR const *file_url, + IDWriteFontFile **fontfile); +} + +[ + local, + object, + uuid(dc102f47-a12d-4b1c-822d-9e117e33043f) +] +interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader +{ + HRESULT CreateInMemoryFontFileReference( + IDWriteFactory *factory, + void const *data, + UINT32 data_size, + IUnknown *owner, + IDWriteFontFile **fontfile); + UINT32 GetFileCount(); +} + +[ + local, + object, + uuid(958db99a-be2a-4f09-af7d-65189803d1d3) +] +interface IDWriteFactory5 : IDWriteFactory4 +{ + HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder1 **fontset_builder); + HRESULT CreateInMemoryFontFileLoader(IDWriteFontFileLoader **loader); + HRESULT CreateHttpFontFileLoader( + WCHAR const *referrer_url, + WCHAR const *extra_headers, + IDWriteRemoteFontFileLoader **loader); + DWRITE_CONTAINER_TYPE AnalyzeContainerType(void const *data, UINT32 data_size); + HRESULT UnpackFontFile( + DWRITE_CONTAINER_TYPE container_type, + void const *data, + UINT32 data_size, + IDWriteFontFileStream **stream); +}