| 1 |
/* |
| 2 |
* Copyright 2021 Andrew Eikum for CodeWeavers |
| 3 |
* Copyright 2020 Rémi Bernon for CodeWeavers |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public |
| 16 |
* License along with this library; if not, write to the Free Software |
| 17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifdef __WIDL__ |
| 21 |
#pragma winrt ns_prefix |
| 22 |
#endif |
| 23 |
|
| 24 |
import "inspectable.idl"; |
| 25 |
import "eventtoken.idl"; |
| 26 |
import "windows.foundation.idl"; |
| 27 |
|
| 28 |
namespace Windows { |
| 29 |
namespace Media { |
| 30 |
namespace Devices { |
| 31 |
typedef enum AudioDeviceRole AudioDeviceRole; |
| 32 |
interface IDefaultAudioDeviceChangedEventArgs; |
| 33 |
interface IMediaDeviceStatics; |
| 34 |
runtimeclass DefaultAudioCaptureDeviceChangedEventArgs; |
| 35 |
runtimeclass DefaultAudioRenderDeviceChangedEventArgs; |
| 36 |
runtimeclass MediaDevice; |
| 37 |
} |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
namespace Windows { |
| 42 |
namespace Media { |
| 43 |
namespace Devices { |
| 44 |
declare { |
| 45 |
interface Windows.Foundation.TypedEventHandler<IInspectable *, Windows.Media.Devices.DefaultAudioCaptureDeviceChangedEventArgs *>; |
| 46 |
interface Windows.Foundation.TypedEventHandler<IInspectable *, Windows.Media.Devices.DefaultAudioRenderDeviceChangedEventArgs *>; |
| 47 |
} |
| 48 |
} |
| 49 |
} |
| 50 |
} |
| 51 |
|
| 52 |
namespace Windows { |
| 53 |
namespace Media { |
| 54 |
namespace Devices { |
| 55 |
enum AudioDeviceRole { |
| 56 |
Default = 0, |
| 57 |
Communications = 1, |
| 58 |
}; |
| 59 |
} |
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
namespace Windows { |
| 64 |
namespace Media { |
| 65 |
namespace Devices { |
| 66 |
[ |
| 67 |
uuid(110f882f-1c05-4657-a18e-47c9b69f07ab) |
| 68 |
] |
| 69 |
interface IDefaultAudioDeviceChangedEventArgs : IInspectable |
| 70 |
{ |
| 71 |
[propget] HRESULT Id([out] [retval] HSTRING *value); |
| 72 |
[propget] HRESULT Role([out] [retval] Windows.Media.Devices.AudioDeviceRole *value); |
| 73 |
} |
| 74 |
|
| 75 |
[ |
| 76 |
exclusiveto(Windows.Media.Devices.MediaDevice), |
| 77 |
uuid(aa2d9a40-909f-4bba-bf8b-0c0d296f14f0) |
| 78 |
] |
| 79 |
interface IMediaDeviceStatics : IInspectable |
| 80 |
{ |
| 81 |
HRESULT GetAudioCaptureSelector([out] [retval] HSTRING *value); |
| 82 |
HRESULT GetAudioRenderSelector([out] [retval] HSTRING *value); |
| 83 |
HRESULT GetVideoCaptureSelector([out] [retval] HSTRING *value); |
| 84 |
HRESULT GetDefaultAudioCaptureId([in] Windows.Media.Devices.AudioDeviceRole role, [out] [retval] HSTRING *value); |
| 85 |
HRESULT GetDefaultAudioRenderId([in] Windows.Media.Devices.AudioDeviceRole role, [out] [retval] HSTRING *value); |
| 86 |
|
| 87 |
[eventadd] HRESULT DefaultAudioCaptureDeviceChanged( |
| 88 |
[in] Windows.Foundation.TypedEventHandler<IInspectable *, Windows.Media.Devices.DefaultAudioCaptureDeviceChangedEventArgs *> *handler, |
| 89 |
[out, retval] EventRegistrationToken* token); |
| 90 |
[eventremove] HRESULT DefaultAudioCaptureDeviceChanged( |
| 91 |
[in] EventRegistrationToken token); |
| 92 |
|
| 93 |
[eventadd] HRESULT DefaultAudioRenderDeviceChanged( |
| 94 |
[in] Windows.Foundation.TypedEventHandler<IInspectable *, Windows.Media.Devices.DefaultAudioRenderDeviceChangedEventArgs *> *handler, |
| 95 |
[out, retval] EventRegistrationToken* token); |
| 96 |
[eventremove] HRESULT DefaultAudioRenderDeviceChanged( |
| 97 |
[in] EventRegistrationToken token); |
| 98 |
} |
| 99 |
|
| 100 |
[ |
| 101 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 102 |
activatable(Windows.Foundation.UniversalApiContract, 1.0), |
| 103 |
marshaling_behavior(agile), |
| 104 |
static(Windows.Media.Devices.IMediaDeviceStatics, Windows.Foundation.UniversalApiContract, 1.0), |
| 105 |
] |
| 106 |
runtimeclass MediaDevice |
| 107 |
{ |
| 108 |
} |
| 109 |
|
| 110 |
[ |
| 111 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 112 |
marshaling_behavior(agile) |
| 113 |
] |
| 114 |
runtimeclass DefaultAudioRenderDeviceChangedEventArgs |
| 115 |
{ |
| 116 |
[default] interface Windows.Media.Devices.IDefaultAudioDeviceChangedEventArgs; |
| 117 |
} |
| 118 |
|
| 119 |
[ |
| 120 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 121 |
marshaling_behavior(agile) |
| 122 |
] |
| 123 |
runtimeclass DefaultAudioCaptureDeviceChangedEventArgs |
| 124 |
{ |
| 125 |
[default] interface Windows.Media.Devices.IDefaultAudioDeviceChangedEventArgs; |
| 126 |
} |
| 127 |
} |
| 128 |
} |
| 129 |
} |