Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 1 | /******************************************************************************* |
Amit Kucheria | c0e17fc | 2011-01-17 09:35:52 +0200 | [diff] [blame] | 2 | * Copyright (C) 2010, Linaro Limited. |
Amit Arora | 39f2954 | 2010-09-14 12:03:22 +0530 | [diff] [blame] | 3 | * |
| 4 | * This file is part of PowerDebug. |
| 5 | * |
| 6 | * All rights reserved. This program and the accompanying materials |
| 7 | * are made available under the terms of the Eclipse Public License v1.0 |
| 8 | * which accompanies this distribution, and is available at |
| 9 | * http://www.eclipse.org/legal/epl-v10.html |
| 10 | * |
| 11 | * Contributors: |
| 12 | * Amit Arora <amit.arora@linaro.org> (IBM Corporation) |
| 13 | * - initial API and implementation |
| 14 | *******************************************************************************/ |
| 15 | |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 16 | #include "powerdebug.h" |
Amit Arora | 1755278 | 2010-12-02 12:23:14 +0530 | [diff] [blame] | 17 | #include "regulator.h" |
Amit Arora | ed3e565 | 2010-10-27 12:02:53 +0530 | [diff] [blame] | 18 | #include "display.h" |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 19 | |
| 20 | #define print(w, x, y, fmt, args...) do { mvwprintw(w, y, x, fmt, ##args); } while (0) |
| 21 | #define NUM_FOOTER_ITEMS 5 |
| 22 | |
| 23 | static WINDOW *header_win; |
| 24 | static WINDOW *regulator_win; |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 25 | static WINDOW *clock_win; |
| 26 | static WINDOW *sensor_win; |
Amit Arora | c93e071 | 2010-10-07 13:51:53 +0530 | [diff] [blame] | 27 | static WINDOW *selected_win; |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 28 | static WINDOW *footer_win; |
| 29 | |
| 30 | int maxx, maxy; |
| 31 | char footer_items[NUM_FOOTER_ITEMS][64]; |
| 32 | |
Daniel Lezcano | d5a2c6d | 2011-03-23 14:37:38 +0100 | [diff] [blame] | 33 | static char *win_names[TOTAL_FEATURE_WINS] = { |
| 34 | "Clocks", |
| 35 | "Regulators", |
| 36 | "Sensors" |
| 37 | }; |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 38 | |
Amit Arora | c93e071 | 2010-10-07 13:51:53 +0530 | [diff] [blame] | 39 | /* "all" : Kill header and footer windows too ? */ |
| 40 | void killall_windows(int all) |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 41 | { |
Amit Arora | c93e071 | 2010-10-07 13:51:53 +0530 | [diff] [blame] | 42 | if (all && header_win) { |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 43 | delwin(header_win); |
| 44 | header_win = NULL; |
| 45 | } |
| 46 | if (regulator_win) { |
| 47 | delwin(regulator_win); |
| 48 | regulator_win = NULL; |
| 49 | } |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 50 | if (clock_win) { |
| 51 | delwin(clock_win); |
| 52 | clock_win = NULL; |
| 53 | } |
| 54 | if (sensor_win) { |
| 55 | delwin(sensor_win); |
| 56 | sensor_win = NULL; |
| 57 | } |
Amit Arora | c93e071 | 2010-10-07 13:51:53 +0530 | [diff] [blame] | 58 | if (all && footer_win) { |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 59 | delwin(footer_win); |
| 60 | footer_win = NULL; |
| 61 | } |
| 62 | } |
| 63 | |
Daniel Lezcano | 3abd8b1 | 2011-03-26 22:06:15 +0100 | [diff] [blame] | 64 | static void display_fini(void) |
| 65 | { |
| 66 | endwin(); |
| 67 | } |
| 68 | |
Daniel Lezcano | ca17a72 | 2011-03-26 22:06:16 +0100 | [diff] [blame^] | 69 | int display_init(void) |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 70 | { |
Daniel Lezcano | ca17a72 | 2011-03-26 22:06:16 +0100 | [diff] [blame^] | 71 | if (!initscr()) |
| 72 | return -1; |
| 73 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 74 | start_color(); |
Daniel Lezcano | ca17a72 | 2011-03-26 22:06:16 +0100 | [diff] [blame^] | 75 | use_default_colors(); |
| 76 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 77 | keypad(stdscr, TRUE); |
| 78 | noecho(); |
| 79 | cbreak(); |
| 80 | curs_set(0); |
| 81 | nonl(); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 82 | |
Daniel Lezcano | ca17a72 | 2011-03-26 22:06:16 +0100 | [diff] [blame^] | 83 | if (init_pair(PT_COLOR_DEFAULT, COLOR_WHITE, COLOR_BLACK) || |
| 84 | init_pair(PT_COLOR_ERROR, COLOR_BLACK, COLOR_RED) || |
| 85 | init_pair(PT_COLOR_HEADER_BAR, COLOR_WHITE, COLOR_BLACK) || |
| 86 | init_pair(PT_COLOR_YELLOW, COLOR_WHITE, COLOR_YELLOW) || |
| 87 | init_pair(PT_COLOR_GREEN, COLOR_WHITE, COLOR_GREEN) || |
| 88 | init_pair(PT_COLOR_BRIGHT, COLOR_WHITE, COLOR_BLACK) || |
| 89 | init_pair(PT_COLOR_BLUE, COLOR_WHITE, COLOR_BLUE) || |
| 90 | init_pair(PT_COLOR_RED, COLOR_WHITE, COLOR_RED)) |
| 91 | return -1; |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 92 | |
Daniel Lezcano | ca17a72 | 2011-03-26 22:06:16 +0100 | [diff] [blame^] | 93 | return atexit(display_fini); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 94 | } |
| 95 | |
Daniel Lezcano | 558a6d5 | 2011-03-23 14:37:41 +0100 | [diff] [blame] | 96 | void create_windows(int selectedwindow) |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 97 | { |
| 98 | |
| 99 | getmaxyx(stdscr, maxy, maxx); |
Amit Arora | c93e071 | 2010-10-07 13:51:53 +0530 | [diff] [blame] | 100 | killall_windows(1); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 101 | |
| 102 | header_win = subwin(stdscr, 1, maxx, 0, 0); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 103 | footer_win = subwin(stdscr, 1, maxx, maxy-1, 0); |
| 104 | |
| 105 | strcpy(footer_items[0], " Q (Quit) "); |
| 106 | strcpy(footer_items[1], " R (Refresh) "); |
| 107 | |
Amit Arora | 83ae6cb | 2010-12-02 12:22:19 +0530 | [diff] [blame] | 108 | if (selectedwindow == CLOCK) |
| 109 | strcpy(footer_items[2], " Other Keys: 'Left', 'Right', 'Up', 'Down', 'enter', " |
Amit Kucheria | a0adae4 | 2011-01-12 10:54:23 -0600 | [diff] [blame] | 110 | " '/', 'Esc' "); |
Amit Arora | 83ae6cb | 2010-12-02 12:22:19 +0530 | [diff] [blame] | 111 | else |
| 112 | strcpy(footer_items[2], " Other Keys: 'Left', 'Right' "); |
| 113 | |
| 114 | strcpy(footer_items[3], ""); |
| 115 | |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 116 | werase(stdscr); |
| 117 | refresh(); |
| 118 | |
| 119 | } |
| 120 | |
Daniel Lezcano | 558a6d5 | 2011-03-23 14:37:41 +0100 | [diff] [blame] | 121 | void create_selectedwindow(int selectedwindow) |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 122 | { |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 123 | WINDOW *win; |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 124 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 125 | killall_windows(0); |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 126 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 127 | getmaxyx(stdscr, maxy, maxx); |
Amit Arora | 24ed7d1 | 2010-09-14 12:12:58 +0530 | [diff] [blame] | 128 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 129 | win = subwin(stdscr, maxy - 2, maxx, 1, 0); |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 130 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 131 | switch (selectedwindow) { |
| 132 | case REGULATOR: regulator_win = win; |
Amit Kucheria | a0adae4 | 2011-01-12 10:54:23 -0600 | [diff] [blame] | 133 | break; |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 134 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 135 | case CLOCK: clock_win = win; |
Amit Kucheria | a0adae4 | 2011-01-12 10:54:23 -0600 | [diff] [blame] | 136 | break; |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 137 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 138 | case SENSOR: sensor_win = win; |
Amit Kucheria | a0adae4 | 2011-01-12 10:54:23 -0600 | [diff] [blame] | 139 | break; |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 140 | } |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 141 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 142 | selected_win = win; |
| 143 | |
| 144 | refresh(); |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 145 | } |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 146 | |
Daniel Lezcano | 558a6d5 | 2011-03-23 14:37:41 +0100 | [diff] [blame] | 147 | void show_header(int selectedwindow) |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 148 | { |
| 149 | int i, j = 0; |
Amit Kucheria | 0a4d019 | 2011-01-12 04:54:37 +0530 | [diff] [blame] | 150 | int curr_pointer = 0; |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 151 | |
| 152 | wattrset(header_win, COLOR_PAIR(PT_COLOR_HEADER_BAR)); |
| 153 | wbkgd(header_win, COLOR_PAIR(PT_COLOR_HEADER_BAR)); |
| 154 | werase(header_win); |
| 155 | |
Amit Kucheria | 0a4d019 | 2011-01-12 04:54:37 +0530 | [diff] [blame] | 156 | print(header_win, curr_pointer, 0, "PowerDebug %s", VERSION); |
| 157 | curr_pointer += 20; |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 158 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 159 | for (i = 0; i < TOTAL_FEATURE_WINS; i++) { |
| 160 | if (selectedwindow == i) |
| 161 | wattron(header_win, A_REVERSE); |
| 162 | else |
| 163 | wattroff(header_win, A_REVERSE); |
Amit Arora | c93e071 | 2010-10-07 13:51:53 +0530 | [diff] [blame] | 164 | |
Amit Kucheria | 0a4d019 | 2011-01-12 04:54:37 +0530 | [diff] [blame] | 165 | print(header_win, curr_pointer, 0, " %s ", win_names[i]); |
| 166 | curr_pointer += strlen(win_names[i]) + 2; |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 167 | } |
| 168 | wrefresh(header_win); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 169 | werase(footer_win); |
| 170 | |
Amit Kucheria | a0adae4 | 2011-01-12 10:54:23 -0600 | [diff] [blame] | 171 | for (i = 0; i < NUM_FOOTER_ITEMS; i++) { |
| 172 | if (strlen(footer_items[i]) == 0) |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 173 | continue; |
| 174 | wattron(footer_win, A_REVERSE); |
| 175 | print(footer_win, j, 0, "%s", footer_items[i]); |
| 176 | wattroff(footer_win, A_REVERSE); |
| 177 | j+= strlen(footer_items[i])+1; |
| 178 | } |
| 179 | wrefresh(footer_win); |
| 180 | } |
| 181 | |
| 182 | |
Daniel Lezcano | 833b63a | 2011-03-26 22:06:00 +0100 | [diff] [blame] | 183 | void show_regulator_info(struct regulator_info *reg_info, int nr_reg, int verbose) |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 184 | { |
Amit Arora | c93e071 | 2010-10-07 13:51:53 +0530 | [diff] [blame] | 185 | int i, count = 1; |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 186 | |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 187 | (void)verbose; |
Amit Arora | bf50db9 | 2010-10-07 14:09:05 +0530 | [diff] [blame] | 188 | |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 189 | werase(regulator_win); |
| 190 | wattron(regulator_win, A_BOLD); |
Amit Arora | c93e071 | 2010-10-07 13:51:53 +0530 | [diff] [blame] | 191 | print(regulator_win, 0, 0, "Name"); |
| 192 | print(regulator_win, 12, 0, "Status"); |
| 193 | print(regulator_win, 24, 0, "State"); |
| 194 | print(regulator_win, 36, 0, "Type"); |
| 195 | print(regulator_win, 48, 0, "Users"); |
| 196 | print(regulator_win, 60, 0, "Microvolts"); |
| 197 | print(regulator_win, 72, 0, "Min u-volts"); |
| 198 | print(regulator_win, 84, 0, "Max u-volts"); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 199 | wattroff(regulator_win, A_BOLD); |
| 200 | |
Daniel Lezcano | 833b63a | 2011-03-26 22:06:00 +0100 | [diff] [blame] | 201 | for (i = 0; i < nr_reg; i++) { |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 202 | int col = 0; |
| 203 | |
Amit Kucheria | a0adae4 | 2011-01-12 10:54:23 -0600 | [diff] [blame] | 204 | if ((i + 2) > (maxy-2)) |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 205 | break; |
| 206 | |
Daniel Lezcano | 3bd64f0 | 2011-03-26 22:05:56 +0100 | [diff] [blame] | 207 | if (reg_info[i].num_users > 0) |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 208 | wattron(regulator_win, WA_BOLD); |
| 209 | else |
| 210 | wattroff(regulator_win, WA_BOLD); |
| 211 | |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 212 | print(regulator_win, col, count, "%s", |
Daniel Lezcano | 3bd64f0 | 2011-03-26 22:05:56 +0100 | [diff] [blame] | 213 | reg_info[i].name); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 214 | col += 12; |
| 215 | print(regulator_win, col, count, "%s", |
Daniel Lezcano | 3bd64f0 | 2011-03-26 22:05:56 +0100 | [diff] [blame] | 216 | reg_info[i].status); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 217 | col += 12; |
| 218 | print(regulator_win, col, count, "%s", |
Daniel Lezcano | 3bd64f0 | 2011-03-26 22:05:56 +0100 | [diff] [blame] | 219 | reg_info[i].state); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 220 | col += 12; |
| 221 | print(regulator_win, col, count, "%s", |
Daniel Lezcano | 3bd64f0 | 2011-03-26 22:05:56 +0100 | [diff] [blame] | 222 | reg_info[i].type); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 223 | col += 12; |
| 224 | print(regulator_win, col, count, "%d", |
Daniel Lezcano | 3bd64f0 | 2011-03-26 22:05:56 +0100 | [diff] [blame] | 225 | reg_info[i].num_users); |
Amit Arora | 6a943ec | 2010-10-07 11:49:25 +0530 | [diff] [blame] | 226 | col += 12; |
| 227 | print(regulator_win, col, count, "%d", |
Daniel Lezcano | 3bd64f0 | 2011-03-26 22:05:56 +0100 | [diff] [blame] | 228 | reg_info[i].microvolts); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 229 | col += 12; |
| 230 | print(regulator_win, col, count, "%d", |
Daniel Lezcano | 3bd64f0 | 2011-03-26 22:05:56 +0100 | [diff] [blame] | 231 | reg_info[i].min_microvolts); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 232 | col += 12; |
| 233 | print(regulator_win, col, count, "%d", |
Daniel Lezcano | 3bd64f0 | 2011-03-26 22:05:56 +0100 | [diff] [blame] | 234 | reg_info[i].max_microvolts); |
Amit Arora | 47fd918 | 2010-08-24 13:26:06 +0530 | [diff] [blame] | 235 | |
| 236 | count++; |
| 237 | } |
| 238 | wrefresh(regulator_win); |
| 239 | } |
| 240 | |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 241 | |
Amit Arora | ac4e865 | 2010-11-09 11:16:53 +0530 | [diff] [blame] | 242 | void print_clock_header(void) |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 243 | { |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 244 | werase(clock_win); |
| 245 | wattron(clock_win, A_BOLD); |
Amit Arora | ac4e865 | 2010-11-09 11:16:53 +0530 | [diff] [blame] | 246 | print(clock_win, 0, 0, "Name"); |
Amit Arora | 031263a | 2010-11-09 11:12:41 +0530 | [diff] [blame] | 247 | print(clock_win, 54, 0, "Flags"); |
| 248 | print(clock_win, 64, 0, "Rate"); |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 249 | print(clock_win, 72, 0, "Usecount"); |
Amit Arora | 04f9774 | 2010-11-16 11:28:57 +0530 | [diff] [blame] | 250 | print(clock_win, 84, 0, "Children"); |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 251 | wattroff(clock_win, A_BOLD); |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 252 | wrefresh(clock_win); |
| 253 | } |
| 254 | |
| 255 | void print_sensor_header(void) |
| 256 | { |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 257 | werase(sensor_win); |
| 258 | wattron(sensor_win, A_BOLD); |
| 259 | print(sensor_win, 0, 0, "Name"); |
| 260 | print(sensor_win, 36, 0, "Temperature"); |
| 261 | wattroff(sensor_win, A_BOLD); |
| 262 | wattron(sensor_win, A_BLINK); |
| 263 | print(sensor_win, 0, 1, "Currently Sensor information available" |
Amit Kucheria | a0adae4 | 2011-01-12 10:54:23 -0600 | [diff] [blame] | 264 | " only in Dump mode!"); |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 265 | wattroff(sensor_win, A_BLINK); |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 266 | wrefresh(sensor_win); |
| 267 | } |
| 268 | |
Amit Arora | ac4e865 | 2010-11-09 11:16:53 +0530 | [diff] [blame] | 269 | void print_one_clock(int line, char *str, int bold, int highlight) |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 270 | { |
Amit Arora | 031263a | 2010-11-09 11:12:41 +0530 | [diff] [blame] | 271 | if (bold) |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 272 | wattron(clock_win, WA_BOLD); |
Amit Arora | ac4e865 | 2010-11-09 11:16:53 +0530 | [diff] [blame] | 273 | if (highlight) |
| 274 | wattron(clock_win, WA_STANDOUT); |
| 275 | |
Amit Arora | 031263a | 2010-11-09 11:12:41 +0530 | [diff] [blame] | 276 | print(clock_win, 0, line + 1, "%s", str); |
| 277 | if (bold) |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 278 | wattroff(clock_win, WA_BOLD); |
Amit Arora | ac4e865 | 2010-11-09 11:16:53 +0530 | [diff] [blame] | 279 | if (highlight) |
| 280 | wattroff(clock_win, WA_STANDOUT); |
Amit Arora | 6e774cd | 2010-10-28 11:31:24 +0530 | [diff] [blame] | 281 | wrefresh(clock_win); |
Amit Arora | 728e0c9 | 2010-09-14 12:06:09 +0530 | [diff] [blame] | 282 | } |