dwrite: Fix CreateInMemoryFontFileLoader() prototype.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f51d0487a7
commit
8cddbdd785
|
@ -343,7 +343,7 @@ extern HRESULT create_gdiinterop(IDWriteFactory7 *factory, IDWriteGdiInterop1 **
|
|||
extern void fontface_detach_from_cache(IDWriteFontFace5 *fontface) DECLSPEC_HIDDEN;
|
||||
extern void factory_lock(IDWriteFactory7 *factory) DECLSPEC_HIDDEN;
|
||||
extern void factory_unlock(IDWriteFactory7 *factory) DECLSPEC_HIDDEN;
|
||||
extern HRESULT create_inmemory_fileloader(IDWriteFontFileLoader**) DECLSPEC_HIDDEN;
|
||||
extern HRESULT create_inmemory_fileloader(IDWriteInMemoryFontFileLoader **loader) DECLSPEC_HIDDEN;
|
||||
extern HRESULT create_font_resource(IDWriteFactory7 *factory, IDWriteFontFile *file, UINT32 face_index,
|
||||
IDWriteFontResource **resource) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -6832,7 +6832,7 @@ static const IDWriteInMemoryFontFileLoaderVtbl inmemoryfontfileloadervtbl =
|
|||
inmemoryfontfileloader_GetFileCount,
|
||||
};
|
||||
|
||||
HRESULT create_inmemory_fileloader(IDWriteFontFileLoader **ret)
|
||||
HRESULT create_inmemory_fileloader(IDWriteInMemoryFontFileLoader **ret)
|
||||
{
|
||||
struct dwrite_inmemory_fileloader *loader;
|
||||
|
||||
|
@ -6845,7 +6845,7 @@ HRESULT create_inmemory_fileloader(IDWriteFontFileLoader **ret)
|
|||
loader->IDWriteInMemoryFontFileLoader_iface.lpVtbl = &inmemoryfontfileloadervtbl;
|
||||
loader->ref = 1;
|
||||
|
||||
*ret = (IDWriteFontFileLoader *)&loader->IDWriteInMemoryFontFileLoader_iface;
|
||||
*ret = &loader->IDWriteInMemoryFontFileLoader_iface;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -1627,7 +1627,8 @@ static HRESULT WINAPI dwritefactory5_CreateFontSetBuilder(IDWriteFactory7 *iface
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dwritefactory5_CreateInMemoryFontFileLoader(IDWriteFactory7 *iface, IDWriteFontFileLoader **loader)
|
||||
static HRESULT WINAPI dwritefactory5_CreateInMemoryFontFileLoader(IDWriteFactory7 *iface,
|
||||
IDWriteInMemoryFontFileLoader **loader)
|
||||
{
|
||||
TRACE("%p, %p.\n", iface, loader);
|
||||
|
||||
|
|
|
@ -8696,8 +8696,9 @@ static void testowner_init(struct testowner_object *object)
|
|||
static void test_inmemory_file_loader(void)
|
||||
{
|
||||
IDWriteFontFileStream *stream, *stream2, *stream3;
|
||||
IDWriteFontFileLoader *loader, *loader2;
|
||||
IDWriteInMemoryFontFileLoader *loader, *loader2;
|
||||
IDWriteInMemoryFontFileLoader *inmemory;
|
||||
IDWriteFontFileLoader *fileloader;
|
||||
struct testowner_object ownerobject;
|
||||
const void *key, *data, *frag_start;
|
||||
UINT64 file_size, size, writetime;
|
||||
|
@ -8727,12 +8728,9 @@ static void test_inmemory_file_loader(void)
|
|||
hr = IDWriteFactory5_CreateInMemoryFontFileLoader(factory, &loader2);
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
ok(loader != loader2, "unexpected pointer\n");
|
||||
IDWriteFontFileLoader_Release(loader2);
|
||||
IDWriteInMemoryFontFileLoader_Release(loader2);
|
||||
|
||||
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteInMemoryFontFileLoader, (void **)&inmemory);
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
IDWriteFontFileLoader_Release(loader);
|
||||
EXPECT_REF(inmemory, 1);
|
||||
inmemory = loader;
|
||||
|
||||
count = IDWriteInMemoryFontFileLoader_GetFileCount(inmemory);
|
||||
ok(!count, "Unexpected file count %u.\n", count);
|
||||
|
@ -8742,15 +8740,15 @@ static void test_inmemory_file_loader(void)
|
|||
hr = IDWriteFontFace_GetFiles(fontface, &count, &file);
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
|
||||
hr = IDWriteFontFile_GetLoader(file, &loader);
|
||||
hr = IDWriteFontFile_GetLoader(file, &fileloader);
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
|
||||
hr = IDWriteFontFile_GetReferenceKey(file, &key, &key_size);
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
|
||||
hr = IDWriteFontFileLoader_CreateStreamFromKey(loader, key, key_size, &stream);
|
||||
hr = IDWriteFontFileLoader_CreateStreamFromKey(fileloader, key, key_size, &stream);
|
||||
ok(hr == S_OK, "got %#x\n", hr);
|
||||
IDWriteFontFileLoader_Release(loader);
|
||||
IDWriteFontFileLoader_Release(fileloader);
|
||||
IDWriteFontFile_Release(file);
|
||||
|
||||
hr = IDWriteFontFileStream_GetFileSize(stream, &file_size);
|
||||
|
@ -8848,9 +8846,7 @@ static void test_inmemory_file_loader(void)
|
|||
hr = IDWriteFactory5_CreateInMemoryFontFileLoader(factory, &loader);
|
||||
ok(hr == S_OK, "Failed to create loader, hr %#x.\n", hr);
|
||||
|
||||
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteInMemoryFontFileLoader, (void **)&inmemory);
|
||||
ok(hr == S_OK, "Failed to get in-memory interface, hr %#x.\n", hr);
|
||||
IDWriteFontFileLoader_Release(loader);
|
||||
inmemory = loader;
|
||||
|
||||
hr = IDWriteFactory5_RegisterFontFileLoader(factory, (IDWriteFontFileLoader *)inmemory);
|
||||
ok(hr == S_OK, "Failed to register loader, hr %#x.\n", hr);
|
||||
|
|
|
@ -923,7 +923,7 @@ interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader
|
|||
interface IDWriteFactory5 : IDWriteFactory4
|
||||
{
|
||||
HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder1 **fontset_builder);
|
||||
HRESULT CreateInMemoryFontFileLoader(IDWriteFontFileLoader **loader);
|
||||
HRESULT CreateInMemoryFontFileLoader(IDWriteInMemoryFontFileLoader **loader);
|
||||
HRESULT CreateHttpFontFileLoader(
|
||||
WCHAR const *referrer_url,
|
||||
WCHAR const *extra_headers,
|
||||
|
|
Loading…
Reference in New Issue