/*
- * Copyright (C) 2007-2014 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2007 Andre Noll <maan@tuebingen.mpg.de>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file gui.h symbols used by gui and gui_theme */
+/**
+ * The foreground and background color of each status item, the decorations and
+ * all messages can be customized through an instance of this structure.
+ */
+struct gui_color_spec {
+ int fg; /**< Foreground color. */
+ int bg; /**< Background color. */
+};
+
/** How to display one status item. */
struct stat_item_data {
const char *prefix; /**< Text to print before the item content. */
unsigned x; /**< Horizontal start coordinate for this item. */
unsigned y; /**< Vertical start coordinate for this item. */
unsigned len; /**< Item width, including \a prefix and \a postfix. */
- int fg; /**< Foreground color. */
- int bg; /**< Background color. */
+ struct gui_color_spec color; /**< Foreground and background color. */
int align; /**< How to align this item. */
};
const char *name;
/** Also printed at startup. */
const char *author;
- /** Foreground color of the status bar. */
- int sb_fg;
- /** Background color of the status bar. */
- int sb_bg;
- /** Foreground for the name and args of the executing process. */
- int cmd_fg;
- /** Background for the name and args of the executing process. */
- int cmd_bg;
- /** Foreground color for stdout of the executing process. */
- int output_fg;
- /** Background color for stdout of the executing process. */
- int output_bg;
- /** Foreground color for log messages of moderate severity. */
- int msg_fg;
- /** Background color for log messages of moderate severity. */
- int msg_bg;
- /** Foreground color for severe log messages. */
- int err_msg_fg;
- /** Background color for severe log messages. */
- int err_msg_bg;
- /** Foreground color for the separator line. */
- int sep_fg;
- /** Background color for the separator line. */
- int sep_bg;
/** The character for the separator line. */
char sep_char;
- /** Default foreground color, see assume_default_colors(3). */
- int default_fg;
- /** Default background color. */
- int default_bg;
+ /** Default color, see assume_default_colors(3). */
+ struct gui_color_spec dflt;
/** Default number of lines of the top window. */
int top_lines_default;
/** Minimal admissible number of lines to display the top window. */
int cols_min;
/** Individual status item properties. */
struct stat_item_data data[NUM_STAT_ITEMS];
+ /** Color of the status bar. */
+ struct gui_color_spec sb;
+ /** Color of the name and args of the executing process. */
+ struct gui_color_spec cmd;
+ /** Color for stdout of the executing process. */
+ struct gui_color_spec output;
+ /** Color for log messages of moderate severity. */
+ struct gui_color_spec msg;
+ /** Color for severe log messages. */
+ struct gui_color_spec err_msg;
+ /** Color for the separator line. */
+ struct gui_color_spec sep;
};
void theme_init(const char *name, struct gui_theme *t);