2b96adee8d5ffb435b88ec6e0f99949aefb00a33
[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 ULONG DbgPrint(PCH , ...);
32 #define DPRINT DbgPrint("SNDVOL32: %s:%i: ", __FILE__, __LINE__); DbgPrint
33
34
35 /*
36 * MIXER
37 */
38
39 typedef struct _SND_MIXER_CONNECTION
40 {
41 struct _SND_MIXER_CONNECTION *Next;
42 MIXERLINE Info;
43 LPMIXERCONTROL Controls;
44 } SND_MIXER_CONNECTION, *PSND_MIXER_CONNECTION;
45
46
47 typedef struct _SND_MIXER_DESTINATION
48 {
49 struct _SND_MIXER_DESTINATION *Next;
50 MIXERLINE Info;
51 LPMIXERCONTROL Controls;
52 PSND_MIXER_CONNECTION Connections;
53 } SND_MIXER_DESTINATION, *PSND_MIXER_DESTINATION;
54
55 typedef struct _SND_MIXER
56 {
57 UINT MixersCount;
58 HWND hWndNotification;
59 UINT MixerId;
60 HMIXER hmx;
61 MIXERCAPS Caps;
62 PSND_MIXER_DESTINATION Lines;
63 } SND_MIXER, *PSND_MIXER;
64
65 typedef BOOL (CALLBACK *PFNSNDMIXENUMLINES)(PSND_MIXER Mixer, LPMIXERLINE Line, PVOID Context);
66 typedef BOOL (CALLBACK *PFNSNDMIXENUMPRODUCTS)(PSND_MIXER Mixer, UINT Id, LPCTSTR ProductName, PVOID Context);
67
68 PSND_MIXER SndMixerCreate(HWND hWndNotification);
69 VOID SndMixerDestroy(PSND_MIXER Mixer);
70 VOID SndMixerClose(PSND_MIXER Mixer);
71 BOOL SndMixerSelect(PSND_MIXER Mixer, UINT MixerId);
72 UINT SndMixerGetSelection(PSND_MIXER Mixer);
73 INT SndMixerGetProductName(PSND_MIXER Mixer, LPTSTR lpBuffer, UINT uSize);
74 BOOL SndMixerEnumProducts(PSND_MIXER Mixer, PFNSNDMIXENUMPRODUCTS EnumProc, PVOID Context);
75 INT SndMixerGetDestinationCount(PSND_MIXER Mixer);
76 BOOL SndMixerEnumDestinationLines(PSND_MIXER Mixer, PFNSNDMIXENUMLINES EnumProc, PVOID Context);
77
78 /*
79 * MISC
80 */
81 INT
82 AllocAndLoadString(OUT LPWSTR *lpTarget,
83 IN HINSTANCE hInst,
84 IN UINT uID);
85
86 DWORD
87 LoadAndFormatString(IN HINSTANCE hInstance,
88 IN UINT uID,
89 OUT LPWSTR *lpTarget,
90 ...);
91
92 #endif /* __SNDVOL32_H */