wine-staging/patches/directmanipulation-new-dll/0007-directmanipulation-Supprot-IDirectManipulationFrameI.patch
2019-07-23 08:56:49 +10:00

105 lines
4.2 KiB
Diff

From c7190485c2cc3ccc4d6480d0621552aa488154bd Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 23 Jul 2019 08:37:12 +1000
Subject: [PATCH] directmanipulation: Supprot
IDirectManipulationFrameInfoProvider interface in
IDirectManipulationCompositor.
---
dlls/directmanipulation/directmanipulation.c | 49 ++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index 44d74b368d0..f5a8aee5de2 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -213,6 +213,7 @@ static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IU
struct directcompositor
{
IDirectManipulationCompositor IDirectManipulationCompositor_iface;
+ IDirectManipulationFrameInfoProvider IDirectManipulationFrameInfoProvider_iface;
LONG ref;
};
@@ -221,8 +222,15 @@ static inline struct directcompositor *impl_from_IDirectManipulationCompositor(I
return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationCompositor_iface);
}
+static inline struct directcompositor *impl_from_IDirectManipulationFrameInfoProvider(IDirectManipulationFrameInfoProvider *iface)
+{
+ return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationFrameInfoProvider_iface);
+}
+
static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *iface, REFIID riid, void **ppv)
{
+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
+
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IDirectManipulationCompositor))
{
@@ -230,6 +238,12 @@ static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *i
*ppv = iface;
return S_OK;
}
+ else if(IsEqualGUID(riid, &IID_IDirectManipulationFrameInfoProvider))
+ {
+ IUnknown_AddRef(iface);
+ *ppv = &This->IDirectManipulationFrameInfoProvider_iface;
+ return S_OK;
+ }
FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
return E_NOINTERFACE;
@@ -299,6 +313,40 @@ static const struct IDirectManipulationCompositorVtbl compositorVtbl =
compositor_Flush
};
+static HRESULT WINAPI provider_QueryInterface(IDirectManipulationFrameInfoProvider *iface, REFIID riid, void **ppv)
+{
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
+ return IDirectManipulationCompositor_QueryInterface(&This->IDirectManipulationCompositor_iface, riid, ppv);
+}
+
+static ULONG WINAPI provider_AddRef(IDirectManipulationFrameInfoProvider *iface)
+{
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
+ return IDirectManipulationCompositor_AddRef(&This->IDirectManipulationCompositor_iface);
+}
+
+static ULONG WINAPI provider_Release(IDirectManipulationFrameInfoProvider *iface)
+{
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
+ return IDirectManipulationCompositor_Release(&This->IDirectManipulationCompositor_iface);
+}
+
+static HRESULT WINAPI provider_GetNextFrameInfo(IDirectManipulationFrameInfoProvider *iface, ULONGLONG *time,
+ ULONGLONG *process, ULONGLONG *composition)
+{
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
+ FIXME("%p, %p, %p, %p\n", This, time, process, composition);
+ return E_NOTIMPL;
+}
+
+static const struct IDirectManipulationFrameInfoProviderVtbl providerVtbl =
+{
+ provider_QueryInterface,
+ provider_AddRef,
+ provider_Release,
+ provider_GetNextFrameInfo
+};
+
static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
{
struct directcompositor *object;
@@ -313,6 +361,7 @@ static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnk
return E_OUTOFMEMORY;
object->IDirectManipulationCompositor_iface.lpVtbl = &compositorVtbl;
+ object->IDirectManipulationFrameInfoProvider_iface.lpVtbl = &providerVtbl;
object->ref = 1;
ret = compositor_QueryInterface(&object->IDirectManipulationCompositor_iface, riid, ppv);
--
2.17.1