Doxify para_gui.
[paraslash.git] / gui.h
1 /*
2  * Copyright (C) 2007-2014 Andre Noll <maan@systemlinux.org>
3  *
4  * Licensed under the GPL v2. For licencing details see COPYING.
5  */
6
7 /** \file gui.h symbols used by gui and gui_theme */
8
9 /** How to display one status item. */
10 struct stat_item_data {
11         const char *prefix; /**< Text to print before the item content. */
12         const char *postfix; /**< Text to print after item content. */
13         unsigned x; /**< Horizontal start coordinate for this item. */
14         unsigned y; /**< Vertical start coordinate for this item. */
15         unsigned len; /**< Item width, including \a prefix and \a postfix. */
16         int fg; /**< Foreground color. */
17         int bg; /**< Background color. */
18         int align; /**< How to align this item. */
19 };
20
21 /** Theme definition. */
22 struct gui_theme {
23         /** Printed at startup. */
24         const char *name;
25         /** Also printed at startup. */
26         const char *author;
27         /** Foreground color of the status bar. */
28         int sb_fg;
29         /** Background color of the status bar. */
30         int sb_bg;
31         /** Foreground for the name and args of the executing process. */
32         int cmd_fg;
33         /** Background for the name and args of the executing process. */
34         int cmd_bg;
35         /** Foreground color for stdout of the executing process. */
36         int output_fg;
37         /** Background color for stdout of the executing process. */
38         int output_bg;
39         /** Foreground color for log messages of moderate severity. */
40         int msg_fg;
41         /** Background color for log messages of moderate severity. */
42         int msg_bg;
43         /** Foreground color for severe log messages. */
44         int err_msg_fg;
45         /** Background color for severe log messages. */
46         int err_msg_bg;
47         /** Foreground color for the separator line. */
48         int sep_fg;
49         /** Background color for the separator line. */
50         int sep_bg;
51         /** The character for the separator line. */
52         char sep_char;
53         /** Default foreground color, see assume_default_colors(3). */
54         int default_fg;
55         /** Default background color. */
56         int default_bg;
57         /** Default number of lines of the top window. */
58         int top_lines_default;
59         /** Minimal admissible number of lines to display the top window. */
60         int top_lines_min;
61         /** Minimal admissible number of lines to display this theme. */
62         int lines_min;
63         /** Minimal admissible number of columns to display this theme. */
64         int cols_min;
65         /** Individual status item properties. */
66         struct stat_item_data data[NUM_STAT_ITEMS];
67 };
68
69 void theme_init(const char *name, struct gui_theme *t);
70 void theme_prev(struct gui_theme *t);
71 void theme_next(struct gui_theme *t);
72
73 /** Status item text should be left-aligned. */
74 #define LEFT 1
75 /** Status item text should be right-aligned. */
76 #define RIGHT 2
77 /** Status item text should be displayed centered. */
78 #define CENTER 3