partly implemented the mixer selection dialog
[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 <shellapi.h>
8 #include <stdio.h>
9 #include <tchar.h>
10 #include <string.h>
11 #include "resources.h"
12
13 typedef struct _MIXER_WINDOW
14 {
15 HWND hWnd;
16 HWND hStatusBar;
17 struct _SND_MIXER *Mixer;
18 UINT SelectedLine;
19 } MIXER_WINDOW, *PMIXER_WINDOW;
20
21 LRESULT CALLBACK MainWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
22
23 BOOL RebuildMixerWindowControls(PMIXER_WINDOW MixerWindow);
24
25 extern HINSTANCE hAppInstance;
26 extern ATOM MainWindowClass;
27 extern HWND hMainWnd;
28 extern HANDLE hAppHeap;
29
30 #define SZ_APP_CLASS TEXT("Volume Control")
31
32 ULONG DbgPrint(PCH , ...);
33 #define DPRINT DbgPrint("SNDVOL32: %s:%i: ", __FILE__, __LINE__); DbgPrint
34
35
36 /*
37 * MIXER
38 */
39
40 typedef struct _SND_MIXER_CONNECTION
41 {
42 struct _SND_MIXER_CONNECTION *Next;
43 MIXERLINE Info;
44 LPMIXERCONTROL Controls;
45 } SND_MIXER_CONNECTION, *PSND_MIXER_CONNECTION;
46
47
48 typedef struct _SND_MIXER_DESTINATION
49 {
50 struct _SND_MIXER_DESTINATION *Next;
51 MIXERLINE Info;
52 LPMIXERCONTROL Controls;
53 PSND_MIXER_CONNECTION Connections;
54 } SND_MIXER_DESTINATION, *PSND_MIXER_DESTINATION;
55
56 typedef struct _SND_MIXER
57 {
58 UINT MixersCount;
59 HWND hWndNotification;
60 UINT MixerId;
61 HMIXER hmx;
62 MIXERCAPS Caps;
63 PSND_MIXER_DESTINATION Lines;
64 } SND_MIXER, *PSND_MIXER;
65
66 typedef BOOL (CALLBACK *PFNSNDMIXENUMLINES)(PSND_MIXER Mixer, LPMIXERLINE Line, PVOID Context);
67 typedef BOOL (CALLBACK *PFNSNDMIXENUMCONNECTIONS)(PSND_MIXER Mixer, DWORD LineID, LPMIXERLINE Line, PVOID Context);
68 typedef BOOL (CALLBACK *PFNSNDMIXENUMPRODUCTS)(PSND_MIXER Mixer, UINT Id, LPCTSTR ProductName, PVOID Context);
69
70 PSND_MIXER SndMixerCreate(HWND hWndNotification);
71 VOID SndMixerDestroy(PSND_MIXER Mixer);
72 VOID SndMixerClose(PSND_MIXER Mixer);
73 BOOL SndMixerSelect(PSND_MIXER Mixer, UINT MixerId);
74 UINT SndMixerGetSelection(PSND_MIXER Mixer);
75 INT SndMixerGetProductName(PSND_MIXER Mixer, LPTSTR lpBuffer, UINT uSize);
76 BOOL SndMixerEnumProducts(PSND_MIXER Mixer, PFNSNDMIXENUMPRODUCTS EnumProc, PVOID Context);
77 INT SndMixerGetDestinationCount(PSND_MIXER Mixer);
78 BOOL SndMixerEnumLines(PSND_MIXER Mixer, PFNSNDMIXENUMLINES EnumProc, PVOID Context);
79 BOOL SndMixerEnumConnections(PSND_MIXER Mixer, DWORD LineID, PFNSNDMIXENUMCONNECTIONS EnumProc, PVOID Context);
80
81 /*
82 * MISC
83 */
84 INT
85 AllocAndLoadString(OUT LPWSTR *lpTarget,
86 IN HINSTANCE hInst,
87 IN UINT uID);
88
89 DWORD
90 LoadAndFormatString(IN HINSTANCE hInstance,
91 IN UINT uID,
92 OUT LPWSTR *lpTarget,
93 ...);
94
95 #endif /* __SNDVOL32_H */