FS#8961 - Anti-Aliased Fonts.
[kugel-rb.git] / apps / recorder / icons.c
blob0b48c125d1dde1f7bf120c4db6cf102600303bba
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 Robert E. Hak
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #include <string.h>
22 #include "lcd.h"
23 #include "font.h"
24 #include "kernel.h"
25 #include "sprintf.h"
26 #include "rtc.h"
27 #include "powermgmt.h"
29 #include "settings.h"
31 #include "metadata.h"
32 #include "icons.h"
34 const unsigned char bitmap_icons_5x8[][5] =
36 [Icon_Lock_Main] =
37 {0x78, 0x7f, 0x49, 0x7f, 0x78}, /* Lock Main */
38 [Icon_Lock_Remote] =
39 {0x78, 0x7f, 0x49, 0x7f, 0x78}, /* Lock Remote */
40 [Icon_Stereo] =
41 {0x7f, 0x22, 0x1c, 0x22, 0x7f}, /* Stereo recording */
42 [Icon_Mono] =
43 {0x00, 0x1c, 0x22, 0x7f, 0x00}, /* Mono recording */
44 #if CONFIG_CODEC != SWCODEC
45 [Icon_q] =
46 {0x1e, 0x21, 0x31, 0x21, 0x5e} /* Q icon */
47 #endif
50 const unsigned char bitmap_icons_7x8[][7] =
52 {0x08,0x1c,0x3e,0x3e,0x3e,0x14,0x14}, /* Power plug */
53 {0x1c,0x14,0x3e,0x2a,0x22,0x1c,0x08}, /* USB plug */
54 {0x01,0x1e,0x1c,0x3e,0x7f,0x20,0x40}, /* Speaker mute */
55 {0x00,0x7f,0x7f,0x3e,0x1c,0x08,0x00}, /* Play */
56 {0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f}, /* Stop */
57 {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00}, /* Pause */
58 {0x7f,0x3e,0x1c,0x7f,0x3e,0x1c,0x08}, /* Fast forward */
59 {0x08,0x1c,0x3e,0x7f,0x1c,0x3e,0x7f}, /* Fast backward */
60 {0x1c,0x3e,0x7f,0x7f,0x7f,0x3e,0x1c}, /* Record */
61 {0x1c,0x3e,0x7f,0x00,0x7f,0x3e,0x1c}, /* Record pause */
62 {0x40,0xa0,0xa0,0xa0,0x7f,0x02,0x02}, /* Radio on */
63 {0x42,0xa4,0xa8,0xb0,0x7f,0x22,0x42}, /* Radio mute */
64 {0x44,0x4e,0x5f,0x44,0x44,0x44,0x38}, /* Repeat playmode */
65 {0x44,0x4e,0x5f,0x44,0x38,0x02,0x7f}, /* Repeat-one playmode */
66 {0x3e,0x41,0x51,0x41,0x45,0x41,0x3e}, /* Shuffle playmode (dice) */
67 {0x04,0x0c,0x1c,0x3c,0x1c,0x0c,0x04}, /* Down-arrow */
68 {0x20,0x30,0x38,0x3c,0x38,0x30,0x20}, /* Up-arrow */
69 {0x7f,0x04,0x4e,0x5f,0x44,0x38,0x7f} /* Repeat-AB playmode */
72 #if CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING)
73 const unsigned char bitmap_glyphs_4x8[][4] =
75 /* Keep digits together and first! */
76 [0] =
77 {0x00, 0x3e, 0x22, 0x3e}, /* 0 */
78 [1] =
79 {0x00, 0x24, 0x3e, 0x20}, /* 1 */
80 [2] =
81 {0x00, 0x3a, 0x2a, 0x2e}, /* 2 */
82 [3] =
83 {0x00, 0x22, 0x2a, 0x36}, /* 3 */
84 [4] =
85 {0x00, 0x0e, 0x08, 0x3e}, /* 4 */
86 [5] =
87 {0x00, 0x2e, 0x2a, 0x3a}, /* 5 */
88 [6] =
89 {0x00, 0x3e, 0x2a, 0x3a}, /* 6 */
90 [7] =
91 {0x00, 0x02, 0x02, 0x3e}, /* 7 */
92 [8] =
93 {0x00, 0x3e, 0x2a, 0x3e}, /* 8 */
94 [9] =
95 {0x00, 0x0e, 0x0a, 0x3e}, /* 9 */
96 [10 ... Glyph_4x8Last-1] =
97 {0x00, 0x00, 0x00, 0x00}, /* auto-blank */
98 [Glyph_4x8_k] =
99 {0x00, 0x3e, 0x10, 0x28}, /* k */
102 const unsigned char bitmap_formats_18x8[Format_18x8Last][18]=
104 [0 ... Format_18x8Last-1] = /* auto-blank */
105 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* ___ */
107 [Format_18x8_AIFF] =
108 {0x00, 0x3c, 0x0a, 0x0a, 0x0a, 0x3c, 0x00, 0x3e, 0x00,
109 0x3e, 0x0a, 0x02, 0x02, 0x00, 0x3e, 0x0a, 0x02, 0x02}, /* AIFF */
110 [Format_18x8_MPA_L3] =
111 {0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x00,
112 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* M__ */
113 [Format_18x8_WAVPACK] =
114 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x20,
115 0x18, 0x20, 0x1e, 0x00, 0x0e, 0x10, 0x20, 0x10, 0x0e}, /* _WV */
116 [Format_18x8_PCM_WAV] =
117 {0x00, 0x1e, 0x20, 0x18, 0x20, 0x1e, 0x00, 0x3c, 0x0a,
118 0x0a, 0x0a, 0x3c, 0x00, 0x0e, 0x10, 0x20, 0x10, 0x0e}, /* WAV */
120 #endif /* CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) */
122 /* Disk/MMC activity */
123 const unsigned char bitmap_icon_disk[12] =
124 #ifdef HAVE_FLASH_STORAGE
125 {0x15,0x3f,0x7d,0x7B,0x77,0x67,0x79,0x7b,0x57,0x4f,0x47,0x7f};
126 #else
127 {0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00};
128 #endif
131 * Print play mode to status bar
133 void statusbar_icon_play_mode(int mode)
135 lcd_mono_bitmap(bitmap_icons_7x8[mode], ICON_PLAY_MODE_X_POS,
136 STATUSBAR_Y_POS, ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT);
140 * Print shuffle mode to status bar
142 void statusbar_icon_shuffle(void)
144 lcd_mono_bitmap(bitmap_icons_7x8[Icon_Shuffle], ICON_SHUFFLE_X_POS,
145 STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT);