diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-01-19 19:29:48 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-01-19 19:29:48 +0100 |
commit | 68ee325e65615fa781ae8a25df8075201a961162 (patch) | |
tree | 57831a342e436b1514bd0129d74c48fe505eeebc /src | |
parent | ce4136312155a870febced831c02b10785bfb75d (diff) | |
download | weechat-68ee325e65615fa781ae8a25df8075201a961162.zip |
Rename some variables and functions about weechat colors
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/curses/gui-curses-color.c | 10 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 15 | ||||
-rw-r--r-- | src/gui/curses/gui-curses.h | 2 |
3 files changed, 14 insertions, 13 deletions
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index 22e265d9e..c3ee4d467 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -275,19 +275,19 @@ gui_color_build (int number, int foreground, int background) } /* - * gui_color_get_pair: get color pair with a WeeChat color number + * gui_color_weechat_get_pair: get color pair with a WeeChat color number */ int -gui_color_get_pair (int num_color) +gui_color_weechat_get_pair (int weechat_color) { int fg, bg; - if ((num_color < 0) || (num_color > GUI_COLOR_NUM_COLORS - 1)) + if ((weechat_color < 0) || (weechat_color > GUI_COLOR_NUM_COLORS - 1)) return COLOR_WHITE; - fg = gui_color[num_color]->foreground; - bg = gui_color[num_color]->background; + fg = gui_color[weechat_color]->foreground; + bg = gui_color[weechat_color]->background; if ((fg > 0) && (fg & GUI_COLOR_PAIR_FLAG)) return fg & GUI_COLOR_PAIR_MASK; diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index fb834e102..2741a436c 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -186,16 +186,16 @@ gui_window_wprintw (WINDOW *window, const char *data, ...) } /* - * gui_window_curses_clear_weechat: clear a Curses window with a weechat color + * gui_window_clear_weechat: clear a Curses window with a weechat color */ void -gui_window_clear_weechat (WINDOW *window, int num_color) +gui_window_clear_weechat (WINDOW *window, int weechat_color) { if (!gui_ok) return; - wbkgdset (window, ' ' | COLOR_PAIR (gui_color_get_pair (num_color))); + wbkgdset (window, ' ' | COLOR_PAIR (gui_color_weechat_get_pair (weechat_color))); werase (window); wmove (window, 0, 0); } @@ -224,11 +224,12 @@ gui_window_clear (WINDOW *window, int bg) } /* - * gui_window_reset_style: reset style (color and attr) for a window + * gui_window_reset_style: reset style (color and attr) with a weechat color + * for a window */ void -gui_window_reset_style (WINDOW *window, int num_color) +gui_window_reset_style (WINDOW *window, int weechat_color) { window_current_style_fg = -1; window_current_style_bg = -1; @@ -236,8 +237,8 @@ gui_window_reset_style (WINDOW *window, int num_color) window_current_color_attr = 0; wattroff (window, A_BOLD | A_UNDERLINE | A_REVERSE); - wattron (window, COLOR_PAIR(gui_color_get_pair (num_color)) | - gui_color[num_color]->attributes); + wattron (window, COLOR_PAIR(gui_color_weechat_get_pair (weechat_color)) | + gui_color[weechat_color]->attributes); } /* diff --git a/src/gui/curses/gui-curses.h b/src/gui/curses/gui-curses.h index d1cd7f297..8e33663b8 100644 --- a/src/gui/curses/gui-curses.h +++ b/src/gui/curses/gui-curses.h @@ -61,7 +61,7 @@ extern int gui_color_last_pair; extern int gui_color_num_bg; /* color functions */ -extern int gui_color_get_pair (int num_color); +extern int gui_color_weechat_get_pair (int weechat_color); extern void gui_color_pre_init (); extern void gui_color_init (); extern void gui_color_end (); |