--- /dev/null
+/*
+ * pslash - a lightweight framebuffer splashscreen for embedded devices.
+ *
+ * Copyright (c) 2012 sleep(5) ltd
+ * Author: Tomas Frydrych <tomas@sleepfive.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef _HAVE_PSPLASH_COLORS_H
+#define _HAVE_PSPLASH_COLORS_H
+
+/* This is the overall background color */
+#define PSPLASH_BACKGROUND_COLOR 0xec,0xec,0xe1
+
+/* This is the color of any text output */
+#define PSPLASH_TEXT_COLOR 0x6d,0x6d,0x70
+
+/* This is the color of the progress bar indicator */
+#define PSPLASH_BAR_COLOR 0x6d,0x6d,0x70
+
+/* This is the color of the progress bar background */
+#define PSPLASH_BAR_BACKGROUND_COLOR 0xec,0xec,0xe1
+
+#endif
fb->height - (fb->height/6) - h,
fb->width,
h,
- 0xec, 0xec, 0xe1);
+ PSPLASH_BACKGROUND_COLOR);
psplash_fb_draw_text (fb,
(fb->width-w)/2,
fb->height - (fb->height/6) - h,
- 0x6d, 0x6d, 0x70,
+ PSPLASH_TEXT_COLOR,
&radeon_font,
msg);
}
barwidth = (CLAMP(value,0,100) * width) / 100;
psplash_fb_draw_rect (fb, x + barwidth, y,
width - barwidth, height,
- 0xec, 0xec, 0xe1);
+ PSPLASH_BAR_BACKGROUND_COLOR);
psplash_fb_draw_rect (fb, x, y, barwidth,
- height, 0x6d, 0x6d, 0x70);
+ height, PSPLASH_BAR_COLOR);
}
else
{
barwidth = (CLAMP(-value,0,100) * width) / 100;
psplash_fb_draw_rect (fb, x, y,
width - barwidth, height,
- 0xec, 0xec, 0xe1);
+ PSPLASH_BAR_BACKGROUND_COLOR);
psplash_fb_draw_rect (fb, x + width - barwidth,
y, barwidth, height,
- 0x6d, 0x6d, 0x70);
+ PSPLASH_BAR_COLOR);
}
DBG("value: %i, width: %i, barwidth :%i\n", value,
}
/* Clear the background with #ecece1 */
- psplash_fb_draw_rect (fb, 0, 0, fb->width, fb->height, 0xec, 0xec, 0xe1);
+ psplash_fb_draw_rect (fb, 0, 0, fb->width, fb->height,
+ PSPLASH_BACKGROUND_COLOR);
/* Draw the Poky logo */
psplash_fb_draw_image (fb,