mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Updated directmanipulation-new-dll patchset
This commit is contained in:
parent
5b012f08d5
commit
6ef7be2566
@ -0,0 +1,26 @@
|
||||
From 5d5892c9403b77bd3f17acebfee1acc7e95003a0 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 30 Jul 2019 09:30:41 +1000
|
||||
Subject: [PATCH 1/4] directmanipulation: Fake success from
|
||||
IDirectManipulationViewport2 ActivateConfiguration.
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 4f16963d42..f1e008bc7f 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -370,7 +370,7 @@ static HRESULT WINAPI viewport_ActivateConfiguration(IDirectManipulationViewport
|
||||
{
|
||||
struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
FIXME("%p, %d\n", This, configuration);
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI viewport_SetManualGesture(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration)
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,91 @@
|
||||
From 34c03e1857d977ef7ec913628a358092f749394b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 31 Jul 2019 10:03:26 +1000
|
||||
Subject: [PATCH 2/4] include: Add IDirectManipulationPrimaryContent interface
|
||||
|
||||
---
|
||||
include/directmanipulation.idl | 61 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 61 insertions(+)
|
||||
|
||||
diff --git a/include/directmanipulation.idl b/include/directmanipulation.idl
|
||||
index 443b31a0ce..a49f368d11 100644
|
||||
--- a/include/directmanipulation.idl
|
||||
+++ b/include/directmanipulation.idl
|
||||
@@ -88,6 +88,39 @@ typedef enum DIRECTMANIPULATION_MOTION_TYPES
|
||||
DIRECTMANIPULATION_MOTION_CENTERY
|
||||
} DIRECTMANIPULATION_MOTION_TYPES;
|
||||
|
||||
+typedef enum DIRECTMANIPULATION_SNAPPOINT_TYPE
|
||||
+{
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_MANDATORY = 0,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_OPTIONAL = 1,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_MANDATORY_SINGLE = 2,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_OPTIONAL_SINGLE = 3
|
||||
+} DIRECTMANIPULATION_SNAPPOINT_TYPE;
|
||||
+
|
||||
+typedef enum DIRECTMANIPULATION_SNAPPOINT_COORDINATE
|
||||
+{
|
||||
+ DIRECTMANIPULATION_COORDINATE_BOUNDARY = 0x00,
|
||||
+ DIRECTMANIPULATION_COORDINATE_ORIGIN = 0x01,
|
||||
+ DIRECTMANIPULATION_COORDINATE_MIRRORED = 0x10
|
||||
+} DIRECTMANIPULATION_SNAPPOINT_COORDINATE;
|
||||
+
|
||||
+typedef enum DIRECTMANIPULATION_HORIZONTALALIGNMENT
|
||||
+{
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_NONE = 0x00,
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_LEFT = 0x01,
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_CENTER = 0x02,
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_RIGHT = 0x04,
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER = 0x08
|
||||
+} DIRECTMANIPULATION_HORIZONTALALIGNMENT;
|
||||
+
|
||||
+typedef enum DIRECTMANIPULATION_VERTICALALIGNMENT
|
||||
+{
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_NONE = 0x00,
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_TOP = 0x01,
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_CENTER = 0x02,
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_BOTTOM = 0x04,
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_UNLOCKCENTER = 0x08
|
||||
+} DIRECTMANIPULATION_VERTICALALIGNMENT;
|
||||
+
|
||||
typedef enum DIRECTMANIPULATION_INPUT_MODE
|
||||
{
|
||||
DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC = 0,
|
||||
@@ -309,6 +342,34 @@ interface IDirectManipulationManager2 : IDirectManipulationManager
|
||||
HRESULT CreateBehavior([in] REFCLSID clsid, [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
|
||||
}
|
||||
|
||||
+[
|
||||
+ local,
|
||||
+ object,
|
||||
+ uuid(c12851e4-1698-4625-b9b1-7ca3ec18630b),
|
||||
+ pointer_default(unique)
|
||||
+]
|
||||
+interface IDirectManipulationPrimaryContent : IUnknown
|
||||
+{
|
||||
+ HRESULT SetSnapInterval([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] float interval, [in] float offset);
|
||||
+
|
||||
+ HRESULT SetSnapPoints([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] const float *points, [in] DWORD count);
|
||||
+
|
||||
+ HRESULT SetSnapType([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_TYPE type);
|
||||
+
|
||||
+ HRESULT SetSnapCoordinate([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate,
|
||||
+ [in] float origin);
|
||||
+
|
||||
+ HRESULT SetZoomBoundaries([in] float minimum, [in] float maximum);
|
||||
+
|
||||
+ HRESULT SetHorizontalAlignment([in] DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment);
|
||||
+
|
||||
+ HRESULT SetVerticalAlignment([in] DIRECTMANIPULATION_VERTICALALIGNMENT alignment);
|
||||
+
|
||||
+ HRESULT GetInertiaEndTransform([out] float *matrix, [in] DWORD count);
|
||||
+
|
||||
+ HRESULT GetCenterPoint([out] float *x, [out] float *y);
|
||||
+}
|
||||
+
|
||||
[
|
||||
uuid(9fbedf98-f6d8-4e3b-b488-fa66dbf5e9f3),
|
||||
version(1.0)
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,186 @@
|
||||
From 52d03476a908684bb201ae69032f39bf2a745190 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 23 Aug 2019 11:34:16 +1000
|
||||
Subject: [PATCH 3/4] directmanipulation: Implement
|
||||
IDirectManipulationViewport2 GetPrimaryContent
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 155 ++++++++++++++++++-
|
||||
1 file changed, 154 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index f1e008bc7f..ca60e76db6 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -177,6 +177,142 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+
|
||||
+struct primarycontext
|
||||
+{
|
||||
+ IDirectManipulationPrimaryContent IDirectManipulationPrimaryContent_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct primarycontext *impl_from_IDirectManipulationPrimaryContent(IDirectManipulationPrimaryContent *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationPrimaryContent_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationPrimaryContent))
|
||||
+ {
|
||||
+ IDirectManipulationPrimaryContent_AddRef(&This->IDirectManipulationPrimaryContent_iface);
|
||||
+ *ppv = &This->IDirectManipulationPrimaryContent_iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI primary_AddRef(IDirectManipulationPrimaryContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI primary_Release(IDirectManipulationPrimaryContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapInterval(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ float interval, float offset)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %f, %f\n", This, motion, interval, offset);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapPoints(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ const float *points, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %p, %d\n", This, motion, points, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapType(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_TYPE type)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %d\n", This, motion, type);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapCoordinate(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate, float origin)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %d, %f\n", This, motion, coordinate, origin);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetZoomBoundaries(IDirectManipulationPrimaryContent *iface, float minimum, float maximum)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %f, %f\n", This, minimum, maximum);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetHorizontalAlignment(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d\n", This, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetVerticalAlignment(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_VERTICALALIGNMENT alignment)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d\n", This, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_GetInertiaEndTransform(IDirectManipulationPrimaryContent *iface, float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_GetCenterPoint(IDirectManipulationPrimaryContent *iface, float *x, float *y)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, x, y);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IDirectManipulationPrimaryContentVtbl primaryVtbl =
|
||||
+{
|
||||
+ primary_QueryInterface,
|
||||
+ primary_AddRef,
|
||||
+ primary_Release,
|
||||
+ primary_SetSnapInterval,
|
||||
+ primary_SetSnapPoints,
|
||||
+ primary_SetSnapType,
|
||||
+ primary_SetSnapCoordinate,
|
||||
+ primary_SetZoomBoundaries,
|
||||
+ primary_SetHorizontalAlignment,
|
||||
+ primary_SetVerticalAlignment,
|
||||
+ primary_GetInertiaEndTransform,
|
||||
+ primary_GetCenterPoint
|
||||
+};
|
||||
+
|
||||
struct directviewport
|
||||
{
|
||||
IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
|
||||
@@ -327,7 +463,24 @@ static HRESULT WINAPI viewport_SyncDisplayTransform(IDirectManipulationViewport2
|
||||
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);
|
||||
+ TRACE("%p, %s, %p\n", This, debugstr_guid(riid), object);
|
||||
+ if(IsEqualGUID(riid, &IID_IDirectManipulationPrimaryContent))
|
||||
+ {
|
||||
+ struct primarycontext *primary;
|
||||
+ TRACE("IDirectManipulationPrimaryContent\n");
|
||||
+ primary = heap_alloc( sizeof(*primary));
|
||||
+ if(!primary)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ primary->IDirectManipulationPrimaryContent_iface.lpVtbl = &primaryVtbl;
|
||||
+ primary->ref = 1;
|
||||
+
|
||||
+ *object = &primary->IDirectManipulationPrimaryContent_iface;
|
||||
+
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+ else
|
||||
+ FIXME("Unsupported interface %s\n", debugstr_guid(riid));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -3152,6 +3152,9 @@ if test "$enable_directmanipulation_new_dll" -eq 1; then
|
||||
patch_apply directmanipulation-new-dll/0010-include-Add-IDirectManipulationViewport2-interface.patch
|
||||
patch_apply directmanipulation-new-dll/0011-directmanipulation-Implement-IDirectManipulationMana.patch
|
||||
patch_apply directmanipulation-new-dll/0012-directmanipulation-tests-Initial-tests.patch
|
||||
patch_apply directmanipulation-new-dll/0013-directmanipulation-Fake-success-from-IDirectManipula.patch
|
||||
patch_apply directmanipulation-new-dll/0014-include-Add-IDirectManipulationPrimaryContent-interf.patch
|
||||
patch_apply directmanipulation-new-dll/0015-directmanipulation-Implement-IDirectManipulationView.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add directmanipulation.idl.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: New dll.", 1 },';
|
||||
@ -3165,6 +3168,9 @@ if test "$enable_directmanipulation_new_dll" -eq 1; then
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add IDirectManipulationViewport2 interface.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationManager2 CreateViewport.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation/tests: Initial tests.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Fake success from IDirectManipulationViewport2 ActivateConfiguration.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add IDirectManipulationPrimaryContent interface.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationViewport2 GetPrimaryContent.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user