1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 09:13:14 +02:00

Add 256 colors support

Changes:
- new section "palette" in weechat.conf
- new API functions: list_search_pos and list_casesearch_pos
This commit is contained in:
Sebastien Helleu
2010-12-20 10:13:37 +01:00
parent e80d6b93a5
commit cd7a02bec5
35 changed files with 1650 additions and 139 deletions
+66
View File
@@ -101,6 +101,26 @@ gui_color_assign (int *color, const char *color_name)
return 0;
}
/*
* gui_color_assign_by_diff: assign color by difference
* It is called when a color option is
* set with value ++X or --X, to search
* another color (for example ++1 is
* next color/alias in list)
* return 1 if ok, 0 if error
*/
int
gui_color_assign_by_diff (int *color, const char *color_name, int diff)
{
/* TODO: write this function for Gtk */
(void) color;
(void) color_name;
(void) diff;
return 1;
}
/*
* gui_color_get_number: get number of available colors
*/
@@ -147,6 +167,17 @@ gui_color_get_pair (int num_color)
return (bg * 8) + fg;
}
/*
* gui_color_init_pair: init a color pair
*/
void
gui_color_init_pair (int number)
{
/* This function does nothing in Gtk GUI */
(void) number;
}
/*
* gui_color_init_pairs: init color pairs
*/
@@ -227,6 +258,41 @@ gui_color_display_terminal_colors ()
/* This function does nothing in Gtk GUI */
}
/*
* gui_color_palette_build_aliases: build aliases for palette
*/
void
gui_color_palette_build_aliases ()
{
/* This function does nothing in Gtk GUI */
}
/*
* gui_color_palette_new: create a new color in palette
*/
struct t_gui_color_palette *
gui_color_palette_new (int number, const char *value)
{
/* This function does nothing in Gtk GUI */
(void) number;
(void) value;
return NULL;
}
/*
* gui_color_palette_free: free a color in palette
*/
void
gui_color_palette_free (struct t_gui_color_palette *color_palette)
{
/* This function does nothing in Gtk GUI */
(void) color_palette;
}
/*
* gui_color_end: end GUI colors
*/