mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 13:56:31 +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>
21 lines
506 B
C
21 lines
506 B
C
#ifndef MIXER_CLICKABLE_H
|
|
#define MIXER_CLICKABLE_H
|
|
|
|
#include CURSESINC
|
|
#include "bindings.h"
|
|
|
|
struct clickable_rect {
|
|
short y1;
|
|
short x1;
|
|
short y2;
|
|
short x2;
|
|
command_enum command;
|
|
int arg1;
|
|
};
|
|
|
|
void clickable_set(int y1, int x1, int y2, int x2, command_enum command, int arg1);
|
|
void clickable_set_relative(WINDOW *win, int y1, int x1, int y2, int x2, command_enum command, int arg1);
|
|
void clickable_clear(int y1, int x1, int y2, int x2);
|
|
struct clickable_rect* clickable_find(int y, int x);
|
|
|
|
#endif
|