1c72fcc34Sopenharmony_ci#ifndef MIXER_WIDGET_H_INCLUDED
2c72fcc34Sopenharmony_ci#define MIXER_WIDGET_H_INCLUDED
3c72fcc34Sopenharmony_ci
4c72fcc34Sopenharmony_ci#include CURSESINC
5c72fcc34Sopenharmony_ci#include <alsa/asoundlib.h>
6c72fcc34Sopenharmony_ci#include "widget.h"
7c72fcc34Sopenharmony_ci
8c72fcc34Sopenharmony_cienum view_mode {
9c72fcc34Sopenharmony_ci	VIEW_MODE_PLAYBACK,
10c72fcc34Sopenharmony_ci	VIEW_MODE_CAPTURE,
11c72fcc34Sopenharmony_ci	VIEW_MODE_ALL,
12c72fcc34Sopenharmony_ci	VIEW_MODE_COUNT,
13c72fcc34Sopenharmony_ci};
14c72fcc34Sopenharmony_ci
15c72fcc34Sopenharmony_cienum channel_mask {
16c72fcc34Sopenharmony_ci	LEFT = 1,
17c72fcc34Sopenharmony_ci	RIGHT = 2,
18c72fcc34Sopenharmony_ci};
19c72fcc34Sopenharmony_ci
20c72fcc34Sopenharmony_ciextern snd_mixer_t *mixer;
21c72fcc34Sopenharmony_ciextern char *mixer_device_name;
22c72fcc34Sopenharmony_ciextern bool unplugged;
23c72fcc34Sopenharmony_ci
24c72fcc34Sopenharmony_ciextern struct widget mixer_widget;
25c72fcc34Sopenharmony_ci
26c72fcc34Sopenharmony_ciextern enum view_mode view_mode;
27c72fcc34Sopenharmony_ci
28c72fcc34Sopenharmony_ciextern int focus_control_index;
29c72fcc34Sopenharmony_ciextern snd_mixer_selem_id_t *current_selem_id;
30c72fcc34Sopenharmony_ciextern unsigned int current_control_flags;
31c72fcc34Sopenharmony_ci
32c72fcc34Sopenharmony_ciextern bool control_values_changed;
33c72fcc34Sopenharmony_ciextern bool controls_changed;
34c72fcc34Sopenharmony_ci
35c72fcc34Sopenharmony_ciextern unsigned int mouse_wheel_step;
36c72fcc34Sopenharmony_ciextern bool mouse_wheel_focuses_control;
37c72fcc34Sopenharmony_ci
38c72fcc34Sopenharmony_civoid create_mixer_object(struct snd_mixer_selem_regopt *selem_regopt);
39c72fcc34Sopenharmony_civoid create_mixer_widget(void);
40c72fcc34Sopenharmony_civoid mixer_shutdown(void);
41c72fcc34Sopenharmony_civoid close_mixer_device(void);
42c72fcc34Sopenharmony_cibool select_card_by_name(const char *device_name);
43c72fcc34Sopenharmony_civoid refocus_control(void);
44c72fcc34Sopenharmony_ci
45c72fcc34Sopenharmony_ci#endif
46