ReactOS 0.4.15-dev-8241-g63935f8
sndvol32.h
Go to the documentation of this file.
1#ifndef __SNDVOL32_H
2#define __SNDVOL32_H
3
4#include <stdarg.h>
5
6#include <windef.h>
7#include <winbase.h>
8#include <wingdi.h>
9#include <winuser.h>
10#include <mmsystem.h>
11#include <commctrl.h>
12#include <tchar.h>
13#include <strsafe.h>
14#include <assert.h>
15
16#include "resources.h"
17
18#define VOLUME_MIN 0
19#define VOLUME_MAX 500
20#define VOLUME_TICKS 5
21#define VOLUME_PAGE_SIZE 100
22#define BALANCE_LEFT 0
23#define BALANCE_CENTER 32
24#define BALANCE_RIGHT 64
25#define BALANCE_STEPS 64
26#define BALANCE_TICKS 1
27#define BALANCE_PAGE_SIZE 12
28
29#define PLAY_MIXER 0
30#define RECORD_MIXER 1
31
32#define ADVANCED_BUTTON_HEIGHT 16
33
34#define HOTKEY_CTRL_S 1
35
36typedef enum _WINDOW_MODE
37{
42
43typedef struct _MIXER_WINDOW
44{
52
63
66extern HWND hMainWnd;
67extern HANDLE hAppHeap;
68
69#define SZ_APP_CLASS TEXT("Volume Control")
70#define _countof(array) (sizeof(array) / sizeof(array[0]))
71
73#define DPRINT DbgPrint("SNDVOL32: %s:%i: ", __FILE__, __LINE__); DbgPrint
74
75
76/*
77 * MIXER
78 */
79
81{
87
88
90{
97
98typedef struct _SND_MIXER
99{
103 HMIXER hmx;
107
109{
113
120
123
125{
131
132typedef struct _ADVANCED_CONTEXT
133{
139
140
141/* NOTE: do NOT modify SNDVOL_REG_LINESTATE for binary compatibility with XP! */
143{
147
148
152
153PSND_MIXER SndMixerCreate(HWND hWndNotification, UINT MixerId);
156BOOL SndMixerSelect(PSND_MIXER Mixer, UINT MixerId);
158INT SndMixerSetVolumeControlDetails(PSND_MIXER Mixer, DWORD dwControlID, DWORD cChannels, DWORD cbDetails, LPVOID paDetails);
159INT SndMixerGetVolumeControlDetails(PSND_MIXER Mixer, DWORD dwControlID, DWORD cChannels, DWORD cbDetails, LPVOID paDetails);
167BOOL SndMixerQueryControls(PSND_MIXER Mixer, PUINT DisplayControls, LPMIXERLINE LineInfo, LPMIXERCONTROL *Controls);
169
170/* advanced.c */
171
175 HWND hwndDlg,
176 UINT uMsg,
178 LPARAM lParam);
179
180
181/*
182 * dialog.c
183 */
187
188/*
189 * MISC
190 */
191
192extern HKEY hAppSettingsKey;
193
194BOOL
196
197VOID
199
200BOOL
202
203BOOL
205 IN PPREFERENCES_CONTEXT PrefContext);
206
207INT
210 IN UINT uID);
211
212DWORD
214 IN UINT uID,
215 OUT LPWSTR *lpTarget,
216 ...);
217
218BOOL
220 IN LPTSTR szLineName,
221 IN LPTSTR szControlName,
222 OUT DWORD *Flags);
223
224BOOL
226 IN LPTSTR szLineName,
227 IN PSNDVOL_REG_LINESTATE LineState,
228 IN DWORD cbSize);
229
230DWORD
232
233/* tray.c */
234
238 HWND hwndDlg,
239 UINT uMsg,
241 LPARAM lParam);
242
243#endif /* __SNDVOL32_H */
DWORD Id
static BOOL CALLBACK EnumProc(_In_ HWND hWnd, _In_ LPARAM lParam)
Definition: SetParent.c:53
HWND hWnd
Definition: settings.c:17
HINSTANCE hInstance
Definition: charmap.c:19
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
WORD ATOM
Definition: dimm.idl:113
static const WCHAR szDeviceName[]
Definition: provider.c:56
#define CALLBACK
Definition: compat.h:35
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ ULONGLONG _In_ PUNICODE_STRING _In_ PUNICODE_STRING LongName
Definition: fsrtlfuncs.h:338
#define DbgPrint
Definition: hal.h:12
#define MIXER_LONG_NAME_CHARS
Definition: mmsystem.h:294
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
#define BOOL
Definition: nt_native.h:43
CHAR * PCH
Definition: ntbasedef.h:391
long LONG
Definition: pedump.c:60
struct _SND_MIXER_DESTINATION SND_MIXER_DESTINATION
INT SndMixerGetDestinationCount(PSND_MIXER Mixer)
Definition: mixer.c:520
struct _PREFERENCES_CONTEXT PREFERENCES_CONTEXT
enum _WINDOW_MODE WINDOW_MODE
struct _SND_MIXER SND_MIXER
struct _SND_MIXER_CONNECTION SND_MIXER_CONNECTION
BOOL SndMixerEnumLines(PSND_MIXER Mixer, PFNSNDMIXENUMLINES EnumProc, PVOID Context)
Definition: mixer.c:526
BOOL SndMixerSelect(PSND_MIXER Mixer, UINT MixerId)
Definition: mixer.c:304
VOID SndMixerDestroy(PSND_MIXER Mixer)
Definition: mixer.c:91
LPMIXERLINE SndMixerGetLineByName(PSND_MIXER Mixer, DWORD LineID, LPWSTR LineName)
Definition: mixer.c:615
BOOL SndMixerQueryControls(PSND_MIXER Mixer, PUINT DisplayControls, LPMIXERLINE LineInfo, LPMIXERCONTROL *Controls)
Definition: mixer.c:112
VOID UpdateDialogLineSliderControl(PPREFERENCES_CONTEXT PrefContext, LPMIXERLINE Line, DWORD DialogID, DWORD Position)
Definition: dialog.c:815
VOID UpdateDialogLineSwitchControl(PPREFERENCES_CONTEXT PrefContext, LPMIXERLINE Line, LONG fValue)
Definition: dialog.c:769
struct _SND_MIXER_DESTINATION * PSND_MIXER_DESTINATION
PSND_MIXER SndMixerCreate(HWND hWndNotification, UINT MixerId)
Definition: mixer.c:69
HWND hMainWnd
Definition: magnifier.c:32
BOOL(CALLBACK * PFNSNDMIXENUMPRODUCTS)(PSND_MIXER Mixer, UINT Id, LPCTSTR ProductName, PVOID Context)
Definition: sndvol32.h:151
BOOL InitAppConfig(VOID)
Definition: misc.c:138
BOOL(CALLBACK * PFNSNDMIXENUMLINES)(PSND_MIXER Mixer, LPMIXERLINE Line, UINT DisplayControls, PVOID Context)
Definition: sndvol32.h:149
VOID CloseAppConfig(VOID)
Definition: misc.c:152
INT AllocAndLoadString(OUT LPWSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:50
DWORD GetStyleValue(VOID)
Definition: misc.c:388
VOID LoadDialogCtrls(PPREFERENCES_CONTEXT PrefContext)
Definition: dialog.c:676
struct _SET_VOLUME_CONTEXT * PSET_VOLUME_CONTEXT
struct _ADVANCED_CONTEXT * PADVANCED_CONTEXT
UINT SndMixerGetSelection(PSND_MIXER Mixer)
Definition: mixer.c:361
ATOM MainWindowClass
Definition: sndvol32.c:31
BOOL(CALLBACK * PFNSNDMIXENUMCONNECTIONS)(PSND_MIXER Mixer, DWORD LineID, LPMIXERLINE Line, PVOID Context)
Definition: sndvol32.h:150
HANDLE hAppHeap
Definition: mmc.c:24
enum _WINDOW_MODE * PWINDOW_MODE
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPWSTR *lpTarget,...)
Definition: misc.c:76
HINSTANCE hAppInstance
Definition: mmc.c:23
BOOL SndMixerIsDisplayControl(PSND_MIXER Mixer, LPMIXERCONTROL Control)
Definition: mixer.c:598
BOOL SaveXYCoordWnd(IN HWND hWnd, IN PPREFERENCES_CONTEXT PrefContext)
Definition: misc.c:218
VOID SndMixerClose(PSND_MIXER Mixer)
Definition: mixer.c:101
INT_PTR CALLBACK AdvancedDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advanced.c:225
struct _SND_MIXER_CONNECTION * PSND_MIXER_CONNECTION
INT SndMixerGetProductName(PSND_MIXER Mixer, LPTSTR lpBuffer, UINT uSize)
Definition: mixer.c:367
struct _MIXER_WINDOW MIXER_WINDOW
INT SndMixerGetLineName(PSND_MIXER Mixer, DWORD LineID, LPTSTR lpBuffer, UINT uSize, BOOL LongName)
Definition: mixer.c:390
struct _MIXER_WINDOW * PMIXER_WINDOW
struct _SET_VOLUME_CONTEXT SET_VOLUME_CONTEXT
BOOL SndMixerEnumProducts(PSND_MIXER Mixer, PFNSNDMIXENUMPRODUCTS EnumProc, PVOID Context)
Definition: mixer.c:431
struct _SNDVOL_REG_LINESTATE * PSNDVOL_REG_LINESTATE
struct _PREFERENCES_CONTEXT * PPREFERENCES_CONTEXT
BOOL WriteLineConfig(IN LPTSTR szDeviceName, IN LPTSTR szLineName, IN PSNDVOL_REG_LINESTATE LineState, IN DWORD cbSize)
Definition: misc.c:272
_WINDOW_MODE
Definition: sndvol32.h:37
@ SMALL_MODE
Definition: sndvol32.h:39
@ NORMAL_MODE
Definition: sndvol32.h:38
@ TRAY_MODE
Definition: sndvol32.h:40
INT SndMixerGetVolumeControlDetails(PSND_MIXER Mixer, DWORD dwControlID, DWORD cChannels, DWORD cbDetails, LPVOID paDetails)
Definition: mixer.c:498
BOOL SndMixerEnumConnections(PSND_MIXER Mixer, DWORD LineID, PFNSNDMIXENUMCONNECTIONS EnumProc, PVOID Context)
Definition: mixer.c:552
BOOL LoadXYCoordWnd(IN PPREFERENCES_CONTEXT PrefContext)
Definition: misc.c:162
INT SndMixerSetVolumeControlDetails(PSND_MIXER Mixer, DWORD dwControlID, DWORD cChannels, DWORD cbDetails, LPVOID paDetails)
Definition: mixer.c:474
struct _ADVANCED_CONTEXT ADVANCED_CONTEXT
struct _SND_MIXER * PSND_MIXER
INT_PTR CALLBACK TrayDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: tray.c:262
BOOL ReadLineConfig(IN LPTSTR szDeviceName, IN LPTSTR szLineName, IN LPTSTR szControlName, OUT DWORD *Flags)
Definition: misc.c:307
HKEY hAppSettingsKey
Definition: misc.c:135
struct _SNDVOL_REG_LINESTATE SNDVOL_REG_LINESTATE
Definition: ncftp.h:79
PMIXER_WINDOW MixerWindow
Definition: sndvol32.h:135
PSND_MIXER Mixer
Definition: sndvol32.h:136
WCHAR LineName[MIXER_LONG_NAME_CHARS]
Definition: sndvol32.h:134
LPMIXERLINE Line
Definition: sndvol32.h:137
HFONT hFont
Definition: sndvol32.h:58
BOOL bShowExtendedControls
Definition: sndvol32.h:56
WINDOW_MODE Mode
Definition: sndvol32.h:53
struct _SND_MIXER * Mixer
Definition: sndvol32.h:47
UINT MixerId
Definition: sndvol32.h:54
UINT DialogCount
Definition: sndvol32.h:51
HWND hStatusBar
Definition: sndvol32.h:46
HWND * Window
Definition: sndvol32.h:50
BOOL bHasExtendedControls
Definition: sndvol32.h:55
SIZE baseUnit
Definition: sndvol32.h:59
UINT WindowCount
Definition: sndvol32.h:49
UINT SelectedLine
Definition: sndvol32.h:48
PSND_MIXER Mixer
Definition: sndvol32.h:111
PMIXER_WINDOW MixerWindow
Definition: sndvol32.h:110
WCHAR LineName[MIXER_LONG_NAME_CHARS]
Definition: sndvol32.h:126
WCHAR LineName[MIXER_LONG_NAME_CHARS]
Definition: sndvol32.h:145
struct _SND_MIXER_CONNECTION * Next
Definition: sndvol32.h:82
LPMIXERCONTROL Controls
Definition: sndvol32.h:84
LPMIXERCONTROL Controls
Definition: sndvol32.h:93
struct _SND_MIXER_DESTINATION * Next
Definition: sndvol32.h:91
PSND_MIXER_CONNECTION Connections
Definition: sndvol32.h:95
UINT MixerId
Definition: sndvol32.h:102
UINT MixersCount
Definition: sndvol32.h:100
HMIXER hmx
Definition: sndvol32.h:103
HWND hWndNotification
Definition: sndvol32.h:101
MIXERCAPS Caps
Definition: sndvol32.h:104
PSND_MIXER_DESTINATION Lines
Definition: sndvol32.h:105
static COORD Position
Definition: mouse.c:34
int32_t INT_PTR
Definition: typedefs.h:64
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_In_ WDF_WMI_PROVIDER_CONTROL Control
Definition: wdfwmi.h:166
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
char TCHAR
Definition: xmlstorage.h:189
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
CHAR * LPTSTR
Definition: xmlstorage.h:192