[PATCH 1/4] include: Add windows.media.speechsynthesis.idl draft.

Rémi Bernon rbernon at codeweavers.com
Mon Sep 28 03:18:57 CDT 2020


This IDL is used by windows.media.speech.dll, which is itself required
by Flight Simulator. It will here be used as an illustration and test
case for WIDL WinRT features.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---

This is the beginning of a series to correctly support parameterized
interfaces in WIDL in WinRT mode. I'm using this new idl file as well
as windows.foundation.idl to illustrate and test the parsing features,
and the generated headers.

The generated code should closely match MIDL this time, at least on the
C side. The C++ side of the WinRT generated headers are based template
implementation classes from internal WinRT headers, which we don't have
and that will require a lot more work to figure how to do it properly.

 include/Makefile.in                       |  1 +
 include/windows.media.speechsynthesis.idl | 61 +++++++++++++++++++++++
 2 files changed, 62 insertions(+)
 create mode 100644 include/windows.media.speechsynthesis.idl

diff --git a/include/Makefile.in b/include/Makefile.in
index 91a02645c33..dd13656392e 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -733,6 +733,7 @@ SOURCES = \
 	windef.h \
 	windns.h \
 	windows.foundation.idl \
+	windows.media.speechsynthesis.idl \
 	windows.h \
 	windowsx.h \
 	wine/debug.h \
diff --git a/include/windows.media.speechsynthesis.idl b/include/windows.media.speechsynthesis.idl
new file mode 100644
index 00000000000..a0a4c9cbf50
--- /dev/null
+++ b/include/windows.media.speechsynthesis.idl
@@ -0,0 +1,61 @@
+/*
+ * 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";
+
+namespace Windows {
+    namespace Media {
+        namespace SpeechSynthesis {
+            typedef enum VoiceGender VoiceGender;
+            interface IInstalledVoicesStatic;
+            interface IVoiceInformation;
+        }
+    }
+}
+
+namespace Windows {
+    namespace Media {
+        namespace SpeechSynthesis {
+            /* [contract(Windows.Foundation.UniversalApiContract, 1.0)] */
+            enum VoiceGender
+            {
+                Male   = 0,
+                Female = 1
+            };
+
+            [
+                /* contract(Windows.Foundation.UniversalApiContract, 1.0), */
+                /* exclusiveto(Windows.Media.SpeechSynthesis.VoiceInformation), */
+                uuid(b127d6a4-1291-4604-aa9c-83134083352c)
+            ]
+            interface IVoiceInformation : IInspectable
+            {
+                [propget] HRESULT DisplayName([out] [retval] HSTRING* value);
+                [propget] HRESULT Id([out] [retval] HSTRING* value);
+                [propget] HRESULT Language([out] [retval] HSTRING* value);
+                [propget] HRESULT Description([out] [retval] HSTRING* value);
+                [propget] HRESULT Gender([out] [retval] VoiceGender* value);
+            }
+        }
+    }
+}
-- 
2.28.0




More information about the wine-devel mailing list