Updated directmanipulation-new-dll patchset

This commit is contained in:
Alistair Leslie-Hughes 2019-07-29 09:49:00 +10:00
parent 7ebc640edb
commit 391055dbe1
3 changed files with 131 additions and 8 deletions

View File

@ -1,15 +1,15 @@
From a86c9d4e94bd06d922a0a7ec4bbfd30acec8eb8a Mon Sep 17 00:00:00 2001
From 3b024e2861712c7fd833c77a2de71b025102309f 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(-)
dlls/directmanipulation/directmanipulation.c | 131 ++++++++++++++++++-
1 file changed, 129 insertions(+), 2 deletions(-)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index edfdda980e..7d00354963 100644
index edfdda980e..c67d3ff956 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -68,6 +68,13 @@ HRESULT WINAPI DllCanUnloadNow(void)
@ -136,7 +136,7 @@ index edfdda980e..7d00354963 100644
heap_free(This);
}
return ref;
@@ -146,8 +249,30 @@ static HRESULT WINAPI direct_manip_ProcessInput(IDirectManipulationManager2 *ifa
@@ -146,8 +249,32 @@ 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);
@ -156,11 +156,13 @@ index edfdda980e..7d00354963 100644
+ else
+ {
+ hr = S_OK;
+ IDirectManipulationUpdateManager_AddRef(This->updatemanager);
+ }
+
+ if(hr == S_OK)
+ *obj = &This->updatemanager;
+ {
+ IDirectManipulationUpdateManager_AddRef(This->updatemanager);
+ *obj = This->updatemanager;
+ }
+ }
+ else
+ FIXME("Interface %s currently not supported.\n", debugstr_guid(riid));

View File

@ -0,0 +1,118 @@
From 9ed6b36924bd91b046f3df62512d6b8369b917d0 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 29 Jul 2019 09:09:41 +1000
Subject: [PATCH] directmanipulation/tests: Initial tests
---
configure | 1 +
configure.ac | 1 +
dlls/directmanipulation/tests/Makefile.in | 5 ++
dlls/directmanipulation/tests/manipulation.c | 60 ++++++++++++++++++++
4 files changed, 67 insertions(+)
create mode 100644 dlls/directmanipulation/tests/Makefile.in
create mode 100644 dlls/directmanipulation/tests/manipulation.c
diff --git a/configure b/configure
index bc376a6686..d23b90c6a4 100755
--- a/configure
+++ b/configure
@@ -20164,6 +20164,7 @@ wine_fn_config_makefile dlls/dinput/tests enable_tests
wine_fn_config_makefile dlls/dinput8 enable_dinput8
wine_fn_config_makefile dlls/dinput8/tests enable_tests
wine_fn_config_makefile dlls/directmanipulation enable_directmanipulation
+wine_fn_config_makefile dlls/directmanipulation/tests enable_tests
wine_fn_config_makefile dlls/dispdib.dll16 enable_win16
wine_fn_config_makefile dlls/dispex enable_dispex
wine_fn_config_makefile dlls/dispex/tests enable_tests
diff --git a/configure.ac b/configure.ac
index 51519fdd9b..6d8562da0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3149,6 +3149,7 @@ WINE_CONFIG_MAKEFILE(dlls/dinput/tests)
WINE_CONFIG_MAKEFILE(dlls/dinput8)
WINE_CONFIG_MAKEFILE(dlls/dinput8/tests)
WINE_CONFIG_MAKEFILE(dlls/directmanipulation)
+WINE_CONFIG_MAKEFILE(dlls/directmanipulation/tests)
WINE_CONFIG_MAKEFILE(dlls/dispdib.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/dispex)
WINE_CONFIG_MAKEFILE(dlls/dispex/tests)
diff --git a/dlls/directmanipulation/tests/Makefile.in b/dlls/directmanipulation/tests/Makefile.in
new file mode 100644
index 0000000000..29ec0db511
--- /dev/null
+++ b/dlls/directmanipulation/tests/Makefile.in
@@ -0,0 +1,5 @@
+TESTDLL = directmanipulation.dll
+IMPORTS = uuid ole32
+
+C_SRCS = \
+ manipulation.c
diff --git a/dlls/directmanipulation/tests/manipulation.c b/dlls/directmanipulation/tests/manipulation.c
new file mode 100644
index 0000000000..9ecc3d54be
--- /dev/null
+++ b/dlls/directmanipulation/tests/manipulation.c
@@ -0,0 +1,60 @@
+/*
+ *
+ * Copyright 2019 Alistair Leslie-Hughes
+ *
+ * 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
+ *
+ */
+#define COBJMACROS
+
+#include <stdarg.h>
+
+#include "windows.h"
+#include "directmanipulation.h"
+
+#include "wine/test.h"
+
+static void test_IDirectManipulationManager2()
+{
+ IDirectManipulationManager2 *manager2;
+ IDirectManipulationUpdateManager *update;
+ HRESULT hres;
+
+ hres = CoCreateInstance(&CLSID_DirectManipulationManager, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
+ &IID_IDirectManipulationManager2, (void**)&manager2);
+ if(FAILED(hres))
+ {
+ win_skip("Failed to create XMLView instance\n");
+ return;
+ }
+ ok(hres == S_OK, "CoCreateInstance returned %x, expected S_OK\n", hres);
+
+ hres = IDirectManipulationManager2_GetUpdateManager(manager2, &IID_IDirectManipulationUpdateManager, (void**)&update);
+ ok(hres == S_OK, "returned %x, expected S_OK\n", hres);
+
+ if(update)
+ IDirectManipulationUpdateManager_Release(update);
+
+ IDirectManipulationManager2_Release(manager2);
+}
+
+START_TEST(manipulation)
+{
+ CoInitialize(NULL);
+
+ test_IDirectManipulationManager2();
+
+ CoUninitialize();
+}
--
2.17.1

View File

@ -3276,7 +3276,8 @@ fi
# |
# | Modified files:
# | * configure, configure.ac, dlls/directmanipulation/Makefile.in, dlls/directmanipulation/directmanip.idl,
# | dlls/directmanipulation/directmanipulation.c, dlls/directmanipulation/directmanipulation.spec, dlls/uuid/uuid.c,
# | dlls/directmanipulation/directmanipulation.c, dlls/directmanipulation/directmanipulation.spec,
# | dlls/directmanipulation/tests/Makefile.in, dlls/directmanipulation/tests/manipulation.c, dlls/uuid/uuid.c,
# | include/Makefile.in, include/directmanipulation.idl
# |
if test "$enable_directmanipulation_new_dll" -eq 1; then
@ -3291,6 +3292,7 @@ if test "$enable_directmanipulation_new_dll" -eq 1; then
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
patch_apply directmanipulation-new-dll/0012-directmanipulation-tests-Initial-tests.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "include: Add directmanipulation.idl.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: New dll.", 1 },';
@ -3303,6 +3305,7 @@ if test "$enable_directmanipulation_new_dll" -eq 1; then
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 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation/tests: Initial tests.", 1 },';
) >> "$patchlist"
fi