1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 20:36:38 +02:00

Rename some variables and functions about weechat colors

This commit is contained in:
Sebastien Helleu
2011-01-19 19:29:48 +01:00
parent ce41363121
commit 68ee325e65
3 changed files with 14 additions and 13 deletions
+5 -5
View File
@@ -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;
+8 -7
View File
@@ -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);
}
/*
+1 -1
View File
@@ -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 ();