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