mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-23 05:16:30 +01:00
32dc22c2bf
This commit is a preparation for the configuration file parser. The `int attr_*` variables have been moved into a separate struct. Members of that struct are alphabetically ordered, so an attribute can later be accessed by its name. Added `int get_color_pair(short fg, short bg)` for returning or creating a color pair number. Added call to `use_default_colors()` for enabling access to the terminal's default color (-1). Signed-off-by: Benjamin Abendroth <braph93@gmx.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
41 lines
698 B
C
41 lines
698 B
C
#ifndef COLORS_H_INCLUDED
|
|
#define COLORS_H_INCLUDED
|
|
|
|
#define TRICOLOR_VOLUME_BAR
|
|
|
|
struct attributes {
|
|
// Alphabetically sorted
|
|
#ifdef TRICOLOR_VOLUME_BAR
|
|
int ctl_bar_hi;
|
|
#endif
|
|
int ctl_bar_lo;
|
|
#ifdef TRICOLOR_VOLUME_BAR
|
|
int ctl_bar_mi;
|
|
#endif
|
|
int ctl_capture;
|
|
int ctl_frame;
|
|
int ctl_inactive;
|
|
int ctl_label;
|
|
int ctl_label_focus;
|
|
int ctl_label_inactive;
|
|
int ctl_mark_focus;
|
|
int ctl_mute;
|
|
int ctl_nocapture;
|
|
int ctl_nomute;
|
|
int errormsg;
|
|
int infomsg;
|
|
int menu;
|
|
int menu_selected;
|
|
int mixer_active;
|
|
int mixer_frame;
|
|
int mixer_text;
|
|
int textbox;
|
|
int textfield;
|
|
};
|
|
|
|
extern struct attributes attrs;
|
|
|
|
void init_colors(int use_color);
|
|
int get_color_pair(short fg, short bg);
|
|
|
|
#endif
|