| /* |
| * 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); |
| |
| if (!logfont) return E_INVALIDARG; |
| |
| 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; |
| } |