Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
v3:
- remove unused 'apicontract MediaControlContract';
- add 'requires' to ISpeechSynthesisStream.
include/Makefile.in | 1 +
include/windows.foundation.idl | 9 ++++
include/windows.media.idl | 43 ++++++++++++++++
include/windows.media.speechsynthesis.idl | 63 +++++++++++++++++++++++
4 files changed, 116 insertions(+)
create mode 100644 include/windows.media.idl
diff --git a/include/Makefile.in b/include/Makefile.in
index acb55b37f6c..b230804974c 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -776,6 +776,7 @@ SOURCES = \
windows.gaming.input.idl \
windows.globalization.idl \
windows.h \
+ windows.media.idl \
windows.media.devices.idl \
windows.media.speechsynthesis.idl \
windows.storage.streams.idl \
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index fe09dc66edd..292522f2c49 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -119,6 +119,15 @@ namespace Windows {
{
HRESULT ToString([out, retval] HSTRING *value);
}
+
+ [
+ contract(Windows.Foundation.FoundationContract, 1.0),
+ uuid(30d5a829-7fa4-4026-83bb-d75bae4ea99e)
+ ]
+ interface IClosable : IInspectable
+ {
+ HRESULT Close();
+ }
}
}
diff --git a/include/windows.media.idl b/include/windows.media.idl
new file mode 100644
index 00000000000..fe81c768361
--- /dev/null
+++ b/include/windows.media.idl
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2021 Paul Gofman 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 {
+ interface IMediaControl;
+ }
+}
+
+namespace Windows {
+ namespace Media {
+ [contract(Windows.Foundation.UniversalApiContract, 1.0)]
+ [uuid(1803def8-dca5-4b6f-9c20-e3d3c0643625)]
+ interface IMediaMarker : IInspectable
+ {
+ [propget] HRESULT Time([out] [retval] Windows.Foundation.TimeSpan* value);
+ [propget] HRESULT MediaMarkerType([out] [retval] HSTRING* value);
+ [propget] HRESULT Text([out] [retval] HSTRING* value);
+ }
+ }
+}
diff --git a/include/windows.media.speechsynthesis.idl b/include/windows.media.speechsynthesis.idl
index af4466681dc..29dca510dee 100644
--- a/include/windows.media.speechsynthesis.idl
+++ b/include/windows.media.speechsynthesis.idl
@@ -22,6 +22,7 @@
import "inspectable.idl";
import "windows.foundation.idl";
+import "windows.media.idl";
namespace Windows {
namespace Foundation {
@@ -35,10 +36,27 @@ namespace Windows {
interface ISpeechSynthesizer;
interface ISpeechSynthesizer2;
interface IVoiceInformation;
+ interface ISpeechSynthesisStream;
runtimeclass SpeechSynthesizer;
runtimeclass VoiceInformation;
+ runtimeclass SpeechSynthesisStream;
}
}
+ namespace Storage {
+ namespace Streams {
+ interface IRandomAccessStreamWithContentType;
+ interface IRandomAccessStream;
+ interface IInputStream;
+ interface IOutputStream;
+ interface IContentTypeProvider;
+ }
+ }
+}
+
+namespace Windows {
+ namespace Media {
+ interface IMediaMarker;
+ }
}
namespace Windows {
@@ -48,6 +66,9 @@ namespace Windows {
interface Windows.Foundation.Collections.IIterator<Windows.Media.SpeechSynthesis.VoiceInformation*>;
interface Windows.Foundation.Collections.IIterable<Windows.Media.SpeechSynthesis.VoiceInformation*>;
interface Windows.Foundation.Collections.IVectorView<Windows.Media.SpeechSynthesis.VoiceInformation*>;
+ interface Windows.Foundation.Collections.IVectorView<Windows.Media.IMediaMarker*>;
+ interface Windows.Foundation.IAsyncOperation<Windows.Media.SpeechSynthesis.SpeechSynthesisStream*>;
+ interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Media.SpeechSynthesis.SpeechSynthesisStream*>;
}
}
}
@@ -63,6 +84,34 @@ namespace Windows {
Female = 1
};
+ [contract(Windows.Foundation.UniversalApiContract, 1.0)]
+ [exclusiveto(Windows.Media.SpeechSynthesis.SpeechSynthesisStream)]
+ [uuid(83e46e93-244c-4622-ba0b-6229c4d0d65d)]
+ interface ISpeechSynthesisStream : IInspectable
+ requires
+ Windows.Storage.Streams.IRandomAccessStreamWithContentType,
+ Windows.Storage.Streams.IRandomAccessStream,
+ Windows.Foundation.IClosable,
+ Windows.Storage.Streams.IInputStream,
+ Windows.Storage.Streams.IOutputStream,
+ Windows.Storage.Streams.IContentTypeProvider
+ {
+ [propget] HRESULT Markers([out] [retval] Windows.Foundation.Collections.IVectorView<Windows.Media.IMediaMarker*>** value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.Media.SpeechSynthesis.SpeechSynthesizer),
+ uuid(ce9f7c76-97f4-4ced-ad68-d51c458e45c6)
+ ]
+ interface ISpeechSynthesizer : IInspectable
+ {
+ HRESULT SynthesizeTextToStreamAsync([in] HSTRING text, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Media.SpeechSynthesis.SpeechSynthesisStream*> **operation);
+ HRESULT SynthesizeSsmlToStreamAsync([in] HSTRING Ssml, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Media.SpeechSynthesis.SpeechSynthesisStream*> **operation);
+ [propput] HRESULT Voice([in] VoiceInformation *value);
+ [propget] HRESULT Voice([out] [retval] VoiceInformation **value);
+ }
+
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.Media.SpeechSynthesis.VoiceInformation),
@@ -97,6 +146,20 @@ namespace Windows {
[default] interface Windows.Media.SpeechSynthesis.IVoiceInformation;
}
+
+ [contract(Windows.Foundation.UniversalApiContract, 1.0)]
+ [marshaling_behavior(agile)]
+ runtimeclass SpeechSynthesisStream
+ {
+ [default] interface Windows.Media.SpeechSynthesis.ISpeechSynthesisStream;
+ interface Windows.Storage.Streams.IRandomAccessStreamWithContentType;
+ interface Windows.Storage.Streams.IContentTypeProvider;
+ interface Windows.Storage.Streams.IRandomAccessStream;
+ interface Windows.Storage.Streams.IOutputStream;
+ interface Windows.Foundation.IClosable;
+ interface Windows.Storage.Streams.IInputStream;
+ }
+
[
activatable(Windows.Foundation.UniversalApiContract, 1.0),
contract(Windows.Foundation.UniversalApiContract, 1.0),
--
2.33.1