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 fontface_detach_from_cache(IDWriteFontFace5 *fontface) DECLSPEC_HIDDEN;
|
||||||
extern void factory_lock(IDWriteFactory7 *factory) DECLSPEC_HIDDEN;
|
extern void factory_lock(IDWriteFactory7 *factory) DECLSPEC_HIDDEN;
|
||||||
extern void factory_unlock(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,
|
extern HRESULT create_font_resource(IDWriteFactory7 *factory, IDWriteFontFile *file, UINT32 face_index,
|
||||||
IDWriteFontResource **resource) DECLSPEC_HIDDEN;
|
IDWriteFontResource **resource) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
|
|
@ -6832,7 +6832,7 @@ static const IDWriteInMemoryFontFileLoaderVtbl inmemoryfontfileloadervtbl =
|
||||||
inmemoryfontfileloader_GetFileCount,
|
inmemoryfontfileloader_GetFileCount,
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT create_inmemory_fileloader(IDWriteFontFileLoader **ret)
|
HRESULT create_inmemory_fileloader(IDWriteInMemoryFontFileLoader **ret)
|
||||||
{
|
{
|
||||||
struct dwrite_inmemory_fileloader *loader;
|
struct dwrite_inmemory_fileloader *loader;
|
||||||
|
|
||||||
|
@ -6845,7 +6845,7 @@ HRESULT create_inmemory_fileloader(IDWriteFontFileLoader **ret)
|
||||||
loader->IDWriteInMemoryFontFileLoader_iface.lpVtbl = &inmemoryfontfileloadervtbl;
|
loader->IDWriteInMemoryFontFileLoader_iface.lpVtbl = &inmemoryfontfileloadervtbl;
|
||||||
loader->ref = 1;
|
loader->ref = 1;
|
||||||
|
|
||||||
*ret = (IDWriteFontFileLoader *)&loader->IDWriteInMemoryFontFileLoader_iface;
|
*ret = &loader->IDWriteInMemoryFontFileLoader_iface;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1627,7 +1627,8 @@ static HRESULT WINAPI dwritefactory5_CreateFontSetBuilder(IDWriteFactory7 *iface
|
||||||
return E_NOTIMPL;
|
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);
|
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)
|
static void test_inmemory_file_loader(void)
|
||||||
{
|
{
|
||||||
IDWriteFontFileStream *stream, *stream2, *stream3;
|
IDWriteFontFileStream *stream, *stream2, *stream3;
|
||||||
IDWriteFontFileLoader *loader, *loader2;
|
IDWriteInMemoryFontFileLoader *loader, *loader2;
|
||||||
IDWriteInMemoryFontFileLoader *inmemory;
|
IDWriteInMemoryFontFileLoader *inmemory;
|
||||||
|
IDWriteFontFileLoader *fileloader;
|
||||||
struct testowner_object ownerobject;
|
struct testowner_object ownerobject;
|
||||||
const void *key, *data, *frag_start;
|
const void *key, *data, *frag_start;
|
||||||
UINT64 file_size, size, writetime;
|
UINT64 file_size, size, writetime;
|
||||||
|
@ -8727,12 +8728,9 @@ static void test_inmemory_file_loader(void)
|
||||||
hr = IDWriteFactory5_CreateInMemoryFontFileLoader(factory, &loader2);
|
hr = IDWriteFactory5_CreateInMemoryFontFileLoader(factory, &loader2);
|
||||||
ok(hr == S_OK, "got %#x\n", hr);
|
ok(hr == S_OK, "got %#x\n", hr);
|
||||||
ok(loader != loader2, "unexpected pointer\n");
|
ok(loader != loader2, "unexpected pointer\n");
|
||||||
IDWriteFontFileLoader_Release(loader2);
|
IDWriteInMemoryFontFileLoader_Release(loader2);
|
||||||
|
|
||||||
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteInMemoryFontFileLoader, (void **)&inmemory);
|
inmemory = loader;
|
||||||
ok(hr == S_OK, "got %#x\n", hr);
|
|
||||||
IDWriteFontFileLoader_Release(loader);
|
|
||||||
EXPECT_REF(inmemory, 1);
|
|
||||||
|
|
||||||
count = IDWriteInMemoryFontFileLoader_GetFileCount(inmemory);
|
count = IDWriteInMemoryFontFileLoader_GetFileCount(inmemory);
|
||||||
ok(!count, "Unexpected file count %u.\n", count);
|
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);
|
hr = IDWriteFontFace_GetFiles(fontface, &count, &file);
|
||||||
ok(hr == S_OK, "got %#x\n", hr);
|
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);
|
ok(hr == S_OK, "got %#x\n", hr);
|
||||||
|
|
||||||
hr = IDWriteFontFile_GetReferenceKey(file, &key, &key_size);
|
hr = IDWriteFontFile_GetReferenceKey(file, &key, &key_size);
|
||||||
ok(hr == S_OK, "got %#x\n", hr);
|
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);
|
ok(hr == S_OK, "got %#x\n", hr);
|
||||||
IDWriteFontFileLoader_Release(loader);
|
IDWriteFontFileLoader_Release(fileloader);
|
||||||
IDWriteFontFile_Release(file);
|
IDWriteFontFile_Release(file);
|
||||||
|
|
||||||
hr = IDWriteFontFileStream_GetFileSize(stream, &file_size);
|
hr = IDWriteFontFileStream_GetFileSize(stream, &file_size);
|
||||||
|
@ -8848,9 +8846,7 @@ static void test_inmemory_file_loader(void)
|
||||||
hr = IDWriteFactory5_CreateInMemoryFontFileLoader(factory, &loader);
|
hr = IDWriteFactory5_CreateInMemoryFontFileLoader(factory, &loader);
|
||||||
ok(hr == S_OK, "Failed to create loader, hr %#x.\n", hr);
|
ok(hr == S_OK, "Failed to create loader, hr %#x.\n", hr);
|
||||||
|
|
||||||
hr = IDWriteFontFileLoader_QueryInterface(loader, &IID_IDWriteInMemoryFontFileLoader, (void **)&inmemory);
|
inmemory = loader;
|
||||||
ok(hr == S_OK, "Failed to get in-memory interface, hr %#x.\n", hr);
|
|
||||||
IDWriteFontFileLoader_Release(loader);
|
|
||||||
|
|
||||||
hr = IDWriteFactory5_RegisterFontFileLoader(factory, (IDWriteFontFileLoader *)inmemory);
|
hr = IDWriteFactory5_RegisterFontFileLoader(factory, (IDWriteFontFileLoader *)inmemory);
|
||||||
ok(hr == S_OK, "Failed to register loader, hr %#x.\n", hr);
|
ok(hr == S_OK, "Failed to register loader, hr %#x.\n", hr);
|
||||||
|
|
|
@ -923,7 +923,7 @@ interface IDWriteInMemoryFontFileLoader : IDWriteFontFileLoader
|
||||||
interface IDWriteFactory5 : IDWriteFactory4
|
interface IDWriteFactory5 : IDWriteFactory4
|
||||||
{
|
{
|
||||||
HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder1 **fontset_builder);
|
HRESULT CreateFontSetBuilder(IDWriteFontSetBuilder1 **fontset_builder);
|
||||||
HRESULT CreateInMemoryFontFileLoader(IDWriteFontFileLoader **loader);
|
HRESULT CreateInMemoryFontFileLoader(IDWriteInMemoryFontFileLoader **loader);
|
||||||
HRESULT CreateHttpFontFileLoader(
|
HRESULT CreateHttpFontFileLoader(
|
||||||
WCHAR const *referrer_url,
|
WCHAR const *referrer_url,
|
||||||
WCHAR const *extra_headers,
|
WCHAR const *extra_headers,
|
||||||
|
|
Loading…
Reference in New Issue