]> git.proxmox.com Git - rustc.git/blob - vendor/winapi/src/um/endpointvolume.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / vendor / winapi / src / um / endpointvolume.rs
1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 use ctypes::c_float;
7 use shared::basetsd::UINT32;
8 use shared::guiddef::{GUID, LPCGUID};
9 use shared::minwindef::{BOOL, DWORD, UINT};
10 use um::unknwnbase::{IUnknown, IUnknownVtbl};
11 use um::winnt::HRESULT;
12 STRUCT!{struct AUDIO_VOLUME_NOTIFICATION_DATA {
13 guidEventContext: GUID,
14 bMuted: BOOL,
15 fMasterVolume: c_float,
16 nChannels: UINT,
17 afChannelVolumes: [c_float; 1],
18 }}
19 pub type PAUDIO_VOLUME_NOTIFICATION_DATA = *mut AUDIO_VOLUME_NOTIFICATION_DATA;
20 pub const ENDPOINT_HARDWARE_SUPPORT_VOLUME: DWORD = 0x00000001;
21 pub const ENDPOINT_HARDWARE_SUPPORT_MUTE: DWORD = 0x00000002;
22 pub const ENDPOINT_HARDWARE_SUPPORT_METER: DWORD = 0x00000004;
23 RIDL!{#[uuid(0x657804fa, 0xd6ad, 0x4496, 0x8a, 0x60, 0x35, 0x27, 0x52, 0xaf, 0x4f, 0x89)]
24 interface IAudioEndpointVolumeCallback(IAudioEndpointVolumeCallbackVtbl): IUnknown(IUnknownVtbl) {
25 fn OnNotify(
26 pNotify: PAUDIO_VOLUME_NOTIFICATION_DATA,
27 ) -> HRESULT,
28 }}
29 RIDL!{#[uuid(0x5cdf2c82, 0x841e, 0x4546, 0x97, 0x22, 0x0c, 0xf7, 0x40, 0x78, 0x22, 0x9a)]
30 interface IAudioEndpointVolume(IAudioEndpointVolumeVtbl): IUnknown(IUnknownVtbl) {
31 fn RegisterControlChangeNotify(
32 pNotify: *mut IAudioEndpointVolumeCallback,
33 ) -> HRESULT,
34 fn UnregisterControlChangeNotify(
35 pNotify: *mut IAudioEndpointVolumeCallback,
36 ) -> HRESULT,
37 fn GetChannelCount(
38 pnChannelCount: *mut UINT,
39 ) -> HRESULT,
40 fn SetMasterVolumeLevel(
41 fLevelDB: c_float,
42 pguidEventContext: LPCGUID,
43 ) -> HRESULT,
44 fn SetMasterVolumeLevelScalar(
45 fLevel: c_float,
46 pguidEventContext: LPCGUID,
47 ) -> HRESULT,
48 fn GetMasterVolumeLevel(
49 pfLevelDB: *mut c_float,
50 ) -> HRESULT,
51 fn GetMasterVolumeLevelScalar(
52 pfLevel: *mut c_float,
53 ) -> HRESULT,
54 fn SetChannelVolumeLevel(
55 nChannel: UINT,
56 fLevelDB: c_float,
57 pguidEventContext: LPCGUID,
58 ) -> HRESULT,
59 fn SetChannelVolumeLevelScalar(
60 nChannel: UINT,
61 fLevel: c_float,
62 pguidEventContext: LPCGUID,
63 ) -> HRESULT,
64 fn GetChannelVolumeLevel(
65 nChannel: UINT,
66 pfLevelDB: *mut c_float,
67 ) -> HRESULT,
68 fn GetChannelVolumeLevelScalar(
69 nChannel: UINT,
70 pfLevel: *mut c_float,
71 ) -> HRESULT,
72 fn SetMute(
73 bMute: BOOL,
74 pguidEventContext: LPCGUID,
75 ) -> HRESULT,
76 fn GetMute(
77 pbMute: *mut BOOL,
78 ) -> HRESULT,
79 fn GetVolumeStepInfo(
80 pnStep: *mut UINT,
81 pnStepCount: *mut UINT,
82 ) -> HRESULT,
83 fn VolumeStepUp(
84 pguidEventContext: LPCGUID,
85 ) -> HRESULT,
86 fn VolumeStepDown(
87 pguidEventContext: LPCGUID,
88 ) -> HRESULT,
89 fn QueryHardwareSupport(
90 pdwHardwareSupportMask: *mut DWORD,
91 ) -> HRESULT,
92 fn GetVolumeRange(
93 pflVolumeMindB: *mut c_float,
94 pflVolumeMaxdB: *mut c_float,
95 pflVolumeIncrementdB: *mut c_float,
96 ) -> HRESULT,
97 }}
98 RIDL!{#[uuid(0x66e11784, 0xf695, 0x4f28, 0xa5, 0x05, 0xa7, 0x08, 0x00, 0x81, 0xa7, 0x8f)]
99 interface IAudioEndpointVolumeEx(IAudioEndpointVolumeExVtbl):
100 IAudioEndpointVolume(IAudioEndpointVolumeVtbl) {
101 fn GetVolumeRangeChannel(
102 iChannel: UINT,
103 pflVolumeMindB: *mut c_float,
104 pflVolumeMaxdB: *mut c_float,
105 pflVolumeIncrementdB: *mut c_float,
106 ) -> HRESULT,
107 }}
108 RIDL!{#[uuid(0xc02216f6, 0x8c67, 0x4b5b, 0x9d, 0x00, 0xd0, 0x08, 0xe7, 0x3e, 0x00, 0x64)]
109 interface IAudioMeterInformation(IAudioMeterInformationVtbl): IUnknown(IUnknownVtbl) {
110 fn GetPeakValue(
111 pfPeak: *mut c_float,
112 ) -> HRESULT,
113 fn GetMeteringChannelCount(
114 pnChannelCount: *mut UINT,
115 ) -> HRESULT,
116 fn GetChannelsPeakValues(
117 u32ChannelCount: UINT32,
118 afPeakValues: *mut c_float,
119 ) -> HRESULT,
120 fn QueryHardwareSupport(
121 pdwHardwareSupportMask: *mut DWORD,
122 ) -> HRESULT,
123 }}