Replace colors definition by enum
and reduce the scope by moving it to the c file.
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
diff --git a/display.c b/display.c
index aee5503..2d63908 100644
--- a/display.c
+++ b/display.c
@@ -20,6 +20,16 @@
#define print(w, x, y, fmt, args...) do { mvwprintw(w, y, x, fmt, ##args); } while (0)
#define NUM_FOOTER_ITEMS 5
+enum { PT_COLOR_DEFAULT = 1,
+ PT_COLOR_HEADER_BAR,
+ PT_COLOR_ERROR,
+ PT_COLOR_RED,
+ PT_COLOR_YELLOW,
+ PT_COLOR_GREEN,
+ PT_COLOR_BRIGHT,
+ PT_COLOR_BLUE,
+};
+
static WINDOW *header_win;
static WINDOW *regulator_win;
static WINDOW *clock_win;
diff --git a/display.h b/display.h
index 044af6c..047d674 100644
--- a/display.h
+++ b/display.h
@@ -13,13 +13,4 @@
* - initial API and implementation
*******************************************************************************/
-#define PT_COLOR_DEFAULT 1
-#define PT_COLOR_HEADER_BAR 2
-#define PT_COLOR_ERROR 3
-#define PT_COLOR_RED 4
-#define PT_COLOR_YELLOW 5
-#define PT_COLOR_GREEN 6
-#define PT_COLOR_BRIGHT 7
-#define PT_COLOR_BLUE 8
-
extern int display_init(void);