]> git.alsa-project.org Git - alsa-utils.git/commit
alsamixer: added mouse support
authorbraph <braph93@gmx.de>
Thu, 26 Sep 2019 23:25:56 +0000 (01:25 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 1 Jul 2020 14:10:35 +0000 (16:10 +0200)
commitba1c5357a1b796b2844d44002ee1d6ab78cd06e1
tree595edee9ae08cbbc8fbf43807fcf6c2e1b263599
parent6e9e84ba609c8e86a15c0eb17aa89df11de14cdf
alsamixer: added mouse support

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>
12 files changed:
alsamixer/Makefile.am
alsamixer/bindings.h
alsamixer/card_select.c
alsamixer/mainloop.c
alsamixer/menu_widget.c [new file with mode: 0644]
alsamixer/menu_widget.h [new file with mode: 0644]
alsamixer/mixer_clickable.c [new file with mode: 0644]
alsamixer/mixer_clickable.h [new file with mode: 0644]
alsamixer/mixer_display.c
alsamixer/mixer_widget.c
alsamixer/mixer_widget.h
alsamixer/proc_files.c