Commit 0ccdda12 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Added IDWriteGdiInterop stub.

parent 370099e4
MODULE = dwrite.dll MODULE = dwrite.dll
C_SRCS = \ C_SRCS = \
gdiinterop.c \
main.c main.c
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
/*
* Copyright 2012 Nikolay Sivov for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
extern HRESULT create_gdiinterop(IDWriteGdiInterop**) DECLSPEC_HIDDEN;
/*
* GDI Interop
*
* Copyright 2012 Nikolay Sivov for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "dwrite.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
static HRESULT WINAPI gdiinterop_QueryInterface(IDWriteGdiInterop *iface, REFIID riid, void **obj)
{
TRACE("(%s %p)\n", debugstr_guid(riid), obj);
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDWriteGdiInterop))
{
*obj = iface;
return S_OK;
}
*obj = NULL;
return E_NOINTERFACE;
}
static ULONG WINAPI gdiinterop_AddRef(IDWriteGdiInterop *iface)
{
return 2;
}
static ULONG WINAPI gdiinterop_Release(IDWriteGdiInterop *iface)
{
return 1;
}
static HRESULT WINAPI gdiinterop_CreateFontFromLOGFONT(IDWriteGdiInterop *iface,
LOGFONTW const *logfont, IDWriteFont **font)
{
FIXME("(%p %p): stub\n", logfont, font);
return E_NOTIMPL;
}
static HRESULT WINAPI gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop *iface,
IDWriteFont *font, LOGFONTW *logfont, BOOL *is_systemfont)
{
FIXME("(%p %p %p): stub\n", font, logfont, is_systemfont);
return E_NOTIMPL;
}
static HRESULT WINAPI gdiinterop_ConvertFontFaceToLOGFONT(IDWriteGdiInterop *iface,
IDWriteFontFace *font, LOGFONTW *logfont)
{
FIXME("(%p %p): stub\n", font, logfont);
return E_NOTIMPL;
}
static HRESULT WINAPI gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop *iface,
HDC hdc, IDWriteFontFace **fontface)
{
FIXME("(%p %p): stub\n", hdc, fontface);
return E_NOTIMPL;
}
static HRESULT WINAPI gdiinterop_CreateBitmapRenderTarget(IDWriteGdiInterop *iface,
HDC hdc, UINT32 width, UINT32 height, IDWriteBitmapRenderTarget **target)
{
FIXME("(%p %u %u %p): stub\n", hdc, width, height, target);
return E_NOTIMPL;
}
static const struct IDWriteGdiInteropVtbl gdiinteropvtbl = {
gdiinterop_QueryInterface,
gdiinterop_AddRef,
gdiinterop_Release,
gdiinterop_CreateFontFromLOGFONT,
gdiinterop_ConvertFontToLOGFONT,
gdiinterop_ConvertFontFaceToLOGFONT,
gdiinterop_CreateFontFaceFromHdc,
gdiinterop_CreateBitmapRenderTarget
};
static IDWriteGdiInterop gdiinterop = { &gdiinteropvtbl };
HRESULT create_gdiinterop(IDWriteGdiInterop **ret)
{
*ret = &gdiinterop;
return S_OK;
}
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "initguid.h" #include "initguid.h"
#include "dwrite.h" #include "dwrite.h"
#include "dwrite_private.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(dwrite); WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
...@@ -168,8 +169,8 @@ static HRESULT WINAPI dwritefactory_CreateTypography(IDWriteFactory *iface, IDWr ...@@ -168,8 +169,8 @@ static HRESULT WINAPI dwritefactory_CreateTypography(IDWriteFactory *iface, IDWr
static HRESULT WINAPI dwritefactory_GetGdiInterop(IDWriteFactory *iface, IDWriteGdiInterop **gdi_interop) static HRESULT WINAPI dwritefactory_GetGdiInterop(IDWriteFactory *iface, IDWriteGdiInterop **gdi_interop)
{ {
FIXME("(%p): stub\n", gdi_interop); TRACE("(%p)\n", gdi_interop);
return E_NOTIMPL; return create_gdiinterop(gdi_interop);
} }
static HRESULT WINAPI dwritefactory_CreateTextLayout(IDWriteFactory *iface, WCHAR const* string, static HRESULT WINAPI dwritefactory_CreateTextLayout(IDWriteFactory *iface, WCHAR const* string,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment