Commit 926d98ef authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d2d1: Add ID2D1Factory2 stub.

parent 13cdcdae
......@@ -25,7 +25,7 @@
#include <assert.h>
#include <limits.h>
#define COBJMACROS
#include "d2d1_1.h"
#include "d2d1_2.h"
#ifdef D2D1_INIT_GUID
#include "initguid.h"
#endif
......
......@@ -32,7 +32,7 @@ struct d2d_settings d2d_settings =
struct d2d_factory
{
ID2D1Factory1 ID2D1Factory1_iface;
ID2D1Factory2 ID2D1Factory2_iface;
LONG refcount;
ID3D10Device1 *device;
......@@ -41,9 +41,9 @@ struct d2d_factory
float dpi_y;
};
static inline struct d2d_factory *impl_from_ID2D1Factory1(ID2D1Factory1 *iface)
static inline struct d2d_factory *impl_from_ID2D1Factory2(ID2D1Factory2 *iface)
{
return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Factory1_iface);
return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Factory2_iface);
}
static HRESULT d2d_factory_reload_sysmetrics(struct d2d_factory *factory)
......@@ -64,15 +64,16 @@ static HRESULT d2d_factory_reload_sysmetrics(struct d2d_factory *factory)
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_QueryInterface(ID2D1Factory1 *iface, REFIID iid, void **out)
static HRESULT STDMETHODCALLTYPE d2d_factory_QueryInterface(ID2D1Factory2 *iface, REFIID iid, void **out)
{
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
if ((IsEqualGUID(iid, &IID_ID2D1Factory1) && d2d_settings.max_version_factory >= 1)
if ((IsEqualGUID(iid, &IID_ID2D1Factory2) && d2d_settings.max_version_factory >= 2)
|| (IsEqualGUID(iid, &IID_ID2D1Factory1) && d2d_settings.max_version_factory >= 1)
|| IsEqualGUID(iid, &IID_ID2D1Factory)
|| IsEqualGUID(iid, &IID_IUnknown))
{
ID2D1Factory1_AddRef(iface);
ID2D1Factory2_AddRef(iface);
*out = iface;
return S_OK;
}
......@@ -83,9 +84,9 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_QueryInterface(ID2D1Factory1 *iface
return E_NOINTERFACE;
}
static ULONG STDMETHODCALLTYPE d2d_factory_AddRef(ID2D1Factory1 *iface)
static ULONG STDMETHODCALLTYPE d2d_factory_AddRef(ID2D1Factory2 *iface)
{
struct d2d_factory *factory = impl_from_ID2D1Factory1(iface);
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
ULONG refcount = InterlockedIncrement(&factory->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount);
......@@ -93,9 +94,9 @@ static ULONG STDMETHODCALLTYPE d2d_factory_AddRef(ID2D1Factory1 *iface)
return refcount;
}
static ULONG STDMETHODCALLTYPE d2d_factory_Release(ID2D1Factory1 *iface)
static ULONG STDMETHODCALLTYPE d2d_factory_Release(ID2D1Factory2 *iface)
{
struct d2d_factory *factory = impl_from_ID2D1Factory1(iface);
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
ULONG refcount = InterlockedDecrement(&factory->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
......@@ -110,18 +111,18 @@ static ULONG STDMETHODCALLTYPE d2d_factory_Release(ID2D1Factory1 *iface)
return refcount;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_ReloadSystemMetrics(ID2D1Factory1 *iface)
static HRESULT STDMETHODCALLTYPE d2d_factory_ReloadSystemMetrics(ID2D1Factory2 *iface)
{
struct d2d_factory *factory = impl_from_ID2D1Factory1(iface);
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
TRACE("iface %p.\n", iface);
return d2d_factory_reload_sysmetrics(factory);
}
static void STDMETHODCALLTYPE d2d_factory_GetDesktopDpi(ID2D1Factory1 *iface, float *dpi_x, float *dpi_y)
static void STDMETHODCALLTYPE d2d_factory_GetDesktopDpi(ID2D1Factory2 *iface, float *dpi_x, float *dpi_y)
{
struct d2d_factory *factory = impl_from_ID2D1Factory1(iface);
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
TRACE("iface %p, dpi_x %p, dpi_y %p.\n", iface, dpi_x, dpi_y);
......@@ -129,7 +130,7 @@ static void STDMETHODCALLTYPE d2d_factory_GetDesktopDpi(ID2D1Factory1 *iface, fl
*dpi_y = factory->dpi_y;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factory2 *iface,
const D2D1_RECT_F *rect, ID2D1RectangleGeometry **geometry)
{
struct d2d_geometry *object;
......@@ -153,7 +154,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRoundedRectangleGeometry(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRoundedRectangleGeometry(ID2D1Factory2 *iface,
const D2D1_ROUNDED_RECT *rect, ID2D1RoundedRectangleGeometry **geometry)
{
FIXME("iface %p, rect %p, geometry %p stub!\n", iface, rect, geometry);
......@@ -161,7 +162,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRoundedRectangleGeometry(ID2D
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateEllipseGeometry(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateEllipseGeometry(ID2D1Factory2 *iface,
const D2D1_ELLIPSE *ellipse, ID2D1EllipseGeometry **geometry)
{
FIXME("iface %p, ellipse %p, geometry %p stub!\n", iface, ellipse, geometry);
......@@ -169,7 +170,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateEllipseGeometry(ID2D1Factory1
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory2 *iface,
D2D1_FILL_MODE fill_mode, ID2D1Geometry **geometries, UINT32 geometry_count, ID2D1GeometryGroup **group)
{
FIXME("iface %p, fill_mode %#x, geometries %p, geometry_count %u, group %p stub!\n",
......@@ -178,7 +179,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory1 *
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Factory2 *iface,
ID2D1Geometry *src_geometry, const D2D1_MATRIX_3X2_F *transform,
ID2D1TransformedGeometry **transformed_geometry)
{
......@@ -198,7 +199,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Fact
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory1 *iface, ID2D1PathGeometry **geometry)
static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory2 *iface, ID2D1PathGeometry **geometry)
{
struct d2d_geometry *object;
......@@ -215,7 +216,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory1 *i
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle(ID2D1Factory2 *iface,
const D2D1_STROKE_STYLE_PROPERTIES *desc, const float *dashes, UINT32 dash_count,
ID2D1StrokeStyle **stroke_style)
{
......@@ -241,7 +242,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle(ID2D1Factory1 *if
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock(ID2D1Factory2 *iface,
const D2D1_DRAWING_STATE_DESCRIPTION *desc, IDWriteRenderingParams *text_rendering_params,
ID2D1DrawingStateBlock **state_block)
{
......@@ -281,10 +282,10 @@ static HRESULT d2d_factory_get_device(struct d2d_factory *factory, ID3D10Device1
return hr;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Factory2 *iface,
IWICBitmap *target, const D2D1_RENDER_TARGET_PROPERTIES *desc, ID2D1RenderTarget **render_target)
{
struct d2d_factory *factory = impl_from_ID2D1Factory1(iface);
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
struct d2d_wic_render_target *object;
ID3D10Device1 *device;
HRESULT hr;
......@@ -300,7 +301,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Fa
return hr;
}
if (FAILED(hr = d2d_wic_render_target_init(object, iface, device, target, desc)))
if (FAILED(hr = d2d_wic_render_target_init(object, (ID2D1Factory1 *)iface, device, target, desc)))
{
WARN("Failed to initialize render target, hr %#x.\n", hr);
heap_free(object);
......@@ -313,11 +314,11 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Fa
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory2 *iface,
const D2D1_RENDER_TARGET_PROPERTIES *desc, const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwnd_rt_desc,
ID2D1HwndRenderTarget **render_target)
{
struct d2d_factory *factory = impl_from_ID2D1Factory1(iface);
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
struct d2d_hwnd_render_target *object;
ID3D10Device1 *device;
HRESULT hr;
......@@ -330,7 +331,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory
if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
if (FAILED(hr = d2d_hwnd_render_target_init(object, iface, device, desc, hwnd_rt_desc)))
if (FAILED(hr = d2d_hwnd_render_target_init(object, (ID2D1Factory1 *)iface, device, desc, hwnd_rt_desc)))
{
WARN("Failed to initialize render target, hr %#x.\n", hr);
heap_free(object);
......@@ -343,7 +344,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1Factory2 *iface,
IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc, ID2D1RenderTarget **render_target)
{
IDXGIDevice *dxgi_device;
......@@ -358,7 +359,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1
return hr;
}
hr = ID2D1Factory1_CreateDevice(iface, dxgi_device, &device);
hr = ID2D1Factory1_CreateDevice((ID2D1Factory1 *)iface, dxgi_device, &device);
IDXGIDevice_Release(dxgi_device);
if (FAILED(hr))
{
......@@ -371,10 +372,10 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1
return hr;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory2 *iface,
const D2D1_RENDER_TARGET_PROPERTIES *desc, ID2D1DCRenderTarget **render_target)
{
struct d2d_factory *factory = impl_from_ID2D1Factory1(iface);
struct d2d_factory *factory = impl_from_ID2D1Factory2(iface);
struct d2d_dc_render_target *object;
ID3D10Device1 *device;
HRESULT hr;
......@@ -387,7 +388,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory1
if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
if (FAILED(hr = d2d_dc_render_target_init(object, iface, device, desc)))
if (FAILED(hr = d2d_dc_render_target_init(object, (ID2D1Factory1 *)iface, device, desc)))
{
WARN("Failed to initialize render target, hr %#x.\n", hr);
heap_free(object);
......@@ -400,7 +401,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory1
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDevice(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDevice(ID2D1Factory2 *iface,
IDXGIDevice *dxgi_device, ID2D1Device **device)
{
struct d2d_device *object;
......@@ -410,7 +411,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDevice(ID2D1Factory1 *iface,
if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
d2d_device_init(object, iface, dxgi_device);
d2d_device_init(object, (ID2D1Factory1 *)iface, dxgi_device);
TRACE("Create device %p.\n", object);
*device = &object->ID2D1Device_iface;
......@@ -418,7 +419,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDevice(ID2D1Factory1 *iface,
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory2 *iface,
const D2D1_STROKE_STYLE_PROPERTIES1 *desc, const float *dashes, UINT32 dash_count,
ID2D1StrokeStyle1 **stroke_style)
{
......@@ -428,14 +429,14 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory1 *i
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry1(ID2D1Factory1 *iface, ID2D1PathGeometry1 **geometry)
static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry1(ID2D1Factory2 *iface, ID2D1PathGeometry1 **geometry)
{
FIXME("iface %p, geometry %p stub!\n", iface, geometry);
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock1(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock1(ID2D1Factory2 *iface,
const D2D1_DRAWING_STATE_DESCRIPTION1 *desc, IDWriteRenderingParams *text_rendering_params,
ID2D1DrawingStateBlock1 **state_block)
{
......@@ -455,7 +456,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock1(ID2D1Facto
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGdiMetafile(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGdiMetafile(ID2D1Factory2 *iface,
IStream *stream, ID2D1GdiMetafile **metafile)
{
FIXME("iface %p, stream %p, metafile %p stub!\n", iface, stream, metafile);
......@@ -463,7 +464,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGdiMetafile(ID2D1Factory1 *if
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Factory2 *iface,
REFCLSID effect_id, IStream *property_xml, const D2D1_PROPERTY_BINDING *bindings,
UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory)
{
......@@ -473,7 +474,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Facto
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Factory2 *iface,
REFCLSID effect_id, const WCHAR *property_xml, const D2D1_PROPERTY_BINDING *bindings,
UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory)
{
......@@ -483,14 +484,14 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Facto
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory1 *iface, REFCLSID effect_id)
static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory2 *iface, REFCLSID effect_id)
{
FIXME("iface %p, effect_id %s stub!\n", iface, debugstr_guid(effect_id));
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_GetRegisteredEffects(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_GetRegisteredEffects(ID2D1Factory2 *iface,
CLSID *effects, UINT32 effect_count, UINT32 *returned, UINT32 *registered)
{
FIXME("iface %p, effects %p, effect_count %u, returned %p, registered %p stub!\n",
......@@ -499,7 +500,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_GetRegisteredEffects(ID2D1Factory1
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_GetEffectProperties(ID2D1Factory1 *iface,
static HRESULT STDMETHODCALLTYPE d2d_factory_GetEffectProperties(ID2D1Factory2 *iface,
REFCLSID effect_id, ID2D1Properties **props)
{
FIXME("iface %p, effect_id %s, props %p stub!\n", iface, debugstr_guid(effect_id), props);
......@@ -507,7 +508,15 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_GetEffectProperties(ID2D1Factory1 *
return E_NOTIMPL;
}
static const struct ID2D1Factory1Vtbl d2d_factory_vtbl =
static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory1_CreateDevice(ID2D1Factory2 *iface, IDXGIDevice *dxgi_device,
ID2D1Device1 **device)
{
FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device);
return E_NOTIMPL;
}
static const struct ID2D1Factory2Vtbl d2d_factory_vtbl =
{
d2d_factory_QueryInterface,
d2d_factory_AddRef,
......@@ -536,6 +545,7 @@ static const struct ID2D1Factory1Vtbl d2d_factory_vtbl =
d2d_factory_UnregisterEffect,
d2d_factory_GetRegisteredEffects,
d2d_factory_GetEffectProperties,
d2d_factory_ID2D1Factory1_CreateDevice,
};
static void d2d_factory_init(struct d2d_factory *factory, D2D1_FACTORY_TYPE factory_type,
......@@ -546,7 +556,7 @@ static void d2d_factory_init(struct d2d_factory *factory, D2D1_FACTORY_TYPE fact
if (factory_options && factory_options->debugLevel != D2D1_DEBUG_LEVEL_NONE)
WARN("Ignoring debug level %#x.\n", factory_options->debugLevel);
factory->ID2D1Factory1_iface.lpVtbl = &d2d_factory_vtbl;
factory->ID2D1Factory2_iface.lpVtbl = &d2d_factory_vtbl;
factory->refcount = 1;
d2d_factory_reload_sysmetrics(factory);
}
......@@ -567,8 +577,8 @@ HRESULT WINAPI D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
TRACE("Created factory %p.\n", object);
hr = ID2D1Factory1_QueryInterface(&object->ID2D1Factory1_iface, iid, factory);
ID2D1Factory1_Release(&object->ID2D1Factory1_iface);
hr = ID2D1Factory2_QueryInterface(&object->ID2D1Factory2_iface, iid, factory);
ID2D1Factory2_Release(&object->ID2D1Factory2_iface);
return hr;
}
......
......@@ -18,4 +18,4 @@
#include "d3d10_1.h"
#include "initguid.h"
#include "d2d1_1.h"
#include "d2d1_2.h"
......@@ -80,6 +80,7 @@ SOURCES = \
cvconst.h \
d2d1.idl \
d2d1_1.idl \
d2d1_2.idl \
d2dbasetypes.h \
d2derr.h \
d3d.h \
......
/*
* Copyright 2018 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
*/
import "d2d1_1.idl";
interface ID2D1DeviceContext1;
typedef enum D2D1_RENDERING_PRIORITY
{
D2D1_RENDERING_PRIORITY_NORMAL = 0,
D2D1_RENDERING_PRIORITY_LOW = 1,
D2D1_RENDERING_PRIORITY_FORCE_DWORD = 0xffffffff,
} D2D1_RENDERING_PRIORITY;
[
object,
uuid(d21768e1-23a4-4823-a14b-7c3eba85d658),
local,
]
interface ID2D1Device1 : ID2D1Device
{
D2D1_RENDERING_PRIORITY GetRenderingPriority();
void SetRenderingPriority(
[in] D2D1_RENDERING_PRIORITY priority
);
HRESULT CreateDeviceContext(
[in] D2D1_DEVICE_CONTEXT_OPTIONS options,
[out] ID2D1DeviceContext1 **device_context
);
}
[
object,
uuid(94f81a73-9212-4376-9c58-b16a3a0d3992),
local,
]
interface ID2D1Factory2 : ID2D1Factory1
{
HRESULT CreateDevice(
[in] IDXGIDevice *dxgi_device,
[out] ID2D1Device1 **device
);
}
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