Mercurial > pidgin
view console/libgnt/gntcolors.c @ 13895:8f910263b4bb
[gaim-migrate @ 16380]
Merge SVN revision #16379 from v2_0_0 to trunk
Original commit message (by LSchiere):
iwkse in #gaim brought it to my attention that the example code in the C Plugin
Howto won't compile. It won't compile because GAIM_WEBSITE is defined in internal.h, which we don't want plugin authors including, and which isn't included in
the sample code.
I decided it would be a good thing if the example code compiled, so I changed it.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 30 Jun 2006 16:23:56 +0000 |
parents | 5c750626eaa5 |
children | a621329e8c85 |
line wrap: on
line source
#include <ncursesw/ncurses.h> #include "gntcolors.h" void gnt_init_colors() { if (can_change_color()) { /* XXX: Do some init_color()s */ init_color(GNT_COLOR_BLACK, 0, 0, 0); init_color(GNT_COLOR_RED, 1000, 0, 0); init_color(GNT_COLOR_GREEN, 0, 1000, 0); init_color(GNT_COLOR_BLUE, 0, 0, 1000); init_color(GNT_COLOR_WHITE, 1000, 1000, 1000); init_color(GNT_COLOR_GRAY, 799, 799, 799); init_color(GNT_COLOR_DARK_GRAY, 256, 256, 256); /* Now some init_pair()s */ init_pair(GNT_COLOR_NORMAL, GNT_COLOR_BLACK, GNT_COLOR_WHITE); init_pair(GNT_COLOR_HIGHLIGHT, GNT_COLOR_BLUE, GNT_COLOR_GRAY); init_pair(GNT_COLOR_SHADOW, GNT_COLOR_BLACK, GNT_COLOR_DARK_GRAY); init_pair(GNT_COLOR_TITLE, GNT_COLOR_WHITE, GNT_COLOR_DARK_GRAY); init_pair(GNT_COLOR_TEXT_NORMAL, GNT_COLOR_BLACK, GNT_COLOR_GRAY); init_pair(GNT_COLOR_HIGHLIGHT_D, GNT_COLOR_BLACK, GNT_COLOR_GRAY); } else { init_pair(GNT_COLOR_NORMAL, COLOR_BLACK, COLOR_WHITE); init_pair(GNT_COLOR_HIGHLIGHT, COLOR_YELLOW, COLOR_BLACK); init_pair(GNT_COLOR_SHADOW, COLOR_BLACK, COLOR_BLACK); init_pair(GNT_COLOR_TITLE, COLOR_WHITE, COLOR_BLACK); init_pair(GNT_COLOR_TEXT_NORMAL, COLOR_BLACK, COLOR_WHITE); init_pair(GNT_COLOR_HIGHLIGHT_D, COLOR_CYAN, COLOR_BLACK); } }