[PATCH 4/9] d2d1: Stub ID2D1Device
Lucian Poston
lucian.poston at gmail.com
Tue Nov 21 02:41:08 CST 2017
https://bugs.winehq.org/show_bug.cgi?id=44052
Signed-off-by: Lucian Poston <lucian.poston at gmail.com>
---
dlls/d2d1/Makefile.in | 1 +
dlls/d2d1/device.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 130 insertions(+)
create mode 100644 dlls/d2d1/device.c
diff --git a/dlls/d2d1/Makefile.in b/dlls/d2d1/Makefile.in
index 51b9627047..88bdab98dc 100644
--- a/dlls/d2d1/Makefile.in
+++ b/dlls/d2d1/Makefile.in
@@ -8,6 +8,7 @@ C_SRCS = \
bitmap_render_target.c \
brush.c \
dc_render_target.c \
+ device.c \
factory.c \
geometry.c \
hwnd_render_target.c \
diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c
new file mode 100644
index 0000000000..900541759e
--- /dev/null
+++ b/dlls/d2d1/device.c
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2017 Wine Project
+ *
+ * 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 "config.h"
+#include "wine/port.h"
+
+#include "d2d1_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d2d);
+
+struct d2d_device
+{
+ ID2D1Device ID2D1Device_iface;
+ LONG refcount;
+};
+
+static inline struct d2d_device *impl_from_ID2D1Device(ID2D1Device *iface)
+{
+ return CONTAINING_RECORD(iface, struct d2d_device, ID2D1Device_iface);
+}
+
+static HRESULT WINAPI d2d_device_QueryInterface(
+ ID2D1Device *iface,
+ REFIID riid,
+ void **ppvObject)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static ULONG WINAPI d2d_device_AddRef(
+ ID2D1Device *iface)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return 0;
+}
+
+static ULONG WINAPI d2d_device_Release(
+ ID2D1Device *iface)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return 0;
+}
+
+static void WINAPI d2d_device_GetFactory(
+ ID2D1Device *iface,
+ ID2D1Factory **factory)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+}
+
+static HRESULT WINAPI d2d_device_CreateDeviceContext(
+ ID2D1Device *iface,
+ D2D1_DEVICE_CONTEXT_OPTIONS options,
+ ID2D1DeviceContext **deviceContext)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d2d_device_CreatePrintControl(
+ ID2D1Device *iface,
+ IWICImagingFactory *wicFactory,
+ IPrintDocumentPackageTarget *documentTarget,
+ const D2D1_PRINT_CONTROL_PROPERTIES *printControlProperties,
+ ID2D1PrintControl **printControl)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static void WINAPI d2d_device_SetMaximumTextureMemory(
+ ID2D1Device *iface,
+ UINT64 maximumInBytes)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+}
+
+static UINT64 WINAPI d2d_device_GetMaximumTextureMemory(
+ ID2D1Device *iface)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI d2d_device_ClearResources(
+ ID2D1Device *iface,
+ UINT millisecondsSinceUse)
+{
+ struct d2d_device *This = impl_from_ID2D1Device(iface);
+ FIXME("%p stub!\n", This);
+ return E_NOTIMPL;
+}
+
+static const struct ID2D1DeviceVtbl d2d_device_vtbl =
+{
+ d2d_device_QueryInterface,
+ d2d_device_AddRef,
+ d2d_device_Release,
+ d2d_device_GetFactory,
+ d2d_device_CreateDeviceContext,
+ d2d_device_CreatePrintControl,
+ d2d_device_SetMaximumTextureMemory,
+ d2d_device_GetMaximumTextureMemory,
+ d2d_device_ClearResources,
+};
--
2.13.6
More information about the wine-devel
mailing list