Updated directmanipulation-new-dll patchset

This commit is contained in:
Alistair Leslie-Hughes 2019-07-26 09:54:27 +10:00
parent 9fd7972c2b
commit aad0b50e62
5 changed files with 821 additions and 0 deletions

View File

@ -0,0 +1,174 @@
From a86c9d4e94bd06d922a0a7ec4bbfd30acec8eb8a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 22 Jul 2019 10:36:34 +1000
Subject: [PATCH] directmanipulation: Implement IDirectManipulationManager2
GetUpdateManager.
---
dlls/directmanipulation/directmanipulation.c | 129 ++++++++++++++++++-
1 file changed, 127 insertions(+), 2 deletions(-)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index edfdda980e..7d00354963 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -68,6 +68,13 @@ HRESULT WINAPI DllCanUnloadNow(void)
struct directmanipulation
{
IDirectManipulationManager2 IDirectManipulationManager2_iface;
+ IDirectManipulationUpdateManager *updatemanager;
+ LONG ref;
+};
+
+struct directupdatemanager
+{
+ IDirectManipulationUpdateManager IDirectManipulationUpdateManager_iface;
LONG ref;
};
@@ -76,6 +83,100 @@ static inline struct directmanipulation *impl_from_IDirectManipulationManager2(I
return CONTAINING_RECORD(iface, struct directmanipulation, IDirectManipulationManager2_iface);
}
+static inline struct directupdatemanager *impl_from_IDirectManipulationUpdateManager(IDirectManipulationUpdateManager *iface)
+{
+ return CONTAINING_RECORD(iface, struct directupdatemanager, IDirectManipulationUpdateManager_iface);
+}
+
+static HRESULT WINAPI update_manager_QueryInterface(IDirectManipulationUpdateManager *iface, REFIID riid,void **ppv)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationUpdateManager)) {
+ IUnknown_AddRef(iface);
+ *ppv = iface;
+ return S_OK;
+ }
+
+ FIXME("(%p)->(%s,%p), not found\n", This, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+ULONG WINAPI update_manager_AddRef(IDirectManipulationUpdateManager *iface)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ return ref;
+}
+
+ULONG WINAPI update_manager_Release(IDirectManipulationUpdateManager *iface)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ if (!ref)
+ {
+ heap_free(This);
+ }
+ return ref;
+}
+
+static HRESULT WINAPI update_manager_RegisterWaitHandleCallback(IDirectManipulationUpdateManager *iface, HANDLE handle,
+ IDirectManipulationUpdateHandler *handler, DWORD *cookie)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ FIXME("%p, %p, %p, %p\n", This, handle, handler, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI update_manager_UnregisterWaitHandleCallback(IDirectManipulationUpdateManager *iface, DWORD cookie)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ FIXME("%p, %x\n", This, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI update_manager_Update(IDirectManipulationUpdateManager *iface, IDirectManipulationFrameInfoProvider *provider)
+{
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
+ FIXME("%p, %p\n", This, provider);
+ return E_NOTIMPL;
+}
+
+struct IDirectManipulationUpdateManagerVtbl updatemanagerVtbl =
+{
+ update_manager_QueryInterface,
+ update_manager_AddRef,
+ update_manager_Release,
+ update_manager_RegisterWaitHandleCallback,
+ update_manager_UnregisterWaitHandleCallback,
+ update_manager_Update
+};
+
+static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
+{
+ struct directupdatemanager *object;
+
+ object = heap_alloc(sizeof(*object));
+ if(!object)
+ return E_OUTOFMEMORY;
+
+ object->IDirectManipulationUpdateManager_iface.lpVtbl = &updatemanagerVtbl;
+ object->ref = 1;
+
+ *obj = &object->IDirectManipulationUpdateManager_iface;
+
+ return S_OK;
+}
+
static HRESULT WINAPI direct_manip_QueryInterface(IDirectManipulationManager2 *iface, REFIID riid, void **ppv)
{
if (IsEqualGUID(riid, &IID_IUnknown) ||
@@ -109,6 +210,8 @@ static ULONG WINAPI direct_manip_Release(IDirectManipulationManager2 *iface)
if (!ref)
{
+ if(This->updatemanager)
+ IDirectManipulationUpdateManager_Release(This->updatemanager);
heap_free(This);
}
return ref;
@@ -146,8 +249,30 @@ static HRESULT WINAPI direct_manip_ProcessInput(IDirectManipulationManager2 *ifa
static HRESULT WINAPI direct_manip_GetUpdateManager(IDirectManipulationManager2 *iface, REFIID riid, void **obj)
{
struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
- FIXME("%p, %s, %p\n", This, debugstr_guid(riid), obj);
- return E_NOTIMPL;
+ HRESULT hr = E_FAIL;
+
+ TRACE("%p, %s, %p\n", This, debugstr_guid(riid), obj);
+
+ *obj = NULL;
+ if(IsEqualGUID(riid, &IID_IDirectManipulationUpdateManager))
+ {
+ if(!This->updatemanager)
+ {
+ hr = create_update_manager(&This->updatemanager);
+ }
+ else
+ {
+ hr = S_OK;
+ IDirectManipulationUpdateManager_AddRef(This->updatemanager);
+ }
+
+ if(hr == S_OK)
+ *obj = &This->updatemanager;
+ }
+ else
+ FIXME("Interface %s currently not supported.\n", debugstr_guid(riid));
+
+ return hr;
}
static HRESULT WINAPI direct_manip_CreateViewport(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
--
2.17.1

View File

@ -0,0 +1,51 @@
From 6f2fd8dc5086a0c0982f71416b8a2b1e25ac6433 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 24 Jul 2019 09:15:18 +1000
Subject: [PATCH] directmanipulation: Implement IDirectManipulationCompositor
SetUpdateManager.
---
dlls/directmanipulation/directmanipulation.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index 7d00354963..629a41c845 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -339,6 +339,7 @@ struct directcompositor
{
IDirectManipulationCompositor IDirectManipulationCompositor_iface;
IDirectManipulationFrameInfoProvider IDirectManipulationFrameInfoProvider_iface;
+ IDirectManipulationUpdateManager *manager;
LONG ref;
};
@@ -393,6 +394,8 @@ static ULONG WINAPI compositor_Release(IDirectManipulationCompositor *iface)
if (!ref)
{
+ if(This->manager)
+ IDirectManipulationUpdateManager_Release(This->manager);
heap_free(This);
}
return ref;
@@ -416,8 +419,14 @@ static HRESULT WINAPI compositor_RemoveContent(IDirectManipulationCompositor *if
static HRESULT WINAPI compositor_SetUpdateManager(IDirectManipulationCompositor *iface, IDirectManipulationUpdateManager *manager)
{
struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
- FIXME("%p, %p\n", This, manager);
- return E_NOTIMPL;
+ TRACE("%p, %p\n", This, manager);
+
+ if(!manager)
+ return E_INVALIDARG;
+
+ This->manager = manager;
+ IDirectManipulationUpdateManager_AddRef(This->manager);
+ return S_OK;
}
static HRESULT WINAPI compositor_Flush(IDirectManipulationCompositor *iface)
--
2.17.1

View File

@ -0,0 +1,215 @@
From d71134e27429531e7ebf25f4b5db8e9047ecbaad Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 24 Jul 2019 10:05:35 +1000
Subject: [PATCH] include: Add IDirectManipulationViewport2 interface
---
include/directmanipulation.idl | 173 +++++++++++++++++++++++++++++++++
1 file changed, 173 insertions(+)
diff --git a/include/directmanipulation.idl b/include/directmanipulation.idl
index c2fd831c6c..443b31a0ce 100644
--- a/include/directmanipulation.idl
+++ b/include/directmanipulation.idl
@@ -23,6 +23,8 @@ cpp_quote("#if 0")
typedef void* HWND;
cpp_quote("#endif")
+interface IDirectManipulationViewportEventHandler;
+
typedef enum DIRECTMANIPULATION_HITTEST_TYPE
{
DIRECTMANIPULATION_HITTEST_TYPE_ASYNCHRONOUS = 0x00000000,
@@ -30,6 +32,68 @@ typedef enum DIRECTMANIPULATION_HITTEST_TYPE
DIRECTMANIPULATION_HITTEST_TYPE_AUTO_SYNCHRONOUS = 0x00000002
} DIRECTMANIPULATION_HITTEST_TYPE;
+typedef enum DIRECTMANIPULATION_STATUS
+{
+ DIRECTMANIPULATION_BUILDING = 0,
+ DIRECTMANIPULATION_ENABLED = 1,
+ DIRECTMANIPULATION_DISABLED = 2,
+ DIRECTMANIPULATION_RUNNING = 3,
+ DIRECTMANIPULATION_INERTIA = 4,
+ DIRECTMANIPULATION_READY = 5,
+ DIRECTMANIPULATION_SUSPENDED = 6
+} DIRECTMANIPULATION_STATUS;
+
+typedef enum DIRECTMANIPULATION_VIEWPORT_OPTIONS
+{
+ DIRECTMANIPULATION_VIEWPORT_OPTIONS_DEFAULT = 0x0000,
+ DIRECTMANIPULATION_VIEWPORT_OPTIONS_AUTODISABLE = 0x0001,
+ DIRECTMANIPULATION_VIEWPORT_OPTIONS_MANUALUPDATE = 0x0002,
+ DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT = 0x0004,
+ DIRECTMANIPULATION_VIEWPORT_OPTIONS_EXPLICITHITTEST = 0x0008,
+ DIRECTMANIPULATION_VIEWPORT_OPTIONS_DISABLEPIXELSNAPPING = 0x0010,
+} DIRECTMANIPULATION_VIEWPORT_OPTIONS;
+
+typedef enum DIRECTMANIPULATION_CONFIGURATION
+{
+ DIRECTMANIPULATION_CONFIGURATION_NONE = 0x00000000,
+ DIRECTMANIPULATION_CONFIGURATION_INTERACTION = 0x00000001,
+ DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_X = 0x00000002,
+ DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_Y = 0x00000004,
+ DIRECTMANIPULATION_CONFIGURATION_SCALING = 0x00000010,
+ DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_INERTIA = 0x00000020,
+ DIRECTMANIPULATION_CONFIGURATION_SCALING_INERTIA = 0x00000080,
+ DIRECTMANIPULATION_CONFIGURATION_RAILS_X = 0x00000100,
+ DIRECTMANIPULATION_CONFIGURATION_RAILS_Y = 0x00000200,
+} DIRECTMANIPULATION_CONFIGURATION;
+
+typedef enum DIRECTMANIPULATION_GESTURE_CONFIGURATION
+{
+ DIRECTMANIPULATION_GESTURE_NONE = 0x00000000,
+ DIRECTMANIPULATION_GESTURE_DEFAULT = 0x00000000,
+ DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_VERTICAL = 0x00000008,
+ DIRECTMANIPULATION_GESTURE_CROSS_SLIDE_HORIZONTAL = 0x00000010,
+ DIRECTMANIPULATION_GESTURE_PINCH_ZOOM = 0x00000020,
+} DIRECTMANIPULATION_GESTURE_CONFIGURATION;
+
+typedef enum DIRECTMANIPULATION_MOTION_TYPES
+{
+ DIRECTMANIPULATION_MOTION_NONE = 0x0000,
+ DIRECTMANIPULATION_MOTION_TRANSLATEX = 0x0001,
+ DIRECTMANIPULATION_MOTION_TRANSLATEY = 0x0002,
+ DIRECTMANIPULATION_MOTION_ZOOM = 0x0004,
+ DIRECTMANIPULATION_MOTION_CENTERX = 0x0010,
+ DIRECTMANIPULATION_MOTION_CENTERY = 0x0020,
+ DIRECTMANIPULATION_MOTION_ALL = DIRECTMANIPULATION_MOTION_TRANSLATEX | DIRECTMANIPULATION_MOTION_TRANSLATEY |
+ DIRECTMANIPULATION_MOTION_ZOOM | DIRECTMANIPULATION_MOTION_CENTERX |
+ DIRECTMANIPULATION_MOTION_CENTERY
+} DIRECTMANIPULATION_MOTION_TYPES;
+
+typedef enum DIRECTMANIPULATION_INPUT_MODE
+{
+ DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC = 0,
+ DIRECTMANIPULATION_INPUT_MODE_MANUAL = 1
+} DIRECTMANIPULATION_INPUT_MODE;
+
[
local,
object,
@@ -136,6 +200,104 @@ interface IDirectManipulationCompositor : IUnknown
HRESULT Flush();
}
+[
+ local,
+ object,
+ uuid(28b85a3d-60a0-48bd-9ba1-5ce8d9ea3a6d),
+ pointer_default(unique)
+]
+interface IDirectManipulationViewport : IUnknown
+{
+ HRESULT Enable();
+
+ HRESULT Disable();
+
+ HRESULT SetContact([in] UINT32 id);
+
+ HRESULT ReleaseContact([in] UINT32 id);
+
+ HRESULT ReleaseAllContacts();
+
+ HRESULT GetStatus([out] DIRECTMANIPULATION_STATUS *status);
+
+ HRESULT GetTag([in] REFIID riid, [out, iid_is(riid)] void **object, [out] UINT32 *id);
+
+ HRESULT SetTag([in, unique] IUnknown *object, [in] UINT32 id);
+
+ HRESULT GetViewportRect([out, retval] RECT *viewport);
+
+ HRESULT SetViewportRect([in] const RECT *viewport);
+
+ HRESULT ZoomToRect([in] const float left, [in] const float top, [in] const float right,
+ [in] const float bottom, [in] BOOL animate);
+
+ HRESULT SetViewportTransform([in] const float *matrix, [in] DWORD count);
+
+ HRESULT SyncDisplayTransform([in] const float *matrix, [in] DWORD count);
+
+ HRESULT GetPrimaryContent([in] REFIID riid, [out, iid_is(riid)] void **object);
+
+ HRESULT AddContent([in, unique] IDirectManipulationContent *content);
+
+ HRESULT RemoveContent([in, unique] IDirectManipulationContent *content);
+
+ HRESULT SetViewportOptions([in] DIRECTMANIPULATION_VIEWPORT_OPTIONS options);
+
+ HRESULT AddConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
+
+ HRESULT RemoveConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
+
+ HRESULT ActivateConfiguration([in] DIRECTMANIPULATION_CONFIGURATION configuration);
+
+ HRESULT SetManualGesture([in] DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration);
+
+ HRESULT SetChaining([in] DIRECTMANIPULATION_MOTION_TYPES enabledTypes);
+
+ HRESULT AddEventHandler([in] HWND window, [in] IDirectManipulationViewportEventHandler *eventHandler,
+ [out, retval] DWORD *cookie);
+
+ HRESULT RemoveEventHandler([in] DWORD cookie);
+
+ HRESULT SetInputMode([in] DIRECTMANIPULATION_INPUT_MODE mode);
+
+ HRESULT SetUpdateMode([in] DIRECTMANIPULATION_INPUT_MODE mode);
+
+ HRESULT Stop();
+
+ HRESULT Abandon();
+}
+
+[
+ local,
+ object,
+ uuid(923ccaac-61e1-4385-b726-017af189882a),
+ pointer_default(unique)
+]
+interface IDirectManipulationViewport2 : IDirectManipulationViewport
+{
+ HRESULT AddBehavior([in] IUnknown *behavior, [out, retval] DWORD *cookie);
+
+ HRESULT RemoveBehavior([in] DWORD cookie);
+
+ HRESULT RemoveAllBehaviors();
+}
+
+[
+ local,
+ object,
+ uuid(952121DA-D69F-45F9-B0F9-F23944321A6D),
+ pointer_default(unique)
+]
+interface IDirectManipulationViewportEventHandler : IUnknown
+{
+ HRESULT OnViewportStatusChanged([in] IDirectManipulationViewport *viewport, [in] DIRECTMANIPULATION_STATUS current,
+ [in] DIRECTMANIPULATION_STATUS previous);
+
+ HRESULT OnViewportUpdated([in] IDirectManipulationViewport *viewport);
+
+ HRESULT OnContentUpdated([in] IDirectManipulationViewport *viewport, [in] IDirectManipulationContent *content);
+}
+
[
local,
object,
@@ -179,4 +341,15 @@ library DirectManipulation
[default] interface IDirectManipulationCompositor;
interface IDirectManipulationFrameInfoProvider;
}
+
+ [
+ noncreatable,
+ hidden,
+ uuid(34e211b6-3650-4f75-8334-fa359598e1c5)
+ ]
+ coclass DirectManipulationViewport
+ {
+ interface IDirectManipulationViewport2;
+ [default] interface IDirectManipulationViewport;
+ }
}
--
2.17.1

View File

@ -0,0 +1,373 @@
From 7d82a3f5a5bcdbf2b362c456080e59f882842b85 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 26 Jul 2019 09:51:05 +1000
Subject: [PATCH] directmanipulation: Implement IDirectManipulationManager2
CreateViewport
---
dlls/directmanipulation/directmanipulation.c | 341 ++++++++++++++++++-
1 file changed, 339 insertions(+), 2 deletions(-)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index 629a41c845..86e9556e70 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -177,6 +177,334 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
return S_OK;
}
+struct directviewport
+{
+ IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
+ LONG ref;
+};
+
+static inline struct directviewport *impl_from_IDirectManipulationViewport2(IDirectManipulationViewport2 *iface)
+{
+ return CONTAINING_RECORD(iface, struct directviewport, IDirectManipulationViewport2_iface);
+}
+
+static HRESULT WINAPI viewport_QueryInterface(IDirectManipulationViewport2 *iface, REFIID riid, void **ppv)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationViewport) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationViewport2))
+ {
+ IDirectManipulationViewport2_AddRef(&This->IDirectManipulationViewport2_iface);
+ *ppv = &This->IDirectManipulationViewport2_iface;
+ return S_OK;
+ }
+
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI viewport_AddRef(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI viewport_Release(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ if (!ref)
+ {
+ heap_free(This);
+ }
+ return ref;
+}
+
+static HRESULT WINAPI viewport_Enable(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_Disable(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetContact(IDirectManipulationViewport2 *iface, UINT32 id)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_ReleaseContact(IDirectManipulationViewport2 *iface, UINT32 id)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_ReleaseAllContacts(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_GetStatus(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_STATUS *status)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, status);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_GetTag(IDirectManipulationViewport2 *iface, REFIID riid, void **object, UINT32 *id)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %s, %p, %p\n", This, debugstr_guid(riid), object, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetTag(IDirectManipulationViewport2 *iface, IUnknown *object, UINT32 id)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %p\n", This, object, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_GetViewportRect(IDirectManipulationViewport2 *iface, RECT *viewport)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, viewport);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetViewportRect(IDirectManipulationViewport2 *iface, const RECT *viewport)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, viewport);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_ZoomToRect(IDirectManipulationViewport2 *iface, const float left,
+ const float top, const float right, const float bottom, BOOL animate)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %f, %f, %f, %f, %d\n", This, left, top, right, bottom, animate);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetViewportTransform(IDirectManipulationViewport2 *iface,
+ const float *matrix, DWORD count)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %d\n", This, matrix, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SyncDisplayTransform(IDirectManipulationViewport2 *iface,
+ const float *matrix, DWORD count)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %d\n", This, matrix, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *iface, REFIID riid, void **object)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %s, %p\n", This, debugstr_guid(riid), object);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_AddContent(IDirectManipulationViewport2 *iface, IDirectManipulationContent *content)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, content);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveContent(IDirectManipulationViewport2 *iface, IDirectManipulationContent *content)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, content);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetViewportOptions(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_VIEWPORT_OPTIONS options)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, options);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_AddConfiguration(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_CONFIGURATION configuration)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, configuration);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveConfiguration(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_CONFIGURATION configuration)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, configuration);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_ActivateConfiguration(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_CONFIGURATION configuration)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, configuration);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetManualGesture(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, configuration);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetChaining(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_MOTION_TYPES enabledTypes)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, enabledTypes);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_AddEventHandler(IDirectManipulationViewport2 *iface, HWND window,
+ IDirectManipulationViewportEventHandler *eventHandler, DWORD *cookie)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %p, %p\n", This, window, eventHandler, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveEventHandler(IDirectManipulationViewport2 *iface, DWORD cookie)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetInputMode(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_INPUT_MODE mode)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, mode);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetUpdateMode(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_INPUT_MODE mode)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, mode);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_Stop(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_Abandon(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_AddBehavior(IDirectManipulationViewport2 *iface, IUnknown *behavior, DWORD *cookie)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %p\n", This, behavior, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveBehavior(IDirectManipulationViewport2 *iface, DWORD cookie)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveAllBehaviors(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static const IDirectManipulationViewport2Vtbl viewportVtbl =
+{
+ viewport_QueryInterface,
+ viewport_AddRef,
+ viewport_Release,
+ viewport_Enable,
+ viewport_Disable,
+ viewport_SetContact,
+ viewport_ReleaseContact,
+ viewport_ReleaseAllContacts,
+ viewport_GetStatus,
+ viewport_GetTag,
+ viewport_SetTag,
+ viewport_GetViewportRect,
+ viewport_SetViewportRect,
+ viewport_ZoomToRect,
+ viewport_SetViewportTransform,
+ viewport_SyncDisplayTransform,
+ viewport_GetPrimaryContent,
+ viewport_AddContent,
+ viewport_RemoveContent,
+ viewport_SetViewportOptions,
+ viewport_AddConfiguration,
+ viewport_RemoveConfiguration,
+ viewport_ActivateConfiguration,
+ viewport_SetManualGesture,
+ viewport_SetChaining,
+ viewport_AddEventHandler,
+ viewport_RemoveEventHandler,
+ viewport_SetInputMode,
+ viewport_SetUpdateMode,
+ viewport_Stop,
+ viewport_Abandon,
+ viewport_AddBehavior,
+ viewport_RemoveBehavior,
+ viewport_RemoveAllBehaviors
+};
+
+static HRESULT create_viewport(IDirectManipulationViewport2 **obj)
+{
+ struct directviewport *object;
+
+ object = heap_alloc(sizeof(*object));
+ if(!object)
+ return E_OUTOFMEMORY;
+
+ object->IDirectManipulationViewport2_iface.lpVtbl = &viewportVtbl;
+ object->ref = 1;
+
+ *obj = &object->IDirectManipulationViewport2_iface;
+
+ return S_OK;
+}
+
static HRESULT WINAPI direct_manip_QueryInterface(IDirectManipulationManager2 *iface, REFIID riid, void **ppv)
{
if (IsEqualGUID(riid, &IID_IUnknown) ||
@@ -278,9 +606,18 @@ static HRESULT WINAPI direct_manip_GetUpdateManager(IDirectManipulationManager2
static HRESULT WINAPI direct_manip_CreateViewport(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
HWND window, REFIID riid, void **obj)
{
+ HRESULT hr = E_NOTIMPL;
struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
- FIXME("%p, %p, %p, %s, %p\n", This, frame, window, debugstr_guid(riid), obj);
- return E_NOTIMPL;
+ TRACE("%p, %p, %p, %s, %p\n", This, frame, window, debugstr_guid(riid), obj);
+
+ if(IsEqualGUID(riid, &IID_IDirectManipulationViewport) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationViewport2) )
+ {
+ hr = create_viewport( (IDirectManipulationViewport2**)obj);
+ }
+ else
+ FIXME("Unsupported interface %s\n", debugstr_guid(riid));
+ return hr;
}
static HRESULT WINAPI direct_manip_CreateContent(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
--
2.17.1

View File

@ -3280,6 +3280,10 @@ if test "$enable_directmanipulation_new_dll" -eq 1; then
patch_apply directmanipulation-new-dll/0005-include-Add-DCompManipulationCompositor-coclass-and-.patch
patch_apply directmanipulation-new-dll/0006-directmanipulation-Support-DCompManipulationComposit.patch
patch_apply directmanipulation-new-dll/0007-directmanipulation-Supprot-IDirectManipulationFrameI.patch
patch_apply directmanipulation-new-dll/0008-directmanipulation-Implement-IDirectManipulationMana.patch
patch_apply directmanipulation-new-dll/0009-directmanipulation-Implement-IDirectManipulationComp.patch
patch_apply directmanipulation-new-dll/0010-include-Add-IDirectManipulationViewport2-interface.patch
patch_apply directmanipulation-new-dll/0011-directmanipulation-Implement-IDirectManipulationMana.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add directmanipulation.idl.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: New dll.", 1 },';
@ -3288,6 +3292,10 @@ if test "$enable_directmanipulation_new_dll" -eq 1; then
printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add DCompManipulationCompositor coclass and supporting interfaces.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Support DCompManipulationCompositor interface.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Supprot IDirectManipulationFrameInfoProvider interface in IDirectManipulationCompositor.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationManager2 GetUpdateManager.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationCompositor SetUpdateManager.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add IDirectManipulationViewport2 interface.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationManager2 CreateViewport.", 1 },';
) >> "$patchlist"
fi