1 /* Copyright (C) 2007 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
3 /** \file gui.h symbols used by gui and gui_theme */
6 * The foreground and background color of each status item, the decorations and
7 * all messages can be customized through an instance of this structure.
9 struct gui_color_spec {
10 int fg; /**< Foreground color. */
11 int bg; /**< Background color. */
14 /** How to display one status item. */
15 struct stat_item_data {
16 const char *prefix; /**< Text to print before the item content. */
17 const char *postfix; /**< Text to print after item content. */
18 unsigned x; /**< Horizontal start coordinate for this item. */
19 unsigned y; /**< Vertical start coordinate for this item. */
20 unsigned len; /**< Item width, including \a prefix and \a postfix. */
21 struct gui_color_spec color; /**< Foreground and background color. */
22 int align; /**< How to align this item. */
25 /** Theme definition. */
27 /** Printed at startup. */
29 /** Also printed at startup. */
31 /** The character for the separator line. */
33 /** Default color, see assume_default_colors(3). */
34 struct gui_color_spec dflt;
35 /** Default number of lines of the top window. */
36 int top_lines_default;
37 /** Minimal admissible number of lines to display the top window. */
39 /** Minimal admissible number of lines to display this theme. */
41 /** Minimal admissible number of columns to display this theme. */
43 /** Individual status item properties. */
44 struct stat_item_data data[NUM_STAT_ITEMS];
45 /** Color of the status bar. */
46 struct gui_color_spec sb;
47 /** Color of the name and args of the executing process. */
48 struct gui_color_spec cmd;
49 /** Color for stdout of the executing process. */
50 struct gui_color_spec output;
51 /** Color for log messages of moderate severity. */
52 struct gui_color_spec msg;
53 /** Color for severe log messages. */
54 struct gui_color_spec err_msg;
55 /** Color for the separator line. */
56 struct gui_color_spec sep;
59 void theme_init(const char *name, struct gui_theme *t);
60 void theme_prev(struct gui_theme *t);
61 void theme_next(struct gui_theme *t);
63 /** Status item text should be left-aligned. */
65 /** Status item text should be right-aligned. */
67 /** Status item text should be displayed centered. */