2 * $Id: background.c,v 1.1 2003/12/07 00:06:33 tom Exp $
8 main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
19 pair_content(0, &f, &b);
20 printw("pair 0 contains (%d,%d)\n", f, b);
23 printw("Initializing pair 1 to red/black\n");
24 init_pair(1, COLOR_RED, COLOR_BLACK);
25 bkgdset(' ' | COLOR_PAIR(1));
26 printw("RED/BLACK\n");
29 printw("Initializing pair 2 to white/blue\n");
30 init_pair(2, COLOR_WHITE, COLOR_BLUE);
31 bkgdset(' ' | COLOR_PAIR(2));
32 printw("WHITE/BLUE\n");
35 printw("Resetting colors to pair 0\n");
36 bkgdset(' ' | COLOR_PAIR(0));
37 printw("Default Colors\n");
40 printw("Resetting colors to pair 1\n");
41 bkgdset(' ' | COLOR_PAIR(1));
42 printw("RED/BLACK\n");
45 printw("Setting screen to pair 0\n");
46 bkgd(' ' | COLOR_PAIR(0));
49 printw("Setting screen to pair 1\n");
50 bkgd(' ' | COLOR_PAIR(1));
53 printw("Setting screen to pair 2\n");
54 bkgd(' ' | COLOR_PAIR(2));
57 printw("Setting screen to pair 0\n");
58 bkgd(' ' | COLOR_PAIR(0));
62 printw("This demo requires a color terminal");
67 ExitProgram(EXIT_SUCCESS);