Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
This is the continuation of my WinRT support patches, tracked in [1].
I've left the DECLSPEC_SELECTANY runtimeclass string constants aside for now, and I'll add them to the generated headers in a separate patch.
A previous version of whole series is already in Wine Staging, and it has been successfully used [2] by Steve Lhomme robux4@ycbcr.xyz for VLC, and who also contributed fixes that I've merged in the series.
[1] https://bugs.winehq.org/show_bug.cgi?id=49998 [2] https://github.com/robUx4/mingw-w64/commits/vlc_winrt/12
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.
include/Makefile.in | 1 + include/windows.media.speechsynthesis.idl | 47 +++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 include/windows.media.speechsynthesis.idl
diff --git a/include/Makefile.in b/include/Makefile.in index 74a1d8e0c89..096fb4554e5 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -745,6 +745,7 @@ SOURCES = \ windef.h \ windns.h \ windows.foundation.idl \ + windows.media.speechsynthesis.idl \ windows.h \ windowscontracts.idl \ windowsx.h \ diff --git a/include/windows.media.speechsynthesis.idl b/include/windows.media.speechsynthesis.idl new file mode 100644 index 00000000000..7a1de5fcba6 --- /dev/null +++ b/include/windows.media.speechsynthesis.idl @@ -0,0 +1,47 @@ +/* + * 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 + }; + } + } +}