Merge pull request #5 from tauonteilchen/master
[hackover2013-badge-firmware.git] / drivers / displays / tft / theme.h
1 /**************************************************************************/
2 /*!
3 @file theme.h
4 @author K. Townsend (microBuilder.eu)
5
6 @brief Common UI definitions for the color scheme, fonts, etc.
7
8 @section LICENSE
9
10 Software License Agreement (BSD License)
11
12 Copyright (c) 2012, K. Townsend
13 All rights reserved.
14
15 Redistribution and use in source and binary forms, with or without
16 modification, are permitted provided that the following conditions are met:
17 1. Redistributions of source code must retain the above copyright
18 notice, this list of conditions and the following disclaimer.
19 2. Redistributions in binary form must reproduce the above copyright
20 notice, this list of conditions and the following disclaimer in the
21 documentation and/or other materials provided with the distribution.
22 3. Neither the name of the copyright holders nor the
23 names of its contributors may be used to endorse or promote products
24 derived from this software without specific prior written permission.
25
26 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
27 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
30 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
31 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
33 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37 /**************************************************************************/
38 #ifndef __THEME_H__
39 #define __THEME_H__
40
41 #include "projectconfig.h"
42
43 #include "colors.h"
44
45 #if CFG_TFTLCD_USEAAFONTS
46 #include "drivers/displays/tft/aafonts/aa2/DejaVuSansCondensedBold14_AA2.h"
47 #else
48 #include "drivers/displays/tft/fonts/dejavusans9.h"
49 #endif
50
51 // Generic Color Palettes (provided as a starting point for custom themes)
52 #define THEME_COLOR_LIMEGREEN_BASE (uint16_t)(0xD7F0) // 211 255 130
53 #define THEME_COLOR_LIMEGREEN_DARKER (uint16_t)(0x8DE8) // 137 188 69
54 #define THEME_COLOR_LIMEGREEN_LIGHTER (uint16_t)(0xEFF9) // 238 255 207
55 #define THEME_COLOR_LIMEGREEN_SHADOW (uint16_t)(0x73EC) // 119 127 103
56 #define THEME_COLOR_LIMEGREEN_ACCENT (uint16_t)(0xAE6D) // 169 204 104
57
58 #define THEME_COLOR_VIOLET_BASE (uint16_t)(0x8AEF) // 143 94 124
59 #define THEME_COLOR_VIOLET_DARKER (uint16_t)(0x4187) // 66 49 59
60 #define THEME_COLOR_VIOLET_LIGHTER (uint16_t)(0xC475) // 194 142 174
61 #define THEME_COLOR_VIOLET_SHADOW (uint16_t)(0x40E6) // 66 29 52
62 #define THEME_COLOR_VIOLET_ACCENT (uint16_t)(0xC992) // 204 50 144
63
64 #define THEME_COLOR_EARTHY_BASE (uint16_t)(0x6269) // 97 79 73
65 #define THEME_COLOR_EARTHY_DARKER (uint16_t)(0x3103) // 48 35 31
66 #define THEME_COLOR_EARTHY_LIGHTER (uint16_t)(0x8C30) // 140 135 129
67 #define THEME_COLOR_EARTHY_SHADOW (uint16_t)(0xAB29) // 173 102 79
68 #define THEME_COLOR_EARTHY_ACCENT (uint16_t)(0xFE77) // 250 204 188
69
70 #define THEME_COLOR_SKYBLUE_BASE (uint16_t)(0x95BF) // 150 180 255
71 #define THEME_COLOR_SKYBLUE_DARKER (uint16_t)(0x73B0) // 113 118 131
72 #define THEME_COLOR_SKYBLUE_LIGHTER (uint16_t)(0xE75F) // 227 235 255
73 #define THEME_COLOR_SKYBLUE_SHADOW (uint16_t)(0x4ACF) // 75 90 127
74 #define THEME_COLOR_SKYBLUE_ACCENT (uint16_t)(0xB5F9) // 182 188 204
75
76 // Themes can be used to centrally change the color scheme for your app
77 // All controls use the colors defined in the supplied theme_t by default
78 typedef struct theme_s
79 {
80 uint16_t colorBackground; // Fill color for the entire LCD
81 uint16_t colorBorder; // Border color for frames, buttons, windows, etc.
82 uint16_t colorBorderDarker; // Slightly darker border color for frames when needed
83 uint16_t colorText; // Default text color (may be overridden in certain functions)
84 uint16_t colorTextAlt; // Alternate text color (may be overridden in certain functions)
85 uint16_t colorFill; // Fill color for window and control backgrounds
86 uint16_t colorFillAlt; // Slightly lighter or darker fill for window and control backgrounds
87 } theme_t;
88
89 // Default font
90 #if CFG_TFTLCD_USEAAFONTS
91 #define THEME_FONT DejaVuSansCondensedBold14_AA2
92 #else
93 #define THEME_FONT dejaVuSans9ptFontInfo
94 #endif
95
96 theme_t themeGetDefault(void);
97
98 #endif
This page took 0.050511 seconds and 5 git commands to generate.