mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-14 04:55:41 +01:00
ba1c5357a1
Mouse support has been added for mixer_widget.c, card_select.c and proc_files.c. In the mixer widget the mouse is handled as follows: - After an element has been printed in mixer_display.c, a call to clickable_set() will store the coordinates of the drawn area plus the command enum that should be executed on click. An optional argument holds an index which points to the selected mixer control. - on_mouse_click() searches for a matching rectangle, focuses the mixer control and returns the command enum. In the menu widgets, the menu_driver() function handles mouse input. Signed-off-by: Benjamin Abendroth <braph93@gmx.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
45 lines
947 B
C
45 lines
947 B
C
#ifndef MIXER_WIDGET_H_INCLUDED
|
|
#define MIXER_WIDGET_H_INCLUDED
|
|
|
|
#include CURSESINC
|
|
#include <alsa/asoundlib.h>
|
|
#include "widget.h"
|
|
|
|
enum view_mode {
|
|
VIEW_MODE_PLAYBACK,
|
|
VIEW_MODE_CAPTURE,
|
|
VIEW_MODE_ALL,
|
|
VIEW_MODE_COUNT,
|
|
};
|
|
|
|
enum channel_mask {
|
|
LEFT = 1,
|
|
RIGHT = 2,
|
|
};
|
|
|
|
extern snd_mixer_t *mixer;
|
|
extern char *mixer_device_name;
|
|
extern bool unplugged;
|
|
|
|
extern struct widget mixer_widget;
|
|
|
|
extern enum view_mode view_mode;
|
|
|
|
extern int focus_control_index;
|
|
extern snd_mixer_selem_id_t *current_selem_id;
|
|
extern unsigned int current_control_flags;
|
|
|
|
extern bool control_values_changed;
|
|
extern bool controls_changed;
|
|
|
|
extern unsigned int mouse_wheel_step;
|
|
extern bool mouse_wheel_focuses_control;
|
|
|
|
void create_mixer_object(struct snd_mixer_selem_regopt *selem_regopt);
|
|
void create_mixer_widget(void);
|
|
void mixer_shutdown(void);
|
|
void close_mixer_device(void);
|
|
bool select_card_by_name(const char *device_name);
|
|
void refocus_control(void);
|
|
|
|
#endif
|