2021-01-20 17:00:14 -08:00
|
|
|
From 57e813244a401d27959d8689942e787fafcaa15b Mon Sep 17 00:00:00 2001
|
2020-08-26 01:44:32 -07:00
|
|
|
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
2020-10-14 00:01:08 -07:00
|
|
|
Date: Fri, 9 Oct 2020 13:38:18 +0200
|
2021-01-20 17:00:14 -08:00
|
|
|
Subject: [PATCH] windows.gaming.input: Add stub dll.
|
2020-08-26 01:44:32 -07:00
|
|
|
|
|
|
|
---
|
2020-10-14 00:01:08 -07:00
|
|
|
configure.ac | 1 +
|
|
|
|
dlls/windows.gaming.input.dll/Makefile.in | 5 +
|
|
|
|
.../windows.gaming.input.spec | 3 +
|
|
|
|
.../windows.gaming.input_main.c | 140 ++++++++++++++++++
|
|
|
|
include/Makefile.in | 1 +
|
|
|
|
include/windows.gaming.input.idl | 24 +++
|
|
|
|
6 files changed, 174 insertions(+)
|
2020-08-26 01:44:32 -07:00
|
|
|
create mode 100644 dlls/windows.gaming.input.dll/Makefile.in
|
|
|
|
create mode 100644 dlls/windows.gaming.input.dll/windows.gaming.input.spec
|
|
|
|
create mode 100644 dlls/windows.gaming.input.dll/windows.gaming.input_main.c
|
2020-10-14 00:01:08 -07:00
|
|
|
create mode 100644 include/windows.gaming.input.idl
|
2020-08-26 01:44:32 -07:00
|
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
2021-01-20 17:00:14 -08:00
|
|
|
index 6fbf7f2d4e5..bdcfe84f87d 100644
|
2020-08-26 01:44:32 -07:00
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2021-01-20 17:00:14 -08:00
|
|
|
@@ -3850,6 +3850,7 @@ WINE_CONFIG_MAKEFILE(dlls/win32s16.dll16,enable_win16)
|
2020-08-26 01:44:32 -07:00
|
|
|
WINE_CONFIG_MAKEFILE(dlls/win87em.dll16,enable_win16)
|
|
|
|
WINE_CONFIG_MAKEFILE(dlls/winaspi.dll16,enable_win16)
|
|
|
|
WINE_CONFIG_MAKEFILE(dlls/windebug.dll16,enable_win16)
|
|
|
|
+WINE_CONFIG_MAKEFILE(dlls/windows.gaming.input.dll)
|
2020-10-14 00:01:08 -07:00
|
|
|
WINE_CONFIG_MAKEFILE(dlls/windows.media.speech.dll)
|
2020-08-26 01:44:32 -07:00
|
|
|
WINE_CONFIG_MAKEFILE(dlls/windowscodecs)
|
|
|
|
WINE_CONFIG_MAKEFILE(dlls/windowscodecs/tests)
|
|
|
|
diff --git a/dlls/windows.gaming.input.dll/Makefile.in b/dlls/windows.gaming.input.dll/Makefile.in
|
|
|
|
new file mode 100644
|
2020-10-14 00:01:08 -07:00
|
|
|
index 00000000000..d9478342294
|
2020-08-26 01:44:32 -07:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/dlls/windows.gaming.input.dll/Makefile.in
|
2020-10-14 00:01:08 -07:00
|
|
|
@@ -0,0 +1,5 @@
|
|
|
|
+MODULE = windows.gaming.input.dll
|
|
|
|
+IMPORTS = combase uuid
|
2020-08-26 01:44:32 -07:00
|
|
|
+EXTRADLLFLAGS = -mno-cygwin
|
|
|
|
+C_SRCS = \
|
|
|
|
+ windows.gaming.input_main.c
|
|
|
|
diff --git a/dlls/windows.gaming.input.dll/windows.gaming.input.spec b/dlls/windows.gaming.input.dll/windows.gaming.input.spec
|
|
|
|
new file mode 100644
|
2020-10-14 00:01:08 -07:00
|
|
|
index 00000000000..20a8bfa98ea
|
2020-08-26 01:44:32 -07:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/dlls/windows.gaming.input.dll/windows.gaming.input.spec
|
|
|
|
@@ -0,0 +1,3 @@
|
|
|
|
+@ stdcall -private DllCanUnloadNow()
|
|
|
|
+@ stdcall -private DllGetActivationFactory(ptr ptr)
|
|
|
|
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
|
|
|
diff --git a/dlls/windows.gaming.input.dll/windows.gaming.input_main.c b/dlls/windows.gaming.input.dll/windows.gaming.input_main.c
|
|
|
|
new file mode 100644
|
2020-10-14 00:01:08 -07:00
|
|
|
index 00000000000..2b6abc4dd84
|
2020-08-26 01:44:32 -07:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/dlls/windows.gaming.input.dll/windows.gaming.input_main.c
|
2020-10-14 00:01:08 -07:00
|
|
|
@@ -0,0 +1,140 @@
|
2020-08-26 01:44:32 -07:00
|
|
|
+#include <stdarg.h>
|
|
|
|
+
|
|
|
|
+#define COBJMACROS
|
|
|
|
+#include "windef.h"
|
|
|
|
+#include "winbase.h"
|
|
|
|
+#include "winstring.h"
|
|
|
|
+#include "wine/debug.h"
|
|
|
|
+#include "objbase.h"
|
2020-10-14 00:01:08 -07:00
|
|
|
+
|
2020-08-26 01:44:32 -07:00
|
|
|
+#include "initguid.h"
|
2020-10-14 00:01:08 -07:00
|
|
|
+#include "activation.h"
|
|
|
|
+
|
|
|
|
+#include "windows.foundation.h"
|
|
|
|
+#include "windows.gaming.input.h"
|
2020-08-26 01:44:32 -07:00
|
|
|
+
|
|
|
|
+WINE_DEFAULT_DEBUG_CHANNEL(input);
|
|
|
|
+
|
|
|
|
+static const char *debugstr_hstring(HSTRING hstr)
|
|
|
|
+{
|
|
|
|
+ const WCHAR *str;
|
|
|
|
+ UINT32 len;
|
|
|
|
+ if (hstr && !((ULONG_PTR)hstr >> 16)) return "(invalid)";
|
|
|
|
+ str = WindowsGetStringRawBuffer(hstr, &len);
|
|
|
|
+ return wine_dbgstr_wn(str, len);
|
|
|
|
+}
|
|
|
|
+
|
2020-10-14 00:01:08 -07:00
|
|
|
+struct windows_gaming_input
|
|
|
|
+{
|
|
|
|
+ IActivationFactory IActivationFactory_iface;
|
|
|
|
+ LONG ref;
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static inline struct windows_gaming_input *impl_from_IActivationFactory(IActivationFactory *iface)
|
|
|
|
+{
|
|
|
|
+ return CONTAINING_RECORD(iface, struct windows_gaming_input, IActivationFactory_iface);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static HRESULT STDMETHODCALLTYPE windows_gaming_input_QueryInterface(
|
|
|
|
+ IActivationFactory *iface, REFIID iid, void **out)
|
2020-08-26 01:44:32 -07:00
|
|
|
+{
|
2020-10-14 00:01:08 -07:00
|
|
|
+ struct windows_gaming_input *impl = impl_from_IActivationFactory(iface);
|
|
|
|
+ TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
|
2020-08-26 01:44:32 -07:00
|
|
|
+
|
2020-10-14 00:01:08 -07:00
|
|
|
+ if (IsEqualGUID(iid, &IID_IUnknown) ||
|
|
|
|
+ IsEqualGUID(iid, &IID_IInspectable) ||
|
|
|
|
+ IsEqualGUID(iid, &IID_IActivationFactory))
|
2020-08-26 01:44:32 -07:00
|
|
|
+ {
|
2020-10-14 00:01:08 -07:00
|
|
|
+ IUnknown_AddRef(iface);
|
|
|
|
+ *out = &impl->IActivationFactory_iface;
|
|
|
|
+ return S_OK;
|
2020-08-26 01:44:32 -07:00
|
|
|
+ }
|
|
|
|
+
|
2020-10-14 00:01:08 -07:00
|
|
|
+ FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
|
|
|
|
+ *out = NULL;
|
|
|
|
+ return E_NOINTERFACE;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static ULONG STDMETHODCALLTYPE windows_gaming_input_AddRef(
|
|
|
|
+ IActivationFactory *iface)
|
|
|
|
+{
|
|
|
|
+ struct windows_gaming_input *impl = impl_from_IActivationFactory(iface);
|
|
|
|
+ ULONG ref = InterlockedIncrement(&impl->ref);
|
|
|
|
+ TRACE("iface %p, ref %u.\n", iface, ref);
|
|
|
|
+ return ref;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static ULONG STDMETHODCALLTYPE windows_gaming_input_Release(
|
|
|
|
+ IActivationFactory *iface)
|
|
|
|
+{
|
|
|
|
+ struct windows_gaming_input *impl = impl_from_IActivationFactory(iface);
|
|
|
|
+ ULONG ref = InterlockedDecrement(&impl->ref);
|
|
|
|
+ TRACE("iface %p, ref %u.\n", iface, ref);
|
|
|
|
+ return ref;
|
2020-08-26 01:44:32 -07:00
|
|
|
+}
|
|
|
|
+
|
2020-10-14 00:01:08 -07:00
|
|
|
+static HRESULT STDMETHODCALLTYPE windows_gaming_input_GetIids(
|
|
|
|
+ IActivationFactory *iface, ULONG *iid_count, IID **iids)
|
|
|
|
+{
|
|
|
|
+ FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
|
|
|
|
+ return E_NOTIMPL;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static HRESULT STDMETHODCALLTYPE windows_gaming_input_GetRuntimeClassName(
|
|
|
|
+ IActivationFactory *iface, HSTRING *class_name)
|
|
|
|
+{
|
|
|
|
+ FIXME("iface %p, class_name %p stub!\n", iface, class_name);
|
|
|
|
+ return E_NOTIMPL;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static HRESULT STDMETHODCALLTYPE windows_gaming_input_GetTrustLevel(
|
|
|
|
+ IActivationFactory *iface, TrustLevel *trust_level)
|
|
|
|
+{
|
|
|
|
+ FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
|
|
|
|
+ return E_NOTIMPL;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static HRESULT STDMETHODCALLTYPE windows_gaming_input_ActivateInstance(
|
|
|
|
+ IActivationFactory *iface, IInspectable **instance)
|
|
|
|
+{
|
|
|
|
+ FIXME("iface %p, instance %p stub!\n", iface, instance);
|
|
|
|
+ return E_NOTIMPL;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static const struct IActivationFactoryVtbl activation_factory_vtbl =
|
|
|
|
+{
|
|
|
|
+ windows_gaming_input_QueryInterface,
|
|
|
|
+ windows_gaming_input_AddRef,
|
|
|
|
+ windows_gaming_input_Release,
|
|
|
|
+ /* IInspectable methods */
|
|
|
|
+ windows_gaming_input_GetIids,
|
|
|
|
+ windows_gaming_input_GetRuntimeClassName,
|
|
|
|
+ windows_gaming_input_GetTrustLevel,
|
|
|
|
+ /* IActivationFactory methods */
|
|
|
|
+ windows_gaming_input_ActivateInstance,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct windows_gaming_input windows_gaming_input =
|
|
|
|
+{
|
|
|
|
+ {&activation_factory_vtbl},
|
|
|
|
+ 0
|
|
|
|
+};
|
|
|
|
+
|
2020-08-26 01:44:32 -07:00
|
|
|
+HRESULT WINAPI DllCanUnloadNow(void)
|
|
|
|
+{
|
|
|
|
+ return S_FALSE;
|
|
|
|
+}
|
|
|
|
+
|
2020-10-14 00:01:08 -07:00
|
|
|
+HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out)
|
2020-08-26 01:44:32 -07:00
|
|
|
+{
|
2020-10-14 00:01:08 -07:00
|
|
|
+ FIXME("clsid %s, riid %s, out %p stub!\n", debugstr_guid(clsid), debugstr_guid(riid), out);
|
2020-08-26 01:44:32 -07:00
|
|
|
+ return CLASS_E_CLASSNOTAVAILABLE;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **factory)
|
|
|
|
+{
|
2020-10-14 00:01:08 -07:00
|
|
|
+ TRACE("classid %s, factory %p.\n", debugstr_hstring(classid), factory);
|
|
|
|
+ *factory = &windows_gaming_input.IActivationFactory_iface;
|
|
|
|
+ IUnknown_AddRef(*factory);
|
|
|
|
+ return S_OK;
|
2020-08-26 01:44:32 -07:00
|
|
|
+}
|
2020-10-14 00:01:08 -07:00
|
|
|
diff --git a/include/Makefile.in b/include/Makefile.in
|
2021-01-20 17:00:14 -08:00
|
|
|
index 466ac6fd5dc..24cc64a3407 100644
|
2020-10-14 00:01:08 -07:00
|
|
|
--- a/include/Makefile.in
|
|
|
|
+++ b/include/Makefile.in
|
2021-01-20 17:00:14 -08:00
|
|
|
@@ -753,6 +753,7 @@ SOURCES = \
|
2020-10-14 00:01:08 -07:00
|
|
|
windef.h \
|
|
|
|
windns.h \
|
|
|
|
windows.foundation.idl \
|
|
|
|
+ windows.gaming.input.idl \
|
|
|
|
windows.h \
|
2021-01-20 17:00:14 -08:00
|
|
|
windows.media.speechsynthesis.idl \
|
2020-10-14 00:01:08 -07:00
|
|
|
windowscontracts.idl \
|
|
|
|
diff --git a/include/windows.gaming.input.idl b/include/windows.gaming.input.idl
|
|
|
|
new file mode 100644
|
|
|
|
index 00000000000..575f34ccb58
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/include/windows.gaming.input.idl
|
|
|
|
@@ -0,0 +1,24 @@
|
|
|
|
+/*
|
|
|
|
+ * Copyright 2020 RĂ©mi Bernon for CodeWeavers
|
|
|
|
+ *
|
|
|
|
+ * 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
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+#ifdef __WIDL__
|
|
|
|
+#pragma winrt ns_prefix
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+import "inspectable.idl";
|
|
|
|
+import "windows.foundation.idl";
|
2020-08-26 01:44:32 -07:00
|
|
|
--
|
2021-01-20 17:00:14 -08:00
|
|
|
2.29.2
|
2020-08-26 01:44:32 -07:00
|
|
|
|