]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - gui.h
afs: Document ->lpr of struct afs_callback_arg.
[paraslash.git] / gui.h
diff --git a/gui.h b/gui.h
index eabfd3c7ed2d7de6ed801510af93384fc654032b..d868581847d19072377bb777520c59ccf7725173 100644 (file)
--- a/gui.h
+++ b/gui.h
@@ -1,11 +1,16 @@
-/*
- * Copyright (C) 2007-2014 Andre Noll <maan@systemlinux.org>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2007 Andre Noll <maan@tuebingen.mpg.de>, see file 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. */
@@ -13,8 +18,7 @@ struct stat_item_data {
        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. */
 };
 
@@ -24,36 +28,10 @@ struct gui_theme {
        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. */
@@ -64,6 +42,18 @@ struct gui_theme {
        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);