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