4 * Copyright 2012 Nikolay Sivov for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #include "dwrite_private.h"
28 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(dwrite
);
32 static HRESULT WINAPI
gdiinterop_QueryInterface(IDWriteGdiInterop
*iface
, REFIID riid
, void **obj
)
34 TRACE("(%s %p)\n", debugstr_guid(riid
), obj
);
36 if (IsEqualIID(riid
, &IID_IUnknown
) || IsEqualIID(riid
, &IID_IDWriteGdiInterop
))
47 static ULONG WINAPI
gdiinterop_AddRef(IDWriteGdiInterop
*iface
)
52 static ULONG WINAPI
gdiinterop_Release(IDWriteGdiInterop
*iface
)
57 static HRESULT WINAPI
gdiinterop_CreateFontFromLOGFONT(IDWriteGdiInterop
*iface
,
58 LOGFONTW
const *logfont
, IDWriteFont
**font
)
60 TRACE("(%p %p)\n", logfont
, font
);
62 if (!logfont
) return E_INVALIDARG
;
64 return create_font_from_logfont(logfont
, font
);
67 static HRESULT WINAPI
gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop
*iface
,
68 IDWriteFont
*font
, LOGFONTW
*logfont
, BOOL
*is_systemfont
)
70 FIXME("(%p %p %p): stub\n", font
, logfont
, is_systemfont
);
74 static HRESULT WINAPI
gdiinterop_ConvertFontFaceToLOGFONT(IDWriteGdiInterop
*iface
,
75 IDWriteFontFace
*font
, LOGFONTW
*logfont
)
77 FIXME("(%p %p): stub\n", font
, logfont
);
81 static HRESULT WINAPI
gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop
*iface
,
82 HDC hdc
, IDWriteFontFace
**fontface
)
84 FIXME("(%p %p): stub\n", hdc
, fontface
);
88 static HRESULT WINAPI
gdiinterop_CreateBitmapRenderTarget(IDWriteGdiInterop
*iface
,
89 HDC hdc
, UINT32 width
, UINT32 height
, IDWriteBitmapRenderTarget
**target
)
91 FIXME("(%p %u %u %p): stub\n", hdc
, width
, height
, target
);
95 static const struct IDWriteGdiInteropVtbl gdiinteropvtbl
= {
96 gdiinterop_QueryInterface
,
99 gdiinterop_CreateFontFromLOGFONT
,
100 gdiinterop_ConvertFontToLOGFONT
,
101 gdiinterop_ConvertFontFaceToLOGFONT
,
102 gdiinterop_CreateFontFaceFromHdc
,
103 gdiinterop_CreateBitmapRenderTarget
106 static IDWriteGdiInterop gdiinterop
= { &gdiinteropvtbl
};
108 HRESULT
create_gdiinterop(IDWriteGdiInterop
**ret
)