X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gui.h;h=d868581847d19072377bb777520c59ccf7725173;hp=eabfd3c7ed2d7de6ed801510af93384fc654032b;hb=23ef2355fbdebce56083ec7a0ebb65a05c42e5dc;hpb=ccd288cee4d15e54640d87c1451b46c3ff0e2591 diff --git a/gui.h b/gui.h index eabfd3c7..d8685818 100644 --- a/gui.h +++ b/gui.h @@ -1,11 +1,16 @@ -/* - * Copyright (C) 2007-2014 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2007 Andre Noll , 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);