diff options
Diffstat (limited to 'src/gui/gui-color.h')
-rw-r--r-- | src/gui/gui-color.h | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/src/gui/gui-color.h b/src/gui/gui-color.h index de102b3e5..87a12f97c 100644 --- a/src/gui/gui-color.h +++ b/src/gui/gui-color.h @@ -69,52 +69,36 @@ enum t_gui_color_enum /* WeeChat internal color attributes (should never be in protocol messages) */ #define GUI_COLOR_COLOR_CHAR '\x19' -#define GUI_COLOR_COLOR_STR "\x19" #define GUI_COLOR_SET_WEECHAT_CHAR '\x1A' -#define GUI_COLOR_SET_WEECHAT_STR "\x1A" #define GUI_COLOR_REMOVE_WEECHAT_CHAR '\x1B' -#define GUI_COLOR_REMOVE_WEECHAT_STR "\x1B" #define GUI_COLOR_RESET_CHAR '\x1C' -#define GUI_COLOR_RESET_STR "\x1C" #define GUI_COLOR_ATTR_BOLD_CHAR '\x01' -#define GUI_COLOR_ATTR_BOLD_STR "\x01" #define GUI_COLOR_ATTR_REVERSE_CHAR '\x02' -#define GUI_COLOR_ATTR_REVERSE_STR "\x02" #define GUI_COLOR_ATTR_ITALIC_CHAR '\x03' -#define GUI_COLOR_ATTR_ITALIC_STR "\x03" #define GUI_COLOR_ATTR_UNDERLINE_CHAR '\x04' -#define GUI_COLOR_ATTR_UNDERLINE_STR "\x04" #define GUI_COLOR(color) ((gui_color[color]) ? gui_color[color]->string : "") -#define GUI_NO_COLOR GUI_COLOR_RESET_STR +#define GUI_NO_COLOR "\x1C" #define GUI_COLOR_CUSTOM_BAR_FG (gui_color_get_custom ("bar_fg")) #define GUI_COLOR_CUSTOM_BAR_DELIM (gui_color_get_custom ("bar_delim")) #define GUI_COLOR_CUSTOM_BAR_BG (gui_color_get_custom ("bar_bg")) +/* color codes for chat and bars */ #define GUI_COLOR_FG_CHAR 'F' -#define GUI_COLOR_FG_STR "F" #define GUI_COLOR_BG_CHAR 'B' -#define GUI_COLOR_BG_STR "B" #define GUI_COLOR_FG_BG_CHAR '*' -#define GUI_COLOR_FG_BG_STR "*" #define GUI_COLOR_PAIR_CHAR '@' -#define GUI_COLOR_PAIR_STR "@" + +/* color codes specific to bars */ #define GUI_COLOR_BAR_CHAR 'b' -#define GUI_COLOR_BAR_STR "b" #define GUI_COLOR_BAR_FG_CHAR 'F' -#define GUI_COLOR_BAR_FG_STR "F" #define GUI_COLOR_BAR_DELIM_CHAR 'D' -#define GUI_COLOR_BAR_DELIM_STR "D" #define GUI_COLOR_BAR_BG_CHAR 'B' -#define GUI_COLOR_BAR_BG_STR "B" #define GUI_COLOR_BAR_START_INPUT_CHAR '_' -#define GUI_COLOR_BAR_START_INPUT_STR "_" #define GUI_COLOR_BAR_START_INPUT_HIDDEN_CHAR '-' -#define GUI_COLOR_BAR_START_INPUT_HIDDEN_STR "-" #define GUI_COLOR_BAR_MOVE_CURSOR_CHAR '#' -#define GUI_COLOR_BAR_MOVE_CURSOR_STR "#" #define GUI_COLOR_PAIR_FLAG 0x10000 #define GUI_COLOR_PAIR_MASK 0xFFFF @@ -134,8 +118,6 @@ struct t_gui_color struct t_gui_color_palette { char *alias; /* alias name for this color pair */ - int foreground; /* foreground color */ - int background; /* background color */ int r, g, b; /* red/green/blue values for color */ }; @@ -167,7 +149,7 @@ extern int gui_color_assign (int *color, char const *color_name); extern int gui_color_assign_by_diff (int *color, const char *color_name, int diff); extern int gui_color_get_weechat_colors_number (); -extern int gui_color_get_last_pair (); +extern int gui_color_get_term_colors (); extern const char *gui_color_get_name (int num_color); extern void gui_color_init_pair (int number); extern void gui_color_init_pairs (); @@ -175,11 +157,13 @@ extern void gui_color_init_weechat (); extern void gui_color_display_terminal_colors (); extern void gui_color_buffer_display (); extern void gui_color_switch_colors (); +extern void gui_color_reset_pairs (); extern void gui_color_buffer_assign (); extern void gui_color_buffer_open (); extern void gui_color_palette_build_aliases (); extern struct t_gui_color_palette *gui_color_palette_new (int number, const char *value); extern void gui_color_palette_free (struct t_gui_color_palette *color_palette); +extern void gui_color_dump (); #endif /* __WEECHAT_GUI_COLOR_H */ |