diff options
Diffstat (limited to 'apps/gui/line.h')
-rw-r--r-- | apps/gui/line.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/apps/gui/line.h b/apps/gui/line.h index d5350eb410..fa1522003c 100644 --- a/apps/gui/line.h +++ b/apps/gui/line.h | |||
@@ -29,6 +29,28 @@ | |||
29 | #include "lcd.h" | 29 | #include "lcd.h" |
30 | #include "screens.h" | 30 | #include "screens.h" |
31 | 31 | ||
32 | /* Possible line decoration styles. Specify one of | ||
33 | * STYLE_NONE, _DEFAULT, _INVERT, _COLORBAR or _GRADIENT, and optionally | ||
34 | * or with STYLE_COLORED specifying line_desc.text_color */ | ||
35 | enum line_styles { | ||
36 | /* Just print the text. Do not clear or draw line decorations */ | ||
37 | STYLE_NONE = 0x00, | ||
38 | /* Line background filled with the bg color (or backdrop if present) */ | ||
39 | STYLE_DEFAULT = 0x01, | ||
40 | /* Like STYLE_DFEAULT except that text and background color will be swapped */ | ||
41 | STYLE_INVERT = 0x02, | ||
42 | /* Line background filled with line color line_desc.line_color */ | ||
43 | STYLE_COLORBAR = 0x04, | ||
44 | /* Line background filled with gradient, colors taken from | ||
45 | * line_desc.line_color and line_desc.line_end_color */ | ||
46 | STYLE_GRADIENT = 0x08, | ||
47 | /* Modifier for the text color, which will be taken from line_desc.text_color */ | ||
48 | STYLE_COLORED = 0x10, | ||
49 | /* These are used internally */ | ||
50 | _STYLE_DECO_MASK = 0x0f, | ||
51 | _STYLE_MODE_MASK = 0x7F, | ||
52 | }; | ||
53 | |||
32 | struct line_desc { | 54 | struct line_desc { |
33 | /* height of the line (in pixels). -1 to inherit the height | 55 | /* height of the line (in pixels). -1 to inherit the height |
34 | * from the font. The text will be centered if the height is larger, | 56 | * from the font. The text will be centered if the height is larger, |
@@ -49,7 +71,7 @@ struct line_desc { | |||
49 | * lcd format (convert with LCD_RGBPACK() if necessary) */ | 71 | * lcd format (convert with LCD_RGBPACK() if necessary) */ |
50 | fb_data line_color, line_end_color; | 72 | fb_data line_color, line_end_color; |
51 | /* line decorations, see STYLE_DEFAULT etc. */ | 73 | /* line decorations, see STYLE_DEFAULT etc. */ |
52 | int style; | 74 | enum line_styles style; |
53 | /* whether the line can scroll */ | 75 | /* whether the line can scroll */ |
54 | bool scroll; | 76 | bool scroll; |
55 | }; | 77 | }; |