56937b9d7bacbb7a91e7fc8a3922ef15d627389b
[reactos.git] / reactos / subsys / system / sndvol32 / sndvol32.h
1 #ifndef __SNDVOL32_H
2 #define __SNDVOL32_H
3
4 #include <windows.h>
5 #include <mmsystem.h>
6 #include <commctrl.h>
7 #include <stdio.h>
8 #include <tchar.h>
9 #include <string.h>
10 #include "resources.h"
11
12 typedef struct _MIXER_WINDOW
13 {
14 HWND hWnd;
15 HWND hStatusBar;
16 struct _SND_MIXER *Mixer;
17 UINT SelectedLine;
18 } MIXER_WINDOW, *PMIXER_WINDOW;
19
20 LRESULT CALLBACK MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
21
22 BOOL RebuildMixerWindowControls(PMIXER_WINDOW MixerWindow);
23
24 extern HINSTANCE hAppInstance;
25 extern ATOM MainWindowClass;
26 extern HWND hMainWnd;
27 extern HANDLE hAppHeap;
28
29 #define SZ_APP_CLASS TEXT("Volume Control")
30
31 #define DBG DbgPrint("SNDVOL32: %s:%i: ", __FILE__, __LINE__); DbgPrint
32
33
34 /*
35 * MIXER
36 */
37
38 typedef struct _SND_MIXER_CONNECTION
39 {
40 struct _SND_MIXER_CONNECTION *Next;
41 MIXERLINE Info;
42 LPMIXERCONTROL Controls;
43 } SND_MIXER_CONNECTION, *PSND_MIXER_CONNECTION;
44
45
46 typedef struct _SND_MIXER_DESTINATION
47 {
48 struct _SND_MIXER_DESTINATION *Next;
49 MIXERLINE Info;
50 LPMIXERCONTROL Controls;
51 PSND_MIXER_CONNECTION Connections;
52 } SND_MIXER_DESTINATION, *PSND_MIXER_DESTINATION;
53
54 typedef struct _SND_MIXER
55 {
56 UINT MixersCount;
57 HWND hWndNotification;
58 UINT MixerId;
59 HMIXER hmx;
60 MIXERCAPS Caps;
61 PSND_MIXER_DESTINATION Lines;
62 } SND_MIXER, *PSND_MIXER;
63
64 typedef BOOL (CALLBACK *PFNSNDMIXENUMLINES)(PSND_MIXER Mixer, LPMIXERLINE Line, PVOID Context);
65 typedef BOOL (CALLBACK *PFNSNDMIXENUMPRODUCTS)(PSND_MIXER Mixer, UINT Id, LPCTSTR ProductName, PVOID Context);
66
67 PSND_MIXER SndMixerCreate(HWND hWndNotification);
68 VOID SndMixerDestroy(PSND_MIXER Mixer);
69 VOID SndMixerClose(PSND_MIXER Mixer);
70 BOOL SndMixerSelect(PSND_MIXER Mixer, UINT MixerId);
71 UINT SndMixerGetSelection(PSND_MIXER Mixer);
72 INT SndMixerGetProductName(PSND_MIXER Mixer, LPTSTR lpBuffer, UINT uSize);
73 BOOL SndMixerEnumProducts(PSND_MIXER Mixer, PFNSNDMIXENUMPRODUCTS EnumProc, PVOID Context);
74 INT SndMixerGetDestinationCount(PSND_MIXER Mixer);
75 BOOL SndMixerEnumDestinationLines(PSND_MIXER Mixer, PFNSNDMIXENUMLINES EnumProc, PVOID Context);
76
77 #endif /* __SNDVOL32_H */